From c41af36fc19e4cb86924e7d6f556a4bdd9e2d9a5 Mon Sep 17 00:00:00 2001 From: KviringAleksei Date: Tue, 23 Jan 2024 14:04:45 +0500 Subject: [PATCH] Configure Items --- client/Net/Embedded/Src/Src.csproj | 3 +- .../Editor/games.cheetah.client.editor.asmdef | 4 +- .../Packages/games.cheetah.client/Tests.meta | 2 +- .../Tests/Server/Helpers/AbstractTest.cs | 3 +- .../Tests/games.cheetah.client.tests.asmdef | 4 +- .../games.cheetah.client/package.json | 1 - .../Runtime/API/EmbeddedServer.cs | 9 +- .../games.cheetah.embedded-server.asmdef | 2 +- .../Tests/Tests.cs | 2 +- ...ches.realtime.embedded-server.tests.asmdef | 2 +- .../package.json | 2 +- .../games.cheetah.grpc.internal.asmdef | 17 - .../games.cheetah.grpc.internal.asmdef.meta | 3 - .../games.cheetah.grpc.internal/package.json | 16 - .../games.cheetah.grpc.shared/.npmignore | 2 - .../games.cheetah.grpc.shared/Runtime.meta | 8 - .../games.cheetah.grpc.shared/Runtime/.empty | 0 .../games.cheetah.grpc.shared.asmdef.meta | 3 - .../.gitignore | 0 .../.npmignore | 0 .../Runtime.meta | 0 .../Runtime/.empty | 0 .../Runtime/Service.cs | 4483 +++++++++++++++++ .../Runtime/Service.cs.meta | 11 + .../Runtime/ServiceGrpc.cs | 704 +++ .../Runtime/ServiceGrpc.cs.meta | 11 + .../games.cheetah.realtime.grpc.asmdef} | 4 +- .../games.cheetah.realtime.grpc.asmdef.meta} | 4 +- .../package.json | 8 +- .../package.json.meta | 0 .../Runtime/API/UDSPlugin.cs | 17 +- .../Runtime/games.cheetah.uds.asmdef | 2 +- .../Packages/games.cheetah.uds/Test.meta | 9 +- .../Packages/games.cheetah.uds/Test/Test.cs | 6 +- .../Test/games.cheetah.uds.test.asmdef | 2 +- .../Packages/games.cheetah.uds/package.json | 2 +- client/Unity/Packages/packages-lock.json | 18 +- .../Unity/ProjectSettings/ProjectVersion.txt | 4 +- proto/{internal.proto => service.proto} | 41 +- proto/shared.proto | 23 - rust/Client/tests/helpers/helper.rs | 4 +- rust/Client/tests/helpers/server.rs | 4 +- rust/Common/src/tracer/mod.rs | 2 +- rust/Server/build.rs | 2 +- rust/Server/src/lib.rs | 8 +- rust/Server/src/server/debug/mod.rs | 10 +- rust/Server/src/server/manager/grpc/from.rs | 44 +- rust/Server/src/server/manager/grpc/mod.rs | 55 +- rust/Server/src/server/manager/grpc/proto.rs | 38 +- rust/Server/src/server/manager/mod.rs | 20 +- rust/Server/src/server/mod.rs | 4 +- rust/Server/src/server/network.rs | 10 +- rust/Server/src/server/room/command/create.rs | 14 +- rust/Server/src/server/room/command/delete.rs | 23 +- rust/Server/src/server/room/command/double.rs | 4 +- rust/Server/src/server/room/command/event.rs | 17 +- rust/Server/src/server/room/command/field.rs | 4 +- rust/Server/src/server/room/command/items.rs | 72 +- rust/Server/src/server/room/command/long.rs | 11 +- rust/Server/src/server/room/command/mod.rs | 21 +- rust/Server/src/server/room/command/room.rs | 19 +- .../src/server/room/command/structure.rs | 11 +- .../{template/config.rs => config/member.rs} | 62 +- rust/Server/src/server/room/config/mod.rs | 3 + .../{template/mod.rs => config/object.rs} | 92 +- rust/Server/src/server/room/config/room.rs | 14 + rust/Server/src/server/room/member.rs | 4 +- rust/Server/src/server/room/mod.rs | 150 +- rust/Server/src/server/room/object/mod.rs | 14 +- rust/Server/src/server/room/sender.rs | 41 +- rust/Server/src/server/room_registry.rs | 13 +- scripts/generate-all.sh | 7 +- 72 files changed, 5739 insertions(+), 490 deletions(-) delete mode 100644 client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef delete mode 100644 client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef.meta delete mode 100644 client/Unity/Packages/games.cheetah.grpc.internal/package.json delete mode 100644 client/Unity/Packages/games.cheetah.grpc.shared/.npmignore delete mode 100644 client/Unity/Packages/games.cheetah.grpc.shared/Runtime.meta delete mode 100644 client/Unity/Packages/games.cheetah.grpc.shared/Runtime/.empty delete mode 100644 client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef.meta rename client/Unity/Packages/{games.cheetah.grpc.internal => games.cheetah.realtime.grpc}/.gitignore (100%) rename client/Unity/Packages/{games.cheetah.grpc.internal => games.cheetah.realtime.grpc}/.npmignore (100%) rename client/Unity/Packages/{games.cheetah.grpc.internal => games.cheetah.realtime.grpc}/Runtime.meta (100%) rename client/Unity/Packages/{games.cheetah.grpc.internal => games.cheetah.realtime.grpc}/Runtime/.empty (100%) create mode 100644 client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs create mode 100644 client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs.meta create mode 100644 client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs create mode 100644 client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs.meta rename client/Unity/Packages/{games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef => games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef} (73%) rename client/Unity/Packages/{games.cheetah.grpc.shared/package.json.meta => games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef.meta} (59%) rename client/Unity/Packages/{games.cheetah.grpc.shared => games.cheetah.realtime.grpc}/package.json (67%) rename client/Unity/Packages/{games.cheetah.grpc.internal => games.cheetah.realtime.grpc}/package.json.meta (100%) rename proto/{internal.proto => service.proto} (81%) delete mode 100644 proto/shared.proto rename rust/Server/src/server/room/{template/config.rs => config/member.rs} (60%) create mode 100644 rust/Server/src/server/room/config/mod.rs rename rust/Server/src/server/room/{template/mod.rs => config/object.rs} (50%) create mode 100644 rust/Server/src/server/room/config/room.rs diff --git a/client/Net/Embedded/Src/Src.csproj b/client/Net/Embedded/Src/Src.csproj index 87b37d0b0..93ce96e90 100644 --- a/client/Net/Embedded/Src/Src.csproj +++ b/client/Net/Embedded/Src/Src.csproj @@ -40,8 +40,7 @@ true runtimes/osx-x64/native/libcheetah_embedded.dylib - - + diff --git a/client/Unity/Packages/games.cheetah.client/Editor/games.cheetah.client.editor.asmdef b/client/Unity/Packages/games.cheetah.client/Editor/games.cheetah.client.editor.asmdef index 903931ab6..a5fb2ed52 100644 --- a/client/Unity/Packages/games.cheetah.client/Editor/games.cheetah.client.editor.asmdef +++ b/client/Unity/Packages/games.cheetah.client/Editor/games.cheetah.client.editor.asmdef @@ -3,9 +3,7 @@ "rootNamespace": "Games.Cheetah.Client", "references": [ "games.cheetah.grpc", - "games.cheetah.client", - "games.cheetah.grpc.admin", - "games.cheetah.grpc.shared" + "games.cheetah.client" ], "includePlatforms": [ "Editor" diff --git a/client/Unity/Packages/games.cheetah.client/Tests.meta b/client/Unity/Packages/games.cheetah.client/Tests.meta index 1122e2bf9..6714e62d4 100644 --- a/client/Unity/Packages/games.cheetah.client/Tests.meta +++ b/client/Unity/Packages/games.cheetah.client/Tests.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cba1993aa6f7041508b325167e9c03e5 +guid: dc13ed3ca37fb48bdb24a9ee70b5fe32 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/client/Unity/Packages/games.cheetah.client/Tests/Server/Helpers/AbstractTest.cs b/client/Unity/Packages/games.cheetah.client/Tests/Server/Helpers/AbstractTest.cs index 524ed3319..3c211c482 100644 --- a/client/Unity/Packages/games.cheetah.client/Tests/Server/Helpers/AbstractTest.cs +++ b/client/Unity/Packages/games.cheetah.client/Tests/Server/Helpers/AbstractTest.cs @@ -5,9 +5,8 @@ using Games.Cheetah.Client.Codec; using Games.Cheetah.Client.Types.Field; using Games.Cheetah.EmbeddedServer.API; -using Games.Cheetah.GRPC.Internal; +using Games.Cheetah.Realtime.GRPC; using NUnit.Framework; -using FieldType = Games.Cheetah.GRPC.Shared.FieldType; namespace Games.Cheetah.Client.Tests.Server.Helpers { diff --git a/client/Unity/Packages/games.cheetah.client/Tests/games.cheetah.client.tests.asmdef b/client/Unity/Packages/games.cheetah.client/Tests/games.cheetah.client.tests.asmdef index d33059033..1a0a9a57f 100644 --- a/client/Unity/Packages/games.cheetah.client/Tests/games.cheetah.client.tests.asmdef +++ b/client/Unity/Packages/games.cheetah.client/Tests/games.cheetah.client.tests.asmdef @@ -7,9 +7,7 @@ "Unity.Collections", "games.cheetah.client", "games.cheetah.client.editor", - "games.cheetah.grpc.admin", - "games.cheetah.grpc.shared", - "games.cheetah.grpc.internal", + "games.cheetah.realtime.grpc", "games.cheetah.embedded-server", "games.cheetah.grpc" ], diff --git a/client/Unity/Packages/games.cheetah.client/package.json b/client/Unity/Packages/games.cheetah.client/package.json index 76bd4ca8c..0d6250b5f 100644 --- a/client/Unity/Packages/games.cheetah.client/package.json +++ b/client/Unity/Packages/games.cheetah.client/package.json @@ -8,7 +8,6 @@ "repository": "github:cheetah-game-platform/platform", "dependencies": { "games.cheetah.grpc": "999.999.999", - "games.cheetah.grpc.shared": "999.999.999", "com.unity.collections": "1.2.4" }, "hideInEditor": false, diff --git a/client/Unity/Packages/games.cheetah.embedded-server/Runtime/API/EmbeddedServer.cs b/client/Unity/Packages/games.cheetah.embedded-server/Runtime/API/EmbeddedServer.cs index bb861590c..23658c4a8 100644 --- a/client/Unity/Packages/games.cheetah.embedded-server/Runtime/API/EmbeddedServer.cs +++ b/client/Unity/Packages/games.cheetah.embedded-server/Runtime/API/EmbeddedServer.cs @@ -2,9 +2,9 @@ using System.Net; using System.Net.Http; using Games.Cheetah.EmbeddedServer.FFI; +using Games.Cheetah.Realtime.GRPC; using Grpc.Net.Client; using Grpc.Net.Client.Web; -using static Games.Cheetah.GRPC.Internal.Internal; using Logger = Games.Cheetah.EmbeddedServer.FFI.Logger; #if UNITY_5_3_OR_NEWER @@ -79,7 +79,7 @@ private static unsafe Server.BindSocket NewBindSocket(IPAddress bindAddress, ush } - public InternalClient CreateGrpcClient() + public RealtimeServerManagementService.RealtimeServerManagementServiceClient CreateGrpcClient() { var channel = GrpcChannel.ForAddress( GetInternalWebGrpcUri(), new GrpcChannelOptions @@ -87,7 +87,7 @@ public InternalClient CreateGrpcClient() HttpHandler = new GrpcWebHandler(new HttpClientHandler()), } ); - return new InternalClient(channel); + return new RealtimeServerManagementService.RealtimeServerManagementServiceClient(channel); } public void Destroy() @@ -102,7 +102,8 @@ public string GetUdpGameHost() { unsafe { - return $"{description.gameIp[0]}.{description.gameIp[1]}.{description.gameIp[2]}.{description.gameIp[3]}"; + return + $"{description.gameIp[0]}.{description.gameIp[1]}.{description.gameIp[2]}.{description.gameIp[3]}"; } } diff --git a/client/Unity/Packages/games.cheetah.embedded-server/Runtime/games.cheetah.embedded-server.asmdef b/client/Unity/Packages/games.cheetah.embedded-server/Runtime/games.cheetah.embedded-server.asmdef index f266b58c1..216e5a683 100644 --- a/client/Unity/Packages/games.cheetah.embedded-server/Runtime/games.cheetah.embedded-server.asmdef +++ b/client/Unity/Packages/games.cheetah.embedded-server/Runtime/games.cheetah.embedded-server.asmdef @@ -4,7 +4,7 @@ "references": [ "games.cheetah.grpc", "games.cheetah.client", - "games.cheetah.grpc.internal" + "games.cheetah.realtime.grpc" ], "allowUnsafeCode": true, "overrideReferences": false, diff --git a/client/Unity/Packages/games.cheetah.embedded-server/Tests/Tests.cs b/client/Unity/Packages/games.cheetah.embedded-server/Tests/Tests.cs index ca4635f81..72708efee 100644 --- a/client/Unity/Packages/games.cheetah.embedded-server/Tests/Tests.cs +++ b/client/Unity/Packages/games.cheetah.embedded-server/Tests/Tests.cs @@ -6,7 +6,7 @@ using Games.Cheetah.Client.Codec; using Games.Cheetah.Client.Types.Network; using Games.Cheetah.EmbeddedServer.API; -using Games.Cheetah.GRPC.Internal; +using Games.Cheetah.Realtime.GRPC; using NUnit.Framework; namespace Games.Cheetah.EmbeddedServer.Tests diff --git a/client/Unity/Packages/games.cheetah.embedded-server/Tests/games.cheetah.matches.realtime.embedded-server.tests.asmdef b/client/Unity/Packages/games.cheetah.embedded-server/Tests/games.cheetah.matches.realtime.embedded-server.tests.asmdef index 943b8e86d..26b415614 100644 --- a/client/Unity/Packages/games.cheetah.embedded-server/Tests/games.cheetah.matches.realtime.embedded-server.tests.asmdef +++ b/client/Unity/Packages/games.cheetah.embedded-server/Tests/games.cheetah.matches.realtime.embedded-server.tests.asmdef @@ -7,7 +7,7 @@ "games.cheetah.grpc", "games.cheetah.client", "games.cheetah.embedded-server", - "games.cheetah.grpc.internal" + "games.cheetah.realtime.grpc" ], "includePlatforms": [ "Editor" diff --git a/client/Unity/Packages/games.cheetah.embedded-server/package.json b/client/Unity/Packages/games.cheetah.embedded-server/package.json index 2d27f7c10..9e39cbb49 100644 --- a/client/Unity/Packages/games.cheetah.embedded-server/package.json +++ b/client/Unity/Packages/games.cheetah.embedded-server/package.json @@ -9,7 +9,7 @@ "dependencies": { "games.cheetah.grpc": "999.999.999", "games.cheetah.client": "999.999.999", - "games.cheetah.grpc.internal": "999.999.999" + "games.cheetah.realtime.grpc": "999.999.999" }, "hideInEditor": false, "type": "library", diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef b/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef deleted file mode 100644 index 48e83a8da..000000000 --- a/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "games.cheetah.grpc.internal", - "rootNamespace": "Games.Cheetah.Grpc.Internal", - "references": [ - "games.cheetah.grpc", - "games.cheetah.grpc.shared" - ], - "allowUnsafeCode": true, - "overrideReferences": false, - "precompiledReferences": [ - "" - ], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef.meta b/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef.meta deleted file mode 100644 index 6fce9a2b9..000000000 --- a/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/games.cheetah.grpc.internal.asmdef.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: e7ea547da96746bba50f2b51f4c577f8 -timeCreated: 1670296583 \ No newline at end of file diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/package.json b/client/Unity/Packages/games.cheetah.grpc.internal/package.json deleted file mode 100644 index b758d5020..000000000 --- a/client/Unity/Packages/games.cheetah.grpc.internal/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "games.cheetah.grpc.internal", - "version": "999.999.999", - "displayName": "games.cheetah.grpc.internal", - "description": "Realtime battle server.", - "unity": "2019.1", - "unityRelease": "0b5", - "repository": "github:cheetah-game-platform/platform", - "dependencies": { - "games.cheetah.grpc": "999.999.999", - "games.cheetah.grpc.shared": "999.999.999" - }, - "hideInEditor": false, - "type": "library", - "author": "https://cheetah.games" -} \ No newline at end of file diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/.npmignore b/client/Unity/Packages/games.cheetah.grpc.shared/.npmignore deleted file mode 100644 index 4abad7da7..000000000 --- a/client/Unity/Packages/games.cheetah.grpc.shared/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -# файл нужен в том числе для игнорирования .gitignore при сборке пакета -package.json.bak \ No newline at end of file diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime.meta b/client/Unity/Packages/games.cheetah.grpc.shared/Runtime.meta deleted file mode 100644 index c1ccacc90..000000000 --- a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3be42f58772174044918a32cd9e5e4e7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/.empty b/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef.meta b/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef.meta deleted file mode 100644 index 119082df3..000000000 --- a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 55ed01c6527d4ef88db6048e08e06119 -timeCreated: 1670296603 \ No newline at end of file diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/.gitignore b/client/Unity/Packages/games.cheetah.realtime.grpc/.gitignore similarity index 100% rename from client/Unity/Packages/games.cheetah.grpc.internal/.gitignore rename to client/Unity/Packages/games.cheetah.realtime.grpc/.gitignore diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/.npmignore b/client/Unity/Packages/games.cheetah.realtime.grpc/.npmignore similarity index 100% rename from client/Unity/Packages/games.cheetah.grpc.internal/.npmignore rename to client/Unity/Packages/games.cheetah.realtime.grpc/.npmignore diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/Runtime.meta b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime.meta similarity index 100% rename from client/Unity/Packages/games.cheetah.grpc.internal/Runtime.meta rename to client/Unity/Packages/games.cheetah.realtime.grpc/Runtime.meta diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/Runtime/.empty b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/.empty similarity index 100% rename from client/Unity/Packages/games.cheetah.grpc.internal/Runtime/.empty rename to client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/.empty diff --git a/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs new file mode 100644 index 000000000..6edcd71f1 --- /dev/null +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs @@ -0,0 +1,4483 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: service.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Games.Cheetah.Realtime.GRPC { + + /// Holder for reflection information generated from service.proto + public static partial class ServiceReflection { + + #region Descriptor + /// File descriptor for service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cg1zZXJ2aWNlLnByb3RvEh1jaGVldGFoLm1hdGNoZXMucmVhbHRpbWUuZ3Jw", + "YyIOCgxFbXB0eVJlcXVlc3QiIQoOUm9vbUlkUmVzcG9uc2USDwoHcm9vbV9p", + "ZBgBIAEoBCJhChNDcmVhdGVNZW1iZXJSZXF1ZXN0Eg8KB3Jvb21faWQYASAB", + "KAQSOQoEdXNlchgCIAEoCzIrLmNoZWV0YWgubWF0Y2hlcy5yZWFsdGltZS5n", + "cnBjLlVzZXJUZW1wbGF0ZSIrChhDcmVhdGVTdXBlck1lbWJlclJlcXVlc3QS", + "DwoHcm9vbV9pZBgBIAEoBCI8ChRDcmVhdGVNZW1iZXJSZXNwb25zZRIPCgd1", + "c2VyX2lkGAEgASgNEhMKC3ByaXZhdGVfa2V5GAIgASgMIqsBCgxSb29tVGVt", + "cGxhdGUSFQoNdGVtcGxhdGVfbmFtZRgBIAEoCRJCCgdvYmplY3RzGAIgAygL", + "MjEuY2hlZXRhaC5tYXRjaGVzLnJlYWx0aW1lLmdycGMuR2FtZU9iamVjdFRl", + "bXBsYXRlEkAKB2NvbmZpZ3MYAyADKAsyLy5jaGVldGFoLm1hdGNoZXMucmVh", + "bHRpbWUuZ3JwYy5HYW1lT2JqZWN0Q29uZmlnImIKDFVzZXJUZW1wbGF0ZRIO", + "CgZncm91cHMYAyABKAQSQgoHb2JqZWN0cxgEIAMoCzIxLmNoZWV0YWgubWF0", + "Y2hlcy5yZWFsdGltZS5ncnBjLkdhbWVPYmplY3RUZW1wbGF0ZSKCAQoSR2Ft", + "ZU9iamVjdFRlbXBsYXRlEgoKAmlkGAEgASgNEhAKCHRlbXBsYXRlGAIgASgN", + "Eg4KBmdyb3VwcxgDIAEoBBI+CgZmaWVsZHMYBCABKAsyLi5jaGVldGFoLm1h", + "dGNoZXMucmVhbHRpbWUuZ3JwYy5HYW1lT2JqZWN0RmllbGQi2gEKEEdhbWVP", + "YmplY3RDb25maWcSEAoIdGVtcGxhdGUYASABKA0SVQoLaXRlbXNDb25maWcY", + "AiADKAsyQC5jaGVldGFoLm1hdGNoZXMucmVhbHRpbWUuZ3JwYy5HYW1lT2Jq", + "ZWN0Q29uZmlnLkl0ZW1zQ29uZmlnRW50cnkaXQoQSXRlbXNDb25maWdFbnRy", + "eRILCgNrZXkYASABKA0SOAoFdmFsdWUYAiABKAsyKS5jaGVldGFoLm1hdGNo", + "ZXMucmVhbHRpbWUuZ3JwYy5JdGVtQ29uZmlnOgI4ASIeCgpJdGVtQ29uZmln", + "EhAKCGNhcGFjaXR5GAEgASgNIg4KDFByb2JlUmVxdWVzdCIPCg1Qcm9iZVJl", + "c3BvbnNlIh8KEURlbGV0ZVJvb21SZXF1ZXN0EgoKAmlkGAEgASgEIhQKEkRl", + "bGV0ZVJvb21SZXNwb25zZSI3ChNEZWxldGVNZW1iZXJSZXF1ZXN0Eg8KB3Jv", + "b21faWQYASABKAQSDwoHdXNlcl9pZBgCIAEoDSIWChREZWxldGVNZW1iZXJS", + "ZXNwb25zZSIhChBHZXRSb29tc1Jlc3BvbnNlEg0KBXJvb21zGAEgAygEImYK", + "HEdldFJvb21zTWVtYmVyc0NvdW50UmVzcG9uc2USRgoFcm9vbXMYASADKAsy", + "Ny5jaGVldGFoLm1hdGNoZXMucmVhbHRpbWUuZ3JwYy5Sb29tTWVtYmVyc0Nv", + "dW50UmVzcG9uc2UiVAoYUm9vbU1lbWJlcnNDb3VudFJlc3BvbnNlEgwKBHJv", + "b20YASABKAQSDwoHbWVtYmVycxgCIAEoDRIZChFjb25uZWN0ZWRfbWVtYmVy", + "cxgDIAEoDSJXCg9HYW1lT2JqZWN0RmllbGQSCgoCaWQYASABKA0SOAoFdmFs", + "dWUYAiABKAsyKS5jaGVldGFoLm1hdGNoZXMucmVhbHRpbWUuZ3JwYy5GaWVs", + "ZFZhbHVlIk4KCkZpZWxkVmFsdWUSDgoEbG9uZxgBIAEoA0gAEhAKBmRvdWJs", + "ZRgCIAEoAUgAEhMKCXN0cnVjdHVyZRgDIAEoDEgAQgkKB1ZhcmlhbnQqOwoJ", + "RmllbGRUeXBlEggKBExvbmcQABIKCgZEb3VibGUQARINCglTdHJ1Y3R1cmUQ", + "AhIJCgVFdmVudBADMsUHCh9SZWFsdGltZVNlcnZlck1hbmFnZW1lbnRTZXJ2", + "aWNlEmgKCkNyZWF0ZVJvb20SKy5jaGVldGFoLm1hdGNoZXMucmVhbHRpbWUu", + "Z3JwYy5Sb29tVGVtcGxhdGUaLS5jaGVldGFoLm1hdGNoZXMucmVhbHRpbWUu", + "Z3JwYy5Sb29tSWRSZXNwb25zZRJ3CgxDcmVhdGVNZW1iZXISMi5jaGVldGFo", + "Lm1hdGNoZXMucmVhbHRpbWUuZ3JwYy5DcmVhdGVNZW1iZXJSZXF1ZXN0GjMu", + "Y2hlZXRhaC5tYXRjaGVzLnJlYWx0aW1lLmdycGMuQ3JlYXRlTWVtYmVyUmVz", + "cG9uc2USdwoMRGVsZXRlTWVtYmVyEjIuY2hlZXRhaC5tYXRjaGVzLnJlYWx0", + "aW1lLmdycGMuRGVsZXRlTWVtYmVyUmVxdWVzdBozLmNoZWV0YWgubWF0Y2hl", + "cy5yZWFsdGltZS5ncnBjLkRlbGV0ZU1lbWJlclJlc3BvbnNlEoEBChFDcmVh", + "dGVTdXBlck1lbWJlchI3LmNoZWV0YWgubWF0Y2hlcy5yZWFsdGltZS5ncnBj", + "LkNyZWF0ZVN1cGVyTWVtYmVyUmVxdWVzdBozLmNoZWV0YWgubWF0Y2hlcy5y", + "ZWFsdGltZS5ncnBjLkNyZWF0ZU1lbWJlclJlc3BvbnNlEmIKBVByb2JlEisu", + "Y2hlZXRhaC5tYXRjaGVzLnJlYWx0aW1lLmdycGMuUHJvYmVSZXF1ZXN0Giwu", + "Y2hlZXRhaC5tYXRjaGVzLnJlYWx0aW1lLmdycGMuUHJvYmVSZXNwb25zZRJo", + "CghHZXRSb29tcxIrLmNoZWV0YWgubWF0Y2hlcy5yZWFsdGltZS5ncnBjLkVt", + "cHR5UmVxdWVzdBovLmNoZWV0YWgubWF0Y2hlcy5yZWFsdGltZS5ncnBjLkdl", + "dFJvb21zUmVzcG9uc2UScQoKRGVsZXRlUm9vbRIwLmNoZWV0YWgubWF0Y2hl", + "cy5yZWFsdGltZS5ncnBjLkRlbGV0ZVJvb21SZXF1ZXN0GjEuY2hlZXRhaC5t", + "YXRjaGVzLnJlYWx0aW1lLmdycGMuRGVsZXRlUm9vbVJlc3BvbnNlEoABChRH", + "ZXRSb29tc01lbWJlcnNDb3VudBIrLmNoZWV0YWgubWF0Y2hlcy5yZWFsdGlt", + "ZS5ncnBjLkVtcHR5UmVxdWVzdBo7LmNoZWV0YWgubWF0Y2hlcy5yZWFsdGlt", + "ZS5ncnBjLkdldFJvb21zTWVtYmVyc0NvdW50UmVzcG9uc2VCHqoCG0dhbWVz", + "LkNoZWV0YWguUmVhbHRpbWUuR1JQQ2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Games.Cheetah.Realtime.GRPC.FieldType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.EmptyRequest), global::Games.Cheetah.Realtime.GRPC.EmptyRequest.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.RoomIdResponse), global::Games.Cheetah.Realtime.GRPC.RoomIdResponse.Parser, new[]{ "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest), global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest.Parser, new[]{ "RoomId", "User" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest), global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest.Parser, new[]{ "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse), global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse.Parser, new[]{ "UserId", "PrivateKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.RoomTemplate), global::Games.Cheetah.Realtime.GRPC.RoomTemplate.Parser, new[]{ "TemplateName", "Objects", "Configs" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.UserTemplate), global::Games.Cheetah.Realtime.GRPC.UserTemplate.Parser, new[]{ "Groups", "Objects" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.GameObjectTemplate), global::Games.Cheetah.Realtime.GRPC.GameObjectTemplate.Parser, new[]{ "Id", "Template", "Groups", "Fields" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.GameObjectConfig), global::Games.Cheetah.Realtime.GRPC.GameObjectConfig.Parser, new[]{ "Template", "ItemsConfig" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.ItemConfig), global::Games.Cheetah.Realtime.GRPC.ItemConfig.Parser, new[]{ "Capacity" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.ProbeRequest), global::Games.Cheetah.Realtime.GRPC.ProbeRequest.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.ProbeResponse), global::Games.Cheetah.Realtime.GRPC.ProbeResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest), global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest.Parser, new[]{ "Id" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.DeleteRoomResponse), global::Games.Cheetah.Realtime.GRPC.DeleteRoomResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest), global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest.Parser, new[]{ "RoomId", "UserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.DeleteMemberResponse), global::Games.Cheetah.Realtime.GRPC.DeleteMemberResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.GetRoomsResponse), global::Games.Cheetah.Realtime.GRPC.GetRoomsResponse.Parser, new[]{ "Rooms" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.GetRoomsMembersCountResponse), global::Games.Cheetah.Realtime.GRPC.GetRoomsMembersCountResponse.Parser, new[]{ "Rooms" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.RoomMembersCountResponse), global::Games.Cheetah.Realtime.GRPC.RoomMembersCountResponse.Parser, new[]{ "Room", "Members", "ConnectedMembers" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.GameObjectField), global::Games.Cheetah.Realtime.GRPC.GameObjectField.Parser, new[]{ "Id", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Games.Cheetah.Realtime.GRPC.FieldValue), global::Games.Cheetah.Realtime.GRPC.FieldValue.Parser, new[]{ "Long", "Double", "Structure" }, new[]{ "Variant" }, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum FieldType { + [pbr::OriginalName("Long")] Long = 0, + [pbr::OriginalName("Double")] Double = 1, + [pbr::OriginalName("Structure")] Structure = 2, + [pbr::OriginalName("Event")] Event = 3, + } + + #endregion + + #region Messages + /// + ///* + /// Запрос без параметров + /// + public sealed partial class EmptyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmptyRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmptyRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmptyRequest(EmptyRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmptyRequest Clone() { + return new EmptyRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EmptyRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EmptyRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EmptyRequest other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + ///* + /// Ответ с идентификатором комнаты + /// + public sealed partial class RoomIdResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoomIdResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomIdResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomIdResponse(RoomIdResponse other) : this() { + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomIdResponse Clone() { + return new RoomIdResponse(this); + } + + /// Field number for the "room_id" field. + public const int RoomIdFieldNumber = 1; + private ulong roomId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong RoomId { + get { return roomId_; } + set { + roomId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoomIdResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoomIdResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId != 0UL) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoomIdResponse other) { + if (other == null) { + return; + } + if (other.RoomId != 0UL) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateMemberRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateMemberRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMemberRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMemberRequest(CreateMemberRequest other) : this() { + roomId_ = other.roomId_; + user_ = other.user_ != null ? other.user_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMemberRequest Clone() { + return new CreateMemberRequest(this); + } + + /// Field number for the "room_id" field. + public const int RoomIdFieldNumber = 1; + private ulong roomId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong RoomId { + get { return roomId_; } + set { + roomId_ = value; + } + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 2; + private global::Games.Cheetah.Realtime.GRPC.UserTemplate user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Games.Cheetah.Realtime.GRPC.UserTemplate User { + get { return user_; } + set { + user_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateMemberRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateMemberRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (!object.Equals(User, other.User)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId != 0UL) hash ^= RoomId.GetHashCode(); + if (user_ != null) hash ^= User.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (user_ != null) { + output.WriteRawTag(18); + output.WriteMessage(User); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (user_ != null) { + output.WriteRawTag(18); + output.WriteMessage(User); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(RoomId); + } + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateMemberRequest other) { + if (other == null) { + return; + } + if (other.RoomId != 0UL) { + RoomId = other.RoomId; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Games.Cheetah.Realtime.GRPC.UserTemplate(); + } + User.MergeFrom(other.User); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + case 18: { + if (user_ == null) { + User = new global::Games.Cheetah.Realtime.GRPC.UserTemplate(); + } + input.ReadMessage(User); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + case 18: { + if (user_ == null) { + User = new global::Games.Cheetah.Realtime.GRPC.UserTemplate(); + } + input.ReadMessage(User); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateSuperMemberRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateSuperMemberRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateSuperMemberRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateSuperMemberRequest(CreateSuperMemberRequest other) : this() { + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateSuperMemberRequest Clone() { + return new CreateSuperMemberRequest(this); + } + + /// Field number for the "room_id" field. + public const int RoomIdFieldNumber = 1; + private ulong roomId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong RoomId { + get { return roomId_; } + set { + roomId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateSuperMemberRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateSuperMemberRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId != 0UL) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateSuperMemberRequest other) { + if (other == null) { + return; + } + if (other.RoomId != 0UL) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class CreateMemberResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateMemberResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMemberResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMemberResponse(CreateMemberResponse other) : this() { + userId_ = other.userId_; + privateKey_ = other.privateKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateMemberResponse Clone() { + return new CreateMemberResponse(this); + } + + /// Field number for the "user_id" field. + public const int UserIdFieldNumber = 1; + private uint userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "private_key" field. + public const int PrivateKeyFieldNumber = 2; + private pb::ByteString privateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PrivateKey { + get { return privateKey_; } + set { + privateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateMemberResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateMemberResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (PrivateKey != other.PrivateKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (PrivateKey.Length != 0) hash ^= PrivateKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(UserId); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(UserId); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UserId); + } + if (PrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrivateKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateMemberResponse other) { + if (other == null) { + return; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.PrivateKey.Length != 0) { + PrivateKey = other.PrivateKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadUInt32(); + break; + } + case 18: { + PrivateKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadUInt32(); + break; + } + case 18: { + PrivateKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + /// + ///* + ///Шаблон для описания комнаты + /// + public sealed partial class RoomTemplate : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoomTemplate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomTemplate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomTemplate(RoomTemplate other) : this() { + templateName_ = other.templateName_; + objects_ = other.objects_.Clone(); + configs_ = other.configs_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomTemplate Clone() { + return new RoomTemplate(this); + } + + /// Field number for the "template_name" field. + public const int TemplateNameFieldNumber = 1; + private string templateName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TemplateName { + get { return templateName_; } + set { + templateName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "objects" field. + public const int ObjectsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_objects_codec + = pb::FieldCodec.ForMessage(18, global::Games.Cheetah.Realtime.GRPC.GameObjectTemplate.Parser); + private readonly pbc::RepeatedField objects_ = new pbc::RepeatedField(); + /// + ///* + ///Начальные игровые объекты комнаты + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Objects { + get { return objects_; } + } + + /// Field number for the "configs" field. + public const int ConfigsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_configs_codec + = pb::FieldCodec.ForMessage(26, global::Games.Cheetah.Realtime.GRPC.GameObjectConfig.Parser); + private readonly pbc::RepeatedField configs_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Configs { + get { return configs_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoomTemplate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoomTemplate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TemplateName != other.TemplateName) return false; + if(!objects_.Equals(other.objects_)) return false; + if(!configs_.Equals(other.configs_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TemplateName.Length != 0) hash ^= TemplateName.GetHashCode(); + hash ^= objects_.GetHashCode(); + hash ^= configs_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TemplateName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TemplateName); + } + objects_.WriteTo(output, _repeated_objects_codec); + configs_.WriteTo(output, _repeated_configs_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TemplateName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TemplateName); + } + objects_.WriteTo(ref output, _repeated_objects_codec); + configs_.WriteTo(ref output, _repeated_configs_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TemplateName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TemplateName); + } + size += objects_.CalculateSize(_repeated_objects_codec); + size += configs_.CalculateSize(_repeated_configs_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoomTemplate other) { + if (other == null) { + return; + } + if (other.TemplateName.Length != 0) { + TemplateName = other.TemplateName; + } + objects_.Add(other.objects_); + configs_.Add(other.configs_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TemplateName = input.ReadString(); + break; + } + case 18: { + objects_.AddEntriesFrom(input, _repeated_objects_codec); + break; + } + case 26: { + configs_.AddEntriesFrom(input, _repeated_configs_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TemplateName = input.ReadString(); + break; + } + case 18: { + objects_.AddEntriesFrom(ref input, _repeated_objects_codec); + break; + } + case 26: { + configs_.AddEntriesFrom(ref input, _repeated_configs_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class UserTemplate : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserTemplate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplate(UserTemplate other) : this() { + groups_ = other.groups_; + objects_ = other.objects_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplate Clone() { + return new UserTemplate(this); + } + + /// Field number for the "groups" field. + public const int GroupsFieldNumber = 3; + private ulong groups_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Groups { + get { return groups_; } + set { + groups_ = value; + } + } + + /// Field number for the "objects" field. + public const int ObjectsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_objects_codec + = pb::FieldCodec.ForMessage(34, global::Games.Cheetah.Realtime.GRPC.GameObjectTemplate.Parser); + private readonly pbc::RepeatedField objects_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Objects { + get { return objects_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserTemplate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserTemplate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Groups != other.Groups) return false; + if(!objects_.Equals(other.objects_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Groups != 0UL) hash ^= Groups.GetHashCode(); + hash ^= objects_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Groups != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(Groups); + } + objects_.WriteTo(output, _repeated_objects_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Groups != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(Groups); + } + objects_.WriteTo(ref output, _repeated_objects_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Groups != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Groups); + } + size += objects_.CalculateSize(_repeated_objects_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserTemplate other) { + if (other == null) { + return; + } + if (other.Groups != 0UL) { + Groups = other.Groups; + } + objects_.Add(other.objects_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 24: { + Groups = input.ReadUInt64(); + break; + } + case 34: { + objects_.AddEntriesFrom(input, _repeated_objects_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 24: { + Groups = input.ReadUInt64(); + break; + } + case 34: { + objects_.AddEntriesFrom(ref input, _repeated_objects_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class GameObjectTemplate : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameObjectTemplate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectTemplate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectTemplate(GameObjectTemplate other) : this() { + id_ = other.id_; + template_ = other.template_; + groups_ = other.groups_; + fields_ = other.fields_ != null ? other.fields_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectTemplate Clone() { + return new GameObjectTemplate(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private uint id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "template" field. + public const int TemplateFieldNumber = 2; + private uint template_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Template { + get { return template_; } + set { + template_ = value; + } + } + + /// Field number for the "groups" field. + public const int GroupsFieldNumber = 3; + private ulong groups_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Groups { + get { return groups_; } + set { + groups_ = value; + } + } + + /// Field number for the "fields" field. + public const int FieldsFieldNumber = 4; + private global::Games.Cheetah.Realtime.GRPC.GameObjectField fields_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Games.Cheetah.Realtime.GRPC.GameObjectField Fields { + get { return fields_; } + set { + fields_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GameObjectTemplate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GameObjectTemplate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Template != other.Template) return false; + if (Groups != other.Groups) return false; + if (!object.Equals(Fields, other.Fields)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (Template != 0) hash ^= Template.GetHashCode(); + if (Groups != 0UL) hash ^= Groups.GetHashCode(); + if (fields_ != null) hash ^= Fields.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Id); + } + if (Template != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Template); + } + if (Groups != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(Groups); + } + if (fields_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Fields); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Id); + } + if (Template != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Template); + } + if (Groups != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(Groups); + } + if (fields_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Fields); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id); + } + if (Template != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Template); + } + if (Groups != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Groups); + } + if (fields_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fields); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GameObjectTemplate other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.Template != 0) { + Template = other.Template; + } + if (other.Groups != 0UL) { + Groups = other.Groups; + } + if (other.fields_ != null) { + if (fields_ == null) { + Fields = new global::Games.Cheetah.Realtime.GRPC.GameObjectField(); + } + Fields.MergeFrom(other.Fields); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadUInt32(); + break; + } + case 16: { + Template = input.ReadUInt32(); + break; + } + case 24: { + Groups = input.ReadUInt64(); + break; + } + case 34: { + if (fields_ == null) { + Fields = new global::Games.Cheetah.Realtime.GRPC.GameObjectField(); + } + input.ReadMessage(Fields); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadUInt32(); + break; + } + case 16: { + Template = input.ReadUInt32(); + break; + } + case 24: { + Groups = input.ReadUInt64(); + break; + } + case 34: { + if (fields_ == null) { + Fields = new global::Games.Cheetah.Realtime.GRPC.GameObjectField(); + } + input.ReadMessage(Fields); + break; + } + } + } + } + #endif + + } + + public sealed partial class GameObjectConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameObjectConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectConfig(GameObjectConfig other) : this() { + template_ = other.template_; + itemsConfig_ = other.itemsConfig_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectConfig Clone() { + return new GameObjectConfig(this); + } + + /// Field number for the "template" field. + public const int TemplateFieldNumber = 1; + private uint template_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Template { + get { return template_; } + set { + template_ = value; + } + } + + /// Field number for the "itemsConfig" field. + public const int ItemsConfigFieldNumber = 2; + private static readonly pbc::MapField.Codec _map_itemsConfig_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Games.Cheetah.Realtime.GRPC.ItemConfig.Parser), 18); + private readonly pbc::MapField itemsConfig_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField ItemsConfig { + get { return itemsConfig_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GameObjectConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GameObjectConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Template != other.Template) return false; + if (!ItemsConfig.Equals(other.ItemsConfig)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Template != 0) hash ^= Template.GetHashCode(); + hash ^= ItemsConfig.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Template != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Template); + } + itemsConfig_.WriteTo(output, _map_itemsConfig_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Template != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Template); + } + itemsConfig_.WriteTo(ref output, _map_itemsConfig_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Template != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Template); + } + size += itemsConfig_.CalculateSize(_map_itemsConfig_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GameObjectConfig other) { + if (other == null) { + return; + } + if (other.Template != 0) { + Template = other.Template; + } + itemsConfig_.Add(other.itemsConfig_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Template = input.ReadUInt32(); + break; + } + case 18: { + itemsConfig_.AddEntriesFrom(input, _map_itemsConfig_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Template = input.ReadUInt32(); + break; + } + case 18: { + itemsConfig_.AddEntriesFrom(ref input, _map_itemsConfig_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class ItemConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ItemConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ItemConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ItemConfig(ItemConfig other) : this() { + capacity_ = other.capacity_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ItemConfig Clone() { + return new ItemConfig(this); + } + + /// Field number for the "capacity" field. + public const int CapacityFieldNumber = 1; + private uint capacity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Capacity { + get { return capacity_; } + set { + capacity_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ItemConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ItemConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Capacity != other.Capacity) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Capacity != 0) hash ^= Capacity.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Capacity != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Capacity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Capacity != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Capacity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Capacity != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Capacity); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ItemConfig other) { + if (other == null) { + return; + } + if (other.Capacity != 0) { + Capacity = other.Capacity; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Capacity = input.ReadUInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Capacity = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + public sealed partial class ProbeRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ProbeRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProbeRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProbeRequest(ProbeRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProbeRequest Clone() { + return new ProbeRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ProbeRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ProbeRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ProbeRequest other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class ProbeResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ProbeResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProbeResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProbeResponse(ProbeResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProbeResponse Clone() { + return new ProbeResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ProbeResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ProbeResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ProbeResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class DeleteRoomRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteRoomRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteRoomRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteRoomRequest(DeleteRoomRequest other) : this() { + id_ = other.id_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteRoomRequest Clone() { + return new DeleteRoomRequest(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private ulong id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Id { + get { return id_; } + set { + id_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteRoomRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteRoomRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0UL) hash ^= Id.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Id); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteRoomRequest other) { + if (other == null) { + return; + } + if (other.Id != 0UL) { + Id = other.Id; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadUInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadUInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class DeleteRoomResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteRoomResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteRoomResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteRoomResponse(DeleteRoomResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteRoomResponse Clone() { + return new DeleteRoomResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteRoomResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteRoomResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteRoomResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class DeleteMemberRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteMemberRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteMemberRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteMemberRequest(DeleteMemberRequest other) : this() { + roomId_ = other.roomId_; + userId_ = other.userId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteMemberRequest Clone() { + return new DeleteMemberRequest(this); + } + + /// Field number for the "room_id" field. + public const int RoomIdFieldNumber = 1; + private ulong roomId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong RoomId { + get { return roomId_; } + set { + roomId_ = value; + } + } + + /// Field number for the "user_id" field. + public const int UserIdFieldNumber = 2; + private uint userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteMemberRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteMemberRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (UserId != other.UserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId != 0UL) hash ^= RoomId.GetHashCode(); + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteUInt32(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(RoomId); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteUInt32(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(RoomId); + } + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteMemberRequest other) { + if (other == null) { + return; + } + if (other.RoomId != 0UL) { + RoomId = other.RoomId; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + case 16: { + UserId = input.ReadUInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoomId = input.ReadUInt64(); + break; + } + case 16: { + UserId = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + public sealed partial class DeleteMemberResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteMemberResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteMemberResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteMemberResponse(DeleteMemberResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteMemberResponse Clone() { + return new DeleteMemberResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteMemberResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteMemberResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteMemberResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class GetRoomsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetRoomsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRoomsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRoomsResponse(GetRoomsResponse other) : this() { + rooms_ = other.rooms_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRoomsResponse Clone() { + return new GetRoomsResponse(this); + } + + /// Field number for the "rooms" field. + public const int RoomsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_rooms_codec + = pb::FieldCodec.ForUInt64(10); + private readonly pbc::RepeatedField rooms_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Rooms { + get { return rooms_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetRoomsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetRoomsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!rooms_.Equals(other.rooms_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= rooms_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + rooms_.WriteTo(output, _repeated_rooms_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + rooms_.WriteTo(ref output, _repeated_rooms_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += rooms_.CalculateSize(_repeated_rooms_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetRoomsResponse other) { + if (other == null) { + return; + } + rooms_.Add(other.rooms_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + rooms_.AddEntriesFrom(input, _repeated_rooms_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + rooms_.AddEntriesFrom(ref input, _repeated_rooms_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class GetRoomsMembersCountResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetRoomsMembersCountResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRoomsMembersCountResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRoomsMembersCountResponse(GetRoomsMembersCountResponse other) : this() { + rooms_ = other.rooms_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRoomsMembersCountResponse Clone() { + return new GetRoomsMembersCountResponse(this); + } + + /// Field number for the "rooms" field. + public const int RoomsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_rooms_codec + = pb::FieldCodec.ForMessage(10, global::Games.Cheetah.Realtime.GRPC.RoomMembersCountResponse.Parser); + private readonly pbc::RepeatedField rooms_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Rooms { + get { return rooms_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetRoomsMembersCountResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetRoomsMembersCountResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!rooms_.Equals(other.rooms_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= rooms_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + rooms_.WriteTo(output, _repeated_rooms_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + rooms_.WriteTo(ref output, _repeated_rooms_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += rooms_.CalculateSize(_repeated_rooms_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetRoomsMembersCountResponse other) { + if (other == null) { + return; + } + rooms_.Add(other.rooms_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + rooms_.AddEntriesFrom(input, _repeated_rooms_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + rooms_.AddEntriesFrom(ref input, _repeated_rooms_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class RoomMembersCountResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoomMembersCountResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomMembersCountResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomMembersCountResponse(RoomMembersCountResponse other) : this() { + room_ = other.room_; + members_ = other.members_; + connectedMembers_ = other.connectedMembers_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomMembersCountResponse Clone() { + return new RoomMembersCountResponse(this); + } + + /// Field number for the "room" field. + public const int RoomFieldNumber = 1; + private ulong room_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Room { + get { return room_; } + set { + room_ = value; + } + } + + /// Field number for the "members" field. + public const int MembersFieldNumber = 2; + private uint members_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Members { + get { return members_; } + set { + members_ = value; + } + } + + /// Field number for the "connected_members" field. + public const int ConnectedMembersFieldNumber = 3; + private uint connectedMembers_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ConnectedMembers { + get { return connectedMembers_; } + set { + connectedMembers_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoomMembersCountResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoomMembersCountResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Room != other.Room) return false; + if (Members != other.Members) return false; + if (ConnectedMembers != other.ConnectedMembers) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Room != 0UL) hash ^= Room.GetHashCode(); + if (Members != 0) hash ^= Members.GetHashCode(); + if (ConnectedMembers != 0) hash ^= ConnectedMembers.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Room != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(Room); + } + if (Members != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Members); + } + if (ConnectedMembers != 0) { + output.WriteRawTag(24); + output.WriteUInt32(ConnectedMembers); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Room != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(Room); + } + if (Members != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Members); + } + if (ConnectedMembers != 0) { + output.WriteRawTag(24); + output.WriteUInt32(ConnectedMembers); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Room != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Room); + } + if (Members != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Members); + } + if (ConnectedMembers != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ConnectedMembers); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoomMembersCountResponse other) { + if (other == null) { + return; + } + if (other.Room != 0UL) { + Room = other.Room; + } + if (other.Members != 0) { + Members = other.Members; + } + if (other.ConnectedMembers != 0) { + ConnectedMembers = other.ConnectedMembers; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Room = input.ReadUInt64(); + break; + } + case 16: { + Members = input.ReadUInt32(); + break; + } + case 24: { + ConnectedMembers = input.ReadUInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Room = input.ReadUInt64(); + break; + } + case 16: { + Members = input.ReadUInt32(); + break; + } + case 24: { + ConnectedMembers = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + public sealed partial class GameObjectField : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameObjectField()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectField() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectField(GameObjectField other) : this() { + id_ = other.id_; + value_ = other.value_ != null ? other.value_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameObjectField Clone() { + return new GameObjectField(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private uint id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private global::Games.Cheetah.Realtime.GRPC.FieldValue value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Games.Cheetah.Realtime.GRPC.FieldValue Value { + get { return value_; } + set { + value_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GameObjectField); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GameObjectField other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!object.Equals(Value, other.Value)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (value_ != null) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Id); + } + if (value_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Id); + } + if (value_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id); + } + if (value_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GameObjectField other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.value_ != null) { + if (value_ == null) { + Value = new global::Games.Cheetah.Realtime.GRPC.FieldValue(); + } + Value.MergeFrom(other.Value); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadUInt32(); + break; + } + case 18: { + if (value_ == null) { + Value = new global::Games.Cheetah.Realtime.GRPC.FieldValue(); + } + input.ReadMessage(Value); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadUInt32(); + break; + } + case 18: { + if (value_ == null) { + Value = new global::Games.Cheetah.Realtime.GRPC.FieldValue(); + } + input.ReadMessage(Value); + break; + } + } + } + } + #endif + + } + + public sealed partial class FieldValue : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldValue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldValue(FieldValue other) : this() { + switch (other.VariantCase) { + case VariantOneofCase.Long: + Long = other.Long; + break; + case VariantOneofCase.Double: + Double = other.Double; + break; + case VariantOneofCase.Structure: + Structure = other.Structure; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldValue Clone() { + return new FieldValue(this); + } + + /// Field number for the "long" field. + public const int LongFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Long { + get { return variantCase_ == VariantOneofCase.Long ? (long) variant_ : 0L; } + set { + variant_ = value; + variantCase_ = VariantOneofCase.Long; + } + } + + /// Field number for the "double" field. + public const int DoubleFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Double { + get { return variantCase_ == VariantOneofCase.Double ? (double) variant_ : 0D; } + set { + variant_ = value; + variantCase_ = VariantOneofCase.Double; + } + } + + /// Field number for the "structure" field. + public const int StructureFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Structure { + get { return variantCase_ == VariantOneofCase.Structure ? (pb::ByteString) variant_ : pb::ByteString.Empty; } + set { + variant_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + variantCase_ = VariantOneofCase.Structure; + } + } + + private object variant_; + /// Enum of possible cases for the "Variant" oneof. + public enum VariantOneofCase { + None = 0, + Long = 1, + Double = 2, + Structure = 3, + } + private VariantOneofCase variantCase_ = VariantOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VariantOneofCase VariantCase { + get { return variantCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearVariant() { + variantCase_ = VariantOneofCase.None; + variant_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FieldValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FieldValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Long != other.Long) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Double, other.Double)) return false; + if (Structure != other.Structure) return false; + if (VariantCase != other.VariantCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (variantCase_ == VariantOneofCase.Long) hash ^= Long.GetHashCode(); + if (variantCase_ == VariantOneofCase.Double) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Double); + if (variantCase_ == VariantOneofCase.Structure) hash ^= Structure.GetHashCode(); + hash ^= (int) variantCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (variantCase_ == VariantOneofCase.Long) { + output.WriteRawTag(8); + output.WriteInt64(Long); + } + if (variantCase_ == VariantOneofCase.Double) { + output.WriteRawTag(17); + output.WriteDouble(Double); + } + if (variantCase_ == VariantOneofCase.Structure) { + output.WriteRawTag(26); + output.WriteBytes(Structure); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (variantCase_ == VariantOneofCase.Long) { + output.WriteRawTag(8); + output.WriteInt64(Long); + } + if (variantCase_ == VariantOneofCase.Double) { + output.WriteRawTag(17); + output.WriteDouble(Double); + } + if (variantCase_ == VariantOneofCase.Structure) { + output.WriteRawTag(26); + output.WriteBytes(Structure); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (variantCase_ == VariantOneofCase.Long) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Long); + } + if (variantCase_ == VariantOneofCase.Double) { + size += 1 + 8; + } + if (variantCase_ == VariantOneofCase.Structure) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Structure); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FieldValue other) { + if (other == null) { + return; + } + switch (other.VariantCase) { + case VariantOneofCase.Long: + Long = other.Long; + break; + case VariantOneofCase.Double: + Double = other.Double; + break; + case VariantOneofCase.Structure: + Structure = other.Structure; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Long = input.ReadInt64(); + break; + } + case 17: { + Double = input.ReadDouble(); + break; + } + case 26: { + Structure = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Long = input.ReadInt64(); + break; + } + case 17: { + Double = input.ReadDouble(); + break; + } + case 26: { + Structure = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs.meta b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs.meta new file mode 100644 index 000000000..812447d68 --- /dev/null +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/Service.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 734988533eceb44668500b491a228ddb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs new file mode 100644 index 000000000..8420c3409 --- /dev/null +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs @@ -0,0 +1,704 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: service.proto +// +#pragma warning disable 0414, 1591, 8981 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Games.Cheetah.Realtime.GRPC { + public static partial class RealtimeServerManagementService + { + static readonly string __ServiceName = "cheetah.matches.realtime.grpc.RealtimeServerManagementService"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_RoomTemplate = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.RoomTemplate.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_RoomIdResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.RoomIdResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_CreateMemberRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_CreateMemberResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_DeleteMemberRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_DeleteMemberResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.DeleteMemberResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_CreateSuperMemberRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_ProbeRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.ProbeRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_ProbeResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.ProbeResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_EmptyRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.EmptyRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_GetRoomsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.GetRoomsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_DeleteRoomRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_DeleteRoomResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.DeleteRoomResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_cheetah_matches_realtime_grpc_GetRoomsMembersCountResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Games.Cheetah.Realtime.GRPC.GetRoomsMembersCountResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateRoom = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateRoom", + __Marshaller_cheetah_matches_realtime_grpc_RoomTemplate, + __Marshaller_cheetah_matches_realtime_grpc_RoomIdResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateMember = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateMember", + __Marshaller_cheetah_matches_realtime_grpc_CreateMemberRequest, + __Marshaller_cheetah_matches_realtime_grpc_CreateMemberResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteMember = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteMember", + __Marshaller_cheetah_matches_realtime_grpc_DeleteMemberRequest, + __Marshaller_cheetah_matches_realtime_grpc_DeleteMemberResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateSuperMember = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateSuperMember", + __Marshaller_cheetah_matches_realtime_grpc_CreateSuperMemberRequest, + __Marshaller_cheetah_matches_realtime_grpc_CreateMemberResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Probe = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Probe", + __Marshaller_cheetah_matches_realtime_grpc_ProbeRequest, + __Marshaller_cheetah_matches_realtime_grpc_ProbeResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetRooms = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetRooms", + __Marshaller_cheetah_matches_realtime_grpc_EmptyRequest, + __Marshaller_cheetah_matches_realtime_grpc_GetRoomsResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteRoom = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteRoom", + __Marshaller_cheetah_matches_realtime_grpc_DeleteRoomRequest, + __Marshaller_cheetah_matches_realtime_grpc_DeleteRoomResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetRoomsMembersCount = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetRoomsMembersCount", + __Marshaller_cheetah_matches_realtime_grpc_EmptyRequest, + __Marshaller_cheetah_matches_realtime_grpc_GetRoomsMembersCountResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Games.Cheetah.Realtime.GRPC.ServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of RealtimeServerManagementService + [grpc::BindServiceMethod(typeof(RealtimeServerManagementService), "BindService")] + public abstract partial class RealtimeServerManagementServiceBase + { + /// + ///* + ///Создать комнату + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateRoom(global::Games.Cheetah.Realtime.GRPC.RoomTemplate request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + ///* + ///Присоединить пользователя к комнате, после этого комната будет ожидать udp соединения + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateMember(global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + ///* + ///Удалить пользователя из комнаты и закрыть соединение + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task DeleteMember(global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + ///* + ///Создать супер пользователя, для него отключены проверки всех прав + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateSuperMember(global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + ///* + ///Проверить живой ли сервер + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task Probe(global::Games.Cheetah.Realtime.GRPC.ProbeRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + ///* + ///Отслеживание операций создания комнаты, при первом вызове отсылаются и уже созданные комнаты. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetRooms(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + ///* + ///Отключить всех пользователей от комнаты и удалить её + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task DeleteRoom(global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetRoomsMembersCount(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for RealtimeServerManagementService + public partial class RealtimeServerManagementServiceClient : grpc::ClientBase + { + /// Creates a new client for RealtimeServerManagementService + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public RealtimeServerManagementServiceClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for RealtimeServerManagementService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public RealtimeServerManagementServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected RealtimeServerManagementServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected RealtimeServerManagementServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + ///* + ///Создать комнату + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.RoomIdResponse CreateRoom(global::Games.Cheetah.Realtime.GRPC.RoomTemplate request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateRoom(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Создать комнату + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.RoomIdResponse CreateRoom(global::Games.Cheetah.Realtime.GRPC.RoomTemplate request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateRoom, null, options, request); + } + /// + ///* + ///Создать комнату + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateRoomAsync(global::Games.Cheetah.Realtime.GRPC.RoomTemplate request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateRoomAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Создать комнату + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateRoomAsync(global::Games.Cheetah.Realtime.GRPC.RoomTemplate request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateRoom, null, options, request); + } + /// + ///* + ///Присоединить пользователя к комнате, после этого комната будет ожидать udp соединения + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse CreateMember(global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateMember(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Присоединить пользователя к комнате, после этого комната будет ожидать udp соединения + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse CreateMember(global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateMember, null, options, request); + } + /// + ///* + ///Присоединить пользователя к комнате, после этого комната будет ожидать udp соединения + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateMemberAsync(global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateMemberAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Присоединить пользователя к комнате, после этого комната будет ожидать udp соединения + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateMemberAsync(global::Games.Cheetah.Realtime.GRPC.CreateMemberRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateMember, null, options, request); + } + /// + ///* + ///Удалить пользователя из комнаты и закрыть соединение + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.DeleteMemberResponse DeleteMember(global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteMember(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Удалить пользователя из комнаты и закрыть соединение + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.DeleteMemberResponse DeleteMember(global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteMember, null, options, request); + } + /// + ///* + ///Удалить пользователя из комнаты и закрыть соединение + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteMemberAsync(global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteMemberAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Удалить пользователя из комнаты и закрыть соединение + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteMemberAsync(global::Games.Cheetah.Realtime.GRPC.DeleteMemberRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteMember, null, options, request); + } + /// + ///* + ///Создать супер пользователя, для него отключены проверки всех прав + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse CreateSuperMember(global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateSuperMember(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Создать супер пользователя, для него отключены проверки всех прав + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.CreateMemberResponse CreateSuperMember(global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateSuperMember, null, options, request); + } + /// + ///* + ///Создать супер пользователя, для него отключены проверки всех прав + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateSuperMemberAsync(global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateSuperMemberAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Создать супер пользователя, для него отключены проверки всех прав + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateSuperMemberAsync(global::Games.Cheetah.Realtime.GRPC.CreateSuperMemberRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateSuperMember, null, options, request); + } + /// + ///* + ///Проверить живой ли сервер + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.ProbeResponse Probe(global::Games.Cheetah.Realtime.GRPC.ProbeRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Probe(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Проверить живой ли сервер + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.ProbeResponse Probe(global::Games.Cheetah.Realtime.GRPC.ProbeRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Probe, null, options, request); + } + /// + ///* + ///Проверить живой ли сервер + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ProbeAsync(global::Games.Cheetah.Realtime.GRPC.ProbeRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ProbeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Проверить живой ли сервер + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ProbeAsync(global::Games.Cheetah.Realtime.GRPC.ProbeRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Probe, null, options, request); + } + /// + ///* + ///Отслеживание операций создания комнаты, при первом вызове отсылаются и уже созданные комнаты. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.GetRoomsResponse GetRooms(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetRooms(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Отслеживание операций создания комнаты, при первом вызове отсылаются и уже созданные комнаты. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.GetRoomsResponse GetRooms(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetRooms, null, options, request); + } + /// + ///* + ///Отслеживание операций создания комнаты, при первом вызове отсылаются и уже созданные комнаты. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetRoomsAsync(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetRoomsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Отслеживание операций создания комнаты, при первом вызове отсылаются и уже созданные комнаты. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetRoomsAsync(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetRooms, null, options, request); + } + /// + ///* + ///Отключить всех пользователей от комнаты и удалить её + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.DeleteRoomResponse DeleteRoom(global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteRoom(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Отключить всех пользователей от комнаты и удалить её + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.DeleteRoomResponse DeleteRoom(global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteRoom, null, options, request); + } + /// + ///* + ///Отключить всех пользователей от комнаты и удалить её + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteRoomAsync(global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteRoomAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + ///* + ///Отключить всех пользователей от комнаты и удалить её + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteRoomAsync(global::Games.Cheetah.Realtime.GRPC.DeleteRoomRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteRoom, null, options, request); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.GetRoomsMembersCountResponse GetRoomsMembersCount(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetRoomsMembersCount(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Games.Cheetah.Realtime.GRPC.GetRoomsMembersCountResponse GetRoomsMembersCount(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetRoomsMembersCount, null, options, request); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetRoomsMembersCountAsync(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetRoomsMembersCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetRoomsMembersCountAsync(global::Games.Cheetah.Realtime.GRPC.EmptyRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetRoomsMembersCount, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override RealtimeServerManagementServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new RealtimeServerManagementServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(RealtimeServerManagementServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_CreateRoom, serviceImpl.CreateRoom) + .AddMethod(__Method_CreateMember, serviceImpl.CreateMember) + .AddMethod(__Method_DeleteMember, serviceImpl.DeleteMember) + .AddMethod(__Method_CreateSuperMember, serviceImpl.CreateSuperMember) + .AddMethod(__Method_Probe, serviceImpl.Probe) + .AddMethod(__Method_GetRooms, serviceImpl.GetRooms) + .AddMethod(__Method_DeleteRoom, serviceImpl.DeleteRoom) + .AddMethod(__Method_GetRoomsMembersCount, serviceImpl.GetRoomsMembersCount).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, RealtimeServerManagementServiceBase serviceImpl) + { + serviceBinder.AddMethod(__Method_CreateRoom, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateRoom)); + serviceBinder.AddMethod(__Method_CreateMember, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateMember)); + serviceBinder.AddMethod(__Method_DeleteMember, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteMember)); + serviceBinder.AddMethod(__Method_CreateSuperMember, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateSuperMember)); + serviceBinder.AddMethod(__Method_Probe, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Probe)); + serviceBinder.AddMethod(__Method_GetRooms, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetRooms)); + serviceBinder.AddMethod(__Method_DeleteRoom, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteRoom)); + serviceBinder.AddMethod(__Method_GetRoomsMembersCount, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetRoomsMembersCount)); + } + + } +} +#endregion diff --git a/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs.meta b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs.meta new file mode 100644 index 000000000..5cc9b6352 --- /dev/null +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ServiceGrpc.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2de40bee5f6434880b865821c4fe0d5d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef similarity index 73% rename from client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef rename to client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef index 083f46903..4508d3351 100644 --- a/client/Unity/Packages/games.cheetah.grpc.shared/Runtime/games.cheetah.grpc.shared.asmdef +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef @@ -1,6 +1,6 @@ { - "name": "games.cheetah.grpc.shared", - "rootNamespace": "Games.Cheetah.Grpc.Shared", + "name": "games.cheetah.realtime.grpc", + "rootNamespace": "Games.Cheetah.Realtime.Grpc", "references": [ "games.cheetah.grpc" ], diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/package.json.meta b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef.meta similarity index 59% rename from client/Unity/Packages/games.cheetah.grpc.shared/package.json.meta rename to client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef.meta index f13812949..d9dec6152 100644 --- a/client/Unity/Packages/games.cheetah.grpc.shared/package.json.meta +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/games.cheetah.realtime.grpc.asmdef.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: ad3f075d2064443e5ac82eeb264dbc75 -PackageManifestImporter: +guid: 7030a202f289141d5917bce800a721f2 +AssemblyDefinitionImporter: externalObjects: {} userData: assetBundleName: diff --git a/client/Unity/Packages/games.cheetah.grpc.shared/package.json b/client/Unity/Packages/games.cheetah.realtime.grpc/package.json similarity index 67% rename from client/Unity/Packages/games.cheetah.grpc.shared/package.json rename to client/Unity/Packages/games.cheetah.realtime.grpc/package.json index ed25ebad0..9b743e0b4 100644 --- a/client/Unity/Packages/games.cheetah.grpc.shared/package.json +++ b/client/Unity/Packages/games.cheetah.realtime.grpc/package.json @@ -1,14 +1,14 @@ { - "name": "games.cheetah.grpc.shared", + "name": "games.cheetah.realtime.grpc", "version": "999.999.999", - "displayName": "games.cheetah.grpc.shared", - "description": "Shared library for relay server", + "displayName": "games.cheetah.realtime.grpc", + "description": "Realtime battle server.", "unity": "2019.1", "unityRelease": "0b5", + "repository": "github:cheetah-game-platform/platform", "dependencies": { "games.cheetah.grpc": "999.999.999" }, - "repository": "github:cheetah-game-platform/platform", "hideInEditor": false, "type": "library", "author": "https://cheetah.games" diff --git a/client/Unity/Packages/games.cheetah.grpc.internal/package.json.meta b/client/Unity/Packages/games.cheetah.realtime.grpc/package.json.meta similarity index 100% rename from client/Unity/Packages/games.cheetah.grpc.internal/package.json.meta rename to client/Unity/Packages/games.cheetah.realtime.grpc/package.json.meta diff --git a/client/Unity/Packages/games.cheetah.uds/Runtime/API/UDSPlugin.cs b/client/Unity/Packages/games.cheetah.uds/Runtime/API/UDSPlugin.cs index 7ef83cc10..5d68802e9 100644 --- a/client/Unity/Packages/games.cheetah.uds/Runtime/API/UDSPlugin.cs +++ b/client/Unity/Packages/games.cheetah.uds/Runtime/API/UDSPlugin.cs @@ -5,10 +5,9 @@ using System.Threading.Tasks; using Games.Cheetah.Client; using Games.Cheetah.Client.Codec; -using Games.Cheetah.GRPC.Internal; +using Games.Cheetah.Realtime.GRPC; using Grpc.Net.Client; using Grpc.Net.Client.Web; -using static Games.Cheetah.GRPC.Internal.Internal; namespace Games.Cheetah.UDS.API { @@ -18,7 +17,9 @@ namespace Games.Cheetah.UDS.API */ public class UDSPlugin { - public delegate void OnRoomCreated(ulong roomId, InternalClient internalClient, NetworkClient cheetahClient); + public delegate void OnRoomCreated(ulong roomId, + RealtimeServerManagementService.RealtimeServerManagementServiceClient grpcClient, + NetworkClient cheetahClient); public delegate void OnRoomDeleted(ulong roomId); @@ -31,7 +32,7 @@ public class UDSPlugin private readonly ushort udpServerPort; private HashSet processedRooms = new(); private HashSet tmpRooms = new(); - private readonly InternalClient internalClient; + private readonly RealtimeServerManagementService.RealtimeServerManagementServiceClient grpcClient; public UDSPlugin( Uri webGrpcRealtimeServerInternalUri, @@ -55,7 +56,7 @@ CodecRegistry codecRegistry } ); - internalClient = new InternalClient(channel); + grpcClient = new RealtimeServerManagementService.RealtimeServerManagementServiceClient(channel); } @@ -64,7 +65,7 @@ CodecRegistry codecRegistry */ public async Task OnUpdate() { - var rooms = await internalClient.GetRoomsAsync(new EmptyRequest()); + var rooms = await grpcClient.GetRoomsAsync(new EmptyRequest()); var roomsOnServer = rooms.Rooms.ToHashSet(); foreach (var room in roomsOnServer) @@ -92,7 +93,7 @@ public async Task OnUpdate() private async Task CreateRoomPlugin(ulong roomId) { - var member = await internalClient.CreateSuperMemberAsync(new CreateSuperMemberRequest + var member = await grpcClient.CreateSuperMemberAsync(new CreateSuperMemberRequest { RoomId = roomId }); @@ -106,7 +107,7 @@ private async Task CreateRoomPlugin(ulong roomId) member.PrivateKey.ToByteArray(), codecRegistry, 10); - onRoomCreated(roomId, internalClient, cheetahClient); + onRoomCreated(roomId, grpcClient, cheetahClient); } } } \ No newline at end of file diff --git a/client/Unity/Packages/games.cheetah.uds/Runtime/games.cheetah.uds.asmdef b/client/Unity/Packages/games.cheetah.uds/Runtime/games.cheetah.uds.asmdef index d2549bd7c..9a30850f4 100644 --- a/client/Unity/Packages/games.cheetah.uds/Runtime/games.cheetah.uds.asmdef +++ b/client/Unity/Packages/games.cheetah.uds/Runtime/games.cheetah.uds.asmdef @@ -4,7 +4,7 @@ "references": [ "games.cheetah.client", "games.cheetah.grpc", - "games.cheetah.grpc.internal" + "games.cheetah.realtime.grpc" ], "allowUnsafeCode": true, "overrideReferences": false, diff --git a/client/Unity/Packages/games.cheetah.uds/Test.meta b/client/Unity/Packages/games.cheetah.uds/Test.meta index a5f1f82cc..6a3e2f6c6 100644 --- a/client/Unity/Packages/games.cheetah.uds/Test.meta +++ b/client/Unity/Packages/games.cheetah.uds/Test.meta @@ -1,3 +1,8 @@ fileFormatVersion: 2 -guid: 7bff5021f27b4ed0b1bafb1b3b17df17 -timeCreated: 1670049952 \ No newline at end of file +guid: 85c9fdcde8918418598990d895c38c80 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/client/Unity/Packages/games.cheetah.uds/Test/Test.cs b/client/Unity/Packages/games.cheetah.uds/Test/Test.cs index 774dd10f1..1c02bc1c9 100644 --- a/client/Unity/Packages/games.cheetah.uds/Test/Test.cs +++ b/client/Unity/Packages/games.cheetah.uds/Test/Test.cs @@ -5,7 +5,7 @@ using Games.Cheetah.Client.Codec; using Games.Cheetah.Client.Types.Network; using Games.Cheetah.EmbeddedServer.API; -using Games.Cheetah.GRPC.Internal; +using Games.Cheetah.Realtime.GRPC; using Games.Cheetah.UDS.API; using NUnit.Framework; @@ -58,7 +58,9 @@ private void OnRoomDeleted(ulong roomId) throw new NotImplementedException(); } - private void OnRoomCreated(ulong roomId, Internal.InternalClient internalClient, NetworkClient cheetahClient) + private void OnRoomCreated(ulong roomId, + RealtimeServerManagementService.RealtimeServerManagementServiceClient internalClient, + NetworkClient cheetahClient) { createdRoomId = roomId; this.cheetahClient = cheetahClient; diff --git a/client/Unity/Packages/games.cheetah.uds/Test/games.cheetah.uds.test.asmdef b/client/Unity/Packages/games.cheetah.uds/Test/games.cheetah.uds.test.asmdef index a120ec137..a8fbb05d2 100644 --- a/client/Unity/Packages/games.cheetah.uds/Test/games.cheetah.uds.test.asmdef +++ b/client/Unity/Packages/games.cheetah.uds/Test/games.cheetah.uds.test.asmdef @@ -6,7 +6,7 @@ "UnityEditor.TestRunner", "UnityEngine", "games.cheetah.client", - "games.cheetah.grpc.internal", + "games.cheetah.realtime.grpc", "games.cheetah.grpc", "games.cheetah.embedded-server", "games.cheetah.uds" diff --git a/client/Unity/Packages/games.cheetah.uds/package.json b/client/Unity/Packages/games.cheetah.uds/package.json index 194204134..aedb3ae82 100644 --- a/client/Unity/Packages/games.cheetah.uds/package.json +++ b/client/Unity/Packages/games.cheetah.uds/package.json @@ -8,7 +8,7 @@ "dependencies": { "games.cheetah.grpc": "999.999.999", "games.cheetah.client": "999.999.999", - "games.cheetah.grpc.internal": "999.999.999", + "games.cheetah.realtime.grpc": "999.999.999", "games.cheetah.embedded-server": "999.999.999" }, "repository": "github:cheetah-game-platform/platform", diff --git a/client/Unity/Packages/packages-lock.json b/client/Unity/Packages/packages-lock.json index fa858cc45..87bb7ea9c 100644 --- a/client/Unity/Packages/packages-lock.json +++ b/client/Unity/Packages/packages-lock.json @@ -226,7 +226,6 @@ "source": "embedded", "dependencies": { "games.cheetah.grpc": "999.999.999", - "games.cheetah.grpc.shared": "999.999.999", "com.unity.collections": "1.2.4" } }, @@ -237,7 +236,7 @@ "dependencies": { "games.cheetah.grpc": "999.999.999", "games.cheetah.client": "999.999.999", - "games.cheetah.grpc.internal": "999.999.999" + "games.cheetah.realtime.grpc": "999.999.999" } }, "games.cheetah.grpc": { @@ -249,17 +248,8 @@ }, "hash": "a528eb1f83d995ed8ba1497af70fa63f3b9b2937" }, - "games.cheetah.grpc.internal": { - "version": "file:games.cheetah.grpc.internal", - "depth": 0, - "source": "embedded", - "dependencies": { - "games.cheetah.grpc": "999.999.999", - "games.cheetah.grpc.shared": "999.999.999" - } - }, - "games.cheetah.grpc.shared": { - "version": "file:games.cheetah.grpc.shared", + "games.cheetah.realtime.grpc": { + "version": "file:games.cheetah.realtime.grpc", "depth": 0, "source": "embedded", "dependencies": { @@ -273,7 +263,7 @@ "dependencies": { "games.cheetah.grpc": "999.999.999", "games.cheetah.client": "999.999.999", - "games.cheetah.grpc.internal": "999.999.999", + "games.cheetah.realtime.grpc": "999.999.999", "games.cheetah.embedded-server": "999.999.999" } }, diff --git a/client/Unity/ProjectSettings/ProjectVersion.txt b/client/Unity/ProjectSettings/ProjectVersion.txt index 9a1a50241..da6718916 100644 --- a/client/Unity/ProjectSettings/ProjectVersion.txt +++ b/client/Unity/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2022.2.17f1 -m_EditorVersionWithRevision: 2022.2.17f1 (54cb9bda89c4) +m_EditorVersion: 2022.3.14f1 +m_EditorVersionWithRevision: 2022.3.14f1 (eff2de9070d8) diff --git a/proto/internal.proto b/proto/service.proto similarity index 81% rename from proto/internal.proto rename to proto/service.proto index fc9438bbb..2233667a2 100644 --- a/proto/internal.proto +++ b/proto/service.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package cheetah.matches.realtime.internal; -option csharp_namespace = "Games.Cheetah.GRPC.Internal"; +package cheetah.matches.realtime.grpc; +option csharp_namespace = "Games.Cheetah.Realtime.GRPC"; -import public "shared.proto"; - -service Internal { +service RealtimeServerManagementService { /** Создать комнату */ @@ -85,6 +83,7 @@ message RoomTemplate { Начальные игровые объекты комнаты */ repeated GameObjectTemplate objects = 2; + repeated GameObjectConfig configs = 3; } message UserTemplate { @@ -96,7 +95,16 @@ message GameObjectTemplate { uint32 id = 1; uint32 template = 2; uint64 groups = 3; - repeated cheetah.matches.realtime.shared.GameObjectField fields = 4; + GameObjectField fields = 4; +} + +message GameObjectConfig { + uint32 template = 1; + map itemsConfig = 2 ; +} + +message ItemConfig { + uint32 capacity = 1; } @@ -135,4 +143,23 @@ message RoomMembersCountResponse { uint64 room = 1; uint32 members = 2; uint32 connected_members = 3; -} \ No newline at end of file +} +enum FieldType { + Long = 0; + Double = 1; + Structure = 2; + Event = 3; +} + +message GameObjectField { + uint32 id = 1; + FieldValue value = 2; +} + +message FieldValue { + oneof Variant { + int64 long = 1; + double double = 2; + bytes structure = 3; + } +} diff --git a/proto/shared.proto b/proto/shared.proto deleted file mode 100644 index d983b8ecb..000000000 --- a/proto/shared.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; -package cheetah.matches.realtime.shared; -option csharp_namespace = "Games.Cheetah.GRPC.Shared"; - -enum FieldType { - Long = 0; - Double = 1; - Structure = 2; - Event = 3; -} - -message GameObjectField { - uint32 id = 1; - FieldValue value = 2; -} - -message FieldValue { - oneof Variant { - int64 long = 1; - double double = 2; - bytes structure = 3; - } -} diff --git a/rust/Client/tests/helpers/helper.rs b/rust/Client/tests/helpers/helper.rs index b409e54a4..3fa6610c7 100644 --- a/rust/Client/tests/helpers/helper.rs +++ b/rust/Client/tests/helpers/helper.rs @@ -11,7 +11,7 @@ use cheetah_client::ffi::command::{S2CCommandFFI, S2CommandUnionFFI}; use cheetah_common::commands::CommandTypeId; use cheetah_common::room::object::GameObjectId; use cheetah_server::server::manager::ServerManager; -use cheetah_server::server::room::template::config::MemberTemplate; +use cheetah_server::server::room::config::member::MemberCreateParams; use crate::helpers::server::IntegrationTestServerBuilder; @@ -69,7 +69,7 @@ impl IntegrationTestHelper { pub fn create_member(&mut self) -> (RoomMemberId, MemberPrivateKey) { let private_key = MemberPrivateKey::new_random(); - let member_template = MemberTemplate { + let member_template = MemberCreateParams { super_member: false, private_key: private_key.clone(), groups: IntegrationTestServerBuilder::DEFAULT_ACCESS_GROUP, diff --git a/rust/Client/tests/helpers/server.rs b/rust/Client/tests/helpers/server.rs index 504e7fe64..ada61beda 100644 --- a/rust/Client/tests/helpers/server.rs +++ b/rust/Client/tests/helpers/server.rs @@ -4,7 +4,7 @@ use cheetah_common::room::object::GameObjectTemplateId; use cheetah_game_realtime_protocol::coniguration::ProtocolConfiguration; use cheetah_game_realtime_protocol::RoomId; use cheetah_server::server::manager::ServerManager; -use cheetah_server::server::room::template::config::RoomTemplate; +use cheetah_server::server::room::config::room::RoomCreateParams; use std::net::SocketAddr; use std::time::Duration; @@ -13,7 +13,7 @@ use std::time::Duration; /// #[derive(Debug, Default)] pub struct IntegrationTestServerBuilder { - template: RoomTemplate, + template: RoomCreateParams, } impl IntegrationTestServerBuilder { diff --git a/rust/Common/src/tracer/mod.rs b/rust/Common/src/tracer/mod.rs index c5aafad30..7be9c47d4 100644 --- a/rust/Common/src/tracer/mod.rs +++ b/rust/Common/src/tracer/mod.rs @@ -133,7 +133,7 @@ mod tests { path.push("Common"); path.push("src"); path.push("tracer"); - path.push("mod.rs"); + path.push("mod"); let view_path = path.display(); let error = format!("some error in {view_path}"); diff --git a/rust/Server/build.rs b/rust/Server/build.rs index 65d0007b9..f0aad011e 100644 --- a/rust/Server/build.rs +++ b/rust/Server/build.rs @@ -8,7 +8,7 @@ fn main() -> Result<(), Error> { std::env::set_var("PROTOC", PathBuf::from("../../scripts/bin/lin/protoc")); #[cfg(target_os = "windows")] std::env::set_var("PROTOC", PathBuf::from("../../scripts/bin/win/protoc")); - tonic_build::configure().compile(&["../../proto/internal.proto"], &["../../proto/"])?; + tonic_build::configure().compile(&["../../proto/service.proto"], &["../../proto/"])?; tonic_build::configure().build_server(false).compile(&["../../proto/status-receiver.proto"], &["../../proto/"])?; Ok(()) } diff --git a/rust/Server/src/lib.rs b/rust/Server/src/lib.rs index a328ce64b..e8e95a39f 100644 --- a/rust/Server/src/lib.rs +++ b/rust/Server/src/lib.rs @@ -4,8 +4,8 @@ use std::sync::Arc; use crate::intergration::agones::agones_und_notifyservice_cycle; use crate::server::debug::run_debug_server; -use crate::server::manager::grpc::proto::internal::internal_server::InternalServer; -use crate::server::manager::grpc::RealtimeInternalService; +use crate::server::manager::grpc::proto::realtime_server_management_service_server::RealtimeServerManagementServiceServer; +use crate::server::manager::grpc::RealtimeServerManagementServiceImpl; use crate::server::manager::ServerManager; use futures::join; use tokio::net::TcpListener; @@ -48,7 +48,7 @@ impl Server { } async fn new_internal_grpc_service(listener: TcpListener, manager: Arc>) { - let service = InternalServer::new(RealtimeInternalService::new(manager)); + let service = RealtimeServerManagementServiceServer::new(RealtimeServerManagementServiceImpl::new(manager)); let (mut health_reporter, health_service) = tonic_health::server::health_reporter(); health_reporter.set_service_status("", ServingStatus::Serving).await; @@ -62,7 +62,7 @@ impl Server { } async fn new_internal_webgrpc_service(listener: TcpListener, manager: Arc>) { - let service = InternalServer::new(RealtimeInternalService::new(manager)); + let service = RealtimeServerManagementServiceServer::new(RealtimeServerManagementServiceImpl::new(manager)); let (mut health_reporter, health_service) = tonic_health::server::health_reporter(); health_reporter.set_service_status("", ServingStatus::Serving).await; diff --git a/rust/Server/src/server/debug/mod.rs b/rust/Server/src/server/debug/mod.rs index b3f08fc52..5bd193033 100644 --- a/rust/Server/src/server/debug/mod.rs +++ b/rust/Server/src/server/debug/mod.rs @@ -65,7 +65,7 @@ where pub mod test { use crate::server::debug::{full_dump_rooms, simple_dump_rooms}; use crate::server::manager::ServerManager; - use crate::server::room::template::config::RoomTemplate; + use crate::server::room::config::room::RoomCreateParams; use cheetah_common::network::bind_to_free_socket; use cheetah_game_realtime_protocol::coniguration::ProtocolConfiguration; use std::sync::Arc; @@ -81,9 +81,9 @@ pub mod test { ) .unwrap(); let room_id = server_manager - .create_room(RoomTemplate { + .create_room(RoomCreateParams { name: "".to_string(), - objects: vec![], + ..Default::default() }) .unwrap(); @@ -102,9 +102,9 @@ pub mod test { ) .unwrap(); let room_id = server_manager - .create_room(RoomTemplate { + .create_room(RoomCreateParams { name: "perm_room".to_string(), - objects: vec![], + ..Default::default() }) .unwrap(); diff --git a/rust/Server/src/server/manager/grpc/from.rs b/rust/Server/src/server/manager/grpc/from.rs index 3cd41015a..61fefa389 100644 --- a/rust/Server/src/server/manager/grpc/from.rs +++ b/rust/Server/src/server/manager/grpc/from.rs @@ -1,28 +1,46 @@ -use crate::server::manager::grpc::proto::internal; -use crate::server::manager::grpc::proto::shared::field_value::Variant; -use crate::server::room::template::config; +use crate::server::manager::grpc; +use crate::server::manager::grpc::proto; +use crate::server::manager::grpc::proto::field_value::Variant; +use crate::server::manager::grpc::proto::{GameObjectConfig, GameObjectTemplate, ItemConfig}; +use crate::server::room::config::{member, object, room}; use cheetah_common::room::access::AccessGroups; use cheetah_common::room::buffer::Buffer; use cheetah_common::room::field::FieldId; +use cheetah_common::room::object::GameObjectTemplateId; -impl From for config::RoomTemplate { - fn from(source: internal::RoomTemplate) -> config::RoomTemplate { - config::RoomTemplate { +impl From for room::RoomCreateParams { + fn from(source: grpc::RoomTemplate) -> room::RoomCreateParams { + Self { name: source.template_name, - objects: source.objects.into_iter().map(config::GameObjectTemplate::from).collect(), + objects: source.objects.into_iter().map(From::from).collect(), + configs: source.configs.into_iter().map(|config| (config.template as GameObjectTemplateId, From::from(config))).collect(), } } } -impl From for config::MemberTemplate { - fn from(source: internal::UserTemplate) -> Self { - config::MemberTemplate::new_member(AccessGroups(source.groups), source.objects.into_iter().map(config::GameObjectTemplate::from).collect()) +impl From for object::GameObjectConfig { + fn from(source: GameObjectConfig) -> Self { + Self { + items_config: source.items_config.into_iter().map(|item| (item.0 as FieldId, From::from(item.1))).collect(), + } + } +} + +impl From for object::ItemConfig { + fn from(source: ItemConfig) -> Self { + Self { capacity: source.capacity as usize } + } +} + +impl From for member::MemberCreateParams { + fn from(source: proto::UserTemplate) -> Self { + member::MemberCreateParams::new_member(AccessGroups(source.groups), source.objects.into_iter().map(object::GameObjectCreateParams::from).collect()) } } -impl From for config::GameObjectTemplate { +impl From for object::GameObjectCreateParams { #[allow(clippy::cast_possible_truncation)] - fn from(source: internal::GameObjectTemplate) -> Self { + fn from(source: proto::GameObjectTemplate) -> Self { let fields: Vec<_> = source .fields .into_iter() @@ -33,7 +51,7 @@ impl From for config::GameObjectTemplate { }) .collect(); - config::GameObjectTemplate { + object::GameObjectCreateParams { id: source.id, template: source.template as u16, groups: AccessGroups(source.groups), diff --git a/rust/Server/src/server/manager/grpc/mod.rs b/rust/Server/src/server/manager/grpc/mod.rs index e911c393d..95b3957da 100644 --- a/rust/Server/src/server/manager/grpc/mod.rs +++ b/rust/Server/src/server/manager/grpc/mod.rs @@ -1,17 +1,16 @@ -use cheetah_game_realtime_protocol::others::member_id::MemberAndRoomId; -use cheetah_game_realtime_protocol::RoomId; -use std::sync::Arc; - -use crate::server::manager::grpc::proto::internal::internal_server::Internal; -use crate::server::manager::grpc::proto::internal::{ +use crate::server::manager::grpc::proto::realtime_server_management_service_server::RealtimeServerManagementService; +use crate::server::manager::grpc::proto::{ CreateMemberRequest, CreateMemberResponse, CreateSuperMemberRequest, DeleteMemberRequest, DeleteMemberResponse, DeleteRoomRequest, DeleteRoomResponse, EmptyRequest, GetRoomsMembersCountResponse, GetRoomsResponse, ProbeRequest, ProbeResponse, RoomIdResponse, RoomMembersCountResponse, RoomTemplate, }; use crate::server::manager::{ManagementTaskError, ManagementTaskExecutionError}; use crate::server::room::command::ServerCommandError; -use crate::server::room::template::config::MemberTemplate; +use crate::server::room::config::member::MemberCreateParams; use crate::ServerManager; use cheetah_common::room::access::AccessGroups; +use cheetah_game_realtime_protocol::others::member_id::MemberAndRoomId; +use cheetah_game_realtime_protocol::RoomId; +use std::sync::Arc; use tokio::sync::Mutex; use tokio::sync::MutexGuard; use tonic::{Request, Response, Status}; @@ -19,19 +18,19 @@ use tonic::{Request, Response, Status}; mod from; pub mod proto; -pub struct RealtimeInternalService { +pub struct RealtimeServerManagementServiceImpl { pub server_manager: Arc>, } const SUPER_MEMBER_KEY_ENV: &str = "SUPER_MEMBER_KEY"; -impl RealtimeInternalService { +impl RealtimeServerManagementServiceImpl { #[must_use] pub fn new(server_manager: Arc>) -> Self { - RealtimeInternalService { server_manager } + RealtimeServerManagementServiceImpl { server_manager } } - async fn register_member(&self, room_id: RoomId, template: MemberTemplate) -> Result, Status> { + async fn register_member(&self, room_id: RoomId, template: MemberCreateParams) -> Result, Status> { let private_key = template.private_key.clone(); self.server_manager.lock().await.create_member(room_id, template).map_err(Status::from).map(|member_id| { Response::new(CreateMemberResponse { @@ -45,7 +44,7 @@ impl RealtimeInternalService { if let Ok(key_from_env) = std::env::var(SUPER_MEMBER_KEY_ENV) { let key_from_env_bytes = key_from_env.as_bytes(); let key = key_from_env_bytes.into(); - server.create_member(room_id, MemberTemplate::new_super_member_with_key(key))?; + server.create_member(room_id, MemberCreateParams::new_super_member_with_key(key))?; } Ok(()) @@ -53,7 +52,7 @@ impl RealtimeInternalService { } #[tonic::async_trait] -impl Internal for RealtimeInternalService { +impl RealtimeServerManagementService for RealtimeServerManagementServiceImpl { async fn create_room(&self, request: Request) -> Result, Status> { let mut server = self.server_manager.lock().await; let template = From::from(request.into_inner()); @@ -70,7 +69,7 @@ impl Internal for RealtimeInternalService { if user_template.groups == AccessGroups::super_member_group().0 { return Err(Status::permission_denied("Wrong member group")); } - self.register_member(request.room_id, MemberTemplate::from(user_template)).await + self.register_member(request.room_id, MemberCreateParams::from(user_template)).await } /// закрыть соединение с пользователем и удалить его из комнаты @@ -88,7 +87,7 @@ impl Internal for RealtimeInternalService { async fn create_super_member(&self, request: Request) -> Result, Status> { let request = request.into_inner(); - self.register_member(request.room_id, MemberTemplate::new_super_member()).await + self.register_member(request.room_id, MemberCreateParams::new_super_member()).await } async fn probe(&self, _request: Request) -> Result, Status> { @@ -150,11 +149,11 @@ impl From for Status { #[cfg(test)] mod test { - use crate::server::manager::grpc::proto::internal::internal_server::Internal; - use crate::server::manager::grpc::proto::internal::{DeleteMemberRequest, DeleteRoomRequest, EmptyRequest, RoomMembersCountResponse}; - use crate::server::manager::grpc::{RealtimeInternalService, SUPER_MEMBER_KEY_ENV}; + use crate::server::manager::grpc::proto::realtime_server_management_service_server::RealtimeServerManagementService; + use crate::server::manager::grpc::proto::{DeleteMemberRequest, DeleteRoomRequest, EmptyRequest, RoomMembersCountResponse}; + use crate::server::manager::grpc::{RealtimeServerManagementServiceImpl, SUPER_MEMBER_KEY_ENV}; use crate::server::manager::ServerManager; - use crate::server::room::template::config::MemberTemplate; + use crate::server::room::config::member::MemberCreateParams; use cheetah_common::network::bind_to_free_socket; use cheetah_game_realtime_protocol::coniguration::ProtocolConfiguration; use std::sync::Arc; @@ -165,7 +164,7 @@ mod test { #[tokio::test] async fn should_get_rooms() { let server_manager = Arc::new(Mutex::new(new_server_manager())); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); let room_1 = server_manager.lock().await.create_room(Default::default()).unwrap(); let room_2 = server_manager.lock().await.create_room(Default::default()).unwrap(); @@ -179,7 +178,7 @@ mod test { #[tokio::test] async fn should_get_rooms_members_counts() { let server_manager = Arc::new(Mutex::new(new_server_manager())); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); let room_1 = server_manager.lock().await.create_room(Default::default()).unwrap(); let room_2 = server_manager.lock().await.create_room(Default::default()).unwrap(); server_manager @@ -187,7 +186,7 @@ mod test { .await .create_member( room_1, - MemberTemplate { + MemberCreateParams { super_member: false, private_key: Default::default(), groups: Default::default(), @@ -216,7 +215,7 @@ mod test { let server_manager = Arc::new(Mutex::new(new_server_manager())); std::env::set_var(SUPER_MEMBER_KEY_ENV, "some-key"); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); let room_id = service.create_room(Request::new(Default::default())).await.unwrap().into_inner(); let dump_response = server_manager.lock().await.dump(room_id.room_id).unwrap(); @@ -227,7 +226,7 @@ mod test { async fn test_delete_room() { let server_manager = Arc::new(Mutex::new(new_server_manager())); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); let room_id = service.create_room(Request::new(Default::default())).await.unwrap().into_inner().room_id; service.delete_room(Request::new(DeleteRoomRequest { id: room_id })).await.unwrap(); @@ -237,7 +236,7 @@ mod test { async fn test_delete_room_not_exist() { let server_manager = Arc::new(Mutex::new(new_server_manager())); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); service.delete_room(Request::new(Default::default())).await.unwrap_err(); } @@ -245,10 +244,10 @@ mod test { #[tokio::test] async fn test_delete_member() { let server_manager = Arc::new(Mutex::new(new_server_manager())); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); let room_id = service.create_room(Request::new(Default::default())).await.unwrap().into_inner().room_id; - let member_id = service.register_member(room_id, MemberTemplate::default()).await.unwrap().into_inner().user_id; + let member_id = service.register_member(room_id, MemberCreateParams::default()).await.unwrap().into_inner().user_id; assert!(!server_manager.lock().await.dump(room_id).unwrap().unwrap().members.is_empty(), "room should not be empty"); assert!( @@ -265,7 +264,7 @@ mod test { #[tokio::test] async fn test_delete_member_room_not_exist() { let server_manager = Arc::new(Mutex::new(new_server_manager())); - let service = RealtimeInternalService::new(Arc::clone(&server_manager)); + let service = RealtimeServerManagementServiceImpl::new(Arc::clone(&server_manager)); let res = service.delete_member(Request::new(DeleteMemberRequest { user_id: 0, room_id: 0 })).await; diff --git a/rust/Server/src/server/manager/grpc/proto.rs b/rust/Server/src/server/manager/grpc/proto.rs index 0f9ee34eb..bf46e19c1 100644 --- a/rust/Server/src/server/manager/grpc/proto.rs +++ b/rust/Server/src/server/manager/grpc/proto.rs @@ -1,27 +1,11 @@ -pub mod shared { - #![allow( - clippy::empty_structs_with_brackets, - clippy::derive_partial_eq_without_eq, - clippy::wildcard_imports, - clippy::return_self_not_must_use, - clippy::clone_on_ref_ptr, - clippy::similar_names, - clippy::must_use_candidate, - clippy::doc_markdown - )] - tonic::include_proto!("cheetah.matches.realtime.shared"); -} - -pub mod internal { - #![allow( - clippy::empty_structs_with_brackets, - clippy::derive_partial_eq_without_eq, - clippy::wildcard_imports, - clippy::return_self_not_must_use, - clippy::clone_on_ref_ptr, - clippy::similar_names, - clippy::must_use_candidate, - clippy::doc_markdown - )] - tonic::include_proto!("cheetah.matches.realtime.internal"); -} +#![allow( + clippy::empty_structs_with_brackets, + clippy::derive_partial_eq_without_eq, + clippy::wildcard_imports, + clippy::return_self_not_must_use, + clippy::clone_on_ref_ptr, + clippy::similar_names, + clippy::must_use_candidate, + clippy::doc_markdown +)] +tonic::include_proto!("cheetah.matches.realtime.grpc"); diff --git a/rust/Server/src/server/manager/mod.rs b/rust/Server/src/server/manager/mod.rs index b9ba5f23c..4c4a66164 100644 --- a/rust/Server/src/server/manager/mod.rs +++ b/rust/Server/src/server/manager/mod.rs @@ -1,6 +1,7 @@ pub mod grpc; use crate::server::room::command::ServerCommandError; -use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; +use crate::server::room::config::member::MemberCreateParams; +use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; use crate::server::room_registry::RoomNotFoundError; use crate::server::Server; @@ -27,8 +28,8 @@ pub struct ServerManager { #[derive(Debug)] pub enum ManagementTask { - CreateRoom(RoomTemplate), - CreateMember(RoomId, MemberTemplate), + CreateRoom(RoomCreateParams), + CreateMember(RoomId, MemberCreateParams), DeleteMember(MemberAndRoomId), Dump(RoomId), GetRooms, @@ -148,7 +149,7 @@ impl ServerManager { })? } - pub fn create_room(&mut self, template: RoomTemplate) -> Result { + pub fn create_room(&mut self, template: RoomCreateParams) -> Result { self.execute_task(ManagementTask::CreateRoom(template)).map(|res| { if let ManagementTaskResult::CreateRoom(room_id) = res { Ok(room_id) @@ -168,7 +169,7 @@ impl ServerManager { self.execute_task(ManagementTask::DeleteRoom(room_id)).map(|_| ()) } - pub fn create_member(&mut self, room_id: RoomId, template: MemberTemplate) -> Result { + pub fn create_member(&mut self, room_id: RoomId, template: MemberCreateParams) -> Result { self.execute_task(ManagementTask::CreateMember(room_id, template)).map(|res| { if let ManagementTaskResult::CreateMember(id) = res { Ok(id) @@ -210,7 +211,8 @@ impl ServerManager { #[cfg(test)] mod test { use crate::server::manager::ServerManager; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use cheetah_common::network::bind_to_free_socket; use cheetah_game_realtime_protocol::coniguration::ProtocolConfiguration; use std::time::Duration; @@ -218,7 +220,7 @@ mod test { #[test] fn should_get_rooms() { let mut server = new_server_manager(); - let room_id = server.create_room(RoomTemplate::default()).unwrap(); + let room_id = server.create_room(RoomCreateParams::default()).unwrap(); let rooms = server.get_rooms().unwrap(); assert_eq!(rooms, vec![room_id]); } @@ -226,8 +228,8 @@ mod test { #[test] fn should_create_member() { let mut server = new_server_manager(); - let room_id = server.create_room(RoomTemplate::default()).unwrap(); - let member_id = server.create_member(room_id, MemberTemplate::default()).unwrap(); + let room_id = server.create_room(RoomCreateParams::default()).unwrap(); + let member_id = server.create_member(room_id, MemberCreateParams::default()).unwrap(); assert_eq!(member_id, 1); } diff --git a/rust/Server/src/server/mod.rs b/rust/Server/src/server/mod.rs index 009dd6f08..7824d63c9 100644 --- a/rust/Server/src/server/mod.rs +++ b/rust/Server/src/server/mod.rs @@ -2,7 +2,7 @@ use crate::server::manager::{ManagementTask, ManagementTaskChannel, ManagementTa use crate::server::measurer::Measurer; use crate::server::network::Network; use crate::server::room::command::ServerCommandError; -use crate::server::room::template::config::MemberTemplate; +use crate::server::room::config::member::MemberCreateParams; use crate::server::room_registry::{RoomNotFoundError, Rooms}; use cheetah_game_realtime_protocol::coniguration::ProtocolConfiguration; use cheetah_game_realtime_protocol::disconnect::command::DisconnectByCommandReason; @@ -106,7 +106,7 @@ impl Server { Ok(res) } - fn register_member(&mut self, room_id: RoomId, member_template: MemberTemplate, now: Instant) -> Result { + fn register_member(&mut self, room_id: RoomId, member_template: MemberCreateParams, now: Instant) -> Result { let room_member_id = self.rooms.register_member(room_id, member_template.clone())?; self.network.register_member(now, room_id, room_member_id, member_template); Ok(room_member_id) diff --git a/rust/Server/src/server/network.rs b/rust/Server/src/server/network.rs index d6d9e6a1b..162eb7b5e 100644 --- a/rust/Server/src/server/network.rs +++ b/rust/Server/src/server/network.rs @@ -12,7 +12,7 @@ use cheetah_game_realtime_protocol::frame::{Frame, FrameId}; use cheetah_game_realtime_protocol::others::member_id::MemberAndRoomId; use cheetah_game_realtime_protocol::{RoomId, RoomMemberId}; -use crate::server::room::template::config::MemberTemplate; +use crate::server::room::config::member::MemberCreateParams; use crate::server::room_registry::Rooms; use cheetah_common::network::collectors::in_collector::InCommandsCollector; use cheetah_common::network::CheetahProtocol; @@ -211,7 +211,7 @@ impl Network { frame.connection_id > session.protocol.connection_id || frame.frame_id > session.last_receive_frame_id || session.last_receive_frame_id == 0 } - pub fn register_member(&mut self, now: Instant, room_id: RoomId, member_id: RoomMemberId, template: MemberTemplate) { + pub fn register_member(&mut self, now: Instant, room_id: RoomId, member_id: RoomMemberId, template: MemberCreateParams) { self.sessions.insert( MemberAndRoomId { member_id, room_id }, MemberSession { @@ -243,8 +243,8 @@ mod tests { use std::time::{Duration, Instant}; use crate::server::network::Network; + use crate::server::room::config::member::MemberCreateParams; use crate::server::room::member::RoomMember; - use crate::server::room::template::config::MemberTemplate; use crate::server::room_registry::Rooms; use cheetah_common::network::bind_to_free_socket; use cheetah_game_realtime_protocol::codec::cipher::Cipher; @@ -293,7 +293,7 @@ mod tests { let mut rooms = Rooms::default(); let mut buffer = [0; 512]; - let member_template = MemberTemplate::new_member(Default::default(), Default::default()); + let member_template = MemberCreateParams::new_member(Default::default(), Default::default()); let member = RoomMember { id: 100, connected: false, @@ -324,7 +324,7 @@ mod tests { #[test] fn should_disconnect_members() { let mut udp_server = create_network_layer(); - let member_template = MemberTemplate::new_member(Default::default(), Default::default()); + let member_template = MemberCreateParams::new_member(Default::default(), Default::default()); let member_to_delete = MemberAndRoomId { member_id: 0, room_id: 0 }; udp_server.register_member(Instant::now(), member_to_delete.room_id, member_to_delete.member_id, member_template.clone()); udp_server.register_member(Instant::now(), 0, 1, member_template); diff --git a/rust/Server/src/server/room/command/create.rs b/rust/Server/src/server/room/command/create.rs index e09580160..1f3b880bc 100644 --- a/rust/Server/src/server/room/command/create.rs +++ b/rust/Server/src/server/room/command/create.rs @@ -32,7 +32,8 @@ pub(crate) fn create_object(command: &CreateGameObject, room: &mut Room, member_ if room.contains_object(&command.object_id) { return Err(ServerCommandError::Error(format!("Object already exists with id {:?}", command.object_id))); } - room.insert_object(GameObject::new(command.object_id, command.template, groups, false)); + let config = room.get_object_config(&command.template); + room.insert_object(GameObject::new(command.object_id, command.template, groups, config, false)); Ok(()) } @@ -45,7 +46,8 @@ mod tests { use cheetah_common::room::owner::GameObjectOwner; use crate::server::room::command::ServerCommandError; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; #[test] @@ -128,7 +130,7 @@ mod tests { fn should_not_replace_exists_object() { let access_groups = AccessGroups(0b11); let (mut room, member_id) = setup(access_groups); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); object.template_id = 777; let object_id = object.id; room.test_out_commands.clear(); @@ -143,9 +145,9 @@ mod tests { } fn setup(access_groups: AccessGroups) -> (Room, u16) { - let template = RoomTemplate::default(); - let mut room = Room::from_template(template); - let member_id = room.register_member(MemberTemplate::stub(access_groups)); + let template = RoomCreateParams::default(); + let mut room = Room::new(0, template); + let member_id = room.register_member(MemberCreateParams::stub(access_groups)); (room, member_id) } } diff --git a/rust/Server/src/server/room/command/delete.rs b/rust/Server/src/server/room/command/delete.rs index 347a8c051..630089516 100644 --- a/rust/Server/src/server/room/command/delete.rs +++ b/rust/Server/src/server/room/command/delete.rs @@ -28,21 +28,22 @@ mod tests { use crate::server::room::command::delete::delete; use crate::server::room::command::ServerCommandError; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; #[test] fn should_delete() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(0b11); - let mut room = Room::from_template(template); - let member_a_id = room.register_member(MemberTemplate::stub(access_groups)); - let member_b_id = room.register_member(MemberTemplate::stub(access_groups)); + let mut room = Room::new(0, template); + let member_a_id = room.register_member(MemberCreateParams::stub(access_groups)); + let member_b_id = room.register_member(MemberCreateParams::stub(access_groups)); room.mark_as_connected_in_test(member_a_id).unwrap(); room.mark_as_connected_in_test(member_b_id).unwrap(); - let object_id = room.test_create_object_with_created_state(GameObjectOwner::Member(member_a_id), access_groups).id; + let object_id = room.test_create_object_with_created_state(GameObjectOwner::Member(member_a_id), access_groups, Default::default()).id; room.test_out_commands.clear(); delete(&object_id, &mut room, member_a_id).unwrap(); @@ -54,13 +55,13 @@ mod tests { #[test] fn should_not_delete_if_not_owner() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(55); - let mut room = Room::from_template(template); - let member_a = room.register_member(MemberTemplate::stub(access_groups)); - let member_b = room.register_member(MemberTemplate::stub(access_groups)); + let mut room = Room::new(0, template); + let member_a = room.register_member(MemberCreateParams::stub(access_groups)); + let member_b = room.register_member(MemberCreateParams::stub(access_groups)); - let object_id = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_a), access_groups).id; + let object_id = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_a), access_groups, Default::default()).id; room.test_out_commands.clear(); assert!(matches!(delete(&object_id, &mut room, member_b), Err(ServerCommandError::MemberNotOwnerGameObject { .. }))); assert!(matches!(room.get_object_mut(object_id), Ok(_))); diff --git a/rust/Server/src/server/room/command/double.rs b/rust/Server/src/server/room/command/double.rs index 36c410a03..e148de637 100644 --- a/rust/Server/src/server/room/command/double.rs +++ b/rust/Server/src/server/room/command/double.rs @@ -42,7 +42,7 @@ mod tests { #[test] fn should_set_double_command() { let (mut room, member_id, access_groups) = setup_one_player(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); let object_id = object.id; object.created = true; room.test_out_commands.clear(); @@ -62,7 +62,7 @@ mod tests { fn should_increment_double_command() { let (mut room, member_id, access_groups) = setup_one_player(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); object.created = true; let object_id = object.id; room.test_out_commands.clear(); diff --git a/rust/Server/src/server/room/command/event.rs b/rust/Server/src/server/room/command/event.rs index 4acee0700..918b2109c 100644 --- a/rust/Server/src/server/room/command/event.rs +++ b/rust/Server/src/server/room/command/event.rs @@ -32,13 +32,14 @@ mod tests { use cheetah_common::room::owner::GameObjectOwner; use crate::server::room::command::tests::setup_one_player; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; #[test] pub(crate) fn should_send_event() { let (mut room, member_id, access_groups) = setup_one_player(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); object.created = true; let object_id = object.id; room.test_out_commands.clear(); @@ -55,19 +56,19 @@ mod tests { #[test] pub(crate) fn should_send_event_to_member() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(10); - let mut room = Room::from_template(template); - let member1 = room.register_member(MemberTemplate::stub(access_groups)); - let member2 = room.register_member(MemberTemplate::stub(access_groups)); - let member3 = room.register_member(MemberTemplate::stub(access_groups)); + let mut room = Room::new(0, template); + let member1 = room.register_member(MemberCreateParams::stub(access_groups)); + let member2 = room.register_member(MemberCreateParams::stub(access_groups)); + let member3 = room.register_member(MemberCreateParams::stub(access_groups)); room.mark_as_connected_in_test(member1).unwrap(); room.mark_as_connected_in_test(member2).unwrap(); room.mark_as_connected_in_test(member3).unwrap(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member1), access_groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member1), access_groups, Default::default()); object.created = true; let object_id = object.id; room.get_member_out_commands_for_test(member1).clear(); diff --git a/rust/Server/src/server/room/command/field.rs b/rust/Server/src/server/room/command/field.rs index 1fbb2ee68..653c9c844 100644 --- a/rust/Server/src/server/room/command/field.rs +++ b/rust/Server/src/server/room/command/field.rs @@ -48,7 +48,7 @@ mod tests { #[test] fn should_command() { let (mut room, member_id, access_groups) = setup_one_player(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); let object_id = object.id; object.created = true; object.long_fields.set(1, Default::default()); @@ -85,7 +85,7 @@ mod tests { #[test] pub(crate) fn should_delete_field() { - let mut object = GameObject::new(GameObjectId::default(), 0, Default::default(), false); + let mut object = GameObject::new(GameObjectId::default(), 0, Default::default(), Default::default(), false); object.structure_fields.set(1, Buffer::from([1, 2, 3].as_ref())); object.structure_fields.delete(1); diff --git a/rust/Server/src/server/room/command/items.rs b/rust/Server/src/server/room/command/items.rs index ff72ee0cb..717007827 100644 --- a/rust/Server/src/server/room/command/items.rs +++ b/rust/Server/src/server/room/command/items.rs @@ -20,7 +20,9 @@ pub(crate) fn add(item: &BinaryField, room: &mut Room, member_id: RoomMemberId) } Some(deque) => deque, }; - if deque.len() > 50 { + + let item_config = object.config.get_items_config(&item.field_id); + if deque.len() >= item_config.capacity { deque.pop_front(); } deque.push_back(item.value); @@ -33,46 +35,84 @@ pub(crate) fn add(item: &BinaryField, room: &mut Room, member_id: RoomMemberId) #[cfg(test)] mod tests { use crate::server::room::command::items::add; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::object::{GameObjectConfig, ItemConfig}; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; use cheetah_common::commands::s2c::S2CCommand; use cheetah_common::commands::types::structure::BinaryField; use cheetah_common::room::access::AccessGroups; use cheetah_common::room::buffer::Buffer; + use cheetah_common::room::object::{GameObjectId, GameObjectTemplateId}; use cheetah_common::room::owner::GameObjectOwner; + use cheetah_game_realtime_protocol::RoomMemberId; use std::collections::VecDeque; #[test] - pub(crate) fn should_add_structure() { - let template = RoomTemplate::default(); - let mut room = Room::from_template(template); - let access_groups = AccessGroups(10); - let member_id = room.register_member(MemberTemplate::stub(access_groups)); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); - object.created = true; - let object_id = object.id; - - room.test_out_commands.clear(); - + pub(crate) fn should_add_items() { + let (mut room, member_id, object_id) = setup(Default::default(), Default::default()); let command_1 = BinaryField { object_id, field_id: 100, value: Buffer::from(vec![1, 2, 3].as_slice()), }; - let command_2 = BinaryField { object_id, field_id: 100, value: Buffer::from(vec![4, 5, 6].as_slice()), }; - add(&command_1, &mut room, member_id).unwrap(); add(&command_2, &mut room, member_id).unwrap(); - let object = room.get_object_mut(object_id).unwrap(); let structures = object.structures_fields.get(100).unwrap(); assert_eq!(*structures, VecDeque::from([command_1.value, command_2.value])); assert!(matches!(room.test_out_commands.pop_back(), Some((.., S2CCommand::AddItem(c))) if c == command_1.into())); } + #[test] + pub(crate) fn should_capacity_items() { + let template = 10; + let field_id = 5; + let room_create_params = RoomCreateParams { + name: "".to_string(), + objects: vec![], + configs: vec![( + template, + GameObjectConfig { + items_config: vec![(field_id, ItemConfig { capacity: 1 })].into_iter().collect(), + }, + )] + .into_iter() + .collect(), + }; + + let (mut room, member_id, object_id) = setup(room_create_params, template); + let command_1 = BinaryField { + object_id, + field_id, + value: Buffer::from(vec![1, 2, 3].as_slice()), + }; + let command_2 = BinaryField { + object_id, + field_id, + value: Buffer::from(vec![4, 5, 6].as_slice()), + }; + add(&command_1, &mut room, member_id).unwrap(); + add(&command_2, &mut room, member_id).unwrap(); + + let object = room.get_object_mut(object_id).unwrap(); + let structures = object.structures_fields.get(field_id).unwrap(); + assert_eq!(*structures, VecDeque::from([command_2.value])); + } + + fn setup(room_create_params: RoomCreateParams, template_id: GameObjectTemplateId) -> (Room, RoomMemberId, GameObjectId) { + let mut room = Room::new(0, room_create_params); + let access_groups = AccessGroups(10); + let member_id = room.register_member(MemberCreateParams::stub(access_groups)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, template_id); + object.created = true; + let object_id = object.id; + room.test_out_commands.clear(); + (room, member_id, object_id) + } } diff --git a/rust/Server/src/server/room/command/long.rs b/rust/Server/src/server/room/command/long.rs index 71fa33d01..5bd01237b 100644 --- a/rust/Server/src/server/room/command/long.rs +++ b/rust/Server/src/server/room/command/long.rs @@ -54,7 +54,8 @@ mod tests { use cheetah_common::room::object::GameObjectId; use cheetah_common::room::owner::GameObjectOwner; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; const FIELD_ID: FieldId = 100; @@ -119,11 +120,11 @@ mod tests { } fn setup() -> (Room, RoomMemberId, GameObjectId) { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(10); - let mut room = Room::from_template(template); - let member_id = room.register_member(MemberTemplate::stub(access_groups)); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let mut room = Room::new(0, template); + let member_id = room.register_member(MemberCreateParams::stub(access_groups)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); object.created = true; let object_id = object.id; (room, member_id, object_id) diff --git a/rust/Server/src/server/room/command/mod.rs b/rust/Server/src/server/room/command/mod.rs index 323d86249..4736151c5 100644 --- a/rust/Server/src/server/room/command/mod.rs +++ b/rust/Server/src/server/room/command/mod.rs @@ -52,7 +52,7 @@ pub enum ServerCommandError { #[error( "Member {member_id:?} cannot access to field {field:?} in object {object_id:?} with \ - template {template_id:?} in room {room_id:?}" + config {template_id:?} in room {room_id:?}" )] MemberCannotAccessToObjectField { room_id: RoomId, @@ -110,24 +110,25 @@ mod tests { use cheetah_common::room::object::GameObjectId; use cheetah_common::room::owner::GameObjectOwner; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; pub(crate) fn setup_two_players() -> (Room, GameObjectId, RoomMemberId, RoomMemberId) { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(0b11); - let mut room = Room::from_template(template); - let member_1 = room.register_member(MemberTemplate::stub(access_groups)); - let member_2 = room.register_member(MemberTemplate::stub(access_groups)); - let object_id = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_1), access_groups).id; + let mut room = Room::new(0, template); + let member_1 = room.register_member(MemberCreateParams::stub(access_groups)); + let member_2 = room.register_member(MemberCreateParams::stub(access_groups)); + let object_id = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_1), access_groups, Default::default()).id; (room, object_id, member_1, member_2) } pub(crate) fn setup_one_player() -> (Room, RoomMemberId, AccessGroups) { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(10); - let mut room = Room::from_template(template); - let member_id = room.register_member(MemberTemplate::stub(access_groups)); + let mut room = Room::new(0, template); + let member_id = room.register_member(MemberCreateParams::stub(access_groups)); (room, member_id, access_groups) } } diff --git a/rust/Server/src/server/room/command/room.rs b/rust/Server/src/server/room/command/room.rs index 9120d6bc4..2990b98c1 100644 --- a/rust/Server/src/server/room/command/room.rs +++ b/rust/Server/src/server/room/command/room.rs @@ -35,7 +35,8 @@ pub fn detach_from_room(room: &mut Room, member_id: RoomMemberId) -> Result<(), #[cfg(test)] mod tests { use crate::server::room::command::room::attach_to_room; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; use cheetah_common::commands::s2c::S2CCommand; use cheetah_common::room::access::AccessGroups; @@ -43,26 +44,26 @@ mod tests { #[test] pub(crate) fn should_load_object_when_attach_to_room() { - let template = RoomTemplate::default(); - let mut room = Room::from_template(template); + let template = RoomCreateParams::default(); + let mut room = Room::new(0, template); let groups_a = AccessGroups(0b100); - let member_a = room.register_member(MemberTemplate::stub(groups_a)); + let member_a = room.register_member(MemberCreateParams::stub(groups_a)); let groups_b = AccessGroups(0b10); - let member_b = room.register_member(MemberTemplate::stub(groups_b)); + let member_b = room.register_member(MemberCreateParams::stub(groups_b)); room.mark_as_connected_in_test(member_a).unwrap(); room.mark_as_connected_in_test(member_b).unwrap(); - let object_a_1 = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_a); + let object_a_1 = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_a, Default::default()); object_a_1.created = true; let object_a_1_id = object_a_1.id; // не созданный объект - не должен загрузиться - room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_a); + room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_a, Default::default()); // другая группа + созданный объект - не должен загрузиться - room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_b).created = true; + room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_b, Default::default()).created = true; // другая группа - не должен загрузиться - room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_b); + room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_b), groups_b, Default::default()); attach_to_room(&mut room, member_a).unwrap(); diff --git a/rust/Server/src/server/room/command/structure.rs b/rust/Server/src/server/room/command/structure.rs index 5b3dda5c3..240c1b1b2 100644 --- a/rust/Server/src/server/room/command/structure.rs +++ b/rust/Server/src/server/room/command/structure.rs @@ -25,16 +25,17 @@ mod tests { use cheetah_common::room::owner::GameObjectOwner; use crate::server::room::command::structure; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; #[test] pub(crate) fn should_set_structure() { - let template = RoomTemplate::default(); - let mut room = Room::from_template(template); + let template = RoomCreateParams::default(); + let mut room = Room::new(0, template); let access_groups = AccessGroups(10); - let member_id = room.register_member(MemberTemplate::stub(access_groups)); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let member_id = room.register_member(MemberCreateParams::stub(access_groups)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); object.created = true; let object_id = object.id; diff --git a/rust/Server/src/server/room/template/config.rs b/rust/Server/src/server/room/config/member.rs similarity index 60% rename from rust/Server/src/server/room/template/config.rs rename to rust/Server/src/server/room/config/member.rs index 3ca7fecc2..56224e91d 100644 --- a/rust/Server/src/server/room/template/config.rs +++ b/rust/Server/src/server/room/config/member.rs @@ -1,25 +1,11 @@ -use cheetah_game_realtime_protocol::frame::member_private_key::MemberPrivateKey; -use std::collections::HashMap; - -use fnv::FnvBuildHasher; - +use crate::server::room::config::object::GameObjectCreateParams; use cheetah_common::room::access::AccessGroups; -use cheetah_common::room::buffer::Buffer; -use cheetah_common::room::field::FieldId; -use cheetah_common::room::object::{GameObjectId, GameObjectTemplateId}; +use cheetah_common::room::object::GameObjectId; +use cheetah_game_realtime_protocol::frame::member_private_key::MemberPrivateKey; use serde::{Deserialize, Serialize}; -/// -/// Шаблон для создания комнаты -/// -#[derive(Debug, Default, Clone)] -pub struct RoomTemplate { - pub name: String, - pub objects: Vec, -} - #[derive(Debug, Default, Clone, Serialize, Deserialize)] -pub struct MemberTemplate { +pub struct MemberCreateParams { /// /// Пользователь для которого игнорируются все настройки безопасности /// Обычно под данным пользователем подключаются плагины @@ -27,32 +13,23 @@ pub struct MemberTemplate { pub super_member: bool, pub private_key: MemberPrivateKey, pub groups: AccessGroups, - pub objects: Vec, + pub objects: Vec, } -#[derive(Debug, Default, Clone, Serialize, Deserialize)] -pub struct GameObjectTemplate { - pub id: u32, - pub template: GameObjectTemplateId, - pub groups: AccessGroups, - pub longs: HashMap, - pub doubles: HashMap, - pub structures: HashMap, -} #[derive(Debug)] pub enum MemberTemplateError { MemberObjectHasWrongId(MemberPrivateKey, u32), } -impl MemberTemplate { +impl MemberCreateParams { #[must_use] - pub fn new_member(groups: AccessGroups, objects: Vec) -> Self { - MemberTemplate::new(false, groups, objects) + pub fn new_member(groups: AccessGroups, objects: Vec) -> Self { + MemberCreateParams::new(false, groups, objects) } #[must_use] pub fn new_super_member() -> Self { - MemberTemplate::new(true, AccessGroups::super_member_group(), Default::default()) + MemberCreateParams::new(true, AccessGroups::super_member_group(), Default::default()) } #[must_use] @@ -62,8 +39,8 @@ impl MemberTemplate { member } - fn new(super_member: bool, groups: AccessGroups, objects: Vec) -> Self { - MemberTemplate { + fn new(super_member: bool, groups: AccessGroups, objects: Vec) -> Self { + MemberCreateParams { super_member, private_key: MemberPrivateKey::new_random(), groups, @@ -71,7 +48,7 @@ impl MemberTemplate { } } - pub fn validate(self) -> Result { + pub fn validate(self) -> Result { for object in &self.objects { if object.id >= GameObjectId::CLIENT_OBJECT_ID_OFFSET { return Err(MemberTemplateError::MemberObjectHasWrongId(self.private_key, object.id)); @@ -83,19 +60,20 @@ impl MemberTemplate { #[cfg(test)] mod tests { - use crate::server::room::template::config::{GameObjectTemplate, MemberTemplate, MemberTemplateError}; + use crate::server::room::config::member::{MemberCreateParams, MemberTemplateError}; + use crate::server::room::config::object::GameObjectCreateParams; use cheetah_common::room::access::AccessGroups; use cheetah_common::room::object::{GameObjectId, GameObjectTemplateId}; - impl MemberTemplate { + impl MemberCreateParams { #[must_use] pub fn stub(access_group: AccessGroups) -> Self { - MemberTemplate::new_member(access_group, Default::default()) + MemberCreateParams::new_member(access_group, Default::default()) } - pub fn configure_object(&mut self, id: u32, template: GameObjectTemplateId, access_groups: AccessGroups) -> &mut GameObjectTemplate { + pub fn configure_object(&mut self, id: u32, template: GameObjectTemplateId, access_groups: AccessGroups) -> &mut GameObjectCreateParams { let objects = &mut self.objects; - objects.push(GameObjectTemplate { + objects.push(GameObjectCreateParams { id, template, groups: access_groups, @@ -111,7 +89,7 @@ mod tests { #[test] fn should_validate_fail_when_member_object_has_wrong_id() { - let objects = vec![GameObjectTemplate { + let objects = vec![GameObjectCreateParams { id: GameObjectId::CLIENT_OBJECT_ID_OFFSET + 1, template: 0b100, groups: AccessGroups(0b1111), @@ -119,7 +97,7 @@ mod tests { doubles: Default::default(), structures: Default::default(), }]; - let template = MemberTemplate::new_member(AccessGroups(0b1111), objects); + let template = MemberCreateParams::new_member(AccessGroups(0b1111), objects); assert!(matches!(template.validate(), Err(MemberTemplateError::MemberObjectHasWrongId(_, _)))); } } diff --git a/rust/Server/src/server/room/config/mod.rs b/rust/Server/src/server/room/config/mod.rs new file mode 100644 index 000000000..dcc854380 --- /dev/null +++ b/rust/Server/src/server/room/config/mod.rs @@ -0,0 +1,3 @@ +pub mod member; +pub mod object; +pub mod room; diff --git a/rust/Server/src/server/room/template/mod.rs b/rust/Server/src/server/room/config/object.rs similarity index 50% rename from rust/Server/src/server/room/template/mod.rs rename to rust/Server/src/server/room/config/object.rs index bce1d2ff3..a87d27f3b 100644 --- a/rust/Server/src/server/room/template/mod.rs +++ b/rust/Server/src/server/room/config/object.rs @@ -1,45 +1,95 @@ -use crate::server::room::object::GameObject; -use crate::server::room::template::config::GameObjectTemplate; -use cheetah_common::room::object::GameObjectId; -use cheetah_common::room::owner::GameObjectOwner; +use std::collections::HashMap; + use cheetah_game_realtime_protocol::RoomMemberId; +use fnv::{FnvBuildHasher, FnvHashMap}; +use serde::{Deserialize, Serialize}; + +use cheetah_common::room::access::AccessGroups; +use cheetah_common::room::buffer::Buffer; +use cheetah_common::room::field::FieldId; +use cheetah_common::room::object::{GameObjectId, GameObjectTemplateId}; +use cheetah_common::room::owner::GameObjectOwner; + +use crate::server::room::object::GameObject; +use crate::server::room::Room; + +#[derive(Debug, Default, Clone, Serialize, Deserialize)] +pub struct GameObjectConfig { + pub items_config: FnvHashMap, +} -pub mod config; +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ItemConfig { + pub capacity: usize, +} + +static DEFAULT_ITEM_CONFIG: ItemConfig = ItemConfig { capacity: 50 }; -impl GameObjectTemplate { +impl Default for &ItemConfig { + fn default() -> Self { + &DEFAULT_ITEM_CONFIG + } +} + +impl Default for ItemConfig { + fn default() -> Self { + DEFAULT_ITEM_CONFIG.clone() + } +} + +impl GameObjectConfig { + pub fn get_items_config(&self, field_id: &FieldId) -> &ItemConfig { + self.items_config.get(field_id).unwrap_or_default() + } +} + +impl GameObjectCreateParams { #[must_use] - pub fn to_root_game_object(&self) -> GameObject { - self.to_game_object(GameObjectId::new(self.id, GameObjectOwner::Room)) + pub fn to_root_game_object(&self, room: &Room) -> GameObject { + self.to_game_object(GameObjectId::new(self.id, GameObjectOwner::Room), room) } #[must_use] - pub fn create_member_game_object(&self, member_id: RoomMemberId) -> GameObject { - self.to_game_object(GameObjectId::new(self.id, GameObjectOwner::Member(member_id))) + pub fn create_member_game_object(&self, member_id: RoomMemberId, room: &Room) -> GameObject { + self.to_game_object(GameObjectId::new(self.id, GameObjectOwner::Member(member_id)), room) } #[must_use] - pub fn to_game_object(&self, id: GameObjectId) -> GameObject { + pub fn to_game_object(&self, id: GameObjectId, room: &Room) -> GameObject { assert_ne!(id.id, 0, "0 is forbidden for game object id"); - let mut object = GameObject::new(id, self.template, self.groups, true); + let config = room.get_object_config(&self.template); + let mut object = GameObject::new(id, self.template, self.groups, config, true); - self.longs.iter().for_each(|(&k, v)| object.long_fields.set(k, v.clone())); - self.doubles.iter().for_each(|(&k, v)| object.double_fields.set(k, v.clone())); - self.structures.iter().for_each(|(&k, v)| object.structure_fields.set(k, v.clone())); + self.longs.iter().for_each(|(&k, v)| object.long_fields.set(k, *v)); + self.doubles.iter().for_each(|(&k, v)| object.double_fields.set(k, *v)); + self.structures.iter().for_each(|(&k, v)| object.structure_fields.set(k, *v)); object } } +#[derive(Debug, Default, Clone, Serialize, Deserialize)] +pub struct GameObjectCreateParams { + pub id: u32, + pub template: GameObjectTemplateId, + pub groups: AccessGroups, + pub longs: HashMap, + pub doubles: HashMap, + pub structures: HashMap, +} + #[cfg(test)] mod tests { - use crate::server::room::template::config::GameObjectTemplate; use cheetah_common::room::owner::GameObjectOwner; + use crate::server::room::config::object::GameObjectCreateParams; + use crate::server::room::Room; + #[test] #[should_panic] fn should_panic_if_object_id_is_0() { - let config_object = GameObjectTemplate { + let config_object = GameObjectCreateParams { id: 0, template: 200, groups: Default::default(), @@ -47,13 +97,14 @@ mod tests { doubles: Default::default(), structures: Default::default(), }; - let _object = config_object.to_root_game_object(); + let room = Room::new(Default::default(), Default::default()); + let _object = config_object.to_root_game_object(&room); } #[test] #[allow(clippy::float_cmp)] fn should_convert_game_object() { - let mut config_object = GameObjectTemplate { + let mut config_object = GameObjectCreateParams { id: 100, template: 200, groups: Default::default(), @@ -66,7 +117,8 @@ mod tests { config_object.doubles.insert(1, 105.105); config_object.structures.insert(2, [1].as_ref().into()); - let object = config_object.clone().to_root_game_object(); + let room = Room::new(Default::default(), Default::default()); + let object = config_object.clone().to_root_game_object(&room); assert_eq!(config_object.id, object.id.id); assert!(matches!(object.id.get_owner(), GameObjectOwner::Room)); assert_eq!(config_object.template, object.template_id); diff --git a/rust/Server/src/server/room/config/room.rs b/rust/Server/src/server/room/config/room.rs new file mode 100644 index 000000000..98d4bf133 --- /dev/null +++ b/rust/Server/src/server/room/config/room.rs @@ -0,0 +1,14 @@ +use crate::server::room::config::object::GameObjectConfig; +use crate::server::room::config::object::GameObjectCreateParams; +use cheetah_common::room::object::GameObjectTemplateId; +use fnv::FnvHashMap; + +/// +/// Шаблон для создания комнаты +/// +#[derive(Debug, Default, Clone)] +pub struct RoomCreateParams { + pub name: String, + pub objects: Vec, + pub configs: FnvHashMap, +} diff --git a/rust/Server/src/server/room/member.rs b/rust/Server/src/server/room/member.rs index 1a28ff747..0b2c9a2e8 100644 --- a/rust/Server/src/server/room/member.rs +++ b/rust/Server/src/server/room/member.rs @@ -1,4 +1,4 @@ -use crate::server::room::template::config::MemberTemplate; +use crate::server::room::config::member::MemberCreateParams; use cheetah_common::commands::CommandWithChannelType; use cheetah_game_realtime_protocol::RoomMemberId; use serde::{Deserialize, Serialize}; @@ -8,6 +8,6 @@ pub struct RoomMember { pub id: RoomMemberId, pub connected: bool, pub attached: bool, - pub template: MemberTemplate, + pub template: MemberCreateParams, pub out_commands: Vec, } diff --git a/rust/Server/src/server/room/mod.rs b/rust/Server/src/server/room/mod.rs index 71a1076f0..0ec55171f 100644 --- a/rust/Server/src/server/room/mod.rs +++ b/rust/Server/src/server/room/mod.rs @@ -2,6 +2,7 @@ use cheetah_game_realtime_protocol::{RoomId, RoomMemberId}; use std::collections::HashMap; use std::fmt::Debug; use std::slice; +use std::sync::Arc; use std::time::{Duration, Instant}; use fnv::{FnvBuildHasher, FnvHashMap}; @@ -9,31 +10,34 @@ use indexmap::map::IndexMap; use serde::{Deserialize, Serialize}; use crate::server::room::command::{execute, ServerCommandError}; +use crate::server::room::config::member::MemberCreateParams; +use crate::server::room::config::object::GameObjectConfig; use crate::server::room::object::{GameObject, S2CCommandsCollector}; -use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; use cheetah_common::commands::guarantees::{ChannelGroup, ReliabilityGuarantees}; use cheetah_common::commands::s2c::S2CCommand; use cheetah_common::commands::types::member::{MemberConnected, MemberDisconnected}; use cheetah_common::commands::{BothDirectionCommand, CommandWithChannelType, CommandWithReliabilityGuarantees}; use cheetah_common::room::access::AccessGroups; use cheetah_common::room::buffer::Buffer; -use cheetah_common::room::object::GameObjectId; +use cheetah_common::room::object::{GameObjectId, GameObjectTemplateId}; use cheetah_common::room::owner::GameObjectOwner; +use config::room::RoomCreateParams; use member::RoomMember; pub mod action; pub mod command; +pub mod config; pub mod member; pub mod object; pub mod sender; -pub mod template; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Room { pub id: RoomId, pub template_name: String, pub members: HashMap, - pub(crate) objects: IndexMap, + configs: FnvHashMap>, + pub objects: IndexMap, current_channel: Option, pub member_id_generator: RoomMemberId, pub room_object_id_generator: u32, @@ -47,25 +51,27 @@ pub struct Room { /// pub test_out_commands: std::collections::VecDeque<(AccessGroups, S2CCommand)>, } + impl Room { - pub fn new(id: RoomId, template: RoomTemplate) -> Self { + pub fn new(id: RoomId, create_params: RoomCreateParams) -> Self { let mut room = Room { id, members: FnvHashMap::default(), objects: Default::default(), current_channel: Default::default(), + objects_singleton_key: Default::default(), #[cfg(test)] test_object_id_generator: 0, #[cfg(test)] test_out_commands: Default::default(), member_id_generator: 0, room_object_id_generator: 65536, - template_name: template.name.clone(), - objects_singleton_key: Default::default(), + template_name: create_params.name.clone(), + configs: create_params.configs.into_iter().map(|item| (item.0, From::from(item.1))).collect(), }; - template.objects.into_iter().for_each(|object| { - let game_object: GameObject = object.to_root_game_object(); + create_params.objects.into_iter().for_each(|object| { + let game_object: GameObject = object.to_root_game_object(&room); room.insert_object(game_object); }); @@ -160,7 +166,7 @@ impl Room { Ok(()) } - pub fn register_member(&mut self, template: MemberTemplate) -> RoomMemberId { + pub fn register_member(&mut self, template: MemberCreateParams) -> RoomMemberId { self.member_id_generator += 1; let member_id = self.member_id_generator; let member = RoomMember { @@ -246,9 +252,9 @@ impl Room { self.objects.iter().for_each(|(_, o)| f(o)); } - fn on_member_connect(&mut self, member_id: RoomMemberId, template: MemberTemplate) -> Result<(), ServerCommandError> { + fn on_member_connect(&mut self, member_id: RoomMemberId, template: MemberCreateParams) -> Result<(), ServerCommandError> { for object_template in template.objects { - let mut object = object_template.create_member_game_object(member_id); + let mut object = object_template.create_member_game_object(member_id, self); let mut commands = S2CCommandsCollector::new(); object.collect_create_commands(&mut commands); let access_groups = object.access_groups; @@ -261,6 +267,10 @@ impl Room { Ok(()) } + + pub(crate) fn get_object_config(&self, template_id: &GameObjectTemplateId) -> Arc { + self.configs.get(template_id).cloned().unwrap_or_default() + } } #[cfg(test)] @@ -269,8 +279,10 @@ mod tests { use std::collections::VecDeque; use crate::server::room::command::ServerCommandError; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::object::GameObjectCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::object::GameObject; - use crate::server::room::template::config::{GameObjectTemplate, MemberTemplate, RoomTemplate}; use crate::server::room::Room; use cheetah_common::commands::c2s::C2SCommand; use cheetah_common::commands::guarantees::{ReliabilityGuarantees, ReliabilityGuaranteesChannel}; @@ -280,33 +292,28 @@ mod tests { use cheetah_common::commands::{BothDirectionCommand, CommandWithChannelType, CommandWithReliabilityGuarantees}; use cheetah_common::room::access::AccessGroups; use cheetah_common::room::buffer::Buffer; - use cheetah_common::room::object::GameObjectId; + use cheetah_common::room::object::{GameObjectId, GameObjectTemplateId}; use cheetah_common::room::owner::GameObjectOwner; impl Default for Room { fn default() -> Self { - Room::new(0, RoomTemplate::default()) + Room::new(0, RoomCreateParams::default()) } } impl Room { - #[must_use] - pub fn from_template(template: RoomTemplate) -> Self { - Room::new(0, template) + pub fn test_create_object_with_not_created_state(&mut self, owner: GameObjectOwner, access_groups: AccessGroups, template_id: GameObjectTemplateId) -> &mut GameObject { + self.test_do_create_object(owner, access_groups, false, template_id) } - pub fn test_create_object_with_not_created_state(&mut self, owner: GameObjectOwner, access_groups: AccessGroups) -> &mut GameObject { - self.test_do_create_object(owner, access_groups, false) + pub fn test_create_object_with_created_state(&mut self, owner: GameObjectOwner, access_groups: AccessGroups, template_id: GameObjectTemplateId) -> &mut GameObject { + self.test_do_create_object(owner, access_groups, true, template_id) } - pub fn test_create_object_with_created_state(&mut self, owner: GameObjectOwner, access_groups: AccessGroups) -> &mut GameObject { - self.test_do_create_object(owner, access_groups, true) - } - - fn test_do_create_object(&mut self, owner: GameObjectOwner, access_groups: AccessGroups, created: bool) -> &mut GameObject { + fn test_do_create_object(&mut self, owner: GameObjectOwner, access_groups: AccessGroups, created: bool, template_id: GameObjectTemplateId) -> &mut GameObject { self.test_object_id_generator += 1; let id = GameObjectId::new(self.test_object_id_generator, owner); - let mut object = GameObject::new(id, 0, access_groups, false); + let mut object = GameObject::new(id, template_id, access_groups, self.get_object_config(&template_id), false); object.created = created; self.insert_object(object); self.get_object_mut(id).unwrap() @@ -332,21 +339,6 @@ mod tests { }) .collect() } - - #[must_use] - pub fn test_get_member_out_commands_with_meta(&self, member_id: RoomMemberId) -> VecDeque { - self.get_member(&member_id) - .unwrap() - .out_commands - .iter() - .map(|c| &c.command) - .filter_map(|c| match c { - BothDirectionCommand::S2C(c) => Some(c.clone()), - BothDirectionCommand::C2S(_) => None, - }) - .collect() - } - pub fn test_clear_member_out_commands(&mut self, member_id: RoomMemberId) { self.get_member_mut(&member_id).unwrap().out_commands.clear(); } @@ -354,15 +346,15 @@ mod tests { #[test] fn should_remove_objects_when_disconnect() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(0b111); - let mut room = Room::from_template(template); - let member_a = room.register_member(MemberTemplate::stub(access_groups)); - let member_b = room.register_member(MemberTemplate::stub(access_groups)); - let object_a_1 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_a), access_groups).id; - let object_a_2 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_a), access_groups).id; - let object_b_1 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_b), access_groups).id; - let object_b_2 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_b), access_groups).id; + let mut room = Room::new(0, template); + let member_a = room.register_member(MemberCreateParams::stub(access_groups)); + let member_b = room.register_member(MemberCreateParams::stub(access_groups)); + let object_a_1 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_a), access_groups, Default::default()).id; + let object_a_2 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_a), access_groups, Default::default()).id; + let object_b_1 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_b), access_groups, Default::default()).id; + let object_b_2 = room.test_create_object_with_created_state(GameObjectOwner::Member(member_b), access_groups, Default::default()).id; room.test_out_commands.clear(); room.disconnect_member(member_a).unwrap(); @@ -379,8 +371,8 @@ mod tests { #[test] fn should_create_object_from_config() { - let mut template = RoomTemplate::default(); - let object_template = GameObjectTemplate { + let mut template = RoomCreateParams::default(); + let object_template = GameObjectCreateParams { id: 155, template: 5, groups: Default::default(), @@ -390,14 +382,14 @@ mod tests { }; template.objects = vec![object_template.clone()]; - let room = Room::from_template(template); + let room = Room::new(0, template); assert!(room.objects.contains_key(&GameObjectId::new(object_template.id, GameObjectOwner::Room))); } #[test] fn should_create_object_from_config_for_member() { - let template = RoomTemplate::default(); - let object_template = GameObjectTemplate { + let template = RoomCreateParams::default(); + let object_template = GameObjectCreateParams { id: 155, template: 5, groups: AccessGroups(55), @@ -405,8 +397,8 @@ mod tests { doubles: Default::default(), structures: Default::default(), }; - let member_template = MemberTemplate::new_member(AccessGroups(55), vec![object_template.clone()]); - let mut room = Room::from_template(template); + let member_template = MemberCreateParams::new_member(AccessGroups(55), vec![object_template.clone()]); + let mut room = Room::new(0, template); let member_id = room.register_member(member_template); room.execute_commands(member_id, &[]); assert!(room.objects.contains_key(&GameObjectId::new(object_template.id, GameObjectOwner::Member(member_id)))); @@ -417,8 +409,8 @@ mod tests { /// #[test] fn should_load_member_object_when_connect_other_member() { - let template = RoomTemplate::default(); - let object1_template = GameObjectTemplate { + let template = RoomCreateParams::default(); + let object1_template = GameObjectCreateParams { id: 100, template: 5, groups: AccessGroups(55), @@ -426,9 +418,9 @@ mod tests { doubles: Default::default(), structures: Default::default(), }; - let member1_template = MemberTemplate::new_member(AccessGroups(55), vec![object1_template.clone()]); + let member1_template = MemberCreateParams::new_member(AccessGroups(55), vec![object1_template.clone()]); - let object2_template = GameObjectTemplate { + let object2_template = GameObjectCreateParams { id: 200, template: 5, groups: AccessGroups(55), @@ -436,9 +428,9 @@ mod tests { doubles: Default::default(), structures: Default::default(), }; - let member2_template = MemberTemplate::new_member(AccessGroups(55), vec![object2_template.clone()]); + let member2_template = MemberCreateParams::new_member(AccessGroups(55), vec![object2_template.clone()]); - let mut room = Room::from_template(template); + let mut room = Room::new(0, template); let member1_id = room.register_member(member1_template); let member2_id = room.register_member(member2_template); room.execute_commands(member1_id, &[]); @@ -469,13 +461,13 @@ mod tests { #[test] pub(crate) fn should_keep_order_object() { let (template, member_template) = create_template(); - let mut room = Room::from_template(template); + let mut room = Room::new(0, template); room.register_member(member_template); - room.insert_object(GameObject::new(GameObjectId::new(100, GameObjectOwner::Room), 0, Default::default(), false)); + room.insert_object(GameObject::new(GameObjectId::new(100, GameObjectOwner::Room), 0, Default::default(), Default::default(), false)); - room.insert_object(GameObject::new(GameObjectId::new(5, GameObjectOwner::Room), 0, Default::default(), false)); + room.insert_object(GameObject::new(GameObjectId::new(5, GameObjectOwner::Room), 0, Default::default(), Default::default(), false)); - room.insert_object(GameObject::new(GameObjectId::new(200, GameObjectOwner::Room), 0, Default::default(), false)); + room.insert_object(GameObject::new(GameObjectId::new(200, GameObjectOwner::Room), 0, Default::default(), Default::default(), false)); let mut order = String::new(); room.objects.values().for_each(|o| { @@ -495,7 +487,7 @@ mod tests { #[test] pub(crate) fn should_clear_out_commands_after_collect() { let mut room = Room::default(); - let member_template = MemberTemplate::stub(AccessGroups(8)); + let member_template = MemberCreateParams::stub(AccessGroups(8)); let member_id = room.register_member(member_template); room.mark_as_connected_in_test(member_id).unwrap(); let member = room.get_member_mut(&member_id).unwrap(); @@ -515,7 +507,7 @@ mod tests { #[test] fn should_check_singleton_key() { let mut room = Room::default(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Room, AccessGroups(7)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Room, AccessGroups(7), Default::default()); let object_id = object.id; let unique_key = Buffer::from([1, 2, 3, 4].as_slice()); room.set_singleton_key(unique_key.clone(), object_id); @@ -526,13 +518,13 @@ mod tests { #[test] fn should_send_member_connected() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(10); - let mut room = Room::from_template(template); - let member_1 = room.register_member(MemberTemplate::stub(access_groups)); + let mut room = Room::new(0, template); + let member_1 = room.register_member(MemberCreateParams::stub(access_groups)); room.mark_as_connected_in_test(member_1).unwrap(); - let member_2 = room.register_member(MemberTemplate::stub(access_groups)); + let member_2 = room.register_member(MemberCreateParams::stub(access_groups)); room.mark_as_connected_in_test(member_2).unwrap(); room.connect_member(member_2).unwrap(); @@ -541,14 +533,14 @@ mod tests { #[test] fn should_send_member_disconnect() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(10); - let mut room = Room::from_template(template); - let member_1 = room.register_member(MemberTemplate::stub(access_groups)); + let mut room = Room::new(0, template); + let member_1 = room.register_member(MemberCreateParams::stub(access_groups)); room.mark_as_connected_in_test(member_1).unwrap(); room.connect_member(member_1).unwrap(); - let member_2 = room.register_member(MemberTemplate::stub(access_groups)); + let member_2 = room.register_member(MemberCreateParams::stub(access_groups)); room.mark_as_connected_in_test(member_2).unwrap(); room.connect_member(member_2).unwrap(); room.disconnect_member(member_2).unwrap(); @@ -559,9 +551,9 @@ mod tests { ); } - pub(crate) fn create_template() -> (RoomTemplate, MemberTemplate) { - let template = RoomTemplate::default(); - let member_template = MemberTemplate::new_member(AccessGroups(55), Default::default()); + pub(crate) fn create_template() -> (RoomCreateParams, MemberCreateParams) { + let template = RoomCreateParams::default(); + let member_template = MemberCreateParams::new_member(AccessGroups(55), Default::default()); (template, member_template) } } diff --git a/rust/Server/src/server/room/object/mod.rs b/rust/Server/src/server/room/object/mod.rs index d542720d6..11af4fb5b 100644 --- a/rust/Server/src/server/room/object/mod.rs +++ b/rust/Server/src/server/room/object/mod.rs @@ -1,7 +1,9 @@ use serde::{Deserialize, Serialize}; use std::fmt::Debug; +use std::sync::Arc; use thiserror::Error; +use crate::server::room::config::object::GameObjectConfig; use cheetah_common::commands::s2c::S2CCommand; use cheetah_common::commands::types::create::{CreateGameObject, GameObjectCreated}; use cheetah_common::room::access::AccessGroups; @@ -24,6 +26,7 @@ pub type S2CCommandsCollector = Vec; pub struct GameObject { pub id: GameObjectId, pub template_id: GameObjectTemplateId, + pub config: Arc, pub access_groups: AccessGroups, pub created: bool, pub double_fields: Fields, @@ -34,16 +37,17 @@ pub struct GameObject { #[derive(Error, Debug, PartialEq, Eq)] pub enum GameObjectError { - #[error("Field count overflow in game object {0:?} with template {1:?}")] + #[error("Field count overflow in game object {0:?} with config {1:?}")] FieldCountOverflow(GameObjectId, GameObjectTemplateId), } impl GameObject { #[must_use] - pub fn new(id: GameObjectId, template_id: GameObjectTemplateId, access_groups: AccessGroups, created: bool) -> Self { + pub fn new(id: GameObjectId, template_id: GameObjectTemplateId, access_groups: AccessGroups, config: Arc, created: bool) -> Self { Self { id, template_id, + config, access_groups, created, double_fields: Default::default(), @@ -93,7 +97,7 @@ mod tests { #[test] pub(crate) fn should_collect_command() { let id = GameObjectId::new(1, GameObjectOwner::Room); - let mut object = GameObject::new(id, 55, AccessGroups(63), true); + let mut object = GameObject::new(id, 55, AccessGroups(63), Default::default(), true); object.long_fields.set(1, 100); object.double_fields.set(2, 200.200); object.structure_fields.set(1, [1, 2, 3].as_ref().into()); @@ -172,7 +176,7 @@ mod tests { #[test] pub(crate) fn should_collect_command_for_not_created_object() { let id = GameObjectId::new(1, GameObjectOwner::Room); - let mut object = GameObject::new(id, 0, Default::default(), false); + let mut object = GameObject::new(id, 0, Default::default(), Default::default(), false); object.long_fields.set(1, 100); let mut commands = S2CCommandsCollector::new(); @@ -186,7 +190,7 @@ mod tests { #[test] pub(crate) fn should_update_structure() { - let mut object = GameObject::new(GameObjectId::default(), 0, Default::default(), false); + let mut object = GameObject::new(GameObjectId::default(), 0, Default::default(), Default::default(), false); object.structure_fields.set(1, Buffer::from([1, 2, 3].as_ref())); object.structure_fields.set(1, Buffer::from([4, 5, 6, 7].as_ref())); diff --git a/rust/Server/src/server/room/sender.rs b/rust/Server/src/server/room/sender.rs index 4db2e271a..72b8cdb7c 100644 --- a/rust/Server/src/server/room/sender.rs +++ b/rust/Server/src/server/room/sender.rs @@ -68,7 +68,8 @@ mod tests { use cheetah_common::room::field::{Field, FieldType}; use cheetah_common::room::owner::GameObjectOwner; - use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; + use crate::server::room::config::member::MemberCreateParams; + use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; /// @@ -79,9 +80,9 @@ mod tests { let access_groups = AccessGroups(55); let field = Field { id: 10, field_type: FieldType::Long }; - let mut room = Room::from_template(RoomTemplate::default()); - let member_id = room.register_member(MemberTemplate::stub(access_groups)); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups); + let mut room = Room::new(0, RoomCreateParams::default()); + let member_id = room.register_member(MemberCreateParams::stub(access_groups)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_id), access_groups, Default::default()); object.access_groups = access_groups; object.created = true; let object_id = object.id; @@ -104,13 +105,13 @@ mod tests { /// #[test] fn should_skip_action_if_sender_not_in_group() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups_a = AccessGroups(0b01); let access_groups_b = AccessGroups(0b10); - let mut room = Room::from_template(template); - let member_1 = room.register_member(MemberTemplate::stub(access_groups_a)); - let member_2 = room.register_member(MemberTemplate::stub(access_groups_b)); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_1), access_groups_a); + let mut room = Room::new(0, template); + let member_1 = room.register_member(MemberCreateParams::stub(access_groups_a)); + let member_2 = room.register_member(MemberCreateParams::stub(access_groups_b)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_1), access_groups_a, Default::default()); object.created = true; let object_id = object.id; room.send_command_from_action(object_id, member_2, None, |_| Ok(None)).unwrap_err(); @@ -122,14 +123,14 @@ mod tests { let object_template = 5; let allow_field_id = 70; - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); - let mut room = Room::from_template(template); - let _member_source_id = room.register_member(MemberTemplate::stub(groups)); - let member_target_id = room.register_member(MemberTemplate::stub(groups)); + let mut room = Room::new(0, template); + let _member_source_id = room.register_member(MemberCreateParams::stub(groups)); + let member_target_id = room.register_member(MemberCreateParams::stub(groups)); room.mark_as_connected_in_test(member_target_id).unwrap(); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_target_id), groups); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_target_id), groups, Default::default()); object.created = true; object.template_id = object_template; let object_id = object.id; @@ -141,7 +142,7 @@ mod tests { })]; room.send_to_member(&member_target_id, &commands).unwrap(); - let out_commands = room.test_get_member_out_commands_with_meta(member_target_id); + let out_commands = room.get_member_out_commands_for_test(member_target_id); let command = out_commands.get(0); assert!(matches!(command, Some(S2CCommand::SetLong(command)) if command.field_id == allow_field_id)); @@ -150,12 +151,12 @@ mod tests { #[test] fn should_do_action_not_send_if_object_not_created() { - let template = RoomTemplate::default(); + let template = RoomCreateParams::default(); let access_groups = AccessGroups(55); - let mut room = Room::from_template(template); - let member_1 = room.register_member(MemberTemplate::stub(access_groups)); - let member_2 = room.register_member(MemberTemplate::stub(access_groups)); - let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_1), access_groups); + let mut room = Room::new(0, template); + let member_1 = room.register_member(MemberCreateParams::stub(access_groups)); + let member_2 = room.register_member(MemberCreateParams::stub(access_groups)); + let object = room.test_create_object_with_not_created_state(GameObjectOwner::Member(member_1), access_groups, Default::default()); let object_id = object.id; room.mark_as_connected_in_test(member_1).unwrap(); room.mark_as_connected_in_test(member_2).unwrap(); diff --git a/rust/Server/src/server/room_registry.rs b/rust/Server/src/server/room_registry.rs index af6080bef..42b88b0de 100644 --- a/rust/Server/src/server/room_registry.rs +++ b/rust/Server/src/server/room_registry.rs @@ -1,5 +1,6 @@ use crate::server::room::command::ServerCommandError; -use crate::server::room::template::config::{MemberTemplate, RoomTemplate}; +use crate::server::room::config::member::MemberCreateParams; +use crate::server::room::config::room::RoomCreateParams; use crate::server::room::Room; use cheetah_common::commands::{CommandWithChannelType, CommandWithReliabilityGuarantees}; use cheetah_game_realtime_protocol::others::member_id::MemberAndRoomId; @@ -36,7 +37,7 @@ impl Rooms { self.rooms.iter() } - pub fn create_room(&mut self, template: RoomTemplate) -> RoomId { + pub fn create_room(&mut self, template: RoomCreateParams) -> RoomId { self.room_id_generator += 1; self.created_rooms_count += 1; let room_id = self.room_id_generator; @@ -50,7 +51,7 @@ impl Rooms { self.rooms.remove(room_id).ok_or(RoomNotFoundError(*room_id)) } - pub fn register_member(&mut self, room_id: RoomId, member_template: MemberTemplate) -> Result { + pub fn register_member(&mut self, room_id: RoomId, member_template: MemberCreateParams) -> Result { match self.rooms.get_mut(&room_id) { None => Err(RoomNotFoundError(room_id)), Some(room) => Ok(room.register_member(member_template)), @@ -97,7 +98,7 @@ mod tests { #[test] fn should_remove_room() { let mut rooms = Rooms::default(); - let room_id = rooms.create_room(RoomTemplate::default()); + let room_id = rooms.create_room(RoomCreateParams::default()); let room = rooms.force_remove_room(&room_id); assert!(room.is_ok(), "want room when take by room_id"); assert_eq!(room_id, room.unwrap().id, "want taken room_id to match with room_id parameter"); @@ -107,8 +108,8 @@ mod tests { #[test] fn should_created_rooms_count() { let mut rooms = Rooms::default(); - let room_a = rooms.create_room(RoomTemplate::default()); - rooms.create_room(RoomTemplate::default()); + let room_a = rooms.create_room(RoomCreateParams::default()); + rooms.create_room(RoomCreateParams::default()); assert_eq!(rooms.created_rooms_count, 2); rooms.force_remove_room(&room_a).unwrap(); assert_eq!(rooms.created_rooms_count, 2); diff --git a/scripts/generate-all.sh b/scripts/generate-all.sh index a0bcf87a7..95215f00c 100755 --- a/scripts/generate-all.sh +++ b/scripts/generate-all.sh @@ -4,13 +4,10 @@ cd ../ echo "=== Generate Unity GRPC " source scripts/generators/unity.sh - -generate_unity_grpc_files proto/shared.proto client/Unity/Packages/games.cheetah.grpc.shared/Runtime/ -generate_unity_grpc_files proto/internal.proto client/Unity/Packages/games.cheetah.grpc.internal/Runtime/ +generate_unity_grpc_files proto/service.proto client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ # мета файлы создаем только для linux - так как # именно он используется для вывода релиза if [[ ($OSTYPE == 'linux'*) ]]; then - generate_meta_files client/Unity/Packages/games.cheetah.grpc.shared/Runtime/ - generate_meta_files client/Unity/Packages/games.cheetah.grpc.internal/Runtime/ + generate_meta_files client/Unity/Packages/games.cheetah.realtime.grpc/Runtime/ fi