From e07dfa6b3ec9737d6c1734f6185693e9d67282fc Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Wed, 12 Nov 2025 01:43:12 +0800 Subject: [PATCH] =?UTF-8?q?Switch=E7=89=88=E6=9C=AC=E6=88=90=E6=9E=9C?= =?UTF-8?q?=E9=98=B6=E6=AE=B5=E6=80=A7=E5=BD=92=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AxiProjectTools/Editors/AxiAutoBuild.cs | 13 +- .../Editors/AxiProjectTools.Statistics.cs | 3 +- .../Assets/AxiProjectTools/Editors/GenCode.cs | 69 + .../AxiProjectTools/Editors/GenCode.cs.meta | 2 + .../AxiNSApi/AxiNSIOKeepingDisposable.cs | 2 + .../Assets/Plugins/AxiReplay/FrameProfiler.cs | 3 +- .../Assets/Plugins/AxiReplay/NetReplay.cs | 2 + .../Assets/Plugins/Essgee.Unity/AxiMemory.cs | 15 +- .../Emulation/Audio/DMGAudio.Square.cs | 40 +- .../Essgee.Unity/Emulation/Audio/DMGAudio.cs | 19 +- .../Emulation/Machines/ColecoVision.cs | 3 +- .../Emulation/Machines/GameBoy.cs | 11 +- .../Essgee.Unity/Emulation/Utilities.cs | 11 +- .../Emulation/Video/Nintendo/CGBVideo.cs | 2 +- .../Emulation/Video/Nintendo/DMGVideo.cs | 111 +- .../Plugins/Essgee.Unity/ObjectPoolAuto.cs | 3 +- .../Assets/Plugins/Google.Protobuf.dll | Bin 381952 -> 0 bytes .../Assets/Plugins/Google.Protobuf.dll.meta | 33 - .../Assets/Plugins/Google.Protobuf.meta | 8 + .../Plugins/Google.Protobuf/ByteArray.cs | 56 + .../Plugins/Google.Protobuf/ByteArray.cs.meta | 11 + .../Plugins/Google.Protobuf/ByteString.cs | 424 + .../Google.Protobuf/ByteString.cs.meta | 11 + .../Google.Protobuf/ByteStringAsync.cs | 39 + .../Google.Protobuf/ByteStringAsync.cs.meta | 11 + .../Google.Protobuf/CodedInputStream.cs | 686 + .../Google.Protobuf/CodedInputStream.cs.meta | 11 + .../CodedOutputStream.ComputeSize.cs | 285 + .../CodedOutputStream.ComputeSize.cs.meta | 11 + .../Google.Protobuf/CodedOutputStream.cs | 609 + .../Google.Protobuf/CodedOutputStream.cs.meta | 11 + .../Plugins/Google.Protobuf/Collections.meta | 8 + .../Google.Protobuf/Collections/Lists.cs | 65 + .../Google.Protobuf/Collections/Lists.cs.meta | 11 + .../Google.Protobuf/Collections/MapField.cs | 737 + .../Collections/MapField.cs.meta | 11 + .../Collections/ProtobufEqualityComparers.cs | 107 + .../ProtobufEqualityComparers.cs.meta | 11 + .../Collections/RepeatedField.cs | 663 + .../Collections/RepeatedField.cs.meta | 11 + .../Google.Protobuf/Compatibility.meta | 8 + .../DynamicallyAccessedMemberTypes.cs | 104 + .../DynamicallyAccessedMemberTypes.cs.meta | 11 + .../DynamicallyAccessedMembersAttribute.cs | 60 + ...ynamicallyAccessedMembersAttribute.cs.meta | 11 + .../Compatibility/PropertyInfoExtensions.cs | 41 + .../PropertyInfoExtensions.cs.meta | 11 + .../RequiresUnreferencedCodeAttribute.cs | 49 + .../RequiresUnreferencedCodeAttribute.cs.meta | 11 + .../Compatibility/TypeExtensions.cs | 90 + .../Compatibility/TypeExtensions.cs.meta | 11 + .../UnconditionalSuppressMessageAttribute.cs | 94 + ...onditionalSuppressMessageAttribute.cs.meta | 11 + .../Plugins/Google.Protobuf/Compiler.meta | 8 + .../Google.Protobuf/Compiler/Plugin.pb.cs | 1683 ++ .../Compiler/Plugin.pb.cs.meta | 11 + .../Plugins/Google.Protobuf/Extension.cs | 96 + .../Plugins/Google.Protobuf/Extension.cs.meta | 11 + .../Google.Protobuf/ExtensionRegistry.cs | 161 + .../Google.Protobuf/ExtensionRegistry.cs.meta | 11 + .../Plugins/Google.Protobuf/ExtensionSet.cs | 398 + .../Google.Protobuf/ExtensionSet.cs.meta | 11 + .../Plugins/Google.Protobuf/ExtensionValue.cs | 206 + .../Google.Protobuf/ExtensionValue.cs.meta | 11 + .../Plugins/Google.Protobuf/FieldCodec.cs | 814 + .../Google.Protobuf/FieldCodec.cs.meta | 11 + .../Plugins/Google.Protobuf/FieldMaskTree.cs | 357 + .../Google.Protobuf/FieldMaskTree.cs.meta | 11 + .../Google.Protobuf/FrameworkPortability.cs | 26 + .../FrameworkPortability.cs.meta | 11 + .../Google.Protobuf/Google.Protobuf.asmdef | 14 + .../Google.Protobuf.asmdef.meta | 7 + .../Plugins/Google.Protobuf/IBufferMessage.cs | 30 + .../Google.Protobuf/IBufferMessage.cs.meta | 11 + .../ICustomDiagnosticMessage.cs | 46 + .../ICustomDiagnosticMessage.cs.meta | 11 + .../Plugins/Google.Protobuf/IDeepCloneable.cs | 31 + .../Google.Protobuf/IDeepCloneable.cs.meta | 11 + .../Google.Protobuf/IExtendableMessage.cs | 56 + .../IExtendableMessage.cs.meta | 11 + .../Plugins/Google.Protobuf/IMessage.cs | 64 + .../Plugins/Google.Protobuf/IMessage.cs.meta | 11 + .../Google.Protobuf/InvalidJsonException.cs | 30 + .../InvalidJsonException.cs.meta | 11 + .../InvalidProtocolBufferException.cs | 117 + .../InvalidProtocolBufferException.cs.meta | 11 + .../Plugins/Google.Protobuf/JsonFormatter.cs | 917 + .../Google.Protobuf/JsonFormatter.cs.meta | 11 + .../Plugins/Google.Protobuf/JsonParser.cs | 1077 ++ .../Google.Protobuf/JsonParser.cs.meta | 11 + .../Plugins/Google.Protobuf/JsonToken.cs | 118 + .../Plugins/Google.Protobuf/JsonToken.cs.meta | 11 + .../Plugins/Google.Protobuf/JsonTokenizer.cs | 812 + .../Google.Protobuf/JsonTokenizer.cs.meta | 11 + .../Google.Protobuf/LimitedInputStream.cs | 64 + .../LimitedInputStream.cs.meta | 11 + .../Google.Protobuf/MessageExtensions.cs | 329 + .../Google.Protobuf/MessageExtensions.cs.meta | 11 + .../Plugins/Google.Protobuf/MessageParser.cs | 388 + .../Google.Protobuf/MessageParser.cs.meta | 11 + .../Plugins/Google.Protobuf/ObjectIntPair.cs | 42 + .../Google.Protobuf/ObjectIntPair.cs.meta | 11 + .../Plugins/Google.Protobuf/ParseContext.cs | 267 + .../Google.Protobuf/ParseContext.cs.meta | 11 + .../Google.Protobuf/ParserInternalState.cs | 80 + .../ParserInternalState.cs.meta | 11 + .../Google.Protobuf/ParsingPrimitives.cs | 789 + .../Google.Protobuf/ParsingPrimitives.cs.meta | 11 + .../ParsingPrimitivesMessages.cs | 267 + .../ParsingPrimitivesMessages.cs.meta | 11 + .../ParsingPrimitivesWrappers.cs | 324 + .../ParsingPrimitivesWrappers.cs.meta | 11 + .../Plugins/Google.Protobuf/Properties.meta | 8 + .../Properties/AssemblyInfo.cs | 30 + .../Properties/AssemblyInfo.cs.meta | 11 + .../Google.Protobuf/ProtoPreconditions.cs | 56 + .../ProtoPreconditions.cs.meta | 11 + .../Plugins/Google.Protobuf/Reflection.meta | 8 + .../Reflection/CustomOptions.cs | 313 + .../Reflection/CustomOptions.cs.meta | 11 + .../Reflection/Descriptor.pb.cs | 14984 ++++++++++++++++ .../Reflection/Descriptor.pb.cs.meta | 11 + .../Reflection/DescriptorBase.cs | 83 + .../Reflection/DescriptorBase.cs.meta | 11 + .../Reflection/DescriptorDeclaration.cs | 87 + .../Reflection/DescriptorDeclaration.cs.meta | 11 + .../Reflection/DescriptorPool.cs | 358 + .../Reflection/DescriptorPool.cs.meta | 11 + .../Reflection/DescriptorUtil.cs | 41 + .../Reflection/DescriptorUtil.cs.meta | 11 + .../DescriptorValidationException.cs | 48 + .../DescriptorValidationException.cs.meta | 11 + .../Reflection/EnumDescriptor.cs | 140 + .../Reflection/EnumDescriptor.cs.meta | 11 + .../Reflection/EnumValueDescriptor.cs | 99 + .../Reflection/EnumValueDescriptor.cs.meta | 11 + .../Reflection/ExtensionAccessor.cs | 46 + .../Reflection/ExtensionAccessor.cs.meta | 11 + .../Reflection/ExtensionCollection.cs | 118 + .../Reflection/ExtensionCollection.cs.meta | 11 + .../Reflection/FeatureSetDescriptor.cs | 119 + .../Reflection/FeatureSetDescriptor.cs.meta | 11 + .../Reflection/FieldAccessorBase.cs | 40 + .../Reflection/FieldAccessorBase.cs.meta | 11 + .../Reflection/FieldDescriptor.cs | 488 + .../Reflection/FieldDescriptor.cs.meta | 11 + .../Google.Protobuf/Reflection/FieldType.cs | 90 + .../Reflection/FieldType.cs.meta | 11 + .../Reflection/FileDescriptor.cs | 614 + .../Reflection/FileDescriptor.cs.meta | 11 + .../Reflection/GeneratedClrTypeInfo.cs | 126 + .../Reflection/GeneratedClrTypeInfo.cs.meta | 11 + .../Google.Protobuf/Reflection/IDescriptor.cs | 32 + .../Reflection/IDescriptor.cs.meta | 11 + .../Reflection/IFieldAccessor.cs | 54 + .../Reflection/IFieldAccessor.cs.meta | 11 + .../Reflection/MapFieldAccessor.cs | 41 + .../Reflection/MapFieldAccessor.cs.meta | 11 + .../Reflection/MessageDescriptor.cs | 436 + .../Reflection/MessageDescriptor.cs.meta | 11 + .../Reflection/MethodDescriptor.cs | 130 + .../Reflection/MethodDescriptor.cs.meta | 11 + .../Reflection/OneofAccessor.cs | 74 + .../Reflection/OneofAccessor.cs.meta | 11 + .../Reflection/OneofDescriptor.cs | 193 + .../Reflection/OneofDescriptor.cs.meta | 11 + .../Reflection/OriginalNameAttribute.cs | 41 + .../Reflection/OriginalNameAttribute.cs.meta | 11 + .../Reflection/PackageDescriptor.cs | 30 + .../Reflection/PackageDescriptor.cs.meta | 11 + .../Reflection/ReflectionUtil.cs | 375 + .../Reflection/ReflectionUtil.cs.meta | 11 + .../Reflection/RepeatedFieldAccessor.cs | 41 + .../Reflection/RepeatedFieldAccessor.cs.meta | 11 + .../Reflection/ServiceDescriptor.cs | 118 + .../Reflection/ServiceDescriptor.cs.meta | 11 + .../Reflection/SingleFieldAccessor.cs | 115 + .../Reflection/SingleFieldAccessor.cs.meta | 11 + .../Reflection/TypeRegistry.cs | 176 + .../Reflection/TypeRegistry.cs.meta | 11 + .../Google.Protobuf/SegmentedBufferHelper.cs | 273 + .../SegmentedBufferHelper.cs.meta | 11 + .../Plugins/Google.Protobuf/UnknownField.cs | 264 + .../Google.Protobuf/UnknownField.cs.meta | 11 + .../Google.Protobuf/UnknownFieldSet.cs | 382 + .../Google.Protobuf/UnknownFieldSet.cs.meta | 11 + .../Google.Protobuf/UnsafeByteOperations.cs | 58 + .../UnsafeByteOperations.cs.meta | 11 + .../Google.Protobuf/WellKnownTypes.meta | 8 + .../Google.Protobuf/WellKnownTypes/Any.pb.cs | 401 + .../WellKnownTypes/Any.pb.cs.meta | 11 + .../WellKnownTypes/AnyPartial.cs | 144 + .../WellKnownTypes/AnyPartial.cs.meta | 11 + .../Google.Protobuf/WellKnownTypes/Api.pb.cs | 1263 ++ .../WellKnownTypes/Api.pb.cs.meta | 11 + .../WellKnownTypes/Duration.pb.cs | 355 + .../WellKnownTypes/Duration.pb.cs.meta | 11 + .../WellKnownTypes/DurationPartial.cs | 268 + .../WellKnownTypes/DurationPartial.cs.meta | 11 + .../WellKnownTypes/Empty.pb.cs | 216 + .../WellKnownTypes/Empty.pb.cs.meta | 11 + .../WellKnownTypes/FieldMask.pb.cs | 436 + .../WellKnownTypes/FieldMask.pb.cs.meta | 11 + .../WellKnownTypes/FieldMaskPartial.cs | 343 + .../WellKnownTypes/FieldMaskPartial.cs.meta | 11 + .../WellKnownTypes/SourceContext.pb.cs | 253 + .../WellKnownTypes/SourceContext.pb.cs.meta | 11 + .../WellKnownTypes/Struct.pb.cs | 1007 ++ .../WellKnownTypes/Struct.pb.cs.meta | 11 + .../WellKnownTypes/TimeExtensions.cs | 53 + .../WellKnownTypes/TimeExtensions.cs.meta | 11 + .../WellKnownTypes/Timestamp.pb.cs | 384 + .../WellKnownTypes/Timestamp.pb.cs.meta | 11 + .../WellKnownTypes/TimestampPartial.cs | 321 + .../WellKnownTypes/TimestampPartial.cs.meta | 11 + .../Google.Protobuf/WellKnownTypes/Type.pb.cs | 2114 +++ .../WellKnownTypes/Type.pb.cs.meta | 11 + .../WellKnownTypes/ValuePartial.cs | 76 + .../WellKnownTypes/ValuePartial.cs.meta | 11 + .../WellKnownTypes/Wrappers.pb.cs | 1914 ++ .../WellKnownTypes/Wrappers.pb.cs.meta | 11 + .../WellKnownTypes/WrappersPartial.cs | 19 + .../WellKnownTypes/WrappersPartial.cs.meta | 11 + .../Plugins/Google.Protobuf/WireFormat.cs | 81 + .../Google.Protobuf/WireFormat.cs.meta | 11 + .../Google.Protobuf/WriteBufferHelper.cs | 142 + .../Google.Protobuf/WriteBufferHelper.cs.meta | 11 + .../Plugins/Google.Protobuf/WriteContext.cs | 258 + .../Google.Protobuf/WriteContext.cs.meta | 11 + .../Google.Protobuf/WriterInternalState.cs | 27 + .../WriterInternalState.cs.meta | 11 + .../Google.Protobuf/WritingPrimitives.cs | 735 + .../Google.Protobuf/WritingPrimitives.cs.meta | 11 + .../WritingPrimitivesMessages.cs | 87 + .../WritingPrimitivesMessages.cs.meta | 11 + .../HaoYueNet.ClientNetwork.Standard2.dll | Bin 34304 -> 35328 bytes .../IngameDebugConsole.prefab | 2 +- .../Scripts/InputFieldWarningsFixer.cs | 4 +- .../Assets/Plugins/Mame.Core/MAMEEmu.cs | 50 +- .../Mame.Core/Motion/MameMainMotion.cs | 14 +- .../Plugins/Mame.Core/ObjectPoolAuto.cs | 3 +- .../Plugins/Mame.Core/cpu/m6800/M6800.cs | 20 +- .../Plugins/Mame.Core/cpu/m68000/MC68000.cs | 64 +- .../cpu/m68000/OpcodeTable.OpCode.Do.cs | 250 +- .../cpu/m68000/OpcodeTable.OpCode.Enum.cs | 32 +- .../Mame.Core/cpu/m68000/OpcodeTable.cs | 870 + .../Mame.Core/cpu/m68000/OpcodeTable.cs.meta | 11 + .../Plugins/Mame.Core/cpu/m6805/M6805.cs | 2 +- .../Plugins/Mame.Core/cpu/m6809/M6809.cs | 2 +- .../Assets/Plugins/Mame.Core/cpu/nec/Nec.cs | 338 +- .../Plugins/Mame.Core/cpu/nec/NecInstr.cs | 1379 +- .../Plugins/Mame.Core/cpu/nec/NecModrm.cs | 44 +- .../Mame.Core/cpu/nec/Nec_GetEA.OpCode.Do.cs | 44 + .../cpu/nec/Nec_GetEA.OpCode.Do.cs.meta | 11 + .../cpu/nec/Nec_GetEA.OpCode.Enum.cs | 231 + .../cpu/nec/Nec_GetEA.OpCode.Enum.cs.meta | 11 + .../cpu/nec/Nec_instruction.OpCode.Do.cs | 265 + .../cpu/nec/Nec_instruction.OpCode.Do.cs.meta | 11 + .../cpu/nec/Nec_instruction.OpCode.Enum.cs | 518 + .../nec/Nec_instruction.OpCode.Enum.cs.meta | 11 + .../Assets/Plugins/Mame.Core/emu/Cpuexec.cs | 17 +- .../Assets/Plugins/Mame.Core/emu/Cpuint.cs | 35 +- .../Assets/Plugins/Mame.Core/emu/Crosshair.cs | 2 +- .../Assets/Plugins/Mame.Core/emu/EmuTimer.cs | 971 +- .../Assets/Plugins/Mame.Core/emu/Mame.cs | 4 +- .../Assets/Plugins/Mame.Core/emu/Memory.cs | 15 +- .../Assets/Plugins/Mame.Core/emu/Motion.cs | 3 +- .../Assets/Plugins/Mame.Core/emu/Mouse.cs | 3 +- .../Assets/Plugins/Mame.Core/emu/RomInfo.cs | 3 +- .../Assets/Plugins/Mame.Core/emu/Video.cs | 31 +- .../Assets/Plugins/Mame.Core/emu/Watchdog.cs | 3 +- .../Plugins/Mame.Core/mame/dataeast/Input.cs | 77 +- .../Plugins/Mame.Core/mame/igs011/IGS011.cs | 12 +- .../Mame.Core/mame/konami68000/Konami68000.cs | 2 +- .../Mame.Core/mame/konami68000/Konamiic.cs | 38 +- .../Plugins/Mame.Core/mame/m72/Audio.cs | 25 +- .../Assets/Plugins/Mame.Core/mame/m72/M72.cs | 6 +- .../Plugins/Mame.Core/mame/m92/Drawgfx.cs | 149 +- .../Assets/Plugins/Mame.Core/mame/m92/M92.cs | 43 +- .../Plugins/Mame.Core/mame/m92/Video.cs | 256 +- .../Plugins/Mame.Core/mame/namcos1/Video.cs | 10 +- .../Plugins/Mame.Core/mame/neogeo/Memory.cs | 136 +- .../Plugins/Mame.Core/mame/neogeo/Neogeo.cs | 17 +- .../Plugins/Mame.Core/mame/neogeo/Neoprot.cs | 56 +- .../Plugins/Mame.Core/mame/neogeo/Video.cs | 43 +- .../Plugins/Mame.Core/mame/pgm/Machine.cs | 2 +- .../Plugins/Mame.Core/mame/taito/Bublbobl.cs | 27 +- .../Plugins/Mame.Core/mame/taito/Opwolf.cs | 51 +- .../Plugins/Mame.Core/mame/taitob/Taitob.cs | 20 +- .../Mame.Core/run_interface/IResources.cs | 1 + .../Assets/Plugins/Mame.Core/sound/AY8910.cs | 179 +- .../Assets/Plugins/Mame.Core/sound/FM.cs | 181 +- .../Assets/Plugins/Mame.Core/sound/ICS2115.cs | 29 +- .../Plugins/Mame.Core/sound/Iremga20.cs | 72 +- .../Assets/Plugins/Mame.Core/sound/MSM5205.cs | 6 +- .../Assets/Plugins/Mame.Core/sound/Sound.cs | 45 +- .../Assets/Plugins/Mame.Core/sound/Streams.cs | 4 +- .../Assets/Plugins/Mame.Core/sound/Upd7759.cs | 3 +- .../Assets/Plugins/Mame.Core/sound/YM2151.cs | 6 +- .../Assets/Plugins/Mame.Core/sound/YM2203.cs | 28 +- .../Assets/Plugins/Mame.Core/sound/YM2413.cs | 2 +- .../Assets/Plugins/Mame.Core/sound/YM2610.cs | 24 +- .../Assets/Plugins/Mame.Core/sound/YM3812.cs | 27 +- .../Plugins/StoicGooseUnity/AxiMemory.cs | 15 +- .../Assets/Resources/IMPORTENT.prefab | 23 +- .../Assets/Resources/MAME/emu/nvram.meta | 8 + .../Resources/MAME/emu/nvram/samsho2.nv.bytes | Bin 0 -> 8192 bytes .../MAME/emu/nvram/samsho2.nv.bytes.meta | 7 + .../MAME/emu/nvram/samsho3h.nv.bytes | Bin 0 -> 8192 bytes .../MAME/emu/nvram/samsho3h.nv.bytes.meta | 7 + .../UIPrefabs/OverlayUI/Overlay.prefab | 92 - .../Resources/UIPrefabs/ScreenKeyPad.prefab | 13401 ++++++++++++-- .../Background_Template.prefab | 16 +- .../Game_CPS1_Template.prefab | 16 +- .../Game_CPS2_Template.prefab | 16 +- .../Game_NES_Template.prefab | 16 +- .../Game_Neogeo_Template.prefab | 18 +- .../Game_Star_Template.prefab | 16 +- .../GlobalFilter_Template.prefab | 16 +- .../SubMenuItemTemplates/Room_Template.prefab | 16 +- .../ScreenScaler_Template.prefab | 16 +- .../BgSetting_Color_ItemTemplate.prefab | 15 +- .../FilterItemTemplate.prefab | 14 +- .../RomItemTemplate.prefab | 23 +- .../RoomItemTemplate.prefab | 22 +- .../ScalerModeItemTemplate.prefab | 14 +- .../Assets/Scene/AxibugEmuOnline.Client.unity | 3 - .../Assets/Script/AppMain/App.cs | 7 +- .../AppMain/AxiInputSP/UGUI/AxiIptButton.cs | 8 + .../AxiInputSP/UGUI/AxiScreenGamepad.cs | 97 +- .../AxiPlayerPrefs/AxiPlayerPrefsFileBase.cs | 41 +- .../AppMain/AxibugEmuOnline.Client.asmdef | 3 +- .../Script/AppMain/Common/ObjectPoolAuto.cs | 3 +- .../Script/AppMain/Common/ProtoBufHelper.cs | 39 +- .../Assets/Script/AppMain/EmuCore.cs | 10 +- .../Emulator/EssgeeEmulator/UEssgee.cs | 1 + .../UEssgeeInterface/UEGSaveByteConvert.cs | 9 +- .../UEssgeeInterface/UEGSoundPlayer.cs | 2 +- .../AppMain/Emulator/MameEmulator/UMAME.cs | 6 +- .../MameEmulator/UniInterface/UniResources.cs | 12 + .../UniInterface/UniSoundPlayer.cs | 2 +- .../Emulator/NesEmulator/AudioProvider.cs | 2 +- .../Emulator/NesEmulator/NesEmulator.cs | 1 + .../Handle/DatabaseHandler.cs | 6 +- .../StoicGooseInterface/SGSoundPlayer.cs | 2 +- .../StoicGooseEmulator/UStoicGoose.cs | 3 + .../Assets/Script/AppMain/Event/EEvent.cs | 5 + .../Assets/Script/AppMain/Manager/AppChat.cs | 13 +- .../Assets/Script/AppMain/Manager/AppEmu.cs | 1 + .../Assets/Script/AppMain/Manager/AppLogin.cs | 18 +- .../Assets/Script/AppMain/Manager/AppRoom.cs | 86 +- .../AppSettings/Filter/FilterChainEffect.cs | 3 +- .../KeyMapperSetting/KeyMapperSetting.cs | 6 +- .../KeyMapperSetting/Model/EmuCoreBinder.cs | 15 +- .../KeyMapperSetting/NesKeyBinding.cs | 4 +- .../Assets/Script/AppMain/Manager/AppShare.cs | 42 +- .../InputDevicesManager/DualWayDictionary.cs | 12 +- .../InputResolver/InputResolver.cs | 9 +- .../InputResolver/InputSystemResolver.cs | 12 +- .../AppMain/Manager/RomLib/FileDownloader.cs | 6 +- .../Script/AppMain/Manager/RomLib/RomFile.cs | 5 +- .../Manager/SaveSlotManager/SavCloudApi.cs | 53 +- .../Manager/SaveSlotManager/SaveFile.cs | 14 +- .../SaveFileSyncStates/UploadingState.cs | 3 +- .../Manager/SaveSlotManager/SimpleSFM.cs | 3 +- .../Script/AppMain/Manager/UserDataManager.cs | 50 +- .../Assets/Script/AppMain/MonoCom/AudioMgr.cs | 20 +- .../Assets/Script/AppMain/MonoCom/TickLoop.cs | 29 +- .../Assets/Script/AppMain/Network/NetMsg.cs | 172 +- .../Script/AppMain/Network/NetworkHelper.cs | 35 +- .../AppMain/Network/ProtobufferMsgPool.cs | 60 + .../Network/ProtobufferMsgPool.cs.meta | 2 + .../AppMain/Network/ProtobufferMsgPool.g.cs | 746 + .../Network/ProtobufferMsgPool.g.cs.meta | 2 + .../Protobuf/ProtobufAxibugEmuOnline.cs | 465 +- .../UI/CommandDispatcher/CommandDispatcher.cs | 4 +- .../Script/AppMain/UI/InGameUI/InGameUI.cs | 2 + .../InGameUI_OpenOrHideScreenJoyStrick.cs | 20 + ...InGameUI_OpenOrHideScreenJoyStrick.cs.meta | 2 + .../UI/InGameUI/InGameUI_SaveStateMenu.cs | 5 +- .../InGameUI/InGameUI_UploadGameCoverImg.cs | 22 + .../InGameUI_UploadGameCoverImg.cs.meta | 2 + .../Assets/Script/AppMain/UI/LaunchUI.cs | 3 + .../Script/AppMain/UI/OptionUI/OptionUI.cs | 7 +- .../UI/OptionUI/OptionUI_SavSlotItem.cs | 13 +- .../AppMain/UI/OverlayUI/OverlayManager.cs | 6 + .../Script/AppMain/UI/OverlayUI/PopTipsUI.cs | 1 - .../Assets/VirtualNes.Core/MMU.cs | 14 +- .../Assets/VirtualNes.Core/NES.cs | 2 +- .../Assets/WSATestCertificate.pfx | Bin 0 -> 2472 bytes .../Assets/WSATestCertificate.pfx.meta | 7 + .../ProjectSettings/ProjectSettings.asset | 5 +- .../ProjectSettings/QualitySettings.asset | 116 +- .../SceneTemplateSettings.json | 167 + .../ProjectSettings/TimelineSettings.asset | 16 + 395 files changed, 66713 insertions(+), 3358 deletions(-) create mode 100644 AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs.meta delete mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll delete mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Type.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Type.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/ValuePartial.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/ValuePartial.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Wrappers.pb.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Wrappers.pb.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/WrappersPartial.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/WrappersPartial.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WireFormat.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WireFormat.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WriteBufferHelper.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WriteBufferHelper.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WriteContext.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WriteContext.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WriterInternalState.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WriterInternalState.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WritingPrimitives.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WritingPrimitives.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WritingPrimitivesMessages.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WritingPrimitivesMessages.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/m68000/OpcodeTable.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/m68000/OpcodeTable.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_GetEA.OpCode.Do.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_GetEA.OpCode.Do.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_GetEA.OpCode.Enum.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_GetEA.OpCode.Enum.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_instruction.OpCode.Do.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_instruction.OpCode.Do.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_instruction.OpCode.Enum.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Plugins/Mame.Core/cpu/nec/Nec_instruction.OpCode.Enum.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Resources/MAME/emu/nvram.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Resources/MAME/emu/nvram/samsho2.nv.bytes create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Resources/MAME/emu/nvram/samsho2.nv.bytes.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Resources/MAME/emu/nvram/samsho3h.nv.bytes create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Resources/MAME/emu/nvram/samsho3h.nv.bytes.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Network/ProtobufferMsgPool.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Network/ProtobufferMsgPool.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Network/ProtobufferMsgPool.g.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Network/ProtobufferMsgPool.g.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_OpenOrHideScreenJoyStrick.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_OpenOrHideScreenJoyStrick.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs create mode 100644 AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs.meta create mode 100644 AxibugEmuOnline.Client.Switch/Assets/WSATestCertificate.pfx create mode 100644 AxibugEmuOnline.Client.Switch/Assets/WSATestCertificate.pfx.meta create mode 100644 AxibugEmuOnline.Client.Switch/ProjectSettings/SceneTemplateSettings.json create mode 100644 AxibugEmuOnline.Client.Switch/ProjectSettings/TimelineSettings.asset diff --git a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiAutoBuild.cs b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiAutoBuild.cs index 4c16c042..37a9e117 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiAutoBuild.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiAutoBuild.cs @@ -88,8 +88,19 @@ public static class AxiAutoBuild _ => "", }; + string targetplatformDir = target.ToString(); - string _locationPathName = $"Output/{target}/{targetName}"; + + targetplatformDir += target switch + { + //平台目录追加一层时间 + BuildTarget.iOS => "/" + DateTime.Now.ToString("yyyyMMddHHmmss"), + BuildTarget.StandaloneLinux64 => "/" + DateTime.Now.ToString("yyyyMMddHHmmss"), + BuildTarget.StandaloneWindows => "/"+ DateTime.Now.ToString("yyyyMMddHHmmss"), + _ => "", + }; + + string _locationPathName = $"Output/{targetplatformDir}/{targetName}"; string FullPath = Path.GetFullPath(Path.Combine(Application.dataPath, "..", _locationPathName)); string dirPath = Path.GetDirectoryName(FullPath); if (!Directory.Exists(dirPath)) diff --git a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiProjectTools.Statistics.cs b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiProjectTools.Statistics.cs index a1e3c1ec..17b8fb4a 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiProjectTools.Statistics.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/AxiProjectTools.Statistics.cs @@ -438,7 +438,8 @@ public class AxiProjectToolsStatistics : EditorWindow int DirtyCount = 0; foreach (var node in cache.nodes) { - GameObject targetNodePathObj = GetNodeByLink(cache.FullPath, node.link, out string errStr); + string errStr; + GameObject targetNodePathObj = GetNodeByLink(cache.FullPath, node.link, out errStr); if (targetNodePathObj == null) { errLog.Add(errStr); diff --git a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs new file mode 100644 index 00000000..b7131fea --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs @@ -0,0 +1,69 @@ +#if UNITY_EDITOR +using AxibugEmuOnline.Client.Network; +using Google.Protobuf; +using System; +using System.Collections; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using UnityEditor; + +public static class GenCode +{ + const string TEMPLATE = @" +namespace [NAMESPACE] +{ + public sealed partial class [CLASSNAME] : IResetable + { + public void Reset() + {[RESETCODE] + } + } +} +"; + [MenuItem("Axibug移植工具/生成Protobuff Reset代码文件")] + public static void GenResetCode() + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("using AxibugEmuOnline.Client.Network;"); + + var msgInterfaceType = typeof(IMessage); + var protoMsgTypes = typeof(NetMsg).Assembly.GetExportedTypes().Where(t => msgInterfaceType.IsAssignableFrom(t)).ToArray(); + var flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty | BindingFlags.GetProperty; + foreach (var msgType in protoMsgTypes) + { + if (msgType.IsAbstract) continue; + + var props = msgType.GetProperties(flag); + StringBuilder resetCodeSB = new StringBuilder(); + foreach (var prop in props) + { + resetCodeSB.AppendLine(); + if (prop.PropertyType.IsValueType) + resetCodeSB.Append($"\t\t\t{prop.Name} = default;"); + else if (typeof(IBufferMessage).IsAssignableFrom(prop.PropertyType)) + resetCodeSB.Append($"\t\t\t{prop.Name}?.Reset();"); + else if (typeof(IList).IsAssignableFrom(prop.PropertyType)) + resetCodeSB.Append($"\t\t\t{prop.Name}?.Clear();"); + else if (typeof(string) == prop.PropertyType) + resetCodeSB.Append($"\t\t\t{prop.Name} = string.Empty;"); + else if (typeof(ByteString) == prop.PropertyType) + resetCodeSB.Append($"\t\t\t{prop.Name} = Google.Protobuf.ByteString.Empty;"); + else throw new Exception($"Not Impl Reset Op {msgType}.{prop.Name} : {prop.PropertyType}"); + } + var code = TEMPLATE + .Replace("[NAMESPACE]", msgType.Namespace) + .Replace("[CLASSNAME]", msgType.Name) + .Replace("[RESETCODE]", resetCodeSB.ToString()); + + + sb.AppendLine(code); + } + + File.WriteAllText("Assets/Script/AppMain/Network/ProtobufferMsgPool.g.cs", sb.ToString()); + + AssetDatabase.Refresh(); + } +} +#endif \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs.meta new file mode 100644 index 00000000..28a92248 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/Editors/GenCode.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 896973cf744f927409f700f4e9151a82 \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIOKeepingDisposable.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIOKeepingDisposable.cs index b28ecc31..ccbd8957 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIOKeepingDisposable.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIOKeepingDisposable.cs @@ -15,6 +15,7 @@ public class AxiNSIOKeepingDisposable : IDisposable } static void UpdateKeepingState(bool add) { +#if UNITY_SWITCH lock (m_CurrLiveHandleLock) { bool lasthadCounter = hadCounter; @@ -42,6 +43,7 @@ public class AxiNSIOKeepingDisposable : IDisposable UnityEngine.Debug.Log("ȡֹûڱʱ˳Ϸ Switch 0080"); } } +#endif } private AxiNSIOKeepingDisposable() { diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/FrameProfiler.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/FrameProfiler.cs index 561a63ef..261d03c3 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/FrameProfiler.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/FrameProfiler.cs @@ -53,7 +53,8 @@ namespace AxiReplay void CalcCacheCount() { double deltaMax = 0; - while (m_timePoints.TryRead(out double delta)) + double delta; + while (m_timePoints.TryRead(out delta)) { deltaMax = Math.Max(deltaMax, delta); } diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/NetReplay.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/NetReplay.cs index 9023bf9f..0bc76e8f 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/NetReplay.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiReplay/NetReplay.cs @@ -54,7 +54,9 @@ namespace AxiReplay { mRemoteForwardCount = (int)ServerForwardCount; mNetReplayQueue.Enqueue(inputData); +#if UNITY_EDITOR //Debug.Log($"InData=>{inputData.FrameStartID} QCount = >{mNetReplayQueue.Count}"); +#endif mRemoteFrameIdx = inputData.FrameStartID; if (!bNetInit) { diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/AxiMemory.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/AxiMemory.cs index 159b9fa8..a32d7f94 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/AxiMemory.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/AxiMemory.cs @@ -16,28 +16,33 @@ namespace Essgee.Utilities public static void GetObjectPtr(this object srcObj, ref GCHandle handle, ref uint* ptr) { - GetObjectPtr(srcObj, ref handle, out IntPtr intptr); + IntPtr intptr; + GetObjectPtr(srcObj, ref handle, out intptr); ptr = (uint*)intptr; } public static void GetObjectPtr(this object srcObj, ref GCHandle handle, ref short* ptr) { - GetObjectPtr(srcObj, ref handle, out IntPtr intptr); + IntPtr intptr; + GetObjectPtr(srcObj, ref handle, out intptr); ptr = (short*)intptr; } public static void GetObjectPtr(this object srcObj, ref GCHandle handle, ref ushort* ptr) { - GetObjectPtr(srcObj, ref handle, out IntPtr intptr); + IntPtr intptr; + GetObjectPtr(srcObj, ref handle, out intptr); ptr = (ushort*)intptr; } public static void GetObjectPtr(this object srcObj, ref GCHandle handle, ref int* ptr) { - GetObjectPtr(srcObj, ref handle, out IntPtr intptr); + IntPtr intptr; + GetObjectPtr(srcObj, ref handle, out intptr); ptr = (int*)intptr; } public static void GetObjectPtr(this object srcObj, ref GCHandle handle, ref byte* ptr) { - GetObjectPtr(srcObj, ref handle, out IntPtr intptr); + IntPtr intptr; + GetObjectPtr(srcObj, ref handle, out intptr); ptr = (byte*)intptr; } diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.Square.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.Square.cs index b20478ea..fe255c89 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.Square.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.Square.cs @@ -6,13 +6,36 @@ namespace Essgee.Emulation.Audio { public class Square : IDMGAudioChannel { - static readonly bool[,] dutyCycleTable = new bool[,] + //static readonly bool[,] dutyCycleTable = new bool[,] + // { + // { false, false, false, false, false, false, false, true, }, // 00000001 12.5% + // { true, false, false, false, false, false, false, true, }, // 10000001 25% + // { true, false, false, false, false, true, true, true, }, // 10000111 50% + // { false, true, true, true, true, true, true, false, } // 01111110 75% + //}; + + // 1. 初始化 - 假设原始数组是 4行 x 8列 + private const int Rows = 4; + private const int Cols = 8; + private readonly bool[] _dutyCycleTable1D = new bool[Rows * Cols] { - { false, false, false, false, false, false, false, true, }, // 00000001 12.5% - { true, false, false, false, false, false, false, true, }, // 10000001 25% - { true, false, false, false, false, true, true, true, }, // 10000111 50% - { false, true, true, true, true, true, true, false, } // 01111110 75% - }; + // 第一行 (索引 0-7) + false, false, false, false, false, false, false, true, + // 第二行 (索引 8-15) + true, false, false, false, false, false, false, true, + // 第三行 (索引 16-23) + true, false, false, false, false, true, true, true, + // 第四行 (索引 24-31) + false, true, true, true, true, true, true, false + }; + + // 2. 访问方法 - 替代原来的 dutyCycleTable[row, col] + public bool GetValue(int row, int col) + { + // 重要的边界检查(在稳定后可通过条件编译移除以极致优化) + // if (row < 0 || row >= Rows || col < 0 || col >= Cols) return false; + return _dutyCycleTable1D[row * Cols + col]; + } // NR10/20 byte sweepPeriodReload, sweepShift; @@ -143,7 +166,10 @@ namespace Essgee.Emulation.Audio dutyCounter %= 8; } - OutputVolume = isDacEnabled && dutyCycleTable[dutyCycle, dutyCounter] ? volume : 0; + //OutputVolume = isDacEnabled && dutyCycleTable[dutyCycle, dutyCounter] ? volume : 0; + + //改为一维数组访问 + OutputVolume = isDacEnabled && _dutyCycleTable1D[dutyCycle * Cols + dutyCounter] ? volume : 0; } private void Trigger() diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.cs index 5ff4e81d..cba87ca7 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Audio/DMGAudio.cs @@ -296,6 +296,8 @@ namespace Essgee.Emulation.Audio sampleCycleCount = frameCycleCount = 0; } + //独立声明,不在函数内部 + private bool[] channelEnableFlags = new bool[4]; public void Step(int clockCyclesInStep) { if (!isSoundHwEnabled) return; @@ -385,10 +387,25 @@ namespace Essgee.Emulation.Audio // new bool[] { !channel1ForceEnable, !channel2ForceEnable, !channel3ForceEnable, !channel4ForceEnable }, // mixedSampleBuffer.ToArray()); + //有GC + //EnqueueSamplesEventArgs eventArgs = EnqueueSamplesEventArgs.Create( + // numChannels, + // channelSampleBuffer, + // new bool[] { !channel1ForceEnable, !channel2ForceEnable, !channel3ForceEnable, !channel4ForceEnable }, + // mixedSampleBuffer, + // mixedSampleBuffer_writePos); + + + // 在函数中使用 + channelEnableFlags[0] = !channel1ForceEnable; + channelEnableFlags[1] = !channel2ForceEnable; + channelEnableFlags[2] = !channel3ForceEnable; + channelEnableFlags[3] = !channel4ForceEnable; + EnqueueSamplesEventArgs eventArgs = EnqueueSamplesEventArgs.Create( numChannels, channelSampleBuffer, - new bool[] { !channel1ForceEnable, !channel2ForceEnable, !channel3ForceEnable, !channel4ForceEnable }, + channelEnableFlags, mixedSampleBuffer, mixedSampleBuffer_writePos); diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/ColecoVision.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/ColecoVision.cs index b700e3be..8ddb9fff 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/ColecoVision.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/ColecoVision.cs @@ -186,7 +186,8 @@ namespace Essgee.Emulation.Machines //var (type, bootstrapRomData) = CartridgeLoader.Load(configuration.BiosRom, "ColecoVision BIOS"); //直接加载BootStrap - GameMetadataHandler.instance.gameMetaReources.GetDatBytes("Bootstrap/[BIOS] ColecoVision (USA, Europe).col", out byte[] bootstrapRomData); + byte[] bootstrapRomData; + GameMetadataHandler.instance.gameMetaReources.GetDatBytes("Bootstrap/[BIOS] ColecoVision (USA, Europe).col", out bootstrapRomData); bios = new ColecoCartridge(bootstrapRomData.Length, 0); bios.LoadRom(bootstrapRomData); } diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/GameBoy.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/GameBoy.cs index cefb4099..d772d4b4 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/GameBoy.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Machines/GameBoy.cs @@ -445,9 +445,11 @@ namespace Essgee.Emulation.Machines public void RunStep() { - var clockCyclesInStep = cpu.Step(); - - for (var s = 0; s < clockCyclesInStep / 4; s++) + int clockCyclesInStep = cpu.Step(); + int loopCount = clockCyclesInStep / 4; // 除法计算移出循环 + // 在循环外检查 cartridge 是否为空,避免每次循环都检查 + bool hasCartridge = cartridge != null; + for (var s = 0; s < loopCount; s++) { HandleTimerOverflow(); UpdateCycleCounter((ushort)(clockCycleCount + 4)); @@ -456,7 +458,8 @@ namespace Essgee.Emulation.Machines video.Step(4); audio.Step(4); - cartridge?.Step(4); + if(hasCartridge) + cartridge.Step(4); currentMasterClockCyclesInFrame += 4; } diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Utilities.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Utilities.cs index b07a169f..1727d4e8 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Utilities.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Utilities.cs @@ -44,7 +44,16 @@ namespace Essgee.Emulation buffer[address + 3] = 0xFF; } - public static void RGBCGBtoBGRA8888(int color, ref byte[] buffer, int address) + //public static void RGBCGBtoBGRA8888(int color, ref byte[] buffer, int address) + //{ + // /* https://byuu.net/video/color-emulation -- "LCD emulation: Game Boy Color" */ + // byte r = (byte)((color >> 0) & 0x1F), g = (byte)((color >> 5) & 0x1F), b = (byte)((color >> 10) & 0x1F); + // buffer[address + 0] = (byte)(Math.Min(960, (r * 6) + (g * 4) + (b * 22)) >> 2); + // buffer[address + 1] = (byte)(Math.Min(960, (g * 24) + (b * 8)) >> 2); + // buffer[address + 2] = (byte)(Math.Min(960, (r * 26) + (g * 4) + (b * 2)) >> 2); + // buffer[address + 3] = 0xFF; + //} + public static void RGBCGBtoBGRA8888(int color, ref byte* buffer, int address) { /* https://byuu.net/video/color-emulation -- "LCD emulation: Game Boy Color" */ byte r = (byte)((color >> 0) & 0x1F), g = (byte)((color >> 5) & 0x1F), b = (byte)((color >> 10) & 0x1F); diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/CGBVideo.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/CGBVideo.cs index 51fda27c..adbcfe87 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/CGBVideo.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/CGBVideo.cs @@ -346,7 +346,7 @@ namespace Essgee.Emulation.Video.Nintendo WriteColorToFramebuffer(c, ((y * displayActiveWidth) + (x % displayActiveWidth)) * 4); } - private void WriteColorToFramebuffer(ushort c, int address) + private unsafe void WriteColorToFramebuffer(ushort c, int address) { RGBCGBtoBGRA8888(c, ref outputFramebuffer, address); } diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/DMGVideo.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/DMGVideo.cs index f75d4e47..bf6b7ee0 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/DMGVideo.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/Emulation/Video/Nintendo/DMGVideo.cs @@ -8,7 +8,7 @@ using static Essgee.Emulation.CPU.SM83; namespace Essgee.Emulation.Video.Nintendo { - public class DMGVideo : IVideo + public unsafe class DMGVideo : IVideo { protected const int displayActiveWidth = 160; protected const int displayActiveHeight = 144; @@ -93,14 +93,26 @@ namespace Essgee.Emulation.Video.Nintendo protected bool statIrqSignal, vBlankReady; protected int[] spritesOnLine; - readonly byte[][] colorValuesBgr = new byte[][] + // readonly byte[][] colorValuesBgr = new byte[][] + // { + // /* B G R */ + // new byte[] { 0xF8, 0xF8, 0xF8 }, /* White */ + // new byte[] { 0x9B, 0x9B, 0x9B }, /* Light gray */ + // new byte[] { 0x3E, 0x3E, 0x3E }, /* Dark gray */ + // new byte[] { 0x1F, 0x1F, 0x1F }, /* Black */ + //}; + + + //取值范例 colorValuesBgr[colorIndex * 3 + channelIndex]; + const byte colorValuesBgr_singleLen = 3; + // 转换后的一维数组 + readonly byte[] colorValuesBgr = new byte[] { - /* B G R */ - new byte[] { 0xF8, 0xF8, 0xF8 }, /* White */ - new byte[] { 0x9B, 0x9B, 0x9B }, /* Light gray */ - new byte[] { 0x3E, 0x3E, 0x3E }, /* Dark gray */ - new byte[] { 0x1F, 0x1F, 0x1F }, /* Black */ - }; + /* White */ 0xF8, 0xF8, 0xF8, + /* Light gray */0x9B, 0x9B, 0x9B, + /* Dark gray */ 0x3E, 0x3E, 0x3E, + /* Black */ 0x1F, 0x1F, 0x1F + }; protected const byte screenUsageEmpty = 0; protected const byte screenUsageBackground = 1 << 0; @@ -109,7 +121,48 @@ namespace Essgee.Emulation.Video.Nintendo protected byte[,] screenUsageFlags, screenUsageSpriteXCoords, screenUsageSpriteSlots; protected int cycleCount, cycleDotPause, currentScanline; - protected byte[] outputFramebuffer; + //protected byte[] outputFramebuffer; + + #region //指针化 outputFramebuffer + byte[] outputFramebuffer_src; + protected GCHandle outputFramebuffer_handle; + public byte* outputFramebuffer; + public int outputFramebufferLength; + public bool outputFramebuffer_IsNull => outputFramebuffer == null; + public byte[] outputFramebuffer_set + { + set + { + outputFramebuffer_handle.ReleaseGCHandle(); + outputFramebuffer_src = value; + outputFramebufferLength = value.Length; + outputFramebuffer_src.GetObjectPtr(ref outputFramebuffer_handle, ref outputFramebuffer); + } + } + #endregion + + + #region //指针化 outputFramebufferCopy + byte[] outputFramebufferCopy_src; + GCHandle outputFramebufferCopy_handle; + public byte* outputFramebufferCopy; + public int outputFramebufferCopyLength; + public bool outputFramebufferCopy_IsNull => outputFramebufferCopy == null; + private IntPtr outputFramebufferCopy_IntPtr; + public byte[] outputFramebufferCopy_set + { + set + { + outputFramebufferCopy_handle.ReleaseGCHandle(); + outputFramebufferCopy_src = value; + outputFramebufferCopyLength = value.Length; + outputFramebufferCopy_src.GetObjectPtr(ref outputFramebufferCopy_handle, ref outputFramebufferCopy); + outputFramebufferCopy_IntPtr = outputFramebufferCopy_handle.AddrOfPinnedObject(); + } + } + #endregion + + protected int clockCyclesPerLine; @@ -247,7 +300,10 @@ namespace Essgee.Emulation.Video.Nintendo screenUsageFlags = new byte[displayActiveWidth, displayActiveHeight]; screenUsageSpriteXCoords = new byte[displayActiveWidth, displayActiveHeight]; screenUsageSpriteSlots = new byte[displayActiveWidth, displayActiveHeight]; - outputFramebuffer = new byte[numDisplayPixels * 4]; + //outputFramebuffer = new byte[numDisplayPixels * 4]; + outputFramebuffer_set = new byte[numDisplayPixels * 4]; + + outputFramebufferCopy_set = new byte[numDisplayPixels * 4]; for (var y = 0; y < displayActiveHeight; y++) SetLine(y, 0xFF, 0xFF, 0xFF); @@ -398,7 +454,8 @@ namespace Essgee.Emulation.Video.Nintendo } - GCHandle? lasyRenderHandle; + GCHandle? lastRenderHandle; + protected virtual void EndHBlank() { /* End of scanline reached */ @@ -423,16 +480,25 @@ namespace Essgee.Emulation.Video.Nintendo /* Submit screen for rendering */ - // 固定数组,防止垃圾回收器移动它 - var bitmapcolorRect_handle = GCHandle.Alloc(outputFramebuffer.Clone() as byte[], GCHandleType.Pinned); - // 获取数组的指针 - IntPtr mFrameDataPtr = bitmapcolorRect_handle.AddrOfPinnedObject(); + //// 固定数组,防止垃圾回收器移动它 + //var bitmapcolorRect_handle = GCHandle.Alloc(outputFramebuffer_src.Clone() as byte[], GCHandleType.Pinned); + //// 获取数组的指针 + //IntPtr mFrameDataPtr = bitmapcolorRect_handle.AddrOfPinnedObject(); + + + for (int i = 0; i < outputFramebufferLength; i++) + { + outputFramebufferCopy[i] = outputFramebuffer[i]; + } + IntPtr mFrameDataPtr = outputFramebufferCopy_IntPtr; + var eventArgs = RenderScreenEventArgs.Create(displayActiveWidth, displayActiveHeight, mFrameDataPtr); OnRenderScreen(eventArgs); eventArgs.Release(); - if (lasyRenderHandle != null) - lasyRenderHandle.Value.Free(); - lasyRenderHandle = bitmapcolorRect_handle; + + //if (lastRenderHandle.HasValue) + // lastRenderHandle.Value.Free(); + //lastRenderHandle = bitmapcolorRect_handle; //OnRenderScreen(new RenderScreenEventArgs(displayActiveWidth, displayActiveHeight, outputFramebuffer.Clone() as byte[])); } @@ -665,9 +731,12 @@ namespace Essgee.Emulation.Video.Nintendo protected virtual void WriteColorToFramebuffer(byte c, int address) { - outputFramebuffer[address + 0] = colorValuesBgr[c & 0x03][0]; - outputFramebuffer[address + 1] = colorValuesBgr[c & 0x03][1]; - outputFramebuffer[address + 2] = colorValuesBgr[c & 0x03][2]; + //outputFramebuffer[address + 0] = colorValuesBgr[c & 0x03][0]; + //outputFramebuffer[address + 1] = colorValuesBgr[c & 0x03][1]; + //outputFramebuffer[address + 2] = colorValuesBgr[c & 0x03][2]; + outputFramebuffer[address + 0] = colorValuesBgr[(c & 0x03) * 3 + 0]; + outputFramebuffer[address + 1] = colorValuesBgr[(c & 0x03) * 3 + 1]; + outputFramebuffer[address + 2] = colorValuesBgr[(c & 0x03) * 3 + 2]; outputFramebuffer[address + 3] = 0xFF; } diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/ObjectPoolAuto.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/ObjectPoolAuto.cs index c55fd88c..4b8fb1f3 100644 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/ObjectPoolAuto.cs +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Essgee.Unity/ObjectPoolAuto.cs @@ -159,7 +159,8 @@ internal static class ObjectPoolAuto public static T GetCachedResult(Func function) { var method = function.Method; - if (!Cache.Results.TryGetValue(method, out var result)) + KeyValuePair, T> result; + if (!Cache.Results.TryGetValue(method, out result)) { result = new KeyValuePair, T>(function, function()); diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll deleted file mode 100644 index 7663c313cb9e24f3c80190a0b2509d839ad1fd5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381952 zcmcG%37i~NwLe}{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Ou3-~3Q{DdA_E`HAII_H~YNK{l)85&h-IjrjrZd-Q+1(ogBD z9`x}pgZhu5^OMNnJz=@|F>!vX{HV3)Eu64kOT*H~J!HU7@#W{6PYRDcdV?Q-vTc-% zk|X+N2xGcfc^0(?&q7RSgz^YpB!`6ednfg|%^?`(Ezx@Zt z9mztKVU)ecCx!obrWaWpR%U4HKPSCX0&ZM?CDW5W)w4@&9<>@6#nYk(y*er?PAJcG zSV=hZ$&|GTUr))lm8I7{!*Op~7o!7?fqulC;@R>y!*!!(V=nE>sCZ*U*v&L<)9ZoG ot<%caQ#(s*==^gwHk&lk{Gd2LM?Y>{d$V$k)8GC150e7_A0sjhPyhe` diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll.meta deleted file mode 100644 index 794d80b6..00000000 --- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.dll.meta +++ /dev/null @@ -1,33 +0,0 @@ -fileFormatVersion: 2 -guid: 2c61c2e567bd4e146b4c09946e815a55 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.meta new file mode 100644 index 00000000..ae447dcd --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4a8c636c0276a9740b79c406e75975e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs new file mode 100644 index 00000000..c8adaf7d --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs @@ -0,0 +1,56 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf +{ + /// + /// Provides a utility routine to copy small arrays much more quickly than Buffer.BlockCopy + /// + internal static class ByteArray + { + /// + /// The threshold above which you should use Buffer.BlockCopy rather than ByteArray.Copy + /// + private const int CopyThreshold = 12; + + /// + /// Determines which copy routine to use based on the number of bytes to be copied. + /// + internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count) + { + if (count > CopyThreshold) + { + Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count); + } + else + { + int stop = srcOffset + count; + for (int i = srcOffset; i < stop; i++) + { + dst[dstOffset++] = src[i]; + } + } + } + + /// + /// Reverses the order of bytes in the array + /// + internal static void Reverse(byte[] bytes) + { + for (int first = 0, last = bytes.Length - 1; first < last; first++, last--) + { + byte temp = bytes[first]; + bytes[first] = bytes[last]; + bytes[last] = temp; + } + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta new file mode 100644 index 00000000..530b61e5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 572496ae08a6d1348a4f88c22abdaa12 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs new file mode 100644 index 00000000..b8e0b391 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs @@ -0,0 +1,424 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; +using System.Security; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Google.Protobuf +{ + /// + /// Immutable array of bytes. + /// + [SecuritySafeCritical] + [DebuggerDisplay("Length = {Length}")] + [DebuggerTypeProxy(typeof(ByteStringDebugView))] + public sealed class ByteString : IEnumerable, IEquatable + { + private static readonly ByteString empty = new ByteString(new byte[0]); + + private readonly ReadOnlyMemory bytes; + + /// + /// Internal use only. Ensure that the provided memory is not mutated and belongs to this instance. + /// + internal static ByteString AttachBytes(ReadOnlyMemory bytes) + { + return new ByteString(bytes); + } + + /// + /// Internal use only. Ensure that the provided memory is not mutated and belongs to this instance. + /// This method encapsulates converting array to memory. Reduces need for SecuritySafeCritical + /// in .NET Framework. + /// + internal static ByteString AttachBytes(byte[] bytes) + { + return AttachBytes(bytes.AsMemory()); + } + + /// + /// Constructs a new ByteString from the given memory. The memory is + /// *not* copied, and must not be modified after this constructor is called. + /// + private ByteString(ReadOnlyMemory bytes) + { + this.bytes = bytes; + } + + /// + /// Returns an empty ByteString. + /// + public static ByteString Empty + { + get { return empty; } + } + + /// + /// Returns the length of this ByteString in bytes. + /// + public int Length + { + get { return bytes.Length; } + } + + /// + /// Returns true if this byte string is empty, false otherwise. + /// + public bool IsEmpty + { + get { return Length == 0; } + } + + /// + /// Provides read-only access to the data of this . + /// No data is copied so this is the most efficient way of accessing. + /// + public ReadOnlySpan Span + { + get { return bytes.Span; } + } + + /// + /// Provides read-only access to the data of this . + /// No data is copied so this is the most efficient way of accessing. + /// + public ReadOnlyMemory Memory + { + get { return bytes; } + } + + /// + /// Converts this into a byte array. + /// + /// The data is copied - changes to the returned array will not be reflected in this ByteString. + /// A byte array with the same data as this ByteString. + public byte[] ToByteArray() + { + return bytes.ToArray(); + } + + /// + /// Converts this into a standard base64 representation. + /// + /// A base64 representation of this ByteString. + public string ToBase64() + { +#if NET5_0_OR_GREATER + return Convert.ToBase64String(bytes.Span); +#else + if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment)) + { + // Fast path. ByteString was created with an array, so pass the underlying array. + return Convert.ToBase64String(segment.Array, segment.Offset, segment.Count); + } + else + { + // Slow path. BytesString is not an array. Convert memory and pass result to ToBase64String. + return Convert.ToBase64String(bytes.ToArray()); + } +#endif + } + + /// + /// Constructs a from the Base64 Encoded String. + /// + public static ByteString FromBase64(string bytes) + { + // By handling the empty string explicitly, we not only optimize but we fix a + // problem on CF 2.0. See issue 61 for details. + return bytes == "" ? Empty : new ByteString(Convert.FromBase64String(bytes)); + } + + /// + /// Constructs a from data in the given stream, synchronously. + /// + /// If successful, will be read completely, from the position + /// at the start of the call. + /// The stream to copy into a ByteString. + /// A ByteString with content read from the given stream. + public static ByteString FromStream(Stream stream) + { + ProtoPreconditions.CheckNotNull(stream, nameof(stream)); + int capacity = stream.CanSeek ? checked((int) (stream.Length - stream.Position)) : 0; + var memoryStream = new MemoryStream(capacity); + stream.CopyTo(memoryStream); +#if NETSTANDARD1_1 || NETSTANDARD2_0 + byte[] bytes = memoryStream.ToArray(); +#else + // Avoid an extra copy if we can. + byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStream.ToArray(); +#endif + return AttachBytes(bytes); + } + + /// + /// Constructs a from data in the given stream, asynchronously. + /// + /// If successful, will be read completely, from the position + /// at the start of the call. + /// The stream to copy into a ByteString. + /// The cancellation token to use when reading from the stream, if any. + /// A ByteString with content read from the given stream. + public static Task FromStreamAsync(Stream stream, CancellationToken cancellationToken = default) + { + ProtoPreconditions.CheckNotNull(stream, nameof(stream)); + return ByteStringAsync.FromStreamAsyncCore(stream, cancellationToken); + } + + /// + /// Constructs a from the given array. The contents + /// are copied, so further modifications to the array will not + /// be reflected in the returned ByteString. + /// This method can also be invoked in ByteString.CopyFrom(0xaa, 0xbb, ...) form + /// which is primarily useful for testing. + /// + public static ByteString CopyFrom(params byte[] bytes) + { + return new ByteString((byte[]) bytes.Clone()); + } + + /// + /// Constructs a from a portion of a byte array. + /// + public static ByteString CopyFrom(byte[] bytes, int offset, int count) + { + byte[] portion = new byte[count]; + ByteArray.Copy(bytes, offset, portion, 0, count); + return new ByteString(portion); + } + + /// + /// Constructs a from a read only span. The contents + /// are copied, so further modifications to the span will not + /// be reflected in the returned . + /// + public static ByteString CopyFrom(ReadOnlySpan bytes) + { + return new ByteString(bytes.ToArray()); + } + + /// + /// Creates a new by encoding the specified text with + /// the given encoding. + /// + public static ByteString CopyFrom(string text, Encoding encoding) + { + return new ByteString(encoding.GetBytes(text)); + } + + /// + /// Creates a new by encoding the specified text in UTF-8. + /// + public static ByteString CopyFromUtf8(string text) + { + return CopyFrom(text, Encoding.UTF8); + } + + /// + /// Returns the byte at the given index. + /// + public byte this[int index] + { + get { return bytes.Span[index]; } + } + + /// + /// Converts this into a string by applying the given encoding. + /// + /// + /// This method should only be used to convert binary data which was the result of encoding + /// text with the given encoding. + /// + /// The encoding to use to decode the binary data into text. + /// The result of decoding the binary data with the given decoding. + public string ToString(Encoding encoding) + { + if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment)) + { + // Fast path. ByteString was created with an array. + return encoding.GetString(segment.Array, segment.Offset, segment.Count); + } + else + { + // Slow path. BytesString is not an array. Convert memory and pass result to GetString. + // TODO: Consider using GetString overload that takes a pointer. + byte[] array = bytes.ToArray(); + return encoding.GetString(array, 0, array.Length); + } + } + + /// + /// Converts this into a string by applying the UTF-8 encoding. + /// + /// + /// This method should only be used to convert binary data which was the result of encoding + /// text with UTF-8. + /// + /// The result of decoding the binary data with the given decoding. + public string ToStringUtf8() + { + return ToString(Encoding.UTF8); + } + + /// + /// Returns an iterator over the bytes in this . + /// + /// An iterator over the bytes in this object. + [SecuritySafeCritical] + public IEnumerator GetEnumerator() + { + return MemoryMarshal.ToEnumerable(bytes).GetEnumerator(); + } + + /// + /// Returns an iterator over the bytes in this . + /// + /// An iterator over the bytes in this object. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + /// Creates a CodedInputStream from this ByteString's data. + /// + public CodedInputStream CreateCodedInput() + { + // We trust CodedInputStream not to reveal the provided byte array or modify it + if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment) && segment.Count == bytes.Length) + { + // Fast path. ByteString was created with a complete array. + return new CodedInputStream(segment.Array, segment.Offset, segment.Count); + } + else + { + // Slow path. BytesString is not an array, or is a slice of an array. + // Convert memory and pass result to WriteRawBytes. + return new CodedInputStream(bytes.ToArray()); + } + } + + /// + /// Compares two byte strings for equality. + /// + /// The first byte string to compare. + /// The second byte string to compare. + /// true if the byte strings are equal; false otherwise. + public static bool operator ==(ByteString lhs, ByteString rhs) + { + if (ReferenceEquals(lhs, rhs)) + { + return true; + } + if (lhs is null || rhs is null) + { + return false; + } + + return lhs.bytes.Span.SequenceEqual(rhs.bytes.Span); + } + + /// + /// Compares two byte strings for inequality. + /// + /// The first byte string to compare. + /// The second byte string to compare. + /// false if the byte strings are equal; true otherwise. + public static bool operator !=(ByteString lhs, ByteString rhs) + { + return !(lhs == rhs); + } + + /// + /// Compares this byte string with another object. + /// + /// The object to compare this with. + /// true if refers to an equal ; false otherwise. + [SecuritySafeCritical] + public override bool Equals(object obj) + { + return this == (obj as ByteString); + } + + /// + /// Returns a hash code for this object. Two equal byte strings + /// will return the same hash code. + /// + /// A hash code for this object. + [SecuritySafeCritical] + public override int GetHashCode() + { + ReadOnlySpan b = bytes.Span; + + int ret = 23; + for (int i = 0; i < b.Length; i++) + { + ret = (ret * 31) + b[i]; + } + return ret; + } + + /// + /// Compares this byte string with another. + /// + /// The to compare this with. + /// true if refers to an equal byte string; false otherwise. + public bool Equals(ByteString other) + { + return this == other; + } + + /// + /// Copies the entire byte array to the destination array provided at the offset specified. + /// + public void CopyTo(byte[] array, int position) + { + bytes.CopyTo(array.AsMemory(position)); + } + + /// + /// Writes the entire byte array to the provided stream + /// + public void WriteTo(Stream outputStream) + { + if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment)) + { + // Fast path. ByteString was created with an array, so pass the underlying array. + outputStream.Write(segment.Array, segment.Offset, segment.Count); + } + else + { + // Slow path. BytesString is not an array. Convert memory and pass result to WriteRawBytes. + var array = bytes.ToArray(); + outputStream.Write(array, 0, array.Length); + } + } + + private sealed class ByteStringDebugView + { + private readonly ByteString data; + + public ByteStringDebugView(ByteString data) + { + this.data = data; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public byte[] Items => data.bytes.ToArray(); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs.meta new file mode 100644 index 00000000..3890dc66 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteString.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3bb4b452d5f4add4695a43f8802bf056 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs new file mode 100644 index 00000000..ade9b8d2 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs @@ -0,0 +1,39 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace Google.Protobuf +{ + /// + /// SecuritySafeCritical attribute can not be placed on types with async methods. + /// This class has ByteString's async methods so it can be marked with SecuritySafeCritical. + /// + internal static class ByteStringAsync + { + internal static async Task FromStreamAsyncCore(Stream stream, CancellationToken cancellationToken) + { + int capacity = stream.CanSeek ? checked((int)(stream.Length - stream.Position)) : 0; + var memoryStream = new MemoryStream(capacity); + // We have to specify the buffer size here, as there's no overload accepting the cancellation token + // alone. But it's documented to use 81920 by default if not specified. + await stream.CopyToAsync(memoryStream, 81920, cancellationToken); +#if NETSTANDARD1_1 + byte[] bytes = memoryStream.ToArray(); +#else + // Avoid an extra copy if we can. + byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStream.ToArray(); +#endif + return ByteString.AttachBytes(bytes); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta new file mode 100644 index 00000000..e93fd246 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: af20324293fdab64597431aa3863202e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs new file mode 100644 index 00000000..fd4414cb --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs @@ -0,0 +1,686 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; +using System.IO; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Reads and decodes protocol message fields. + /// + /// + /// + /// This class is generally used by generated code to read appropriate + /// primitives from the stream. It effectively encapsulates the lowest + /// levels of protocol buffer format. + /// + /// + /// Repeated fields and map fields are not handled by this class; use + /// and to serialize such fields. + /// + /// + [SecuritySafeCritical] + public sealed class CodedInputStream : IDisposable + { + /// + /// Whether to leave the underlying stream open when disposing of this stream. + /// This is always true when there's no stream. + /// + private bool leaveOpen; + + /// + /// Buffer of data read from the stream or provided at construction time. + /// + private byte[] buffer; + + /// + /// The stream to read further input from, or null if the byte array buffer was provided + /// directly on construction, with no further data available. + /// + private readonly Stream input; + + /// + /// The parser state is kept separately so that other parse implementations can reuse the same + /// parsing primitives. + /// + private ParserInternalState state; + + internal const int DefaultRecursionLimit = 100; + internal const int DefaultSizeLimit = Int32.MaxValue; + internal const int BufferSize = 4096; + + #region Construction + + public CodedInputStream() + { + + } + + // Note that the checks are performed such that we don't end up checking obviously-valid things + // like non-null references for arrays we've just created. + + /// + /// Creates a new CodedInputStream reading data from the given byte array. + /// + public CodedInputStream(byte[] buffer) : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffer"), 0, buffer.Length, true) + { + } + + /// + /// Creates a new that reads from the given byte array slice. + /// + public CodedInputStream(byte[] buffer, int offset, int length) + : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffer"), offset, offset + length, true) + { + if (offset < 0 || offset > buffer.Length) + { + throw new ArgumentOutOfRangeException("offset", "Offset must be within the buffer"); + } + if (length < 0 || offset + length > buffer.Length) + { + throw new ArgumentOutOfRangeException("length", "Length must be non-negative and within the buffer"); + } + } + + /// + /// Creates a new reading data from the given stream, which will be disposed + /// when the returned object is disposed. + /// + /// The stream to read from. + public CodedInputStream(Stream input) : this(input, false) + { + } + + /// + /// Creates a new reading data from the given stream. + /// + /// The stream to read from. + /// true to leave open when the returned + /// is disposed; false to dispose of the given stream when the + /// returned object is disposed. + public CodedInputStream(Stream input, bool leaveOpen) + : this(ProtoPreconditions.CheckNotNull(input, "input"), new byte[BufferSize], 0, 0, leaveOpen) + { + } + + /// + /// Creates a new CodedInputStream reading data from the given + /// stream and buffer, using the default limits. + /// + internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, bool leaveOpen) + { + this.input = input; + this.buffer = buffer; + this.state.bufferPos = bufferPos; + this.state.bufferSize = bufferSize; + this.state.sizeLimit = DefaultSizeLimit; + this.state.recursionLimit = DefaultRecursionLimit; + SegmentedBufferHelper.Initialize(this, out this.state.segmentedBufferHelper); + this.leaveOpen = leaveOpen; + + this.state.currentLimit = int.MaxValue; + } + + /// + /// Creates a new CodedInputStream reading data from the given + /// stream and buffer, using the specified limits. + /// + /// + /// This chains to the version with the default limits instead of vice versa to avoid + /// having to check that the default values are valid every time. + /// + internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimit, int recursionLimit, bool leaveOpen) + : this(input, buffer, bufferPos, bufferSize, leaveOpen) + { + if (sizeLimit <= 0) + { + throw new ArgumentOutOfRangeException("sizeLimit", "Size limit must be positive"); + } + if (recursionLimit <= 0) + { + throw new ArgumentOutOfRangeException("recursionLimit!", "Recursion limit must be positive"); + } + this.state.sizeLimit = sizeLimit; + this.state.recursionLimit = recursionLimit; + } + #endregion + + /// + /// Creates a with the specified size and recursion limits, reading + /// from an input stream. + /// + /// + /// This method exists separately from the constructor to reduce the number of constructor overloads. + /// It is likely to be used considerably less frequently than the constructors, as the default limits + /// are suitable for most use cases. + /// + /// The input stream to read from + /// The total limit of data to read from the stream. + /// The maximum recursion depth to allow while reading. + /// A CodedInputStream reading from with the specified size + /// and recursion limits. + public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit) + { + // Note: we may want an overload accepting leaveOpen + return new CodedInputStream(input, new byte[BufferSize], 0, 0, sizeLimit, recursionLimit, false); + } + + /// + /// Returns the current position in the input stream, or the position in the input buffer + /// + public long Position + { + get + { + if (input != null) + { + return input.Position - ((state.bufferSize + state.bufferSizeAfterLimit) - state.bufferPos); + } + return state.bufferPos; + } + } + + /// + /// Returns the last tag read, or 0 if no tags have been read or we've read beyond + /// the end of the stream. + /// + internal uint LastTag { get { return state.lastTag; } } + + /// + /// Returns the size limit for this stream. + /// + /// + /// This limit is applied when reading from the underlying stream, as a sanity check. It is + /// not applied when reading from a byte array data source without an underlying stream. + /// The default value is Int32.MaxValue. + /// + /// + /// The size limit. + /// + public int SizeLimit { get { return state.sizeLimit; } } + + /// + /// Returns the recursion limit for this stream. This limit is applied whilst reading messages, + /// to avoid maliciously-recursive data. + /// + /// + /// The default limit is 100. + /// + /// + /// The recursion limit for this stream. + /// + public int RecursionLimit { get { return state.recursionLimit; } } + + /// + /// Internal-only property; when set to true, unknown fields will be discarded while parsing. + /// + internal bool DiscardUnknownFields + { + get { return state.DiscardUnknownFields; } + set { state.DiscardUnknownFields = value; } + } + + /// + /// Internal-only property; provides extension identifiers to compatible messages while parsing. + /// + internal ExtensionRegistry ExtensionRegistry + { + get { return state.ExtensionRegistry; } + set { state.ExtensionRegistry = value; } + } + + internal byte[] InternalBuffer => buffer; + + internal Stream InternalInputStream => input; + + internal ref ParserInternalState InternalState => ref state; + + /// + /// Disposes of this instance, potentially closing any underlying stream. + /// + /// + /// As there is no flushing to perform here, disposing of a which + /// was constructed with the leaveOpen option parameter set to true (or one which + /// was constructed to read from a byte array) has no effect. + /// + public void Dispose() + { + if (!leaveOpen) + { + input.Dispose(); + } + } + + #region Validation + /// + /// Verifies that the last call to ReadTag() returned tag 0 - in other words, + /// we've reached the end of the stream when we expected to. + /// + /// The + /// tag read was not the one specified + internal void CheckReadEndOfStreamTag() + { + ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref state); + } + #endregion + + #region Reading of tags etc + + /// + /// Peeks at the next field tag. This is like calling , but the + /// tag is not consumed. (So a subsequent call to will return the + /// same value.) + /// + public uint PeekTag() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.PeekTag(ref span, ref state); + } + + /// + /// Reads a field tag, returning the tag of 0 for "end of stream". + /// + /// + /// If this method returns 0, it doesn't necessarily mean the end of all + /// the data in this CodedInputStream; it may be the end of the logical stream + /// for an embedded message, for example. + /// + /// The next field tag, or 0 for end of stream. (0 is never a valid tag.) + public uint ReadTag() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseTag(ref span, ref state); + } + + /// + /// Skips the data for the field with the tag we've just read. + /// This should be called directly after , when + /// the caller wishes to skip an unknown field. + /// + /// + /// This method throws if the last-read tag was an end-group tag. + /// If a caller wishes to skip a group, they should skip the whole group, by calling this method after reading the + /// start-group tag. This behavior allows callers to call this method on any field they don't understand, correctly + /// resulting in an error if an end-group tag has not been paired with an earlier start-group tag. + /// + /// The last tag was an end-group tag + /// The last read operation read to the end of the logical stream + public void SkipLastField() + { + var span = new ReadOnlySpan(buffer); + ParsingPrimitivesMessages.SkipLastField(ref span, ref state); + } + + /// + /// Skip a group. + /// + internal void SkipGroup(uint startGroupTag) + { + var span = new ReadOnlySpan(buffer); + ParsingPrimitivesMessages.SkipGroup(ref span, ref state, startGroupTag); + } + + /// + /// Reads a double field from the stream. + /// + public double ReadDouble() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseDouble(ref span, ref state); + } + + /// + /// Reads a float field from the stream. + /// + public float ReadFloat() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseFloat(ref span, ref state); + } + + /// + /// Reads a uint64 field from the stream. + /// + public ulong ReadUInt64() + { + return ReadRawVarint64(); + } + + /// + /// Reads an int64 field from the stream. + /// + public long ReadInt64() + { + return (long) ReadRawVarint64(); + } + + /// + /// Reads an int32 field from the stream. + /// + public int ReadInt32() + { + return (int) ReadRawVarint32(); + } + + /// + /// Reads a fixed64 field from the stream. + /// + public ulong ReadFixed64() + { + return ReadRawLittleEndian64(); + } + + /// + /// Reads a fixed32 field from the stream. + /// + public uint ReadFixed32() + { + return ReadRawLittleEndian32(); + } + + /// + /// Reads a bool field from the stream. + /// + public bool ReadBool() + { + return ReadRawVarint64() != 0; + } + + /// + /// Reads a string field from the stream. + /// + public string ReadString() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ReadString(ref span, ref state); + } + + /// + /// Reads an embedded message field value from the stream. + /// + public void ReadMessage(IMessage builder) + { + // TODO: if the message doesn't implement IBufferMessage (and thus does not provide the InternalMergeFrom method), + // what we're doing here works fine, but could be more efficient. + // What happens is that we first initialize a ParseContext from the current coded input stream only to parse the length of the message, at which point + // we will need to switch back again to CodedInputStream-based parsing (which involves copying and storing the state) to be able to + // invoke the legacy MergeFrom(CodedInputStream) method. + // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it). + ParseContext.Initialize(buffer.AsSpan(), ref state, out ParseContext ctx); + try + { + ParsingPrimitivesMessages.ReadMessage(ref ctx, builder); + } + finally + { + ctx.CopyStateTo(this); + } + } + + /// + /// Reads an embedded group field from the stream. + /// + public void ReadGroup(IMessage builder) + { + ParseContext.Initialize(this, out ParseContext ctx); + try + { + ParsingPrimitivesMessages.ReadGroup(ref ctx, builder); + } + finally + { + ctx.CopyStateTo(this); + } + } + + /// + /// Reads a bytes field value from the stream. + /// + public ByteString ReadBytes() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ReadBytes(ref span, ref state); + } + + /// + /// Reads a uint32 field value from the stream. + /// + public uint ReadUInt32() + { + return ReadRawVarint32(); + } + + /// + /// Reads an enum field value from the stream. + /// + public int ReadEnum() + { + // Currently just a pass-through, but it's nice to separate it logically from WriteInt32. + return (int) ReadRawVarint32(); + } + + /// + /// Reads an sfixed32 field value from the stream. + /// + public int ReadSFixed32() + { + return (int) ReadRawLittleEndian32(); + } + + /// + /// Reads an sfixed64 field value from the stream. + /// + public long ReadSFixed64() + { + return (long) ReadRawLittleEndian64(); + } + + /// + /// Reads an sint32 field value from the stream. + /// + public int ReadSInt32() + { + return ParsingPrimitives.DecodeZigZag32(ReadRawVarint32()); + } + + /// + /// Reads an sint64 field value from the stream. + /// + public long ReadSInt64() + { + return ParsingPrimitives.DecodeZigZag64(ReadRawVarint64()); + } + + /// + /// Reads a length for length-delimited data. + /// + /// + /// This is internally just reading a varint, but this method exists + /// to make the calling code clearer. + /// + public int ReadLength() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseLength(ref span, ref state); + } + + /// + /// Peeks at the next tag in the stream. If it matches , + /// the tag is consumed and the method returns true; otherwise, the + /// stream is left in the original position and the method returns false. + /// + public bool MaybeConsumeTag(uint tag) + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.MaybeConsumeTag(ref span, ref state, tag); + } + +#endregion + + #region Underlying reading primitives + + /// + /// Reads a raw Varint from the stream. If larger than 32 bits, discard the upper bits. + /// This method is optimised for the case where we've got lots of data in the buffer. + /// That means we can check the size just once, then just read directly from the buffer + /// without constant rechecking of the buffer length. + /// + internal uint ReadRawVarint32() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseRawVarint32(ref span, ref state); + } + + /// + /// Reads a varint from the input one byte at a time, so that it does not + /// read any bytes after the end of the varint. If you simply wrapped the + /// stream in a CodedInputStream and used ReadRawVarint32(Stream) + /// then you would probably end up reading past the end of the varint since + /// CodedInputStream buffers its input. + /// + /// + /// + internal static uint ReadRawVarint32(Stream input) + { + return ParsingPrimitives.ReadRawVarint32(input); + } + + /// + /// Reads a raw varint from the stream. + /// + internal ulong ReadRawVarint64() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseRawVarint64(ref span, ref state); + } + + /// + /// Reads a 32-bit little-endian integer from the stream. + /// + internal uint ReadRawLittleEndian32() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseRawLittleEndian32(ref span, ref state); + } + + /// + /// Reads a 64-bit little-endian integer from the stream. + /// + internal ulong ReadRawLittleEndian64() + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ParseRawLittleEndian64(ref span, ref state); + } + #endregion + + #region Internal reading and buffer management + + /// + /// Sets currentLimit to (current position) + byteLimit. This is called + /// when descending into a length-delimited embedded message. The previous + /// limit is returned. + /// + /// The old limit. + internal int PushLimit(int byteLimit) + { + return SegmentedBufferHelper.PushLimit(ref state, byteLimit); + } + + /// + /// Discards the current limit, returning the previous limit. + /// + internal void PopLimit(int oldLimit) + { + SegmentedBufferHelper.PopLimit(ref state, oldLimit); + } + + /// + /// Returns whether or not all the data before the limit has been read. + /// + /// + internal bool ReachedLimit + { + get + { + return SegmentedBufferHelper.IsReachedLimit(ref state); + } + } + + /// + /// Returns true if the stream has reached the end of the input. This is the + /// case if either the end of the underlying input source has been reached or + /// the stream has reached a limit created using PushLimit. + /// + public bool IsAtEnd + { + get + { + var span = new ReadOnlySpan(buffer); + return SegmentedBufferHelper.IsAtEnd(ref span, ref state); + } + } + + /// + /// Reads a fixed size of bytes from the input. + /// + /// + /// the end of the stream or the current limit was reached + /// + internal byte[] ReadRawBytes(int size) + { + var span = new ReadOnlySpan(buffer); + return ParsingPrimitives.ReadRawBytes(ref span, ref state, size); + } + + /// + /// Reads a top-level message or a nested message after the limits for this message have been pushed. + /// (parser will proceed until the end of the current limit) + /// NOTE: this method needs to be public because it's invoked by the generated code - e.g. msg.MergeFrom(CodedInputStream input) method + /// + public void ReadRawMessage(IMessage message) + { + ParseContext.Initialize(this, out ParseContext ctx); + try + { + ParsingPrimitivesMessages.ReadRawMessage(ref ctx, message); + } + finally + { + ctx.CopyStateTo(this); + } + } + + internal void Reset(byte[] data, int offset, int length, bool discardUnknownFields, ExtensionRegistry registry) + { + var buffer = data; + var bufferPos = offset; + var bufferSize = offset + length; + var leaveOpen = true; + + this.buffer = buffer; + this.state = default; + + this.state.bufferPos = bufferPos; + this.state.bufferSize = bufferSize; + this.state.sizeLimit = DefaultSizeLimit; + this.state.recursionLimit = DefaultRecursionLimit; + SegmentedBufferHelper.Initialize(this, out this.state.segmentedBufferHelper); + this.leaveOpen = leaveOpen; + + this.state.currentLimit = int.MaxValue; + + this.DiscardUnknownFields = DiscardUnknownFields; + this.ExtensionRegistry = registry; + } + #endregion + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta new file mode 100644 index 00000000..081f1b0a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6bd391df78eafba4a9c8c037ef9deb31 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs new file mode 100644 index 00000000..68ec1362 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs @@ -0,0 +1,285 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf +{ + // This part of CodedOutputStream provides all the static entry points that are used + // by generated code and internally to compute the size of messages prior to being + // written to an instance of CodedOutputStream. + public sealed partial class CodedOutputStream + { + private const int LittleEndian64Size = 8; + private const int LittleEndian32Size = 4; + + internal const int DoubleSize = LittleEndian64Size; + internal const int FloatSize = LittleEndian32Size; + internal const int BoolSize = 1; + + /// + /// Computes the number of bytes that would be needed to encode a + /// double field, including the tag. + /// + public static int ComputeDoubleSize(double value) + { + return DoubleSize; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// float field, including the tag. + /// + public static int ComputeFloatSize(float value) + { + return FloatSize; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// uint64 field, including the tag. + /// + public static int ComputeUInt64Size(ulong value) + { + return ComputeRawVarint64Size(value); + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// int64 field, including the tag. + /// + public static int ComputeInt64Size(long value) + { + return ComputeRawVarint64Size((ulong) value); + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// int32 field, including the tag. + /// + public static int ComputeInt32Size(int value) + { + if (value >= 0) + { + return ComputeRawVarint32Size((uint) value); + } + else + { + // Must sign-extend. + return 10; + } + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// fixed64 field, including the tag. + /// + public static int ComputeFixed64Size(ulong value) + { + return LittleEndian64Size; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// fixed32 field, including the tag. + /// + public static int ComputeFixed32Size(uint value) + { + return LittleEndian32Size; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// bool field, including the tag. + /// + public static int ComputeBoolSize(bool value) + { + return BoolSize; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// string field, including the tag. + /// + public static int ComputeStringSize(String value) + { + int byteArraySize = WritingPrimitives.Utf8Encoding.GetByteCount(value); + return ComputeLengthSize(byteArraySize) + byteArraySize; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// group field, including the tag. + /// + public static int ComputeGroupSize(IMessage value) + { + return value.CalculateSize(); + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// embedded message field, including the tag. + /// + public static int ComputeMessageSize(IMessage value) + { + int size = value.CalculateSize(); + return ComputeLengthSize(size) + size; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// bytes field, including the tag. + /// + public static int ComputeBytesSize(ByteString value) + { + return ComputeLengthSize(value.Length) + value.Length; + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// uint32 field, including the tag. + /// + public static int ComputeUInt32Size(uint value) + { + return ComputeRawVarint32Size(value); + } + + /// + /// Computes the number of bytes that would be needed to encode a + /// enum field, including the tag. The caller is responsible for + /// converting the enum value to its numeric value. + /// + public static int ComputeEnumSize(int value) + { + // Currently just a pass-through, but it's nice to separate it logically. + return ComputeInt32Size(value); + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// sfixed32 field, including the tag. + /// + public static int ComputeSFixed32Size(int value) + { + return LittleEndian32Size; + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// sfixed64 field, including the tag. + /// + public static int ComputeSFixed64Size(long value) + { + return LittleEndian64Size; + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// sint32 field, including the tag. + /// + public static int ComputeSInt32Size(int value) + { + return ComputeRawVarint32Size(WritingPrimitives.EncodeZigZag32(value)); + } + + /// + /// Computes the number of bytes that would be needed to encode an + /// sint64 field, including the tag. + /// + public static int ComputeSInt64Size(long value) + { + return ComputeRawVarint64Size(WritingPrimitives.EncodeZigZag64(value)); + } + + /// + /// Computes the number of bytes that would be needed to encode a length, + /// as written by . + /// + public static int ComputeLengthSize(int length) + { + return ComputeRawVarint32Size((uint) length); + } + + /// + /// Computes the number of bytes that would be needed to encode a varint. + /// + public static int ComputeRawVarint32Size(uint value) + { + if ((value & (0xffffffff << 7)) == 0) + { + return 1; + } + if ((value & (0xffffffff << 14)) == 0) + { + return 2; + } + if ((value & (0xffffffff << 21)) == 0) + { + return 3; + } + if ((value & (0xffffffff << 28)) == 0) + { + return 4; + } + return 5; + } + + /// + /// Computes the number of bytes that would be needed to encode a varint. + /// + public static int ComputeRawVarint64Size(ulong value) + { + if ((value & (0xffffffffffffffffL << 7)) == 0) + { + return 1; + } + if ((value & (0xffffffffffffffffL << 14)) == 0) + { + return 2; + } + if ((value & (0xffffffffffffffffL << 21)) == 0) + { + return 3; + } + if ((value & (0xffffffffffffffffL << 28)) == 0) + { + return 4; + } + if ((value & (0xffffffffffffffffL << 35)) == 0) + { + return 5; + } + if ((value & (0xffffffffffffffffL << 42)) == 0) + { + return 6; + } + if ((value & (0xffffffffffffffffL << 49)) == 0) + { + return 7; + } + if ((value & (0xffffffffffffffffL << 56)) == 0) + { + return 8; + } + if ((value & (0xffffffffffffffffL << 63)) == 0) + { + return 9; + } + return 10; + } + + /// + /// Computes the number of bytes that would be needed to encode a tag. + /// + public static int ComputeTagSize(int fieldNumber) + { + return ComputeRawVarint32Size(WireFormat.MakeTag(fieldNumber, 0)); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta new file mode 100644 index 00000000..c998f0d0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f24c14bfc2490f47bc214729d14cd79 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs new file mode 100644 index 00000000..85586d23 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs @@ -0,0 +1,609 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.IO; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Encodes and writes protocol message fields. + /// + /// + /// + /// This class is generally used by generated code to write appropriate + /// primitives to the stream. It effectively encapsulates the lowest + /// levels of protocol buffer format. Unlike some other implementations, + /// this does not include combined "write tag and value" methods. Generated + /// code knows the exact byte representations of the tags they're going to write, + /// so there's no need to re-encode them each time. Manually-written code calling + /// this class should just call one of the WriteTag overloads before each value. + /// + /// + /// Repeated fields and map fields are not handled by this class; use RepeatedField<T> + /// and MapField<TKey, TValue> to serialize such fields. + /// + /// + [SecuritySafeCritical] + public sealed partial class CodedOutputStream : IDisposable + { + /// + /// The buffer size used by CreateInstance(Stream). + /// + public static readonly int DefaultBufferSize = 4096; + + private readonly bool leaveOpen; + private readonly byte[] buffer; + private WriterInternalState state; + + private readonly Stream output; + + #region Construction + /// + /// Creates a new CodedOutputStream that writes directly to the given + /// byte array. If more bytes are written than fit in the array, + /// OutOfSpaceException will be thrown. + /// + public CodedOutputStream(byte[] flatArray) : this(flatArray, 0, flatArray.Length) + { + } + + /// + /// Creates a new CodedOutputStream that writes directly to the given + /// byte array slice. If more bytes are written than fit in the array, + /// OutOfSpaceException will be thrown. + /// + private CodedOutputStream(byte[] buffer, int offset, int length) + { + this.output = null; + this.buffer = ProtoPreconditions.CheckNotNull(buffer, nameof(buffer)); + this.state.position = offset; + this.state.limit = offset + length; + WriteBufferHelper.Initialize(this, out this.state.writeBufferHelper); + leaveOpen = true; // Simple way of avoiding trying to dispose of a null reference + } + + private CodedOutputStream(Stream output, byte[] buffer, bool leaveOpen) + { + this.output = ProtoPreconditions.CheckNotNull(output, nameof(output)); + this.buffer = buffer; + this.state.position = 0; + this.state.limit = buffer.Length; + WriteBufferHelper.Initialize(this, out this.state.writeBufferHelper); + this.leaveOpen = leaveOpen; + } + + /// + /// Creates a new which write to the given stream, and disposes of that + /// stream when the returned CodedOutputStream is disposed. + /// + /// The stream to write to. It will be disposed when the returned CodedOutputStream is disposed. + public CodedOutputStream(Stream output) : this(output, DefaultBufferSize, false) + { + } + + /// + /// Creates a new CodedOutputStream which write to the given stream and uses + /// the specified buffer size. + /// + /// The stream to write to. It will be disposed when the returned CodedOutputStream is disposed. + /// The size of buffer to use internally. + public CodedOutputStream(Stream output, int bufferSize) : this(output, new byte[bufferSize], false) + { + } + + /// + /// Creates a new CodedOutputStream which write to the given stream. + /// + /// The stream to write to. + /// If true, is left open when the returned CodedOutputStream is disposed; + /// if false, the provided stream is disposed as well. + public CodedOutputStream(Stream output, bool leaveOpen) : this(output, DefaultBufferSize, leaveOpen) + { + } + + /// + /// Creates a new CodedOutputStream which write to the given stream and uses + /// the specified buffer size. + /// + /// The stream to write to. + /// The size of buffer to use internally. + /// If true, is left open when the returned CodedOutputStream is disposed; + /// if false, the provided stream is disposed as well. + public CodedOutputStream(Stream output, int bufferSize, bool leaveOpen) : this(output, new byte[bufferSize], leaveOpen) + { + } + #endregion + + /// + /// Returns the current position in the stream, or the position in the output buffer + /// + public long Position + { + get + { + if (output != null) + { + return output.Position + state.position; + } + return state.position; + } + } + + /// + /// Configures whether or not serialization is deterministic. + /// + /// + /// Deterministic serialization guarantees that for a given binary, equal messages (defined by the + /// equals methods in protos) will always be serialized to the same bytes. This implies: + /// + /// Repeated serialization of a message will return the same bytes. + /// Different processes of the same binary (which may be executing on different machines) + /// will serialize equal messages to the same bytes. + /// + /// Note the deterministic serialization is NOT canonical across languages; it is also unstable + /// across different builds with schema changes due to unknown fields. Users who need canonical + /// serialization, e.g. persistent storage in a canonical form, fingerprinting, etc, should define + /// their own canonicalization specification and implement the serializer using reflection APIs + /// rather than relying on this API. + /// Once set, the serializer will: (Note this is an implementation detail and may subject to + /// change in the future) + /// + /// Sort map entries by keys in lexicographical order or numerical order. Note: For string + /// keys, the order is based on comparing the UTF-16 code unit value of each character in the strings. + /// The order may be different from the deterministic serialization in other languages where + /// maps are sorted on the lexicographical order of the UTF8 encoded keys. + /// + /// + public bool Deterministic { get; set; } + + #region Writing of values (not including tags) + + /// + /// Writes a double field value, without a tag, to the stream. + /// + /// The value to write + public void WriteDouble(double value) + { + var span = new Span(buffer); + WritingPrimitives.WriteDouble(ref span, ref state, value); + } + + /// + /// Writes a float field value, without a tag, to the stream. + /// + /// The value to write + public void WriteFloat(float value) + { + var span = new Span(buffer); + WritingPrimitives.WriteFloat(ref span, ref state, value); + } + + /// + /// Writes a uint64 field value, without a tag, to the stream. + /// + /// The value to write + public void WriteUInt64(ulong value) + { + var span = new Span(buffer); + WritingPrimitives.WriteUInt64(ref span, ref state, value); + } + + /// + /// Writes an int64 field value, without a tag, to the stream. + /// + /// The value to write + public void WriteInt64(long value) + { + var span = new Span(buffer); + WritingPrimitives.WriteInt64(ref span, ref state, value); + } + + /// + /// Writes an int32 field value, without a tag, to the stream. + /// + /// The value to write + public void WriteInt32(int value) + { + var span = new Span(buffer); + WritingPrimitives.WriteInt32(ref span, ref state, value); + } + + /// + /// Writes a fixed64 field value, without a tag, to the stream. + /// + /// The value to write + public void WriteFixed64(ulong value) + { + var span = new Span(buffer); + WritingPrimitives.WriteFixed64(ref span, ref state, value); + } + + /// + /// Writes a fixed32 field value, without a tag, to the stream. + /// + /// The value to write + public void WriteFixed32(uint value) + { + var span = new Span(buffer); + WritingPrimitives.WriteFixed32(ref span, ref state, value); + } + + /// + /// Writes a bool field value, without a tag, to the stream. + /// + /// The value to write + public void WriteBool(bool value) + { + var span = new Span(buffer); + WritingPrimitives.WriteBool(ref span, ref state, value); + } + + /// + /// Writes a string field value, without a tag, to the stream. + /// The data is length-prefixed. + /// + /// The value to write + public void WriteString(string value) + { + var span = new Span(buffer); + WritingPrimitives.WriteString(ref span, ref state, value); + } + + /// + /// Writes a message, without a tag, to the stream. + /// The data is length-prefixed. + /// + /// The value to write + public void WriteMessage(IMessage value) + { + // TODO: if the message doesn't implement IBufferMessage (and thus does not provide the InternalWriteTo method), + // what we're doing here works fine, but could be more efficient. + // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it). + var span = new Span(buffer); + WriteContext.Initialize(ref span, ref state, out WriteContext ctx); + try + { + WritingPrimitivesMessages.WriteMessage(ref ctx, value); + } + finally + { + ctx.CopyStateTo(this); + } + } + + /// + /// Writes a message, without a tag, to the stream. + /// Only the message data is written, without a length-delimiter. + /// + /// The value to write + public void WriteRawMessage(IMessage value) + { + // TODO: if the message doesn't implement IBufferMessage (and thus does not provide the InternalWriteTo method), + // what we're doing here works fine, but could be more efficient. + // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it). + var span = new Span(buffer); + WriteContext.Initialize(ref span, ref state, out WriteContext ctx); + try + { + WritingPrimitivesMessages.WriteRawMessage(ref ctx, value); + } + finally + { + ctx.CopyStateTo(this); + } + } + + /// + /// Writes a group, without a tag, to the stream. + /// + /// The value to write + public void WriteGroup(IMessage value) + { + var span = new Span(buffer); + WriteContext.Initialize(ref span, ref state, out WriteContext ctx); + try + { + WritingPrimitivesMessages.WriteGroup(ref ctx, value); + } + finally + { + ctx.CopyStateTo(this); + } + } + + /// + /// Write a byte string, without a tag, to the stream. + /// The data is length-prefixed. + /// + /// The value to write + public void WriteBytes(ByteString value) + { + var span = new Span(buffer); + WritingPrimitives.WriteBytes(ref span, ref state, value); + } + + /// + /// Writes a uint32 value, without a tag, to the stream. + /// + /// The value to write + public void WriteUInt32(uint value) + { + var span = new Span(buffer); + WritingPrimitives.WriteUInt32(ref span, ref state, value); + } + + /// + /// Writes an enum value, without a tag, to the stream. + /// + /// The value to write + public void WriteEnum(int value) + { + var span = new Span(buffer); + WritingPrimitives.WriteEnum(ref span, ref state, value); + } + + /// + /// Writes an sfixed32 value, without a tag, to the stream. + /// + /// The value to write. + public void WriteSFixed32(int value) + { + var span = new Span(buffer); + WritingPrimitives.WriteSFixed32(ref span, ref state, value); + } + + /// + /// Writes an sfixed64 value, without a tag, to the stream. + /// + /// The value to write + public void WriteSFixed64(long value) + { + var span = new Span(buffer); + WritingPrimitives.WriteSFixed64(ref span, ref state, value); + } + + /// + /// Writes an sint32 value, without a tag, to the stream. + /// + /// The value to write + public void WriteSInt32(int value) + { + var span = new Span(buffer); + WritingPrimitives.WriteSInt32(ref span, ref state, value); + } + + /// + /// Writes an sint64 value, without a tag, to the stream. + /// + /// The value to write + public void WriteSInt64(long value) + { + var span = new Span(buffer); + WritingPrimitives.WriteSInt64(ref span, ref state, value); + } + + /// + /// Writes a length (in bytes) for length-delimited data. + /// + /// + /// This method simply writes a rawint, but exists for clarity in calling code. + /// + /// Length value, in bytes. + public void WriteLength(int length) + { + var span = new Span(buffer); + WritingPrimitives.WriteLength(ref span, ref state, length); + } + + #endregion + + #region Raw tag writing + /// + /// Encodes and writes a tag. + /// + /// The number of the field to write the tag for + /// The wire format type of the tag to write + public void WriteTag(int fieldNumber, WireFormat.WireType type) + { + var span = new Span(buffer); + WritingPrimitives.WriteTag(ref span, ref state, fieldNumber, type); + } + + /// + /// Writes an already-encoded tag. + /// + /// The encoded tag + public void WriteTag(uint tag) + { + var span = new Span(buffer); + WritingPrimitives.WriteTag(ref span, ref state, tag); + } + + /// + /// Writes the given single-byte tag directly to the stream. + /// + /// The encoded tag + public void WriteRawTag(byte b1) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawTag(ref span, ref state, b1); + } + + /// + /// Writes the given two-byte tag directly to the stream. + /// + /// The first byte of the encoded tag + /// The second byte of the encoded tag + public void WriteRawTag(byte b1, byte b2) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2); + } + + /// + /// Writes the given three-byte tag directly to the stream. + /// + /// The first byte of the encoded tag + /// The second byte of the encoded tag + /// The third byte of the encoded tag + public void WriteRawTag(byte b1, byte b2, byte b3) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3); + } + + /// + /// Writes the given four-byte tag directly to the stream. + /// + /// The first byte of the encoded tag + /// The second byte of the encoded tag + /// The third byte of the encoded tag + /// The fourth byte of the encoded tag + public void WriteRawTag(byte b1, byte b2, byte b3, byte b4) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3, b4); + } + + /// + /// Writes the given five-byte tag directly to the stream. + /// + /// The first byte of the encoded tag + /// The second byte of the encoded tag + /// The third byte of the encoded tag + /// The fourth byte of the encoded tag + /// The fifth byte of the encoded tag + public void WriteRawTag(byte b1, byte b2, byte b3, byte b4, byte b5) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3, b4, b5); + } + #endregion + + #region Underlying writing primitives + + /// + /// Writes a 32 bit value as a varint. The fast route is taken when + /// there's enough buffer space left to whizz through without checking + /// for each byte; otherwise, we resort to calling WriteRawByte each time. + /// + internal void WriteRawVarint32(uint value) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawVarint32(ref span, ref state, value); + } + + internal void WriteRawVarint64(ulong value) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawVarint64(ref span, ref state, value); + } + + internal void WriteRawLittleEndian32(uint value) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawLittleEndian32(ref span, ref state, value); + } + + internal void WriteRawLittleEndian64(ulong value) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawLittleEndian64(ref span, ref state, value); + } + + /// + /// Writes out an array of bytes. + /// + internal void WriteRawBytes(byte[] value) + { + WriteRawBytes(value, 0, value.Length); + } + + /// + /// Writes out part of an array of bytes. + /// + internal void WriteRawBytes(byte[] value, int offset, int length) + { + var span = new Span(buffer); + WritingPrimitives.WriteRawBytes(ref span, ref state, value, offset, length); + } + + #endregion + + /// + /// Indicates that a CodedOutputStream wrapping a flat byte array + /// ran out of space. + /// + public sealed class OutOfSpaceException : IOException + { + internal OutOfSpaceException() + : base("CodedOutputStream was writing to a flat byte array and ran out of space.") + { + } + } + + /// + /// Flushes any buffered data and optionally closes the underlying stream, if any. + /// + /// + /// + /// By default, any underlying stream is closed by this method. To configure this behaviour, + /// use a constructor overload with a leaveOpen parameter. If this instance does not + /// have an underlying stream, this method does nothing. + /// + /// + /// For the sake of efficiency, calling this method does not prevent future write calls - but + /// if a later write ends up writing to a stream which has been disposed, that is likely to + /// fail. It is recommend that you not call any other methods after this. + /// + /// + public void Dispose() + { + Flush(); + if (!leaveOpen) + { + output.Dispose(); + } + } + + /// + /// Flushes any buffered data to the underlying stream (if there is one). + /// + public void Flush() + { + var span = new Span(buffer); + WriteBufferHelper.Flush(ref span, ref state); + } + + /// + /// Verifies that SpaceLeft returns zero. It's common to create a byte array + /// that is exactly big enough to hold a message, then write to it with + /// a CodedOutputStream. Calling CheckNoSpaceLeft after writing verifies that + /// the message was actually as big as expected, which can help finding bugs. + /// + public void CheckNoSpaceLeft() + { + WriteBufferHelper.CheckNoSpaceLeft(ref state); + } + + /// + /// If writing to a flat array, returns the space left in the array. Otherwise, + /// throws an InvalidOperationException. + /// + public int SpaceLeft => WriteBufferHelper.GetSpaceLeft(ref state); + + internal byte[] InternalBuffer => buffer; + + internal Stream InternalOutputStream => output; + + internal ref WriterInternalState InternalState => ref state; + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta new file mode 100644 index 00000000..d2f31445 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79ad02c5589e31e49a8c14beb07d8e01 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections.meta new file mode 100644 index 00000000..18b85b25 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 011bc81dfcaad4e4f93d75625e1fb321 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs new file mode 100644 index 00000000..149aeac7 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs @@ -0,0 +1,65 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2017 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; + +namespace Google.Protobuf.Collections +{ + /// + /// Utility to compare if two Lists are the same, and the hash code + /// of a List. + /// + public static class Lists + { + /// + /// Checks if two lists are equal. + /// + public static bool Equals(List left, List right) + { + if (left == right) + { + return true; + } + if (left == null || right == null) + { + return false; + } + if (left.Count != right.Count) + { + return false; + } + IEqualityComparer comparer = EqualityComparer.Default; + for (int i = 0; i < left.Count; i++) + { + if (!comparer.Equals(left[i], right[i])) + { + return false; + } + } + return true; + } + + /// + /// Gets the list's hash code. + /// + public static int GetHashCode(List list) + { + if (list == null) + { + return 0; + } + int hash = 31; + foreach (T element in list) + { + hash = hash * 29 + element.GetHashCode(); + } + return hash; + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta new file mode 100644 index 00000000..1b0d4dde --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 59a79b6bbb50cdd4f8af299a4f934b58 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs new file mode 100644 index 00000000..722cc923 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs @@ -0,0 +1,737 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Compatibility; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Security; + +namespace Google.Protobuf.Collections +{ + /// + /// Representation of a map field in a Protocol Buffer message. + /// + /// Key type in the map. Must be a type supported by Protocol Buffer map keys. + /// Value type in the map. Must be a type supported by Protocol Buffers. + /// + /// + /// For string keys, the equality comparison is provided by . + /// + /// + /// Null values are not permitted in the map, either for wrapper types or regular messages. + /// If a map is deserialized from a data stream and the value is missing from an entry, a default value + /// is created instead. For primitive types, that is the regular default value (0, the empty string and so + /// on); for message types, an empty instance of the message is created, as if the map entry contained a 0-length + /// encoded value for the field. + /// + /// + /// This implementation does not generally prohibit the use of key/value types which are not + /// supported by Protocol Buffers (e.g. using a key type of byte) but nor does it guarantee + /// that all operations will work in such cases. + /// + /// + /// The order in which entries are returned when iterating over this object is undefined, and may change + /// in future versions. + /// + /// + [DebuggerDisplay("Count = {Count}")] + [DebuggerTypeProxy(typeof(MapField<,>.MapFieldDebugView))] + public sealed class MapField : IDeepCloneable>, IDictionary, IEquatable>, IDictionary, IReadOnlyDictionary + { + private static readonly EqualityComparer ValueEqualityComparer = ProtobufEqualityComparers.GetEqualityComparer(); + private static readonly EqualityComparer KeyEqualityComparer = ProtobufEqualityComparers.GetEqualityComparer(); + + // TODO: Don't create the map/list until we have an entry. (Assume many maps will be empty.) + private readonly Dictionary>> map = new(KeyEqualityComparer); + private readonly LinkedList> list = new(); + + /// + /// Creates a deep clone of this object. + /// + /// + /// A deep clone of this object. + /// + public MapField Clone() + { + var clone = new MapField(); + // Keys are never cloneable. Values might be. + if (typeof(IDeepCloneable).IsAssignableFrom(typeof(TValue))) + { + foreach (var pair in list) + { + clone.Add(pair.Key, ((IDeepCloneable)pair.Value).Clone()); + } + } + else + { + // Nothing is cloneable, so we don't need to worry. + clone.Add(this); + } + return clone; + } + + /// + /// Adds the specified key/value pair to the map. + /// + /// + /// This operation fails if the key already exists in the map. To replace an existing entry, use the indexer. + /// + /// The key to add + /// The value to add. + /// The given key already exists in map. + public void Add(TKey key, TValue value) + { + // Validation of arguments happens in ContainsKey and the indexer + if (ContainsKey(key)) + { + throw new ArgumentException("Key already exists in map", nameof(key)); + } + this[key] = value; + } + + /// + /// Determines whether the specified key is present in the map. + /// + /// The key to check. + /// true if the map contains the given key; false otherwise. + public bool ContainsKey(TKey key) + { + ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key)); + return map.ContainsKey(key); + } + + private bool ContainsValue(TValue value) => + list.Any(pair => ValueEqualityComparer.Equals(pair.Value, value)); + + /// + /// Removes the entry identified by the given key from the map. + /// + /// The key indicating the entry to remove from the map. + /// true if the map contained the given key before the entry was removed; false otherwise. + public bool Remove(TKey key) + { + ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key)); + if (map.TryGetValue(key, out LinkedListNode> node)) + { + map.Remove(key); + node.List.Remove(node); + return true; + } + else + { + return false; + } + } + + /// + /// Gets the value associated with the specified key. + /// + /// The key whose value to get. + /// When this method returns, the value associated with the specified key, if the key is found; + /// otherwise, the default value for the type of the parameter. + /// This parameter is passed uninitialized. + /// true if the map contains an element with the specified key; otherwise, false. + public bool TryGetValue(TKey key, out TValue value) + { + if (map.TryGetValue(key, out LinkedListNode> node)) + { + value = node.Value.Value; + return true; + } + else + { + value = default; + return false; + } + } + + /// + /// Gets or sets the value associated with the specified key. + /// + /// The key of the value to get or set. + /// The property is retrieved and key does not exist in the collection. + /// The value associated with the specified key. If the specified key is not found, + /// a get operation throws a , and a set operation creates a new element with the specified key. + public TValue this[TKey key] + { + get + { + ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key)); + if (TryGetValue(key, out TValue value)) + { + return value; + } + throw new KeyNotFoundException(); + } + set + { + ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key)); + // value == null check here is redundant, but avoids boxing. + if (value == null) + { + ProtoPreconditions.CheckNotNullUnconstrained(value, nameof(value)); + } + var pair = new KeyValuePair(key, value); + if (map.TryGetValue(key, out LinkedListNode> node)) + { + node.Value = pair; + } + else + { + node = list.AddLast(pair); + map[key] = node; + } + } + } + + /// + /// Gets a collection containing the keys in the map. + /// + public ICollection Keys => new MapView(this, pair => pair.Key, ContainsKey); + + /// + /// Gets a collection containing the values in the map. + /// + public ICollection Values => new MapView(this, pair => pair.Value, ContainsValue); + + /// + /// Adds the specified entries to the map. The keys and values are not automatically cloned. + /// + /// The entries to add to the map. + public void Add(IDictionary entries) + { + ProtoPreconditions.CheckNotNull(entries, nameof(entries)); + foreach (var pair in entries) + { + Add(pair.Key, pair.Value); + } + } + + /// + /// Adds the specified entries to the map, replacing any existing entries with the same keys. + /// The keys and values are not automatically cloned. + /// + /// This method primarily exists to be called from MergeFrom methods in generated classes for messages. + /// The entries to add to the map. + public void MergeFrom(IDictionary entries) + { + ProtoPreconditions.CheckNotNull(entries, nameof(entries)); + foreach (var pair in entries) + { + this[pair.Key] = pair.Value; + } + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// + /// An enumerator that can be used to iterate through the collection. + /// + public IEnumerator> GetEnumerator() => list.GetEnumerator(); + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// + /// An object that can be used to iterate through the collection. + /// + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + /// + /// Adds the specified item to the map. + /// + /// The item to add to the map. + void ICollection>.Add(KeyValuePair item) => Add(item.Key, item.Value); + + /// + /// Removes all items from the map. + /// + public void Clear() + { + list.Clear(); + map.Clear(); + } + + /// + /// Determines whether map contains an entry equivalent to the given key/value pair. + /// + /// The key/value pair to find. + /// + bool ICollection>.Contains(KeyValuePair item) => + TryGetValue(item.Key, out TValue value) && ValueEqualityComparer.Equals(item.Value, value); + + /// + /// Copies the key/value pairs in this map to an array. + /// + /// The array to copy the entries into. + /// The index of the array at which to start copying values. + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + list.CopyTo(array, arrayIndex); + + /// + /// Removes the specified key/value pair from the map. + /// + /// Both the key and the value must be found for the entry to be removed. + /// The key/value pair to remove. + /// true if the key/value pair was found and removed; false otherwise. + bool ICollection>.Remove(KeyValuePair item) + { + if (item.Key == null) + { + throw new ArgumentException("Key is null", nameof(item)); + } + if (map.TryGetValue(item.Key, out LinkedListNode> node) && + EqualityComparer.Default.Equals(item.Value, node.Value.Value)) + { + map.Remove(item.Key); + node.List.Remove(node); + return true; + } + else + { + return false; + } + } + + /// + /// Gets the number of elements contained in the map. + /// + public int Count => list.Count; + + /// + /// Gets a value indicating whether the map is read-only. + /// + public bool IsReadOnly => false; + + /// + /// Determines whether the specified , is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public override bool Equals(object other) => Equals(other as MapField); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + public override int GetHashCode() + { + var keyComparer = KeyEqualityComparer; + var valueComparer = ValueEqualityComparer; + int hash = 0; + foreach (var pair in list) + { + hash ^= keyComparer.GetHashCode(pair.Key) * 31 + valueComparer.GetHashCode(pair.Value); + } + return hash; + } + + /// + /// Compares this map with another for equality. + /// + /// + /// The order of the key/value pairs in the maps is not deemed significant in this comparison. + /// + /// The map to compare this with. + /// true if refers to an equal map; false otherwise. + public bool Equals(MapField other) + { + if (other == null) + { + return false; + } + if (other == this) + { + return true; + } + if (other.Count != this.Count) + { + return false; + } + var valueComparer = ValueEqualityComparer; + foreach (var pair in this) + { + if (!other.TryGetValue(pair.Key, out TValue value)) + { + return false; + } + if (!valueComparer.Equals(value, pair.Value)) + { + return false; + } + } + return true; + } + + /// + /// Adds entries to the map from the given stream. + /// + /// + /// It is assumed that the stream is initially positioned after the tag specified by the codec. + /// This method will continue reading entries from the stream until the end is reached, or + /// a different tag is encountered. + /// + /// Stream to read from + /// Codec describing how the key/value pairs are encoded + public void AddEntriesFrom(CodedInputStream input, Codec codec) + { + ParseContext.Initialize(input, out ParseContext ctx); + try + { + AddEntriesFrom(ref ctx, codec); + } + finally + { + ctx.CopyStateTo(input); + } + } + + /// + /// Adds entries to the map from the given parse context. + /// + /// + /// It is assumed that the input is initially positioned after the tag specified by the codec. + /// This method will continue reading entries from the input until the end is reached, or + /// a different tag is encountered. + /// + /// Input to read from + /// Codec describing how the key/value pairs are encoded + [SecuritySafeCritical] + public void AddEntriesFrom(ref ParseContext ctx, Codec codec) + { + do + { + KeyValuePair entry = ParsingPrimitivesMessages.ReadMapEntry(ref ctx, codec); + this[entry.Key] = entry.Value; + } while (ParsingPrimitives.MaybeConsumeTag(ref ctx.buffer, ref ctx.state, codec.MapTag)); + } + + /// + /// Writes the contents of this map to the given coded output stream, using the specified codec + /// to encode each entry. + /// + /// The output stream to write to. + /// The codec to use for each entry. + public void WriteTo(CodedOutputStream output, Codec codec) + { + WriteContext.Initialize(output, out WriteContext ctx); + try + { + IEnumerable> listToWrite = list; + + if (output.Deterministic) + { + listToWrite = GetSortedListCopy(list); + } + WriteTo(ref ctx, codec, listToWrite); + } + finally + { + ctx.CopyStateTo(output); + } + } + + internal IEnumerable> GetSortedListCopy(IEnumerable> listToSort) + { + // We can't sort the list in place, as that would invalidate the linked list. + // Instead, we create a new list, sort that, and then write it out. + var listToWrite = new List>(listToSort); + listToWrite.Sort((pair1, pair2) => + { + if (typeof(TKey) == typeof(string)) + { + // Use Ordinal, otherwise Comparer.Default uses StringComparer.CurrentCulture + return StringComparer.Ordinal.Compare(pair1.Key.ToString(), pair2.Key.ToString()); + } + return Comparer.Default.Compare(pair1.Key, pair2.Key); + }); + return listToWrite; + } + + /// + /// Writes the contents of this map to the given write context, using the specified codec + /// to encode each entry. + /// + /// The write context to write to. + /// The codec to use for each entry. + [SecuritySafeCritical] + public void WriteTo(ref WriteContext ctx, Codec codec) + { + IEnumerable> listToWrite = list; + if (ctx.state.CodedOutputStream?.Deterministic ?? false) + { + listToWrite = GetSortedListCopy(list); + } + WriteTo(ref ctx, codec, listToWrite); + } + + [SecuritySafeCritical] + private void WriteTo(ref WriteContext ctx, Codec codec, IEnumerable> listKvp) + { + foreach (var entry in listKvp) + { + ctx.WriteTag(codec.MapTag); + + WritingPrimitives.WriteLength(ref ctx.buffer, ref ctx.state, CalculateEntrySize(codec, entry)); + codec.KeyCodec.WriteTagAndValue(ref ctx, entry.Key); + codec.ValueCodec.WriteTagAndValue(ref ctx, entry.Value); + } + } + + /// + /// Calculates the size of this map based on the given entry codec. + /// + /// The codec to use to encode each entry. + /// + public int CalculateSize(Codec codec) + { + if (Count == 0) + { + return 0; + } + int size = 0; + foreach (var entry in list) + { + int entrySize = CalculateEntrySize(codec, entry); + + size += CodedOutputStream.ComputeRawVarint32Size(codec.MapTag); + size += CodedOutputStream.ComputeLengthSize(entrySize) + entrySize; + } + return size; + } + + private static int CalculateEntrySize(Codec codec, KeyValuePair entry) + { + return codec.KeyCodec.CalculateSizeWithTag(entry.Key) + codec.ValueCodec.CalculateSizeWithTag(entry.Value); + } + + /// + /// Returns a string representation of this repeated field, in the same + /// way as it would be represented by the default JSON formatter. + /// + public override string ToString() + { + var writer = new StringWriter(); + JsonFormatter.Default.WriteDictionary(writer, this); + return writer.ToString(); + } + + #region IDictionary explicit interface implementation + + void IDictionary.Add(object key, object value) => Add((TKey)key, (TValue)value); + + bool IDictionary.Contains(object key) => key is TKey k && ContainsKey(k); + + IDictionaryEnumerator IDictionary.GetEnumerator() => new DictionaryEnumerator(GetEnumerator()); + + void IDictionary.Remove(object key) + { + ProtoPreconditions.CheckNotNull(key, nameof(key)); + if (key is TKey k) + { + Remove(k); + } + } + + void ICollection.CopyTo(Array array, int index) + { + // This is ugly and slow as heck, but with any luck it will never be used anyway. + ICollection temp = this.Select(pair => new DictionaryEntry(pair.Key, pair.Value)).ToList(); + temp.CopyTo(array, index); + } + + bool IDictionary.IsFixedSize => false; + + ICollection IDictionary.Keys => (ICollection)Keys; + + ICollection IDictionary.Values => (ICollection)Values; + + bool ICollection.IsSynchronized => false; + + object ICollection.SyncRoot => this; + + object IDictionary.this[object key] + { + get + { + ProtoPreconditions.CheckNotNull(key, nameof(key)); + if (key is TKey k) + { + TryGetValue(k, out TValue value); + return value; + } + return null; + } + + set + { + this[(TKey)key] = (TValue)value; + } + } + #endregion + + #region IReadOnlyDictionary explicit interface implementation + IEnumerable IReadOnlyDictionary.Keys => Keys; + IEnumerable IReadOnlyDictionary.Values => Values; + #endregion + + private class DictionaryEnumerator : IDictionaryEnumerator + { + private readonly IEnumerator> enumerator; + + internal DictionaryEnumerator(IEnumerator> enumerator) + { + this.enumerator = enumerator; + } + + public bool MoveNext() => enumerator.MoveNext(); + + public void Reset() => enumerator.Reset(); + + public object Current => Entry; + public DictionaryEntry Entry => new DictionaryEntry(Key, Value); + public object Key => enumerator.Current.Key; + public object Value => enumerator.Current.Value; + } + + /// + /// A codec for a specific map field. This contains all the information required to encode and + /// decode the nested messages. + /// + public sealed class Codec + { + private readonly FieldCodec keyCodec; + private readonly FieldCodec valueCodec; + private readonly uint mapTag; + + /// + /// Creates a new entry codec based on a separate key codec and value codec, + /// and the tag to use for each map entry. + /// + /// The key codec. + /// The value codec. + /// The map tag to use to introduce each map entry. + public Codec(FieldCodec keyCodec, FieldCodec valueCodec, uint mapTag) + { + this.keyCodec = keyCodec; + this.valueCodec = valueCodec; + this.mapTag = mapTag; + } + + /// + /// The key codec. + /// + internal FieldCodec KeyCodec => keyCodec; + + /// + /// The value codec. + /// + internal FieldCodec ValueCodec => valueCodec; + + /// + /// The tag used in the enclosing message to indicate map entries. + /// + internal uint MapTag => mapTag; + } + + private class MapView : ICollection, ICollection + { + private readonly MapField parent; + private readonly Func, T> projection; + private readonly Func containsCheck; + + internal MapView( + MapField parent, + Func, T> projection, + Func containsCheck) + { + this.parent = parent; + this.projection = projection; + this.containsCheck = containsCheck; + } + + public int Count => parent.Count; + + public bool IsReadOnly => true; + + public bool IsSynchronized => false; + + public object SyncRoot => parent; + + public void Add(T item) => throw new NotSupportedException(); + + public void Clear() => throw new NotSupportedException(); + + public bool Contains(T item) => containsCheck(item); + + public void CopyTo(T[] array, int arrayIndex) + { + if (arrayIndex < 0) + { + throw new ArgumentOutOfRangeException(nameof(arrayIndex)); + } + if (arrayIndex + Count > array.Length) + { + throw new ArgumentException("Not enough space in the array", nameof(array)); + } + foreach (var item in this) + { + array[arrayIndex++] = item; + } + } + + public IEnumerator GetEnumerator() + { + return parent.list.Select(projection).GetEnumerator(); + } + + public bool Remove(T item) => throw new NotSupportedException(); + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + public void CopyTo(Array array, int index) + { + if (index < 0) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + if (index + Count > array.Length) + { + throw new ArgumentException("Not enough space in the array", nameof(array)); + } + foreach (var item in this) + { + array.SetValue(item, index++); + } + } + } + + private sealed class MapFieldDebugView + { + private readonly MapField map; + + public MapFieldDebugView(MapField map) + { + this.map = map; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public KeyValuePair[] Items => map.list.ToArray(); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta new file mode 100644 index 00000000..69c3913e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2d17e06f635e50745bbffabc4e671f0c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs new file mode 100644 index 00000000..5b851b22 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs @@ -0,0 +1,107 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2017 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Generic; + +namespace Google.Protobuf.Collections +{ + /// + /// Provides a central place to implement equality comparisons, primarily for bitwise float/double equality. + /// + public static class ProtobufEqualityComparers + { + /// + /// Returns an equality comparer for suitable for Protobuf equality comparisons. + /// This is usually just the default equality comparer for the type, but floating point numbers are compared + /// bitwise. + /// + /// The type of equality comparer to return. + /// The equality comparer. + public static EqualityComparer GetEqualityComparer() + { + return typeof(T) == typeof(double) ? (EqualityComparer) (object) BitwiseDoubleEqualityComparer + : typeof(T) == typeof(float) ? (EqualityComparer) (object) BitwiseSingleEqualityComparer + : typeof(T) == typeof(double?) ? (EqualityComparer) (object) BitwiseNullableDoubleEqualityComparer + : typeof(T) == typeof(float?) ? (EqualityComparer) (object) BitwiseNullableSingleEqualityComparer + : EqualityComparer.Default; + } + + /// + /// Returns an equality comparer suitable for comparing 64-bit floating point values, by bitwise comparison. + /// (NaN values are considered equal, but only when they have the same representation.) + /// + public static EqualityComparer BitwiseDoubleEqualityComparer { get; } = new BitwiseDoubleEqualityComparerImpl(); + + /// + /// Returns an equality comparer suitable for comparing 32-bit floating point values, by bitwise comparison. + /// (NaN values are considered equal, but only when they have the same representation.) + /// + public static EqualityComparer BitwiseSingleEqualityComparer { get; } = new BitwiseSingleEqualityComparerImpl(); + + /// + /// Returns an equality comparer suitable for comparing nullable 64-bit floating point values, by bitwise comparison. + /// (NaN values are considered equal, but only when they have the same representation.) + /// + public static EqualityComparer BitwiseNullableDoubleEqualityComparer { get; } = new BitwiseNullableDoubleEqualityComparerImpl(); + + /// + /// Returns an equality comparer suitable for comparing nullable 32-bit floating point values, by bitwise comparison. + /// (NaN values are considered equal, but only when they have the same representation.) + /// + public static EqualityComparer BitwiseNullableSingleEqualityComparer { get; } = new BitwiseNullableSingleEqualityComparerImpl(); + + private class BitwiseDoubleEqualityComparerImpl : EqualityComparer + { + public override bool Equals(double x, double y) => + BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y); + + public override int GetHashCode(double obj) => + BitConverter.DoubleToInt64Bits(obj).GetHashCode(); + } + + private class BitwiseSingleEqualityComparerImpl : EqualityComparer + { + // Just promote values to double and use BitConverter.DoubleToInt64Bits, + // as there's no BitConverter.SingleToInt32Bits, unfortunately. + + public override bool Equals(float x, float y) => + BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y); + + public override int GetHashCode(float obj) => + BitConverter.DoubleToInt64Bits(obj).GetHashCode(); + } + + private class BitwiseNullableDoubleEqualityComparerImpl : EqualityComparer + { + public override bool Equals(double? x, double? y) => + x == null && y == null ? true + : x == null || y == null ? false + : BitwiseDoubleEqualityComparer.Equals(x.Value, y.Value); + + // The hash code for null is just a constant which is at least *unlikely* to be used + // elsewhere. (Compared with 0, say.) + public override int GetHashCode(double? obj) => + obj == null ? 293864 : BitwiseDoubleEqualityComparer.GetHashCode(obj.Value); + } + + private class BitwiseNullableSingleEqualityComparerImpl : EqualityComparer + { + public override bool Equals(float? x, float? y) => + x == null && y == null ? true + : x == null || y == null ? false + : BitwiseSingleEqualityComparer.Equals(x.Value, y.Value); + + // The hash code for null is just a constant which is at least *unlikely* to be used + // elsewhere. (Compared with 0, say.) + public override int GetHashCode(float? obj) => + obj == null ? 293864 : BitwiseSingleEqualityComparer.GetHashCode(obj.Value); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta new file mode 100644 index 00000000..cf919fb0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fe847f0b8351a874186d0dead84866dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs new file mode 100644 index 00000000..8bf410aa --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs @@ -0,0 +1,663 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Security; + +namespace Google.Protobuf.Collections +{ + /// + /// The contents of a repeated field: essentially, a collection with some extra + /// restrictions (no null values) and capabilities (deep cloning). + /// + /// + /// This implementation does not generally prohibit the use of types which are not + /// supported by Protocol Buffers but nor does it guarantee that all operations will work in such cases. + /// + /// The element type of the repeated field. + [DebuggerDisplay("Count = {Count}")] + [DebuggerTypeProxy(typeof(RepeatedField<>.RepeatedFieldDebugView))] + public sealed class RepeatedField : IList, IList, IDeepCloneable>, IEquatable>, IReadOnlyList + { + private static readonly EqualityComparer EqualityComparer = ProtobufEqualityComparers.GetEqualityComparer(); + private static readonly T[] EmptyArray = new T[0]; + private const int MinArraySize = 8; + + private T[] array = EmptyArray; + private int count = 0; + + /// + /// Creates a deep clone of this repeated field. + /// + /// + /// If the field type is + /// a message type, each element is also cloned; otherwise, it is + /// assumed that the field type is primitive (including string and + /// bytes, both of which are immutable) and so a simple copy is + /// equivalent to a deep clone. + /// + /// A deep clone of this repeated field. + public RepeatedField Clone() + { + RepeatedField clone = new RepeatedField(); + if (array != EmptyArray) + { + clone.array = (T[])array.Clone(); + if (clone.array is IDeepCloneable[] cloneableArray) + { + for (int i = 0; i < count; i++) + { + clone.array[i] = cloneableArray[i].Clone(); + } + } + } + clone.count = count; + return clone; + } + + /// + /// Adds the entries from the given input stream, decoding them with the specified codec. + /// + /// The input stream to read from. + /// The codec to use in order to read each entry. + public void AddEntriesFrom(CodedInputStream input, FieldCodec codec) + { + ParseContext.Initialize(input, out ParseContext ctx); + try + { + AddEntriesFrom(ref ctx, codec); + } + finally + { + ctx.CopyStateTo(input); + } + } + + /// + /// Adds the entries from the given parse context, decoding them with the specified codec. + /// + /// The input to read from. + /// The codec to use in order to read each entry. + [SecuritySafeCritical] + public void AddEntriesFrom(ref ParseContext ctx, FieldCodec codec) + { + // TODO: Inline some of the Add code, so we can avoid checking the size on every + // iteration. + uint tag = ctx.state.lastTag; + var reader = codec.ValueReader; + // Non-nullable value types can be packed or not. + if (FieldCodec.IsPackedRepeatedField(tag)) + { + int length = ctx.ReadLength(); + if (length > 0) + { + int oldLimit = SegmentedBufferHelper.PushLimit(ref ctx.state, length); + + // If the content is fixed size then we can calculate the length + // of the repeated field and pre-initialize the underlying collection. + // + // Check that the supplied length doesn't exceed the underlying buffer. + // That prevents a malicious length from initializing a very large collection. + if (codec.FixedSize > 0 && length % codec.FixedSize == 0 && ParsingPrimitives.IsDataAvailable(ref ctx.state, length)) + { + EnsureSize(count + (length / codec.FixedSize)); + + while (!SegmentedBufferHelper.IsReachedLimit(ref ctx.state)) + { + // Only FieldCodecs with a fixed size can reach here, and they are all known + // types that don't allow the user to specify a custom reader action. + // reader action will never return null. + array[count++] = reader(ref ctx); + } + } + else + { + // Content is variable size so add until we reach the limit. + while (!SegmentedBufferHelper.IsReachedLimit(ref ctx.state)) + { + Add(reader(ref ctx)); + } + } + SegmentedBufferHelper.PopLimit(ref ctx.state, oldLimit); + } + // Empty packed field. Odd, but valid - just ignore. + } + else + { + // Not packed... (possibly not packable) + do + { + Add(reader(ref ctx)); + } while (ParsingPrimitives.MaybeConsumeTag(ref ctx.buffer, ref ctx.state, tag)); + } + } + + /// + /// Calculates the size of this collection based on the given codec. + /// + /// The codec to use when encoding each field. + /// The number of bytes that would be written to an output by one of the WriteTo methods, + /// using the same codec. + public int CalculateSize(FieldCodec codec) + { + if (count == 0) + { + return 0; + } + uint tag = codec.Tag; + if (codec.PackedRepeatedField) + { + int dataSize = CalculatePackedDataSize(codec); + return CodedOutputStream.ComputeRawVarint32Size(tag) + + CodedOutputStream.ComputeLengthSize(dataSize) + + dataSize; + } + else + { + var sizeCalculator = codec.ValueSizeCalculator; + int size = count * CodedOutputStream.ComputeRawVarint32Size(tag); + if (codec.EndTag != 0) + { + size += count * CodedOutputStream.ComputeRawVarint32Size(codec.EndTag); + } + for (int i = 0; i < count; i++) + { + size += sizeCalculator(array[i]); + } + return size; + } + } + + private int CalculatePackedDataSize(FieldCodec codec) + { + int fixedSize = codec.FixedSize; + if (fixedSize == 0) + { + var calculator = codec.ValueSizeCalculator; + int tmp = 0; + for (int i = 0; i < count; i++) + { + tmp += calculator(array[i]); + } + return tmp; + } + else + { + return fixedSize * Count; + } + } + + /// + /// Writes the contents of this collection to the given , + /// encoding each value using the specified codec. + /// + /// The output stream to write to. + /// The codec to use when encoding each value. + public void WriteTo(CodedOutputStream output, FieldCodec codec) + { + WriteContext.Initialize(output, out WriteContext ctx); + try + { + WriteTo(ref ctx, codec); + } + finally + { + ctx.CopyStateTo(output); + } + } + + /// + /// Writes the contents of this collection to the given write context, + /// encoding each value using the specified codec. + /// + /// The write context to write to. + /// The codec to use when encoding each value. + [SecuritySafeCritical] + public void WriteTo(ref WriteContext ctx, FieldCodec codec) + { + if (count == 0) + { + return; + } + var writer = codec.ValueWriter; + var tag = codec.Tag; + if (codec.PackedRepeatedField) + { + // Packed primitive type + int size = CalculatePackedDataSize(codec); + ctx.WriteTag(tag); + ctx.WriteLength(size); + for (int i = 0; i < count; i++) + { + writer(ref ctx, array[i]); + } + } + else + { + // Not packed: a simple tag/value pair for each value. + // Can't use codec.WriteTagAndValue, as that omits default values. + for (int i = 0; i < count; i++) + { + ctx.WriteTag(tag); + writer(ref ctx, array[i]); + if (codec.EndTag != 0) + { + ctx.WriteTag(codec.EndTag); + } + } + } + } + + /// + /// Gets and sets the capacity of the RepeatedField's internal array. + /// When set, the internal array is reallocated to the given capacity. + /// The new value is less than . + /// + public int Capacity + { + get { return array.Length; } + set + { + if (value < count) + { + throw new ArgumentOutOfRangeException("Capacity", value, + $"Cannot set Capacity to a value smaller than the current item count, {count}"); + } + + if (value >= 0 && value != array.Length) + { + SetSize(value); + } + } + } + + // May increase the size of the internal array, but will never shrink it. + private void EnsureSize(int size) + { + if (array.Length < size) + { + size = Math.Max(size, MinArraySize); + int newSize = Math.Max(array.Length * 2, size); + SetSize(newSize); + } + } + + // Sets the internal array to an exact size. + private void SetSize(int size) + { + if (size != array.Length) + { + var tmp = new T[size]; + Array.Copy(array, 0, tmp, 0, count); + array = tmp; + } + } + + /// + /// Adds the specified item to the collection. + /// + /// The item to add. + public void Add(T item) + { + ProtoPreconditions.CheckNotNullUnconstrained(item, nameof(item)); + EnsureSize(count + 1); + array[count++] = item; + } + + /// + /// Removes all items from the collection. + /// + public void Clear() + { + // Clear the content of the array (so that any objects it referred to can be garbage collected) + // but keep the capacity the same. This allows large repeated fields to be reused without + // array reallocation. + Array.Clear(array, 0, count); + count = 0; + } + + /// + /// Determines whether this collection contains the given item. + /// + /// The item to find. + /// true if this collection contains the given item; false otherwise. + public bool Contains(T item) => IndexOf(item) != -1; + + /// + /// Copies this collection to the given array. + /// + /// The array to copy to. + /// The first index of the array to copy to. + public void CopyTo(T[] array, int arrayIndex) + { + Array.Copy(this.array, 0, array, arrayIndex, count); + } + + /// + /// Removes the specified item from the collection + /// + /// The item to remove. + /// true if the item was found and removed; false otherwise. + public bool Remove(T item) + { + int index = IndexOf(item); + if (index == -1) + { + return false; + } + Array.Copy(array, index + 1, array, index, count - index - 1); + count--; + array[count] = default; + return true; + } + + /// + /// Gets the number of elements contained in the collection. + /// + public int Count => count; + + /// + /// Gets a value indicating whether the collection is read-only. + /// + public bool IsReadOnly => false; + + /// + /// Adds all of the specified values into this collection. + /// + /// The values to add to this collection. + public void AddRange(IEnumerable values) + { + ProtoPreconditions.CheckNotNull(values, nameof(values)); + + // Optimization 1: If the collection we're adding is already a RepeatedField, + // we know the values are valid. + if (values is RepeatedField otherRepeatedField) + { + EnsureSize(count + otherRepeatedField.count); + Array.Copy(otherRepeatedField.array, 0, array, count, otherRepeatedField.count); + count += otherRepeatedField.count; + return; + } + + // Optimization 2: The collection is an ICollection, so we can expand + // just once and ask the collection to copy itself into the array. + if (values is ICollection collection) + { + var extraCount = collection.Count; + // For reference types and nullable value types, we need to check that there are no nulls + // present. (This isn't a thread-safe approach, but we don't advertise this is thread-safe.) + // We expect the JITter to optimize this test to true/false, so it's effectively conditional + // specialization. + if (default(T) == null) + { + // TODO: Measure whether iterating once to check and then letting the collection copy + // itself is faster or slower than iterating and adding as we go. For large + // collections this will not be great in terms of cache usage... but the optimized + // copy may be significantly faster than doing it one at a time. + foreach (var item in collection) + { + if (item == null) + { + throw new ArgumentException("Sequence contained null element", nameof(values)); + } + } + } + EnsureSize(count + extraCount); + collection.CopyTo(array, count); + count += extraCount; + return; + } + + // We *could* check for ICollection as well, but very very few collections implement + // ICollection but not ICollection. (HashSet does, for one...) + + // Fall back to a slower path of adding items one at a time. + foreach (T item in values) + { + Add(item); + } + } + + /// + /// Adds all of the specified values into this collection. This method is present to + /// allow repeated fields to be constructed from queries within collection initializers. + /// Within non-collection-initializer code, consider using the equivalent + /// method instead for clarity. + /// + /// The values to add to this collection. + public void Add(IEnumerable values) + { + AddRange(values); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// + /// An enumerator that can be used to iterate through the collection. + /// + public IEnumerator GetEnumerator() + { + for (int i = 0; i < count; i++) + { + yield return array[i]; + } + } + + /// + /// Determines whether the specified , is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public override bool Equals(object obj) => Equals(obj as RepeatedField); + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// + /// An object that can be used to iterate through the collection. + /// + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + public override int GetHashCode() + { + int hash = 0; + for (int i = 0; i < count; i++) + { + hash = hash * 31 + array[i].GetHashCode(); + } + return hash; + } + + /// + /// Compares this repeated field with another for equality. + /// + /// The repeated field to compare this with. + /// true if refers to an equal repeated field; false otherwise. + public bool Equals(RepeatedField other) + { + if (other is null) + { + return false; + } + if (ReferenceEquals(other, this)) + { + return true; + } + if (other.Count != this.Count) + { + return false; + } + EqualityComparer comparer = EqualityComparer; + for (int i = 0; i < count; i++) + { + if (!comparer.Equals(array[i], other.array[i])) + { + return false; + } + } + return true; + } + + /// + /// Returns the index of the given item within the collection, or -1 if the item is not + /// present. + /// + /// The item to find in the collection. + /// The zero-based index of the item, or -1 if it is not found. + public int IndexOf(T item) + { + ProtoPreconditions.CheckNotNullUnconstrained(item, nameof(item)); + EqualityComparer comparer = EqualityComparer; + for (int i = 0; i < count; i++) + { + if (comparer.Equals(array[i], item)) + { + return i; + } + } + return -1; + } + + /// + /// Inserts the given item at the specified index. + /// + /// The index at which to insert the item. + /// The item to insert. + public void Insert(int index, T item) + { + ProtoPreconditions.CheckNotNullUnconstrained(item, nameof(item)); + if (index < 0 || index > count) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureSize(count + 1); + Array.Copy(array, index, array, index + 1, count - index); + array[index] = item; + count++; + } + + /// + /// Removes the item at the given index. + /// + /// The zero-based index of the item to remove. + public void RemoveAt(int index) + { + if (index < 0 || index >= count) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + Array.Copy(array, index + 1, array, index, count - index - 1); + count--; + array[count] = default; + } + + /// + /// Returns a string representation of this repeated field, in the same + /// way as it would be represented by the default JSON formatter. + /// + public override string ToString() + { + var writer = new StringWriter(); + JsonFormatter.Default.WriteList(writer, this); + return writer.ToString(); + } + + /// + /// Gets or sets the item at the specified index. + /// + /// + /// The element at the specified index. + /// + /// The zero-based index of the element to get or set. + /// The item at the specified index. + public T this[int index] + { + get + { + if (index < 0 || index >= count) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return array[index]; + } + set + { + if (index < 0 || index >= count) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + ProtoPreconditions.CheckNotNullUnconstrained(value, nameof(value)); + array[index] = value; + } + } + + #region Explicit interface implementation for IList and ICollection. + bool IList.IsFixedSize => false; + + void ICollection.CopyTo(Array array, int index) => Array.Copy(this.array, 0, array, index, count); + + bool ICollection.IsSynchronized => false; + + object ICollection.SyncRoot => this; + + object IList.this[int index] + { + get => this[index]; + set => this[index] = (T)value; + } + + int IList.Add(object value) + { + Add((T) value); + return count - 1; + } + + bool IList.Contains(object value) => (value is T t && Contains(t)); + + int IList.IndexOf(object value) => (value is T t) ? IndexOf(t) : -1; + + void IList.Insert(int index, object value) => Insert(index, (T) value); + + void IList.Remove(object value) + { + if (value is T t) + { + Remove(t); + } + } + #endregion + + private sealed class RepeatedFieldDebugView + { + private readonly RepeatedField list; + + public RepeatedFieldDebugView(RepeatedField list) + { + this.list = list; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public T[] Items => list.ToArray(); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta new file mode 100644 index 00000000..05b05699 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 55cfb2cd3d75f4e419da148fa0ae66fd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility.meta new file mode 100644 index 00000000..f0b48df8 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 583ff6b853cb72746af3c83c8629a6bb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs new file mode 100644 index 00000000..62fdf70a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs @@ -0,0 +1,104 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +#if !NET5_0_OR_GREATER +// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis +namespace System.Diagnostics.CodeAnalysis +{ + /// + /// Specifies the types of members that are dynamically accessed. + /// + /// This enumeration has a attribute that allows a + /// bitwise combination of its member values. + /// + [Flags] + internal enum DynamicallyAccessedMemberTypes + { + /// + /// Specifies no members. + /// + None = 0, + + /// + /// Specifies the default, parameterless public constructor. + /// + PublicParameterlessConstructor = 0x0001, + + /// + /// Specifies all public constructors. + /// + PublicConstructors = 0x0002 | PublicParameterlessConstructor, + + /// + /// Specifies all non-public constructors. + /// + NonPublicConstructors = 0x0004, + + /// + /// Specifies all public methods. + /// + PublicMethods = 0x0008, + + /// + /// Specifies all non-public methods. + /// + NonPublicMethods = 0x0010, + + /// + /// Specifies all public fields. + /// + PublicFields = 0x0020, + + /// + /// Specifies all non-public fields. + /// + NonPublicFields = 0x0040, + + /// + /// Specifies all public nested types. + /// + PublicNestedTypes = 0x0080, + + /// + /// Specifies all non-public nested types. + /// + NonPublicNestedTypes = 0x0100, + + /// + /// Specifies all public properties. + /// + PublicProperties = 0x0200, + + /// + /// Specifies all non-public properties. + /// + NonPublicProperties = 0x0400, + + /// + /// Specifies all public events. + /// + PublicEvents = 0x0800, + + /// + /// Specifies all non-public events. + /// + NonPublicEvents = 0x1000, + + /// + /// Specifies all interfaces implemented by the type. + /// + Interfaces = 0x2000, + + /// + /// Specifies all members. + /// + All = ~None + } +} +#endif diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta new file mode 100644 index 00000000..ea86d9e0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: de96bce00062d994091bf37244d982b1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs new file mode 100644 index 00000000..81f3dffa --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs @@ -0,0 +1,60 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +#if !NET5_0_OR_GREATER +// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis +namespace System.Diagnostics.CodeAnalysis +{ + /// + /// Indicates that certain members on a specified are accessed dynamically, + /// for example through . + /// + /// + /// This allows tools to understand which members are being accessed during the execution + /// of a program. + /// + /// This attribute is valid on members whose type is or . + /// + /// When this attribute is applied to a location of type , the assumption is + /// that the string represents a fully qualified type name. + /// + /// When this attribute is applied to a class, interface, or struct, the members specified + /// can be accessed dynamically on instances returned from calling + /// on instances of that class, interface, or struct. + /// + /// If the attribute is applied to a method it's treated as a special case and it implies + /// the attribute should be applied to the "this" parameter of the method. As such the attribute + /// should only be used on instance methods of types assignable to System.Type (or string, but no methods + /// will use it there). + /// + [AttributeUsage( + AttributeTargets.Field | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | + AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Method | + AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct, + Inherited = false)] + internal sealed class DynamicallyAccessedMembersAttribute : Attribute + { + /// + /// Initializes a new instance of the class + /// with the specified member types. + /// + /// The types of members dynamically accessed. + public DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes memberTypes) + { + MemberTypes = memberTypes; + } + + /// + /// Gets the which specifies the type + /// of members dynamically accessed. + /// + public DynamicallyAccessedMemberTypes MemberTypes { get; } + } +} +#endif diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta new file mode 100644 index 00000000..e79eb953 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9f420c540cf43774cbea2746e7afaeb2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs new file mode 100644 index 00000000..fcbcc740 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs @@ -0,0 +1,41 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Reflection; + +namespace Google.Protobuf.Compatibility +{ + /// + /// Extension methods for , effectively providing + /// the familiar members from previous desktop framework versions while + /// targeting the newer releases, .NET Core etc. + /// + internal static class PropertyInfoExtensions + { + /// + /// Returns the public getter of a property, or null if there is no such getter + /// (either because it's read-only, or the getter isn't public). + /// + internal static MethodInfo GetGetMethod(this PropertyInfo target) + { + var method = target.GetMethod; + return method != null && method.IsPublic ? method : null; + } + + /// + /// Returns the public setter of a property, or null if there is no such setter + /// (either because it's write-only, or the setter isn't public). + /// + internal static MethodInfo GetSetMethod(this PropertyInfo target) + { + var method = target.SetMethod; + return method != null && method.IsPublic ? method : null; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta new file mode 100644 index 00000000..f46fadcb --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7002cae484f81924ea0a42e4ff99e150 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs new file mode 100644 index 00000000..6a262591 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs @@ -0,0 +1,49 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +#if !NET5_0_OR_GREATER +// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis +namespace System.Diagnostics.CodeAnalysis +{ + /// + /// Indicates that the specified method requires dynamic access to code that is not referenced + /// statically, for example through . + /// + /// + /// This allows tools to understand which methods are unsafe to call when removing unreferenced + /// code from an application. + /// + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)] + internal sealed class RequiresUnreferencedCodeAttribute : Attribute + { + /// + /// Initializes a new instance of the class + /// with the specified message. + /// + /// + /// A message that contains information about the usage of unreferenced code. + /// + public RequiresUnreferencedCodeAttribute(string message) + { + Message = message; + } + + /// + /// Gets a message that contains information about the usage of unreferenced code. + /// + public string Message { get; } + + /// + /// Gets or sets an optional URL that contains more information about the method, + /// why it requires unreferenced code, and what options a consumer has to deal with it. + /// + public string Url { get; set; } + } +} +#endif diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta new file mode 100644 index 00000000..44337b52 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 94243b97ba117154f8bcbaddfe4cac52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs new file mode 100644 index 00000000..98de3401 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs @@ -0,0 +1,90 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; + +namespace Google.Protobuf.Compatibility +{ + /// + /// Provides extension methods on Type that just proxy to TypeInfo. + /// These are used to support the new type system from .NET 4.5, without + /// having calls to GetTypeInfo all over the place. While the methods here are meant to be + /// broadly compatible with the desktop framework, there are some subtle differences in behaviour - but + /// they're not expected to affect our use cases. While the class is internal, that should be fine: we can + /// evaluate each new use appropriately. + /// + internal static class TypeExtensions + { + /// + /// See https://msdn.microsoft.com/en-us/library/system.type.isassignablefrom + /// + internal static bool IsAssignableFrom(this Type target, Type c) + { + return target.GetTypeInfo().IsAssignableFrom(c.GetTypeInfo()); + } + + /// + /// Returns a representation of the public property associated with the given name in the given type, + /// including inherited properties or null if there is no such public property. + /// Here, "public property" means a property where either the getter, or the setter, or both, is public. + /// + [UnconditionalSuppressMessage("Trimming", "IL2072", + Justification = "The BaseType of the target will have all properties because of the annotation.")] + internal static PropertyInfo GetProperty( + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] + this Type target, string name) + { + // GetDeclaredProperty only returns properties declared in the given type, so we need to recurse. + while (target != null) + { + var typeInfo = target.GetTypeInfo(); + var ret = typeInfo.GetDeclaredProperty(name); + if (ret != null && ((ret.CanRead && ret.GetMethod.IsPublic) || (ret.CanWrite && ret.SetMethod.IsPublic))) + { + return ret; + } + target = typeInfo.BaseType; + } + return null; + } + + /// + /// Returns a representation of the public method associated with the given name in the given type, + /// including inherited methods. + /// + /// + /// This has a few differences compared with Type.GetMethod in the desktop framework. It will throw + /// if there is an ambiguous match even between a private method and a public one, but it *won't* throw + /// if there are two overloads at different levels in the type hierarchy (e.g. class Base declares public void Foo(int) and + /// class Child : Base declares public void Foo(long)). + /// + /// One type in the hierarchy declared more than one method with the same name + [UnconditionalSuppressMessage("Trimming", "IL2072", + Justification = "The BaseType of the target will have all properties because of the annotation.")] + internal static MethodInfo GetMethod( + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] + this Type target, string name) + { + // GetDeclaredMethod only returns methods declared in the given type, so we need to recurse. + while (target != null) + { + var typeInfo = target.GetTypeInfo(); + var ret = typeInfo.GetDeclaredMethod(name); + if (ret != null && ret.IsPublic) + { + return ret; + } + target = typeInfo.BaseType; + } + return null; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta new file mode 100644 index 00000000..a2d768b2 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f34d571813f30754dbd5039e75c3e61d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs new file mode 100644 index 00000000..3f58e27f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs @@ -0,0 +1,94 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +#if !NET5_0_OR_GREATER +// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis +namespace System.Diagnostics.CodeAnalysis +{ + /// + /// Suppresses reporting of a specific rule violation, allowing multiple suppressions on a + /// single code artifact. + /// + /// + /// is different than + /// in that it doesn't have a + /// . So it is always preserved in the compiled assembly. + /// + [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)] + internal sealed class UnconditionalSuppressMessageAttribute : Attribute + { + /// + /// Initializes a new instance of the + /// class, specifying the category of the tool and the identifier for an analysis rule. + /// + /// The category for the attribute. + /// The identifier of the analysis rule the attribute applies to. + public UnconditionalSuppressMessageAttribute(string category, string checkId) + { + Category = category; + CheckId = checkId; + } + + /// + /// Gets the category identifying the classification of the attribute. + /// + /// + /// The property describes the tool or tool analysis category + /// for which a message suppression attribute applies. + /// + public string Category { get; } + + /// + /// Gets the identifier of the analysis tool rule to be suppressed. + /// + /// + /// Concatenated together, the and + /// properties form a unique check identifier. + /// + public string CheckId { get; } + + /// + /// Gets or sets the scope of the code that is relevant for the attribute. + /// + /// + /// The Scope property is an optional argument that specifies the metadata scope for which + /// the attribute is relevant. + /// + public string Scope { get; set; } + + /// + /// Gets or sets a fully qualified path that represents the target of the attribute. + /// + /// + /// The property is an optional argument identifying the analysis target + /// of the attribute. An example value is "System.IO.Stream.ctor():System.Void". + /// Because it is fully qualified, it can be long, particularly for targets such as parameters. + /// The analysis tool user interface should be capable of automatically formatting the parameter. + /// + public string Target { get; set; } + + /// + /// Gets or sets an optional argument expanding on exclusion criteria. + /// + /// + /// The property is an optional argument that specifies additional + /// exclusion where the literal metadata target is not sufficiently precise. For example, + /// the cannot be applied within a method, + /// and it may be desirable to suppress a violation against a statement in the method that will + /// give a rule violation, but not against all statements in the method. + /// + public string MessageId { get; set; } + + /// + /// Gets or sets the justification for suppressing the code analysis message. + /// + public string Justification { get; set; } + } +} +#endif diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta new file mode 100644 index 00000000..12dfa788 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: feb4123b3282a414c90d6681fae27237 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler.meta new file mode 100644 index 00000000..7e1893f4 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90b05e59ab60a3c45ac3cd31a020e94d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs new file mode 100644 index 00000000..55d7f2eb --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs @@ -0,0 +1,1683 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/compiler/plugin.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 Google.Protobuf.Compiler { + + /// Holder for reflection information generated from google/protobuf/compiler/plugin.proto + public static partial class PluginReflection { + + #region Descriptor + /// File descriptor for google/protobuf/compiler/plugin.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static PluginReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiVnb29nbGUvcHJvdG9idWYvY29tcGlsZXIvcGx1Z2luLnByb3RvEhhnb29n", + "bGUucHJvdG9idWYuY29tcGlsZXIaIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlw", + "dG9yLnByb3RvIkYKB1ZlcnNpb24SDQoFbWFqb3IYASABKAUSDQoFbWlub3IY", + "AiABKAUSDQoFcGF0Y2gYAyABKAUSDgoGc3VmZml4GAQgASgJIoECChRDb2Rl", + "R2VuZXJhdG9yUmVxdWVzdBIYChBmaWxlX3RvX2dlbmVyYXRlGAEgAygJEhEK", + "CXBhcmFtZXRlchgCIAEoCRI4Cgpwcm90b19maWxlGA8gAygLMiQuZ29vZ2xl", + "LnByb3RvYnVmLkZpbGVEZXNjcmlwdG9yUHJvdG8SRQoXc291cmNlX2ZpbGVf", + "ZGVzY3JpcHRvcnMYESADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2Ny", + "aXB0b3JQcm90bxI7ChBjb21waWxlcl92ZXJzaW9uGAMgASgLMiEuZ29vZ2xl", + "LnByb3RvYnVmLmNvbXBpbGVyLlZlcnNpb24ikgMKFUNvZGVHZW5lcmF0b3JS", + "ZXNwb25zZRINCgVlcnJvchgBIAEoCRIaChJzdXBwb3J0ZWRfZmVhdHVyZXMY", + "AiABKAQSFwoPbWluaW11bV9lZGl0aW9uGAMgASgFEhcKD21heGltdW1fZWRp", + "dGlvbhgEIAEoBRJCCgRmaWxlGA8gAygLMjQuZ29vZ2xlLnByb3RvYnVmLmNv", + "bXBpbGVyLkNvZGVHZW5lcmF0b3JSZXNwb25zZS5GaWxlGn8KBEZpbGUSDAoE", + "bmFtZRgBIAEoCRIXCg9pbnNlcnRpb25fcG9pbnQYAiABKAkSDwoHY29udGVu", + "dBgPIAEoCRI/ChNnZW5lcmF0ZWRfY29kZV9pbmZvGBAgASgLMiIuZ29vZ2xl", + "LnByb3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvIlcKB0ZlYXR1cmUSEAoMRkVB", + "VFVSRV9OT05FEAASGwoXRkVBVFVSRV9QUk9UTzNfT1BUSU9OQUwQARIdChlG", + "RUFUVVJFX1NVUFBPUlRTX0VESVRJT05TEAJCcgocY29tLmdvb2dsZS5wcm90", + "b2J1Zi5jb21waWxlckIMUGx1Z2luUHJvdG9zWilnb29nbGUuZ29sYW5nLm9y", + "Zy9wcm90b2J1Zi90eXBlcy9wbHVnaW5wYqoCGEdvb2dsZS5Qcm90b2J1Zi5D", + "b21waWxlcg==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.Version), global::Google.Protobuf.Compiler.Version.Parser, new[]{ "Major", "Minor", "Patch", "Suffix" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorRequest), global::Google.Protobuf.Compiler.CodeGeneratorRequest.Parser, new[]{ "FileToGenerate", "Parameter", "ProtoFile", "SourceFileDescriptors", "CompilerVersion" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse), global::Google.Protobuf.Compiler.CodeGeneratorResponse.Parser, new[]{ "Error", "SupportedFeatures", "MinimumEdition", "MaximumEdition", "File" }, null, new[]{ typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.Feature) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File), global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File.Parser, new[]{ "Name", "InsertionPoint", "Content", "GeneratedCodeInfo" }, null, null, null, null)}) + })); + } + #endregion + + } + #region Messages + /// + /// The version number of protocol compiler. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Version : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Version()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Compiler.PluginReflection.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 Version() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Version(Version other) : this() { + _hasBits0 = other._hasBits0; + major_ = other.major_; + minor_ = other.minor_; + patch_ = other.patch_; + suffix_ = other.suffix_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Version Clone() { + return new Version(this); + } + + /// Field number for the "major" field. + public const int MajorFieldNumber = 1; + private readonly static int MajorDefaultValue = 0; + + private int major_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Major { + get { if ((_hasBits0 & 1) != 0) { return major_; } else { return MajorDefaultValue; } } + set { + _hasBits0 |= 1; + major_ = value; + } + } + /// Gets whether the "major" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMajor { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "major" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMajor() { + _hasBits0 &= ~1; + } + + /// Field number for the "minor" field. + public const int MinorFieldNumber = 2; + private readonly static int MinorDefaultValue = 0; + + private int minor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Minor { + get { if ((_hasBits0 & 2) != 0) { return minor_; } else { return MinorDefaultValue; } } + set { + _hasBits0 |= 2; + minor_ = value; + } + } + /// Gets whether the "minor" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMinor { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "minor" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMinor() { + _hasBits0 &= ~2; + } + + /// Field number for the "patch" field. + public const int PatchFieldNumber = 3; + private readonly static int PatchDefaultValue = 0; + + private int patch_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Patch { + get { if ((_hasBits0 & 4) != 0) { return patch_; } else { return PatchDefaultValue; } } + set { + _hasBits0 |= 4; + patch_ = value; + } + } + /// Gets whether the "patch" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPatch { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "patch" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPatch() { + _hasBits0 &= ~4; + } + + /// Field number for the "suffix" field. + public const int SuffixFieldNumber = 4; + private readonly static string SuffixDefaultValue = ""; + + private string suffix_; + /// + /// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + /// be empty for mainline stable releases. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Suffix { + get { return suffix_ ?? SuffixDefaultValue; } + set { + suffix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "suffix" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSuffix { + get { return suffix_ != null; } + } + /// Clears the value of the "suffix" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSuffix() { + suffix_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Version); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Version other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Major != other.Major) return false; + if (Minor != other.Minor) return false; + if (Patch != other.Patch) return false; + if (Suffix != other.Suffix) 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 (HasMajor) hash ^= Major.GetHashCode(); + if (HasMinor) hash ^= Minor.GetHashCode(); + if (HasPatch) hash ^= Patch.GetHashCode(); + if (HasSuffix) hash ^= Suffix.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 (HasMajor) { + output.WriteRawTag(8); + output.WriteInt32(Major); + } + if (HasMinor) { + output.WriteRawTag(16); + output.WriteInt32(Minor); + } + if (HasPatch) { + output.WriteRawTag(24); + output.WriteInt32(Patch); + } + if (HasSuffix) { + output.WriteRawTag(34); + output.WriteString(Suffix); + } + 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 (HasMajor) { + output.WriteRawTag(8); + output.WriteInt32(Major); + } + if (HasMinor) { + output.WriteRawTag(16); + output.WriteInt32(Minor); + } + if (HasPatch) { + output.WriteRawTag(24); + output.WriteInt32(Patch); + } + if (HasSuffix) { + output.WriteRawTag(34); + output.WriteString(Suffix); + } + 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 (HasMajor) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Major); + } + if (HasMinor) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minor); + } + if (HasPatch) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Patch); + } + if (HasSuffix) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Suffix); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Version other) { + if (other == null) { + return; + } + if (other.HasMajor) { + Major = other.Major; + } + if (other.HasMinor) { + Minor = other.Minor; + } + if (other.HasPatch) { + Patch = other.Patch; + } + if (other.HasSuffix) { + Suffix = other.Suffix; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Major = input.ReadInt32(); + break; + } + case 16: { + Minor = input.ReadInt32(); + break; + } + case 24: { + Patch = input.ReadInt32(); + break; + } + case 34: { + Suffix = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Major = input.ReadInt32(); + break; + } + case 16: { + Minor = input.ReadInt32(); + break; + } + case 24: { + Patch = input.ReadInt32(); + break; + } + case 34: { + Suffix = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// An encoded CodeGeneratorRequest is written to the plugin's stdin. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CodeGeneratorRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CodeGeneratorRequest()); + 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::Google.Protobuf.Compiler.PluginReflection.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 CodeGeneratorRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CodeGeneratorRequest(CodeGeneratorRequest other) : this() { + fileToGenerate_ = other.fileToGenerate_.Clone(); + parameter_ = other.parameter_; + protoFile_ = other.protoFile_.Clone(); + sourceFileDescriptors_ = other.sourceFileDescriptors_.Clone(); + compilerVersion_ = other.compilerVersion_ != null ? other.compilerVersion_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CodeGeneratorRequest Clone() { + return new CodeGeneratorRequest(this); + } + + /// Field number for the "file_to_generate" field. + public const int FileToGenerateFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_fileToGenerate_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField fileToGenerate_ = new pbc::RepeatedField(); + /// + /// The .proto files that were explicitly listed on the command-line. The + /// code generator should generate code only for these files. Each file's + /// descriptor will be included in proto_file, below. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FileToGenerate { + get { return fileToGenerate_; } + } + + /// Field number for the "parameter" field. + public const int ParameterFieldNumber = 2; + private readonly static string ParameterDefaultValue = ""; + + private string parameter_; + /// + /// The generator parameter passed on the command-line. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parameter { + get { return parameter_ ?? ParameterDefaultValue; } + set { + parameter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "parameter" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasParameter { + get { return parameter_ != null; } + } + /// Clears the value of the "parameter" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearParameter() { + parameter_ = null; + } + + /// Field number for the "proto_file" field. + public const int ProtoFileFieldNumber = 15; + private static readonly pb::FieldCodec _repeated_protoFile_codec + = pb::FieldCodec.ForMessage(122, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser); + private readonly pbc::RepeatedField protoFile_ = new pbc::RepeatedField(); + /// + /// FileDescriptorProtos for all files in files_to_generate and everything + /// they import. The files will appear in topological order, so each file + /// appears before any file that imports it. + /// + /// Note: the files listed in files_to_generate will include runtime-retention + /// options only, but all other files will include source-retention options. + /// The source_file_descriptors field below is available in case you need + /// source-retention options for files_to_generate. + /// + /// protoc guarantees that all proto_files will be written after + /// the fields above, even though this is not technically guaranteed by the + /// protobuf wire format. This theoretically could allow a plugin to stream + /// in the FileDescriptorProtos and handle them one by one rather than read + /// the entire set into memory at once. However, as of this writing, this + /// is not similarly optimized on protoc's end -- it will store all fields in + /// memory at once before sending them to the plugin. + /// + /// Type names of fields and extensions in the FileDescriptorProto are always + /// fully qualified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ProtoFile { + get { return protoFile_; } + } + + /// Field number for the "source_file_descriptors" field. + public const int SourceFileDescriptorsFieldNumber = 17; + private static readonly pb::FieldCodec _repeated_sourceFileDescriptors_codec + = pb::FieldCodec.ForMessage(138, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser); + private readonly pbc::RepeatedField sourceFileDescriptors_ = new pbc::RepeatedField(); + /// + /// File descriptors with all options, including source-retention options. + /// These descriptors are only provided for the files listed in + /// files_to_generate. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SourceFileDescriptors { + get { return sourceFileDescriptors_; } + } + + /// Field number for the "compiler_version" field. + public const int CompilerVersionFieldNumber = 3; + private global::Google.Protobuf.Compiler.Version compilerVersion_; + /// + /// The version number of protocol compiler. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Compiler.Version CompilerVersion { + get { return compilerVersion_; } + set { + compilerVersion_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CodeGeneratorRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CodeGeneratorRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!fileToGenerate_.Equals(other.fileToGenerate_)) return false; + if (Parameter != other.Parameter) return false; + if(!protoFile_.Equals(other.protoFile_)) return false; + if(!sourceFileDescriptors_.Equals(other.sourceFileDescriptors_)) return false; + if (!object.Equals(CompilerVersion, other.CompilerVersion)) 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 ^= fileToGenerate_.GetHashCode(); + if (HasParameter) hash ^= Parameter.GetHashCode(); + hash ^= protoFile_.GetHashCode(); + hash ^= sourceFileDescriptors_.GetHashCode(); + if (compilerVersion_ != null) hash ^= CompilerVersion.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 + fileToGenerate_.WriteTo(output, _repeated_fileToGenerate_codec); + if (HasParameter) { + output.WriteRawTag(18); + output.WriteString(Parameter); + } + if (compilerVersion_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CompilerVersion); + } + protoFile_.WriteTo(output, _repeated_protoFile_codec); + sourceFileDescriptors_.WriteTo(output, _repeated_sourceFileDescriptors_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) { + fileToGenerate_.WriteTo(ref output, _repeated_fileToGenerate_codec); + if (HasParameter) { + output.WriteRawTag(18); + output.WriteString(Parameter); + } + if (compilerVersion_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CompilerVersion); + } + protoFile_.WriteTo(ref output, _repeated_protoFile_codec); + sourceFileDescriptors_.WriteTo(ref output, _repeated_sourceFileDescriptors_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 += fileToGenerate_.CalculateSize(_repeated_fileToGenerate_codec); + if (HasParameter) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parameter); + } + size += protoFile_.CalculateSize(_repeated_protoFile_codec); + size += sourceFileDescriptors_.CalculateSize(_repeated_sourceFileDescriptors_codec); + if (compilerVersion_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CompilerVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CodeGeneratorRequest other) { + if (other == null) { + return; + } + fileToGenerate_.Add(other.fileToGenerate_); + if (other.HasParameter) { + Parameter = other.Parameter; + } + protoFile_.Add(other.protoFile_); + sourceFileDescriptors_.Add(other.sourceFileDescriptors_); + if (other.compilerVersion_ != null) { + if (compilerVersion_ == null) { + CompilerVersion = new global::Google.Protobuf.Compiler.Version(); + } + CompilerVersion.MergeFrom(other.CompilerVersion); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + fileToGenerate_.AddEntriesFrom(input, _repeated_fileToGenerate_codec); + break; + } + case 18: { + Parameter = input.ReadString(); + break; + } + case 26: { + if (compilerVersion_ == null) { + CompilerVersion = new global::Google.Protobuf.Compiler.Version(); + } + input.ReadMessage(CompilerVersion); + break; + } + case 122: { + protoFile_.AddEntriesFrom(input, _repeated_protoFile_codec); + break; + } + case 138: { + sourceFileDescriptors_.AddEntriesFrom(input, _repeated_sourceFileDescriptors_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + fileToGenerate_.AddEntriesFrom(ref input, _repeated_fileToGenerate_codec); + break; + } + case 18: { + Parameter = input.ReadString(); + break; + } + case 26: { + if (compilerVersion_ == null) { + CompilerVersion = new global::Google.Protobuf.Compiler.Version(); + } + input.ReadMessage(CompilerVersion); + break; + } + case 122: { + protoFile_.AddEntriesFrom(ref input, _repeated_protoFile_codec); + break; + } + case 138: { + sourceFileDescriptors_.AddEntriesFrom(ref input, _repeated_sourceFileDescriptors_codec); + break; + } + } + } + } + #endif + + } + + /// + /// The plugin writes an encoded CodeGeneratorResponse to stdout. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CodeGeneratorResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CodeGeneratorResponse()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Compiler.PluginReflection.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 CodeGeneratorResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CodeGeneratorResponse(CodeGeneratorResponse other) : this() { + _hasBits0 = other._hasBits0; + error_ = other.error_; + supportedFeatures_ = other.supportedFeatures_; + minimumEdition_ = other.minimumEdition_; + maximumEdition_ = other.maximumEdition_; + file_ = other.file_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CodeGeneratorResponse Clone() { + return new CodeGeneratorResponse(this); + } + + /// Field number for the "error" field. + public const int ErrorFieldNumber = 1; + private readonly static string ErrorDefaultValue = ""; + + private string error_; + /// + /// Error message. If non-empty, code generation failed. The plugin process + /// should exit with status code zero even if it reports an error in this way. + /// + /// This should be used to indicate errors in .proto files which prevent the + /// code generator from generating correct code. Errors which indicate a + /// problem in protoc itself -- such as the input CodeGeneratorRequest being + /// unparseable -- should be reported by writing a message to stderr and + /// exiting with a non-zero status code. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Error { + get { return error_ ?? ErrorDefaultValue; } + set { + error_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "error" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasError { + get { return error_ != null; } + } + /// Clears the value of the "error" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearError() { + error_ = null; + } + + /// Field number for the "supported_features" field. + public const int SupportedFeaturesFieldNumber = 2; + private readonly static ulong SupportedFeaturesDefaultValue = 0UL; + + private ulong supportedFeatures_; + /// + /// A bitmask of supported features that the code generator supports. + /// This is a bitwise "or" of values from the Feature enum. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SupportedFeatures { + get { if ((_hasBits0 & 1) != 0) { return supportedFeatures_; } else { return SupportedFeaturesDefaultValue; } } + set { + _hasBits0 |= 1; + supportedFeatures_ = value; + } + } + /// Gets whether the "supported_features" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSupportedFeatures { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "supported_features" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSupportedFeatures() { + _hasBits0 &= ~1; + } + + /// Field number for the "minimum_edition" field. + public const int MinimumEditionFieldNumber = 3; + private readonly static int MinimumEditionDefaultValue = 0; + + private int minimumEdition_; + /// + /// The minimum edition this plugin supports. This will be treated as an + /// Edition enum, but we want to allow unknown values. It should be specified + /// according the edition enum value, *not* the edition number. Only takes + /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MinimumEdition { + get { if ((_hasBits0 & 2) != 0) { return minimumEdition_; } else { return MinimumEditionDefaultValue; } } + set { + _hasBits0 |= 2; + minimumEdition_ = value; + } + } + /// Gets whether the "minimum_edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMinimumEdition { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "minimum_edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMinimumEdition() { + _hasBits0 &= ~2; + } + + /// Field number for the "maximum_edition" field. + public const int MaximumEditionFieldNumber = 4; + private readonly static int MaximumEditionDefaultValue = 0; + + private int maximumEdition_; + /// + /// The maximum edition this plugin supports. This will be treated as an + /// Edition enum, but we want to allow unknown values. It should be specified + /// according the edition enum value, *not* the edition number. Only takes + /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaximumEdition { + get { if ((_hasBits0 & 4) != 0) { return maximumEdition_; } else { return MaximumEditionDefaultValue; } } + set { + _hasBits0 |= 4; + maximumEdition_ = value; + } + } + /// Gets whether the "maximum_edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMaximumEdition { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "maximum_edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMaximumEdition() { + _hasBits0 &= ~4; + } + + /// Field number for the "file" field. + public const int FileFieldNumber = 15; + private static readonly pb::FieldCodec _repeated_file_codec + = pb::FieldCodec.ForMessage(122, global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File.Parser); + private readonly pbc::RepeatedField file_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField File { + get { return file_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CodeGeneratorResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CodeGeneratorResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Error != other.Error) return false; + if (SupportedFeatures != other.SupportedFeatures) return false; + if (MinimumEdition != other.MinimumEdition) return false; + if (MaximumEdition != other.MaximumEdition) return false; + if(!file_.Equals(other.file_)) 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 (HasError) hash ^= Error.GetHashCode(); + if (HasSupportedFeatures) hash ^= SupportedFeatures.GetHashCode(); + if (HasMinimumEdition) hash ^= MinimumEdition.GetHashCode(); + if (HasMaximumEdition) hash ^= MaximumEdition.GetHashCode(); + hash ^= file_.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 (HasError) { + output.WriteRawTag(10); + output.WriteString(Error); + } + if (HasSupportedFeatures) { + output.WriteRawTag(16); + output.WriteUInt64(SupportedFeatures); + } + if (HasMinimumEdition) { + output.WriteRawTag(24); + output.WriteInt32(MinimumEdition); + } + if (HasMaximumEdition) { + output.WriteRawTag(32); + output.WriteInt32(MaximumEdition); + } + file_.WriteTo(output, _repeated_file_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 (HasError) { + output.WriteRawTag(10); + output.WriteString(Error); + } + if (HasSupportedFeatures) { + output.WriteRawTag(16); + output.WriteUInt64(SupportedFeatures); + } + if (HasMinimumEdition) { + output.WriteRawTag(24); + output.WriteInt32(MinimumEdition); + } + if (HasMaximumEdition) { + output.WriteRawTag(32); + output.WriteInt32(MaximumEdition); + } + file_.WriteTo(ref output, _repeated_file_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 (HasError) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Error); + } + if (HasSupportedFeatures) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SupportedFeatures); + } + if (HasMinimumEdition) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinimumEdition); + } + if (HasMaximumEdition) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaximumEdition); + } + size += file_.CalculateSize(_repeated_file_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CodeGeneratorResponse other) { + if (other == null) { + return; + } + if (other.HasError) { + Error = other.Error; + } + if (other.HasSupportedFeatures) { + SupportedFeatures = other.SupportedFeatures; + } + if (other.HasMinimumEdition) { + MinimumEdition = other.MinimumEdition; + } + if (other.HasMaximumEdition) { + MaximumEdition = other.MaximumEdition; + } + file_.Add(other.file_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Error = input.ReadString(); + break; + } + case 16: { + SupportedFeatures = input.ReadUInt64(); + break; + } + case 24: { + MinimumEdition = input.ReadInt32(); + break; + } + case 32: { + MaximumEdition = input.ReadInt32(); + break; + } + case 122: { + file_.AddEntriesFrom(input, _repeated_file_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Error = input.ReadString(); + break; + } + case 16: { + SupportedFeatures = input.ReadUInt64(); + break; + } + case 24: { + MinimumEdition = input.ReadInt32(); + break; + } + case 32: { + MaximumEdition = input.ReadInt32(); + break; + } + case 122: { + file_.AddEntriesFrom(ref input, _repeated_file_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CodeGeneratorResponse message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Sync with code_generator.h. + /// + public enum Feature { + [pbr::OriginalName("FEATURE_NONE")] None = 0, + [pbr::OriginalName("FEATURE_PROTO3_OPTIONAL")] Proto3Optional = 1, + [pbr::OriginalName("FEATURE_SUPPORTS_EDITIONS")] SupportsEditions = 2, + } + + /// + /// Represents a single generated file. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class File : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new File()); + 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::Google.Protobuf.Compiler.CodeGeneratorResponse.Descriptor.NestedTypes[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 File() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public File(File other) : this() { + name_ = other.name_; + insertionPoint_ = other.insertionPoint_; + content_ = other.content_; + generatedCodeInfo_ = other.generatedCodeInfo_ != null ? other.generatedCodeInfo_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public File Clone() { + return new File(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + /// + /// The file name, relative to the output directory. The name must not + /// contain "." or ".." components and must be relative, not be absolute (so, + /// the file cannot lie outside the output directory). "/" must be used as + /// the path separator, not "\". + /// + /// If the name is omitted, the content will be appended to the previous + /// file. This allows the generator to break large files into small chunks, + /// and allows the generated text to be streamed back to protoc so that large + /// files need not reside completely in memory at one time. Note that as of + /// this writing protoc does not optimize for this -- it will read the entire + /// CodeGeneratorResponse before writing files to disk. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "insertion_point" field. + public const int InsertionPointFieldNumber = 2; + private readonly static string InsertionPointDefaultValue = ""; + + private string insertionPoint_; + /// + /// If non-empty, indicates that the named file should already exist, and the + /// content here is to be inserted into that file at a defined insertion + /// point. This feature allows a code generator to extend the output + /// produced by another code generator. The original generator may provide + /// insertion points by placing special annotations in the file that look + /// like: + /// @@protoc_insertion_point(NAME) + /// The annotation can have arbitrary text before and after it on the line, + /// which allows it to be placed in a comment. NAME should be replaced with + /// an identifier naming the point -- this is what other generators will use + /// as the insertion_point. Code inserted at this point will be placed + /// immediately above the line containing the insertion point (thus multiple + /// insertions to the same point will come out in the order they were added). + /// The double-@ is intended to make it unlikely that the generated code + /// could contain things that look like insertion points by accident. + /// + /// For example, the C++ code generator places the following line in the + /// .pb.h files that it generates: + /// // @@protoc_insertion_point(namespace_scope) + /// This line appears within the scope of the file's package namespace, but + /// outside of any particular class. Another plugin can then specify the + /// insertion_point "namespace_scope" to generate additional classes or + /// other declarations that should be placed in this scope. + /// + /// Note that if the line containing the insertion point begins with + /// whitespace, the same whitespace will be added to every line of the + /// inserted text. This is useful for languages like Python, where + /// indentation matters. In these languages, the insertion point comment + /// should be indented the same amount as any inserted code will need to be + /// in order to work correctly in that context. + /// + /// The code generator that generates the initial file and the one which + /// inserts into it must both run as part of a single invocation of protoc. + /// Code generators are executed in the order in which they appear on the + /// command line. + /// + /// If |insertion_point| is present, |name| must also be present. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InsertionPoint { + get { return insertionPoint_ ?? InsertionPointDefaultValue; } + set { + insertionPoint_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "insertion_point" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasInsertionPoint { + get { return insertionPoint_ != null; } + } + /// Clears the value of the "insertion_point" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInsertionPoint() { + insertionPoint_ = null; + } + + /// Field number for the "content" field. + public const int ContentFieldNumber = 15; + private readonly static string ContentDefaultValue = ""; + + private string content_; + /// + /// The file contents. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Content { + get { return content_ ?? ContentDefaultValue; } + set { + content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "content" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasContent { + get { return content_ != null; } + } + /// Clears the value of the "content" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearContent() { + content_ = null; + } + + /// Field number for the "generated_code_info" field. + public const int GeneratedCodeInfoFieldNumber = 16; + private global::Google.Protobuf.Reflection.GeneratedCodeInfo generatedCodeInfo_; + /// + /// Information describing the file content being inserted. If an insertion + /// point is used, this information will be appropriately offset and inserted + /// into the code generation metadata for the generated files. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.GeneratedCodeInfo GeneratedCodeInfo { + get { return generatedCodeInfo_; } + set { + generatedCodeInfo_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as File); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(File other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (InsertionPoint != other.InsertionPoint) return false; + if (Content != other.Content) return false; + if (!object.Equals(GeneratedCodeInfo, other.GeneratedCodeInfo)) 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 (HasName) hash ^= Name.GetHashCode(); + if (HasInsertionPoint) hash ^= InsertionPoint.GetHashCode(); + if (HasContent) hash ^= Content.GetHashCode(); + if (generatedCodeInfo_ != null) hash ^= GeneratedCodeInfo.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasInsertionPoint) { + output.WriteRawTag(18); + output.WriteString(InsertionPoint); + } + if (HasContent) { + output.WriteRawTag(122); + output.WriteString(Content); + } + if (generatedCodeInfo_ != null) { + output.WriteRawTag(130, 1); + output.WriteMessage(GeneratedCodeInfo); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasInsertionPoint) { + output.WriteRawTag(18); + output.WriteString(InsertionPoint); + } + if (HasContent) { + output.WriteRawTag(122); + output.WriteString(Content); + } + if (generatedCodeInfo_ != null) { + output.WriteRawTag(130, 1); + output.WriteMessage(GeneratedCodeInfo); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (HasInsertionPoint) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InsertionPoint); + } + if (HasContent) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Content); + } + if (generatedCodeInfo_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(GeneratedCodeInfo); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(File other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + if (other.HasInsertionPoint) { + InsertionPoint = other.InsertionPoint; + } + if (other.HasContent) { + Content = other.Content; + } + if (other.generatedCodeInfo_ != null) { + if (generatedCodeInfo_ == null) { + GeneratedCodeInfo = new global::Google.Protobuf.Reflection.GeneratedCodeInfo(); + } + GeneratedCodeInfo.MergeFrom(other.GeneratedCodeInfo); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + InsertionPoint = input.ReadString(); + break; + } + case 122: { + Content = input.ReadString(); + break; + } + case 130: { + if (generatedCodeInfo_ == null) { + GeneratedCodeInfo = new global::Google.Protobuf.Reflection.GeneratedCodeInfo(); + } + input.ReadMessage(GeneratedCodeInfo); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + InsertionPoint = input.ReadString(); + break; + } + case 122: { + Content = input.ReadString(); + break; + } + case 130: { + if (generatedCodeInfo_ == null) { + GeneratedCodeInfo = new global::Google.Protobuf.Reflection.GeneratedCodeInfo(); + } + input.ReadMessage(GeneratedCodeInfo); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta new file mode 100644 index 00000000..be8a3aff --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4a3c61a5c6e34a04eb99c780ac05b978 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs new file mode 100644 index 00000000..31522a93 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs @@ -0,0 +1,96 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf +{ + /// + /// Represents a non-generic extension definition. This API is experimental and subject to change. + /// + public abstract class Extension + { + internal abstract Type TargetType { get; } + + /// + /// Internal use. Creates a new extension with the specified field number. + /// + protected Extension(int fieldNumber) + { + FieldNumber = fieldNumber; + } + + internal abstract IExtensionValue CreateValue(); + + /// + /// Gets the field number of this extension + /// + public int FieldNumber { get; } + + internal abstract bool IsRepeated { get; } + } + + /// + /// Represents a type-safe extension identifier used for getting and setting single extension values in instances. + /// This API is experimental and subject to change. + /// + /// The message type this field applies to + /// The field value type of this extension + public sealed class Extension : Extension where TTarget : IExtendableMessage + { + private readonly FieldCodec codec; + + /// + /// Creates a new extension identifier with the specified field number and codec + /// + public Extension(int fieldNumber, FieldCodec codec) : base(fieldNumber) + { + this.codec = codec; + } + + internal TValue DefaultValue => codec != null ? codec.DefaultValue : default; + + internal override Type TargetType => typeof(TTarget); + + internal override bool IsRepeated => false; + + internal override IExtensionValue CreateValue() + { + return new ExtensionValue(codec); + } + } + + /// + /// Represents a type-safe extension identifier used for getting repeated extension values in instances. + /// This API is experimental and subject to change. + /// + /// The message type this field applies to + /// The repeated field value type of this extension + public sealed class RepeatedExtension : Extension where TTarget : IExtendableMessage + { + private readonly FieldCodec codec; + + /// + /// Creates a new repeated extension identifier with the specified field number and codec + /// + public RepeatedExtension(int fieldNumber, FieldCodec codec) : base(fieldNumber) + { + this.codec = codec; + } + + internal override Type TargetType => typeof(TTarget); + + internal override bool IsRepeated => true; + + internal override IExtensionValue CreateValue() + { + return new RepeatedExtensionValue(codec); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs.meta new file mode 100644 index 00000000..89241975 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Extension.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0f4f2e1ac71991488403d126ab9954f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs new file mode 100644 index 00000000..9c02c2e3 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs @@ -0,0 +1,161 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Google.Protobuf +{ + /// + /// Provides extensions to messages while parsing. This API is experimental and subject to change. + /// + public sealed class ExtensionRegistry : ICollection, IDeepCloneable + { + internal sealed class ExtensionComparer : IEqualityComparer + { + public bool Equals(Extension a, Extension b) + { + return new ObjectIntPair(a.TargetType, a.FieldNumber).Equals(new ObjectIntPair(b.TargetType, b.FieldNumber)); + } + public int GetHashCode(Extension a) + { + return new ObjectIntPair(a.TargetType, a.FieldNumber).GetHashCode(); + } + + internal static ExtensionComparer Instance = new ExtensionComparer(); + } + private readonly IDictionary, Extension> extensions; + + /// + /// Creates a new empty extension registry + /// + public ExtensionRegistry() + { + extensions = new Dictionary, Extension>(); + } + + private ExtensionRegistry(IDictionary, Extension> collection) + { + extensions = collection.ToDictionary(k => k.Key, v => v.Value); + } + + /// + /// Gets the total number of extensions in this extension registry + /// + public int Count => extensions.Count; + + /// + /// Returns whether the registry is readonly + /// + bool ICollection.IsReadOnly => false; + + internal bool ContainsInputField(uint lastTag, Type target, out Extension extension) + { + return extensions.TryGetValue(new ObjectIntPair(target, WireFormat.GetTagFieldNumber(lastTag)), out extension); + } + + /// + /// Adds the specified extension to the registry + /// + public void Add(Extension extension) + { + ProtoPreconditions.CheckNotNull(extension, nameof(extension)); + + extensions.Add(new ObjectIntPair(extension.TargetType, extension.FieldNumber), extension); + } + + /// + /// Adds the specified extensions to the registry + /// + public void AddRange(IEnumerable extensions) + { + ProtoPreconditions.CheckNotNull(extensions, nameof(extensions)); + + foreach (var extension in extensions) + { + Add(extension); + } + } + + /// + /// Clears the registry of all values + /// + public void Clear() + { + extensions.Clear(); + } + + /// + /// Gets whether the extension registry contains the specified extension + /// + public bool Contains(Extension item) + { + ProtoPreconditions.CheckNotNull(item, nameof(item)); + + return extensions.ContainsKey(new ObjectIntPair(item.TargetType, item.FieldNumber)); + } + + /// + /// Copies the arrays in the registry set to the specified array at the specified index + /// + /// The array to copy to + /// The array index to start at + void ICollection.CopyTo(Extension[] array, int arrayIndex) + { + ProtoPreconditions.CheckNotNull(array, nameof(array)); + if (arrayIndex < 0 || arrayIndex >= array.Length) + { + throw new ArgumentOutOfRangeException(nameof(arrayIndex)); + } + if (array.Length - arrayIndex < Count) + { + throw new ArgumentException("The provided array is shorter than the number of elements in the registry"); + } + + for (int i = 0; i < array.Length; i++) + { + Extension extension = array[i]; + extensions.Add(new ObjectIntPair(extension.TargetType, extension.FieldNumber), extension); + } + } + + /// + /// Returns an enumerator to enumerate through the items in the registry + /// + /// Returns an enumerator for the extensions in this registry + public IEnumerator GetEnumerator() + { + return extensions.Values.GetEnumerator(); + } + + /// + /// Removes the specified extension from the set + /// + /// The extension + /// true if the extension was removed, otherwise false + public bool Remove(Extension item) + { + ProtoPreconditions.CheckNotNull(item, nameof(item)); + + return extensions.Remove(new ObjectIntPair(item.TargetType, item.FieldNumber)); + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + /// + /// Clones the registry into a new registry + /// + public ExtensionRegistry Clone() + { + return new ExtensionRegistry(extensions); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta new file mode 100644 index 00000000..257a1af6 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef4f85bd14338fd4cbaf283ca0f4a48e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs new file mode 100644 index 00000000..aaae121f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs @@ -0,0 +1,398 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Methods for managing s with null checking. + /// + /// Most users will not use this class directly and its API is experimental and subject to change. + /// + public static class ExtensionSet + { + private static bool TryGetValue(ref ExtensionSet set, Extension extension, out IExtensionValue value) where TTarget : IExtendableMessage + { + if (set == null) + { + value = null; + return false; + } + return set.ValuesByNumber.TryGetValue(extension.FieldNumber, out value); + } + + /// + /// Gets the value of the specified extension + /// + public static TValue Get(ref ExtensionSet set, Extension extension) where TTarget : IExtendableMessage + { + if (TryGetValue(ref set, extension, out IExtensionValue value)) + { + // The stored ExtensionValue can be a different type to what is being requested. + // This happens when the same extension proto is compiled in different assemblies. + // To allow consuming assemblies to still get the value when the TValue type is + // different, this get method: + // 1. Attempts to cast the value to the expected ExtensionValue. + // This is the usual case. It is used first because it avoids possibly boxing the value. + // 2. Fallback to get the value as object from IExtensionValue then casting. + // This allows for someone to specify a TValue of object. They can then convert + // the values to bytes and reparse using expected value. + // 3. If neither of these work, throw a user friendly error that the types aren't compatible. + if (value is ExtensionValue extensionValue) + { + return extensionValue.GetValue(); + } + else if (value.GetValue() is TValue underlyingValue) + { + return underlyingValue; + } + else + { + var valueType = value.GetType().GetTypeInfo(); + if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(ExtensionValue<>)) + { + var storedType = valueType.GenericTypeArguments[0]; + throw new InvalidOperationException( + "The stored extension value has a type of '" + storedType.AssemblyQualifiedName + "'. " + + "This a different from the requested type of '" + typeof(TValue).AssemblyQualifiedName + "'."); + } + else + { + throw new InvalidOperationException("Unexpected extension value type: " + valueType.AssemblyQualifiedName); + } + } + } + else + { + return extension.DefaultValue; + } + } + + /// + /// Gets the value of the specified repeated extension or null if it doesn't exist in this set + /// + public static RepeatedField Get(ref ExtensionSet set, RepeatedExtension extension) where TTarget : IExtendableMessage + { + if (TryGetValue(ref set, extension, out IExtensionValue value)) + { + if (value is RepeatedExtensionValue extensionValue) + { + return extensionValue.GetValue(); + } + else + { + var valueType = value.GetType().GetTypeInfo(); + if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(RepeatedExtensionValue<>)) + { + var storedType = valueType.GenericTypeArguments[0]; + throw new InvalidOperationException( + "The stored extension value has a type of '" + storedType.AssemblyQualifiedName + "'. " + + "This a different from the requested type of '" + typeof(TValue).AssemblyQualifiedName + "'."); + } + else + { + throw new InvalidOperationException("Unexpected extension value type: " + valueType.AssemblyQualifiedName); + } + } + } + else + { + return null; + } + } + + /// + /// Gets the value of the specified repeated extension, registering it if it doesn't exist + /// + public static RepeatedField GetOrInitialize(ref ExtensionSet set, RepeatedExtension extension) where TTarget : IExtendableMessage + { + IExtensionValue value; + if (set == null) + { + value = extension.CreateValue(); + set = new ExtensionSet(); + set.ValuesByNumber.Add(extension.FieldNumber, value); + } + else + { + if (!set.ValuesByNumber.TryGetValue(extension.FieldNumber, out value)) + { + value = extension.CreateValue(); + set.ValuesByNumber.Add(extension.FieldNumber, value); + } + } + + return ((RepeatedExtensionValue)value).GetValue(); + } + + /// + /// Sets the value of the specified extension. This will make a new instance of ExtensionSet if the set is null. + /// + public static void Set(ref ExtensionSet set, Extension extension, TValue value) where TTarget : IExtendableMessage + { + ProtoPreconditions.CheckNotNullUnconstrained(value, nameof(value)); + + IExtensionValue extensionValue; + if (set == null) + { + extensionValue = extension.CreateValue(); + set = new ExtensionSet(); + set.ValuesByNumber.Add(extension.FieldNumber, extensionValue); + } + else + { + if (!set.ValuesByNumber.TryGetValue(extension.FieldNumber, out extensionValue)) + { + extensionValue = extension.CreateValue(); + set.ValuesByNumber.Add(extension.FieldNumber, extensionValue); + } + } + + ((ExtensionValue)extensionValue).SetValue(value); + } + + /// + /// Gets whether the value of the specified extension is set + /// + public static bool Has(ref ExtensionSet set, Extension extension) where TTarget : IExtendableMessage + { + return TryGetValue(ref set, extension, out IExtensionValue _); + } + + /// + /// Clears the value of the specified extension + /// + public static void Clear(ref ExtensionSet set, Extension extension) where TTarget : IExtendableMessage + { + if (set == null) + { + return; + } + set.ValuesByNumber.Remove(extension.FieldNumber); + if (set.ValuesByNumber.Count == 0) + { + set = null; + } + } + + /// + /// Clears the value of the specified extension + /// + public static void Clear(ref ExtensionSet set, RepeatedExtension extension) where TTarget : IExtendableMessage + { + if (set == null) + { + return; + } + set.ValuesByNumber.Remove(extension.FieldNumber); + if (set.ValuesByNumber.Count == 0) + { + set = null; + } + } + + /// + /// Tries to merge a field from the coded input, returning true if the field was merged. + /// If the set is null or the field was not otherwise merged, this returns false. + /// + public static bool TryMergeFieldFrom(ref ExtensionSet set, CodedInputStream stream) where TTarget : IExtendableMessage + { + ParseContext.Initialize(stream, out ParseContext ctx); + try + { + return TryMergeFieldFrom(ref set, ref ctx); + } + finally + { + ctx.CopyStateTo(stream); + } + } + + /// + /// Tries to merge a field from the coded input, returning true if the field was merged. + /// If the set is null or the field was not otherwise merged, this returns false. + /// + public static bool TryMergeFieldFrom(ref ExtensionSet set, ref ParseContext ctx) where TTarget : IExtendableMessage + { + int lastFieldNumber = WireFormat.GetTagFieldNumber(ctx.LastTag); + + if (set != null && set.ValuesByNumber.TryGetValue(lastFieldNumber, out IExtensionValue extensionValue)) + { + extensionValue.MergeFrom(ref ctx); + return true; + } + else if (ctx.ExtensionRegistry != null && ctx.ExtensionRegistry.ContainsInputField(ctx.LastTag, typeof(TTarget), out Extension extension)) + { + IExtensionValue value = extension.CreateValue(); + value.MergeFrom(ref ctx); + set ??= new ExtensionSet(); + set.ValuesByNumber.Add(extension.FieldNumber, value); + return true; + } + else + { + return false; + } + } + + /// + /// Merges the second set into the first set, creating a new instance if first is null + /// + public static void MergeFrom(ref ExtensionSet first, ExtensionSet second) where TTarget : IExtendableMessage + { + if (second == null) + { + return; + } + if (first == null) + { + first = new ExtensionSet(); + } + foreach (var pair in second.ValuesByNumber) + { + if (first.ValuesByNumber.TryGetValue(pair.Key, out IExtensionValue value)) + { + value.MergeFrom(pair.Value); + } + else + { + var cloned = pair.Value.Clone(); + first.ValuesByNumber[pair.Key] = cloned; + } + } + } + + /// + /// Clones the set into a new set. If the set is null, this returns null + /// + public static ExtensionSet Clone(ExtensionSet set) where TTarget : IExtendableMessage + { + if (set == null) + { + return null; + } + + var newSet = new ExtensionSet(); + foreach (var pair in set.ValuesByNumber) + { + var cloned = pair.Value.Clone(); + newSet.ValuesByNumber[pair.Key] = cloned; + } + return newSet; + } + } + + /// + /// Used for keeping track of extensions in messages. + /// methods route to this set. + /// + /// Most users will not need to use this class directly + /// + /// The message type that extensions in this set target + public sealed class ExtensionSet where TTarget : IExtendableMessage + { + internal Dictionary ValuesByNumber { get; } = new Dictionary(); + + /// + /// Gets a hash code of the set + /// + public override int GetHashCode() + { + int ret = typeof(TTarget).GetHashCode(); + foreach (KeyValuePair field in ValuesByNumber) + { + // Use ^ here to make the field order irrelevant. + int hash = field.Key.GetHashCode() ^ field.Value.GetHashCode(); + ret ^= hash; + } + return ret; + } + + /// + /// Returns whether this set is equal to the other object + /// + public override bool Equals(object other) + { + if (ReferenceEquals(this, other)) + { + return true; + } + ExtensionSet otherSet = other as ExtensionSet; + if (ValuesByNumber.Count != otherSet.ValuesByNumber.Count) + { + return false; + } + foreach (var pair in ValuesByNumber) + { + if (!otherSet.ValuesByNumber.TryGetValue(pair.Key, out IExtensionValue secondValue)) + { + return false; + } + if (!pair.Value.Equals(secondValue)) + { + return false; + } + } + return true; + } + + /// + /// Calculates the size of this extension set + /// + public int CalculateSize() + { + int size = 0; + foreach (var value in ValuesByNumber.Values) + { + size += value.CalculateSize(); + } + return size; + } + + /// + /// Writes the extension values in this set to the output stream + /// + public void WriteTo(CodedOutputStream stream) + { + + WriteContext.Initialize(stream, out WriteContext ctx); + try + { + WriteTo(ref ctx); + } + finally + { + ctx.CopyStateTo(stream); + } + } + + /// + /// Writes the extension values in this set to the write context + /// + [SecuritySafeCritical] + public void WriteTo(ref WriteContext ctx) + { + foreach (var value in ValuesByNumber.Values) + { + value.WriteTo(ref ctx); + } + } + + internal bool IsInitialized() + { + return ValuesByNumber.Values.All(v => v.IsInitialized()); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs.meta new file mode 100644 index 00000000..d68c846f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 33d0f348de0f5e04092d3d0661a60e2a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs new file mode 100644 index 00000000..8e39747b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs @@ -0,0 +1,206 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; + +namespace Google.Protobuf +{ + internal interface IExtensionValue : IEquatable, IDeepCloneable + { + void MergeFrom(ref ParseContext ctx); + + void MergeFrom(IExtensionValue value); + void WriteTo(ref WriteContext ctx); + int CalculateSize(); + bool IsInitialized(); + object GetValue(); + } + + internal sealed class ExtensionValue : IExtensionValue + { + private T field; + private readonly FieldCodec codec; + + internal ExtensionValue(FieldCodec codec) + { + this.codec = codec; + field = codec.DefaultValue; + } + + public int CalculateSize() + { + return codec.CalculateUnconditionalSizeWithTag(field); + } + + public IExtensionValue Clone() + { + return new ExtensionValue(codec) + { + field = field is IDeepCloneable ? (field as IDeepCloneable).Clone() : field + }; + } + + public bool Equals(IExtensionValue other) + { + if (ReferenceEquals(this, other)) + return true; + + return other is ExtensionValue + && codec.Equals((other as ExtensionValue).codec) + && Equals(field, (other as ExtensionValue).field); + // we check for equality in the codec since we could have equal field values however the values could be written in different ways + } + + public override int GetHashCode() + { + unchecked + { + int hash = 17; + hash = hash * 31 + field.GetHashCode(); + hash = hash * 31 + codec.GetHashCode(); + return hash; + } + } + + public void MergeFrom(ref ParseContext ctx) + { + codec.ValueMerger(ref ctx, ref field); + } + + public void MergeFrom(IExtensionValue value) + { + if (value is ExtensionValue) + { + var extensionValue = value as ExtensionValue; + codec.FieldMerger(ref field, extensionValue.field); + } + } + + public void WriteTo(ref WriteContext ctx) + { + ctx.WriteTag(codec.Tag); + codec.ValueWriter(ref ctx, field); + if (codec.EndTag != 0) + { + ctx.WriteTag(codec.EndTag); + } + } + + public T GetValue() => field; + + object IExtensionValue.GetValue() => field; + + public void SetValue(T value) + { + field = value; + } + + public bool IsInitialized() + { + if (field is IMessage) + { + return (field as IMessage).IsInitialized(); + } + else + { + return true; + } + } + } + + internal sealed class RepeatedExtensionValue : IExtensionValue + { + private RepeatedField field; + private readonly FieldCodec codec; + + internal RepeatedExtensionValue(FieldCodec codec) + { + this.codec = codec; + field = new RepeatedField(); + } + + public int CalculateSize() + { + return field.CalculateSize(codec); + } + + public IExtensionValue Clone() + { + return new RepeatedExtensionValue(codec) + { + field = field.Clone() + }; + } + + public bool Equals(IExtensionValue other) + { + if (ReferenceEquals(this, other)) + return true; + + return other is RepeatedExtensionValue + && field.Equals((other as RepeatedExtensionValue).field) + && codec.Equals((other as RepeatedExtensionValue).codec); + } + + public override int GetHashCode() + { + unchecked + { + int hash = 17; + hash = hash * 31 + field.GetHashCode(); + hash = hash * 31 + codec.GetHashCode(); + return hash; + } + } + + public void MergeFrom(ref ParseContext ctx) + { + field.AddEntriesFrom(ref ctx, codec); + } + + public void MergeFrom(IExtensionValue value) + { + if (value is RepeatedExtensionValue) + { + field.Add((value as RepeatedExtensionValue).field); + } + } + + public void WriteTo(ref WriteContext ctx) + { + field.WriteTo(ref ctx, codec); + } + + public RepeatedField GetValue() => field; + + object IExtensionValue.GetValue() => field; + + public bool IsInitialized() + { + for (int i = 0; i < field.Count; i++) + { + var element = field[i]; + if (element is IMessage) + { + if (!(element as IMessage).IsInitialized()) + { + return false; + } + } + else + { + break; + } + } + + return true; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs.meta new file mode 100644 index 00000000..d5352cae --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ExtensionValue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c7e3e0891dbb4ef4795fd30b9ae20e20 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs new file mode 100644 index 00000000..165734df --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs @@ -0,0 +1,814 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using Google.Protobuf.WellKnownTypes; +using System; +using System.Collections.Generic; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Factory methods for . + /// + public static class FieldCodec + { + // TODO: Avoid the "dual hit" of lambda expressions: create open delegates instead. (At least test...) + + /// + /// Retrieves a codec suitable for a string field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForString(uint tag) => ForString(tag, ""); + + /// + /// Retrieves a codec suitable for a bytes field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForBytes(uint tag) => ForBytes(tag, ByteString.Empty); + + /// + /// Retrieves a codec suitable for a bool field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForBool(uint tag) => ForBool(tag, false); + + /// + /// Retrieves a codec suitable for an int32 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForInt32(uint tag) => ForInt32(tag, 0); + + /// + /// Retrieves a codec suitable for an sint32 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForSInt32(uint tag) => ForSInt32(tag, 0); + + /// + /// Retrieves a codec suitable for a fixed32 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForFixed32(uint tag) => ForFixed32(tag, 0); + + /// + /// Retrieves a codec suitable for an sfixed32 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForSFixed32(uint tag) => ForSFixed32(tag, 0); + + /// + /// Retrieves a codec suitable for a uint32 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForUInt32(uint tag) => ForUInt32(tag, 0); + + /// + /// Retrieves a codec suitable for an int64 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForInt64(uint tag) => ForInt64(tag, 0); + + /// + /// Retrieves a codec suitable for an sint64 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForSInt64(uint tag) => ForSInt64(tag, 0); + + /// + /// Retrieves a codec suitable for a fixed64 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForFixed64(uint tag) => ForFixed64(tag, 0); + + /// + /// Retrieves a codec suitable for an sfixed64 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForSFixed64(uint tag) => ForSFixed64(tag, 0); + + /// + /// Retrieves a codec suitable for a uint64 field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForUInt64(uint tag) => ForUInt64(tag, 0); + + /// + /// Retrieves a codec suitable for a float field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForFloat(uint tag) => ForFloat(tag, 0); + + /// + /// Retrieves a codec suitable for a double field with the given tag. + /// + /// The tag. + /// A codec for the given tag. + public static FieldCodec ForDouble(uint tag) => ForDouble(tag, 0); + + // Enums are tricky. We can probably use expression trees to build these delegates automatically, + // but it's easy to generate the code for it. + + /// + /// Retrieves a codec suitable for an enum field with the given tag. + /// + /// The tag. + /// A conversion function from to the enum type. + /// A conversion function from the enum type to . + /// A codec for the given tag. + public static FieldCodec ForEnum(uint tag, Func toInt32, Func fromInt32) => + ForEnum(tag, toInt32, fromInt32, default); + + /// + /// Retrieves a codec suitable for a string field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForString(uint tag, string defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadString(), (ref WriteContext ctx, string value) => ctx.WriteString(value), CodedOutputStream.ComputeStringSize, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a bytes field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForBytes(uint tag, ByteString defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadBytes(), (ref WriteContext ctx, ByteString value) => ctx.WriteBytes(value), CodedOutputStream.ComputeBytesSize, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a bool field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForBool(uint tag, bool defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadBool(), (ref WriteContext ctx, bool value) => ctx.WriteBool(value), CodedOutputStream.BoolSize, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for an int32 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForInt32(uint tag, int defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadInt32(), (ref WriteContext output, int value) => output.WriteInt32(value), CodedOutputStream.ComputeInt32Size, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for an sint32 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForSInt32(uint tag, int defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadSInt32(), (ref WriteContext output, int value) => output.WriteSInt32(value), CodedOutputStream.ComputeSInt32Size, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a fixed32 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForFixed32(uint tag, uint defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadFixed32(), (ref WriteContext output, uint value) => output.WriteFixed32(value), 4, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for an sfixed32 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForSFixed32(uint tag, int defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadSFixed32(), (ref WriteContext output, int value) => output.WriteSFixed32(value), 4, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a uint32 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForUInt32(uint tag, uint defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadUInt32(), (ref WriteContext output, uint value) => output.WriteUInt32(value), CodedOutputStream.ComputeUInt32Size, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for an int64 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForInt64(uint tag, long defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadInt64(), (ref WriteContext output, long value) => output.WriteInt64(value), CodedOutputStream.ComputeInt64Size, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for an sint64 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForSInt64(uint tag, long defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadSInt64(), (ref WriteContext output, long value) => output.WriteSInt64(value), CodedOutputStream.ComputeSInt64Size, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a fixed64 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForFixed64(uint tag, ulong defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadFixed64(), (ref WriteContext output, ulong value) => output.WriteFixed64(value), 8, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for an sfixed64 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForSFixed64(uint tag, long defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadSFixed64(), (ref WriteContext output, long value) => output.WriteSFixed64(value), 8, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a uint64 field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForUInt64(uint tag, ulong defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadUInt64(), (ref WriteContext output, ulong value) => output.WriteUInt64(value), CodedOutputStream.ComputeUInt64Size, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a float field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForFloat(uint tag, float defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadFloat(), (ref WriteContext output, float value) => output.WriteFloat(value), CodedOutputStream.FloatSize, tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a double field with the given tag. + /// + /// The tag. + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForDouble(uint tag, double defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => ctx.ReadDouble(), (ref WriteContext output, double value) => output.WriteDouble(value), CodedOutputStream.DoubleSize, tag, defaultValue); + } + + // Enums are tricky. We can probably use expression trees to build these delegates automatically, + // but it's easy to generate the code for it. + + /// + /// Retrieves a codec suitable for an enum field with the given tag. + /// + /// The tag. + /// A conversion function from to the enum type. + /// A conversion function from the enum type to . + /// The default value. + /// A codec for the given tag. + public static FieldCodec ForEnum(uint tag, Func toInt32, Func fromInt32, T defaultValue) + { + return new FieldCodec((ref ParseContext ctx) => fromInt32( + ctx.ReadEnum()), + (ref WriteContext output, T value) => output.WriteEnum(toInt32(value)), + value => CodedOutputStream.ComputeEnumSize(toInt32(value)), tag, defaultValue); + } + + /// + /// Retrieves a codec suitable for a message field with the given tag. + /// + /// The tag. + /// A parser to use for the message type. + /// A codec for the given tag. + public static FieldCodec ForMessage(uint tag, MessageParser parser) where T : class, IMessage + { + return new FieldCodec( + (ref ParseContext ctx) => + { + T message = parser.CreateTemplate(); + ctx.ReadMessage(message); + return message; + }, + (ref WriteContext output, T value) => output.WriteMessage(value), + (ref ParseContext ctx, ref T v) => + { + if (v == null) + { + v = parser.CreateTemplate(); + } + + ctx.ReadMessage(v); + }, + (ref T v, T v2) => + { + if (v2 == null) + { + return false; + } + else if (v == null) + { + v = v2.Clone(); + } + else + { + v.MergeFrom(v2); + } + return true; + }, + message => CodedOutputStream.ComputeMessageSize(message), tag); + } + + /// + /// Retrieves a codec suitable for a group field with the given tag. + /// + /// The start group tag. + /// The end group tag. + /// A parser to use for the group message type. + /// A codec for given tag + public static FieldCodec ForGroup(uint startTag, uint endTag, MessageParser parser) where T : class, IMessage + { + return new FieldCodec( + (ref ParseContext ctx) => + { + T message = parser.CreateTemplate(); + ctx.ReadGroup(message); + return message; + }, + (ref WriteContext output, T value) => output.WriteGroup(value), + (ref ParseContext ctx, ref T v) => + { + if (v == null) + { + v = parser.CreateTemplate(); + } + + ctx.ReadGroup(v); + }, + (ref T v, T v2) => + { + if (v2 == null) + { + return v == null; + } + else if (v == null) + { + v = v2.Clone(); + } + else + { + v.MergeFrom(v2); + } + return true; + }, + message => CodedOutputStream.ComputeGroupSize(message), startTag, endTag); + } + + /// + /// Creates a codec for a wrapper type of a class - which must be string or ByteString. + /// + public static FieldCodec ForClassWrapper(uint tag) where T : class + { + var nestedCodec = WrapperCodecs.GetCodec(); + return new FieldCodec( + (ref ParseContext ctx) => WrapperCodecs.Read(ref ctx, nestedCodec), + (ref WriteContext output, T value) => WrapperCodecs.Write(ref output, value, nestedCodec), + (ref ParseContext ctx, ref T v) => v = WrapperCodecs.Read(ref ctx, nestedCodec), + (ref T v, T v2) => { v = v2; return v == null; }, + value => WrapperCodecs.CalculateSize(value, nestedCodec), + tag, 0, + null); // Default value for the wrapper + } + + /// + /// Creates a codec for a wrapper type of a struct - which must be Int32, Int64, UInt32, UInt64, + /// Bool, Single or Double. + /// + public static FieldCodec ForStructWrapper(uint tag) where T : struct + { + var nestedCodec = WrapperCodecs.GetCodec(); + return new FieldCodec( + WrapperCodecs.GetReader(), + (ref WriteContext output, T? value) => WrapperCodecs.Write(ref output, value.Value, nestedCodec), + (ref ParseContext ctx, ref T? v) => v = WrapperCodecs.Read(ref ctx, nestedCodec), + (ref T? v, T? v2) => { if (v2.HasValue) { v = v2; } return v.HasValue; }, + value => value == null ? 0 : WrapperCodecs.CalculateSize(value.Value, nestedCodec), + tag, 0, + null); // Default value for the wrapper + } + + /// + /// Helper code to create codecs for wrapper types. + /// + /// + /// Somewhat ugly with all the static methods, but the conversions involved to/from nullable types make it + /// slightly tricky to improve. So long as we keep the public API (ForClassWrapper, ForStructWrapper) in place, + /// we can refactor later if we come up with something cleaner. + /// + private static class WrapperCodecs + { + private static readonly Dictionary Codecs = new Dictionary + { + { typeof(bool), ForBool(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Varint)) }, + { typeof(int), ForInt32(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Varint)) }, + { typeof(long), ForInt64(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Varint)) }, + { typeof(uint), ForUInt32(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Varint)) }, + { typeof(ulong), ForUInt64(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Varint)) }, + { typeof(float), ForFloat(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Fixed32)) }, + { typeof(double), ForDouble(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.Fixed64)) }, + { typeof(string), ForString(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.LengthDelimited)) }, + { typeof(ByteString), ForBytes(WireFormat.MakeTag(WrappersReflection.WrapperValueFieldNumber, WireFormat.WireType.LengthDelimited)) } + }; + + private static readonly Dictionary Readers = new Dictionary + { + // TODO: Provide more optimized readers. + { typeof(bool), (ValueReader)ParsingPrimitivesWrappers.ReadBoolWrapper }, + { typeof(int), (ValueReader)ParsingPrimitivesWrappers.ReadInt32Wrapper }, + { typeof(long), (ValueReader)ParsingPrimitivesWrappers.ReadInt64Wrapper }, + { typeof(uint), (ValueReader)ParsingPrimitivesWrappers.ReadUInt32Wrapper }, + { typeof(ulong), (ValueReader)ParsingPrimitivesWrappers.ReadUInt64Wrapper }, + { typeof(float), BitConverter.IsLittleEndian ? + (ValueReader)ParsingPrimitivesWrappers.ReadFloatWrapperLittleEndian : + (ValueReader)ParsingPrimitivesWrappers.ReadFloatWrapperSlow }, + { typeof(double), BitConverter.IsLittleEndian ? + (ValueReader)ParsingPrimitivesWrappers.ReadDoubleWrapperLittleEndian : + (ValueReader)ParsingPrimitivesWrappers.ReadDoubleWrapperSlow }, + // `string` and `ByteString` less performance-sensitive. Do not implement for now. + { typeof(string), null }, + { typeof(ByteString), null }, + }; + + /// + /// Returns a field codec which effectively wraps a value of type T in a message. + /// + /// + internal static FieldCodec GetCodec() + { + if (!Codecs.TryGetValue(typeof(T), out object value)) + { + throw new InvalidOperationException("Invalid type argument requested for wrapper codec: " + typeof(T)); + } + return (FieldCodec) value; + } + + internal static ValueReader GetReader() where T : struct + { + if (!Readers.TryGetValue(typeof(T), out object value)) + { + throw new InvalidOperationException("Invalid type argument requested for wrapper reader: " + typeof(T)); + } + if (value == null) + { + // Return default unoptimized reader for the wrapper type. + var nestedCoded = GetCodec(); + return (ref ParseContext ctx) => Read(ref ctx, nestedCoded); + } + // Return optimized read for the wrapper type. + return (ValueReader)value; + } + + [SecuritySafeCritical] + internal static T Read(ref ParseContext ctx, FieldCodec codec) + { + int length = ctx.ReadLength(); + int oldLimit = SegmentedBufferHelper.PushLimit(ref ctx.state, length); + + uint tag; + T value = codec.DefaultValue; + while ((tag = ctx.ReadTag()) != 0) + { + if (tag == codec.Tag) + { + value = codec.Read(ref ctx); + } + else + { + ParsingPrimitivesMessages.SkipLastField(ref ctx.buffer, ref ctx.state); + } + + } + ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref ctx.state); + SegmentedBufferHelper.PopLimit(ref ctx.state, oldLimit); + + return value; + } + + internal static void Write(ref WriteContext ctx, T value, FieldCodec codec) + { + ctx.WriteLength(codec.CalculateSizeWithTag(value)); + codec.WriteTagAndValue(ref ctx, value); + } + + internal static int CalculateSize(T value, FieldCodec codec) + { + int fieldLength = codec.CalculateSizeWithTag(value); + return CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength; + } + } + } + + internal delegate TValue ValueReader(ref ParseContext ctx); + internal delegate void ValueWriter(ref WriteContext ctx, T value); + + /// + /// + /// An encode/decode pair for a single field. This effectively encapsulates + /// all the information needed to read or write the field value from/to a coded + /// stream. + /// + /// + /// This class is public and has to be as it is used by generated code, but its public + /// API is very limited - just what the generated code needs to call directly. + /// + /// + /// + /// This never writes default values to the stream, and does not address "packedness" + /// in repeated fields itself, other than to know whether or not the field *should* be packed. + /// + public sealed class FieldCodec + { + private static readonly EqualityComparer EqualityComparer = ProtobufEqualityComparers.GetEqualityComparer(); + private static readonly T DefaultDefault; + // Only non-nullable value types support packing. This is the simplest way of detecting that. + private static readonly bool TypeSupportsPacking = default(T) != null; + + /// + /// Merges an input stream into a value + /// + internal delegate void InputMerger(ref ParseContext ctx, ref T value); + + /// + /// Merges a value into a reference to another value, returning a boolean if the value was set + /// + internal delegate bool ValuesMerger(ref T value, T other); + + static FieldCodec() + { + if (typeof(T) == typeof(string)) + { + DefaultDefault = (T)(object)""; + } + else if (typeof(T) == typeof(ByteString)) + { + DefaultDefault = (T)(object)ByteString.Empty; + } + // Otherwise it's the default value of the CLR type + } + + internal static bool IsPackedRepeatedField(uint tag) => + TypeSupportsPacking && WireFormat.GetTagWireType(tag) == WireFormat.WireType.LengthDelimited; + + internal bool PackedRepeatedField { get; } + + /// + /// Returns a delegate to write a value (unconditionally) to a coded output stream. + /// + internal ValueWriter ValueWriter { get; } + + /// + /// Returns the size calculator for just a value. + /// + internal Func ValueSizeCalculator { get; } + + /// + /// Returns a delegate to read a value from a coded input stream. It is assumed that + /// the stream is already positioned on the appropriate tag. + /// + internal ValueReader ValueReader { get; } + + /// + /// Returns a delegate to merge a value from a coded input stream. + /// It is assumed that the stream is already positioned on the appropriate tag + /// + internal InputMerger ValueMerger { get; } + + /// + /// Returns a delegate to merge two values together. + /// + internal ValuesMerger FieldMerger { get; } + + /// + /// Returns the fixed size for an entry, or 0 if sizes vary. + /// + internal int FixedSize { get; } + + /// + /// Gets the tag of the codec. + /// + /// + /// The tag of the codec. + /// + internal uint Tag { get; } + + /// + /// Gets the end tag of the codec or 0 if there is no end tag + /// + /// + /// The end tag of the codec. + /// + internal uint EndTag { get; } + + /// + /// Default value for this codec. Usually the same for every instance of the same type, but + /// for string/ByteString wrapper fields the codec's default value is null, whereas for + /// other string/ByteString fields it's "" or ByteString.Empty. + /// + /// + /// The default value of the codec's type. + /// + internal T DefaultValue { get; } + + private readonly int tagSize; + + internal FieldCodec( + ValueReader reader, + ValueWriter writer, + int fixedSize, + uint tag, + T defaultValue) : this(reader, writer, _ => fixedSize, tag, defaultValue) + { + FixedSize = fixedSize; + } + + internal FieldCodec( + ValueReader reader, + ValueWriter writer, + Func sizeCalculator, + uint tag, + T defaultValue) : this(reader, writer, (ref ParseContext ctx, ref T v) => v = reader(ref ctx), (ref T v, T v2) => { v = v2; return true; }, sizeCalculator, tag, 0, defaultValue) + { + } + + internal FieldCodec( + ValueReader reader, + ValueWriter writer, + InputMerger inputMerger, + ValuesMerger valuesMerger, + Func sizeCalculator, + uint tag, + uint endTag = 0) : this(reader, writer, inputMerger, valuesMerger, sizeCalculator, tag, endTag, DefaultDefault) + { + } + + internal FieldCodec( + ValueReader reader, + ValueWriter writer, + InputMerger inputMerger, + ValuesMerger valuesMerger, + Func sizeCalculator, + uint tag, + uint endTag, + T defaultValue) + { + ValueReader = reader; + ValueWriter = writer; + ValueMerger = inputMerger; + FieldMerger = valuesMerger; + ValueSizeCalculator = sizeCalculator; + FixedSize = 0; + Tag = tag; + EndTag = endTag; + DefaultValue = defaultValue; + tagSize = CodedOutputStream.ComputeRawVarint32Size(tag); + if (endTag != 0) + tagSize += CodedOutputStream.ComputeRawVarint32Size(endTag); + // Detect packed-ness once, so we can check for it within RepeatedField. + PackedRepeatedField = IsPackedRepeatedField(tag); + } + + /// + /// Write a tag and the given value, *if* the value is not the default. + /// + public void WriteTagAndValue(CodedOutputStream output, T value) + { + WriteContext.Initialize(output, out WriteContext ctx); + try + { + WriteTagAndValue(ref ctx, value); + } + finally + { + ctx.CopyStateTo(output); + } + + + //if (!IsDefault(value)) + //{ + // output.WriteTag(Tag); + // ValueWriter(output, value); + // if (EndTag != 0) + // { + // output.WriteTag(EndTag); + // } + //} + } + + /// + /// Write a tag and the given value, *if* the value is not the default. + /// + public void WriteTagAndValue(ref WriteContext ctx, T value) + { + if (!IsDefault(value)) + { + ctx.WriteTag(Tag); + ValueWriter(ref ctx, value); + if (EndTag != 0) + { + ctx.WriteTag(EndTag); + } + } + } + + /// + /// Reads a value of the codec type from the given . + /// + /// The input stream to read from. + /// The value read from the stream. + public T Read(CodedInputStream input) + { + ParseContext.Initialize(input, out ParseContext ctx); + try + { + return ValueReader(ref ctx); + } + finally + { + ctx.CopyStateTo(input); + } + } + + /// + /// Reads a value of the codec type from the given . + /// + /// The parse context to read from. + /// The value read. + public T Read(ref ParseContext ctx) + { + return ValueReader(ref ctx); + } + + /// + /// Calculates the size required to write the given value, with a tag, + /// if the value is not the default. + /// + public int CalculateSizeWithTag(T value) => IsDefault(value) ? 0 : ValueSizeCalculator(value) + tagSize; + + /// + /// Calculates the size required to write the given value, with a tag, even + /// if the value is the default. + /// + internal int CalculateUnconditionalSizeWithTag(T value) => ValueSizeCalculator(value) + tagSize; + + private bool IsDefault(T value) => EqualityComparer.Equals(value, DefaultValue); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs.meta new file mode 100644 index 00000000..41340f6b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldCodec.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5e59b50223fe9154189492d1a8dc617d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs new file mode 100644 index 00000000..b8a8fff5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs @@ -0,0 +1,357 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using Google.Protobuf.Reflection; +using Google.Protobuf.WellKnownTypes; + +namespace Google.Protobuf +{ + /// + /// A tree representation of a FieldMask. Each leaf node in this tree represent + /// a field path in the FieldMask. + /// + /// For example, FieldMask "foo.bar,foo.baz,bar.baz" as a tree will be: + /// + /// [root] -+- foo -+- bar + /// | | + /// | +- baz + /// | + /// +- bar --- baz + /// + /// + /// By representing FieldMasks with this tree structure we can easily convert + /// a FieldMask to a canonical form, merge two FieldMasks, calculate the + /// intersection to two FieldMasks and traverse all fields specified by the + /// FieldMask in a message tree. + /// + internal sealed class FieldMaskTree + { + private const char FIELD_PATH_SEPARATOR = '.'; + + internal sealed class Node + { + public Dictionary Children { get; } = new Dictionary(); + } + + private readonly Node root = new Node(); + + /// + /// Creates an empty FieldMaskTree. + /// + public FieldMaskTree() + { + } + + /// + /// Creates a FieldMaskTree for a given FieldMask. + /// + public FieldMaskTree(FieldMask mask) + { + MergeFromFieldMask(mask); + } + + public override string ToString() + { + return ToFieldMask().ToString(); + } + + /// + /// Adds a field path to the tree. In a FieldMask, every field path matches the + /// specified field as well as all its sub-fields. For example, a field path + /// "foo.bar" matches field "foo.bar" and also "foo.bar.baz", etc. When adding + /// a field path to the tree, redundant sub-paths will be removed. That is, + /// after adding "foo.bar" to the tree, "foo.bar.baz" will be removed if it + /// exists, which will turn the tree node for "foo.bar" to a leaf node. + /// Likewise, if the field path to add is a sub-path of an existing leaf node, + /// nothing will be changed in the tree. + /// + public FieldMaskTree AddFieldPath(string path) + { + var parts = path.Split(FIELD_PATH_SEPARATOR); + if (parts.Length == 0) + { + return this; + } + + var node = root; + var createNewBranch = false; + + // Find the matching node in the tree. + foreach (var part in parts) + { + // Check whether the path matches an existing leaf node. + if (!createNewBranch + && node != root + && node.Children.Count == 0) + { + // The path to add is a sub-path of an existing leaf node. + return this; + } + + if (!node.Children.TryGetValue(part, out Node childNode)) + { + createNewBranch = true; + childNode = new Node(); + node.Children.Add(part, childNode); + } + node = childNode; + } + + // Turn the matching node into a leaf node (i.e., remove sub-paths). + node.Children.Clear(); + return this; + } + + /// + /// Merges all field paths in a FieldMask into this tree. + /// + public FieldMaskTree MergeFromFieldMask(FieldMask mask) + { + foreach (var path in mask.Paths) + { + AddFieldPath(path); + } + + return this; + } + + /// + /// Converts this tree to a FieldMask. + /// + public FieldMask ToFieldMask() + { + var mask = new FieldMask(); + if (root.Children.Count != 0) + { + var paths = new List(); + GetFieldPaths(root, "", paths); + mask.Paths.AddRange(paths); + } + + return mask; + } + + /// + /// Gathers all field paths in a sub-tree. + /// + private void GetFieldPaths(Node node, string path, List paths) + { + if (node.Children.Count == 0) + { + paths.Add(path); + return; + } + + foreach (var entry in node.Children) + { + var childPath = path.Length == 0 ? entry.Key : path + "." + entry.Key; + GetFieldPaths(entry.Value, childPath, paths); + } + } + + /// + /// Adds the intersection of this tree with the given to . + /// + public void IntersectFieldPath(string path, FieldMaskTree output) + { + if (root.Children.Count == 0) + { + return; + } + + var parts = path.Split(FIELD_PATH_SEPARATOR); + if (parts.Length == 0) + { + return; + } + + var node = root; + foreach (var part in parts) + { + if (node != root + && node.Children.Count == 0) + { + // The given path is a sub-path of an existing leaf node in the tree. + output.AddFieldPath(path); + return; + } + + if (!node.Children.TryGetValue(part, out node)) + { + return; + } + } + + // We found a matching node for the path. All leaf children of this matching + // node is in the intersection. + var paths = new List(); + GetFieldPaths(node, path, paths); + foreach (var value in paths) + { + output.AddFieldPath(value); + } + } + + /// + /// Merges all fields specified by this FieldMaskTree from to . + /// + public void Merge(IMessage source, IMessage destination, FieldMask.MergeOptions options) + { + if (source.Descriptor != destination.Descriptor) + { + throw new InvalidProtocolBufferException("Cannot merge messages of different types."); + } + + if (root.Children.Count == 0) + { + return; + } + + Merge(root, "", source, destination, options); + } + + /// + /// Merges all fields specified by a sub-tree from to . + /// + private void Merge( + Node node, + string path, + IMessage source, + IMessage destination, + FieldMask.MergeOptions options) + { + if (source.Descriptor != destination.Descriptor) + { + throw new InvalidProtocolBufferException($"source ({source.Descriptor}) and destination ({destination.Descriptor}) descriptor must be equal"); + } + + var descriptor = source.Descriptor; + foreach (var entry in node.Children) + { + var field = descriptor.FindFieldByName(entry.Key); + if (field == null) + { + Debug.WriteLine($"Cannot find field \"{entry.Key}\" in message type \"{descriptor.FullName}\""); + continue; + } + + if (entry.Value.Children.Count != 0) + { + if (field.IsRepeated + || field.FieldType != FieldType.Message) + { + Debug.WriteLine($"Field \"{field.FullName}\" is not a singular message field and cannot have sub-fields."); + continue; + } + + var sourceField = field.Accessor.GetValue(source); + var destinationField = field.Accessor.GetValue(destination); + if (sourceField == null + && destinationField == null) + { + // If the message field is not present in both source and destination, skip recursing + // so we don't create unnecessary empty messages. + continue; + } + + if (destinationField == null) + { + // If we have to merge but the destination does not contain the field, create it. + destinationField = field.MessageType.Parser.CreateTemplate(); + field.Accessor.SetValue(destination, destinationField); + } + + if (sourceField == null) + { + // If the message field is not present in the source but is in the destination, create an empty one + // so we can properly handle child entries + sourceField = field.MessageType.Parser.CreateTemplate(); + } + + var childPath = path.Length == 0 ? entry.Key : path + "." + entry.Key; + Merge(entry.Value, childPath, (IMessage)sourceField, (IMessage)destinationField, options); + continue; + } + + if (field.IsRepeated) + { + if (options.ReplaceRepeatedFields) + { + field.Accessor.Clear(destination); + } + + var sourceField = (IList)field.Accessor.GetValue(source); + var destinationField = (IList)field.Accessor.GetValue(destination); + foreach (var element in sourceField) + { + destinationField.Add(element); + } + } + else + { + var sourceField = field.Accessor.GetValue(source); + if (field.FieldType == FieldType.Message) + { + if (options.ReplaceMessageFields) + { + if (sourceField == null) + { + field.Accessor.Clear(destination); + } + else + { + field.Accessor.SetValue(destination, sourceField); + } + } + else + { + if (sourceField != null) + { + // Well-known wrapper types are represented as nullable primitive types, so we do not "merge" them. + // Instead, any non-null value just overwrites the previous value directly. + if (field.MessageType.IsWrapperType) + { + field.Accessor.SetValue(destination, sourceField); + } + else + { + var sourceByteString = ((IMessage)sourceField).ToByteString(); + var destinationValue = (IMessage)field.Accessor.GetValue(destination); + if (destinationValue != null) + { + destinationValue.MergeFrom(sourceByteString); + } + else + { + field.Accessor.SetValue(destination, field.MessageType.Parser.ParseFrom(sourceByteString)); + } + } + } + } + } + else + { + if (sourceField != null + || !options.ReplacePrimitiveFields) + { + field.Accessor.SetValue(destination, sourceField); + } + else + { + field.Accessor.Clear(destination); + } + } + } + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs.meta new file mode 100644 index 00000000..6f50cbdd --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FieldMaskTree.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 77987c35c51cf3c4eb52e6650ddd8ce6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs new file mode 100644 index 00000000..edcfd89a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs @@ -0,0 +1,26 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Text.RegularExpressions; + +namespace Google.Protobuf +{ + /// + /// Class containing helpful workarounds for various platform compatibility + /// + internal static class FrameworkPortability + { + // The value of RegexOptions.Compiled is 8. We can test for the presence at + // execution time using Enum.IsDefined, so a single build will do the right thing + // on each platform. (RegexOptions.Compiled isn't supported by PCLs.) + internal static readonly RegexOptions CompiledRegexWhereAvailable = + Enum.IsDefined(typeof(RegexOptions), 8) ? (RegexOptions)8 : RegexOptions.None; + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs.meta new file mode 100644 index 00000000..b8282fda --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/FrameworkPortability.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 92539e5d5f80fb04d849ee37ffc76fb6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef new file mode 100644 index 00000000..5913ebfd --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef @@ -0,0 +1,14 @@ +{ + "name": "Google.Protobuf", + "rootNamespace": "", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef.meta new file mode 100644 index 00000000..3c85694c --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Google.Protobuf.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3ea2eebe4fbf8bc4dbf2d9a3565807ae +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs new file mode 100644 index 00000000..65e7128b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs @@ -0,0 +1,30 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf +{ + /// + /// Interface for a Protocol Buffers message, supporting + /// parsing from and writing to . + /// + public interface IBufferMessage : IMessage + { + /// + /// Internal implementation of merging data from given parse context into this message. + /// Users should never invoke this method directly. + /// + void InternalMergeFrom(ref ParseContext ctx); + + /// + /// Internal implementation of writing this message to a given write context. + /// Users should never invoke this method directly. + /// + void InternalWriteTo(ref WriteContext ctx); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs.meta new file mode 100644 index 00000000..0d58a479 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IBufferMessage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8504bba83a1fddd4883241c00340ef52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs new file mode 100644 index 00000000..ec395303 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs @@ -0,0 +1,46 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2016 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf +{ + /// + /// A message type that has a custom string format for diagnostic purposes. + /// + /// + /// + /// Calling on a generated message type normally + /// returns the JSON representation. If a message type implements this interface, + /// then the method will be called instead of the regular + /// JSON formatting code, but only when ToString() is called either on the message itself + /// or on another message which contains it. This does not affect the normal JSON formatting of + /// the message. + /// + /// + /// For example, if you create a proto message representing a GUID, the internal + /// representation may be a bytes field or four fixed32 fields. However, when debugging + /// it may be more convenient to see a result in the same format as provides. + /// + /// This interface extends to avoid it accidentally being implemented + /// on types other than messages, where it would not be used by anything in the framework. + /// + public interface ICustomDiagnosticMessage : IMessage + { + /// + /// Returns a string representation of this object, for diagnostic purposes. + /// + /// + /// This method is called when a message is formatted as part of a + /// call. It does not affect the JSON representation used by other than + /// in calls to . While it is recommended + /// that the result is valid JSON, this is never assumed by the Protobuf library. + /// + /// A string representation of this object, for diagnostic purposes. + string ToDiagnosticString(); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs.meta new file mode 100644 index 00000000..41dd22fc --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ICustomDiagnosticMessage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eb9680f7419ab7b48a823cb24c879897 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs new file mode 100644 index 00000000..d8cfbedc --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs @@ -0,0 +1,31 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf +{ + /// + /// Generic interface for a deeply cloneable type. + /// + /// + /// + /// All generated messages implement this interface, but so do some non-message types. + /// Additionally, due to the type constraint on T in , + /// it is simpler to keep this as a separate interface. + /// + /// + /// The type itself, returned by the method. + public interface IDeepCloneable + { + /// + /// Creates a deep clone of this object. + /// + /// A deep clone of this object. + T Clone(); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs.meta new file mode 100644 index 00000000..1c6bd4e1 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IDeepCloneable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 865e37e1dfa3cbf41ada3f549537efc8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs new file mode 100644 index 00000000..2b199f61 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs @@ -0,0 +1,56 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; + +namespace Google.Protobuf +{ + /// + /// Generic interface for a Protocol Buffers message containing one or more extensions, where the type parameter is expected to be the same type as the implementation class. + /// This interface is experiemental and is subject to change. + /// + public interface IExtendableMessage : IMessage where T : IExtendableMessage + { + /// + /// Gets the value of the specified extension + /// + TValue GetExtension(Extension extension); + + /// + /// Gets the value of the specified repeated extension or null if the extension isn't registered in this set. + /// For a version of this method that never returns null, use + /// + RepeatedField GetExtension(RepeatedExtension extension); + + /// + /// Gets the value of the specified repeated extension, registering it if it hasn't already been registered. + /// + RepeatedField GetOrInitializeExtension(RepeatedExtension extension); + + /// + /// Sets the value of the specified extension + /// + void SetExtension(Extension extension, TValue value); + + /// + /// Gets whether the value of the specified extension is set + /// + bool HasExtension(Extension extension); + + /// + /// Clears the value of the specified extension + /// + void ClearExtension(Extension extension); + + /// + /// Clears the value of the specified repeated extension + /// + void ClearExtension(RepeatedExtension extension); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs.meta new file mode 100644 index 00000000..348bc619 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IExtendableMessage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d04c76e497015c4f944e9edd078fc42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs new file mode 100644 index 00000000..2fe0d55f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs @@ -0,0 +1,64 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using Google.Protobuf.Reflection; + +namespace Google.Protobuf +{ + /// + /// Interface for a Protocol Buffers message, supporting + /// basic operations required for serialization. + /// + public interface IMessage + { + /// + /// Merges the data from the specified coded input stream with the current message. + /// + /// See the user guide for precise merge semantics. + /// + void MergeFrom(CodedInputStream input); + + /// + /// Writes the data to the given coded output stream. + /// + /// Coded output stream to write the data to. Must not be null. + void WriteTo(CodedOutputStream output); + + /// + /// Calculates the size of this message in Protocol Buffer wire format, in bytes. + /// + /// The number of bytes required to write this message + /// to a coded output stream. + int CalculateSize(); + + /// + /// Descriptor for this message. All instances are expected to return the same descriptor, + /// and for generated types this will be an explicitly-implemented member, returning the + /// same value as the static property declared on the type. + /// + MessageDescriptor Descriptor { get; } + } + + /// + /// Generic interface for a Protocol Buffers message, + /// where the type parameter is expected to be the same type as + /// the implementation class. + /// + /// The message type. + public interface IMessage : IMessage, IEquatable, IDeepCloneable where T : IMessage + { + /// + /// Merges the given message into this one. + /// + /// See the user guide for precise merge semantics. + /// The message to merge with this one. Must not be null. + void MergeFrom(T message); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs.meta new file mode 100644 index 00000000..8f534b1a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/IMessage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7f8804e406a70a24b913d2c64cc0a2d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs new file mode 100644 index 00000000..3b895c05 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs @@ -0,0 +1,30 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.IO; + +namespace Google.Protobuf +{ + /// + /// Thrown when an attempt is made to parse invalid JSON, e.g. using + /// a non-string property key, or including a redundant comma. Parsing a protocol buffer + /// message represented in JSON using can throw both this + /// exception and depending on the situation. This + /// exception is only thrown for "pure JSON" errors, whereas InvalidProtocolBufferException + /// is thrown when the JSON may be valid in and of itself, but cannot be parsed as a protocol buffer + /// message. + /// + public sealed class InvalidJsonException : IOException + { + internal InvalidJsonException(string message) + : base(message) + { + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs.meta new file mode 100644 index 00000000..d75ea3b7 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidJsonException.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c1974c1a986320e458e5cc80b32f1b2a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs new file mode 100644 index 00000000..b023d8a1 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs @@ -0,0 +1,117 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.IO; + +namespace Google.Protobuf +{ + /// + /// Thrown when a protocol message being parsed is invalid in some way, + /// e.g. it contains a malformed varint or a negative byte length. + /// + public sealed class InvalidProtocolBufferException : IOException + { + internal InvalidProtocolBufferException(string message) + : base(message) + { + } + + internal InvalidProtocolBufferException(string message, Exception innerException) + : base(message, innerException) + { + } + + internal static InvalidProtocolBufferException MoreDataAvailable() + { + return new InvalidProtocolBufferException( + "Completed reading a message while more data was available in the stream."); + } + + internal static InvalidProtocolBufferException TruncatedMessage() + { + return new InvalidProtocolBufferException( + "While parsing a protocol message, the input ended unexpectedly " + + "in the middle of a field. This could mean either that the " + + "input has been truncated or that an embedded message " + + "misreported its own length."); + } + + internal static InvalidProtocolBufferException NegativeSize() + { + return new InvalidProtocolBufferException( + "CodedInputStream encountered an embedded string or message " + + "which claimed to have negative size."); + } + + internal static InvalidProtocolBufferException MalformedVarint() + { + return new InvalidProtocolBufferException( + "CodedInputStream encountered a malformed varint."); + } + + /// + /// Creates an exception for an error condition of an invalid tag being encountered. + /// + internal static InvalidProtocolBufferException InvalidTag() + { + return new InvalidProtocolBufferException( + "Protocol message contained an invalid tag (zero)."); + } + + internal static InvalidProtocolBufferException InvalidWireType() + { + return new InvalidProtocolBufferException( + "Protocol message contained a tag with an invalid wire type."); + } + + internal static InvalidProtocolBufferException InvalidBase64(Exception innerException) + { + return new InvalidProtocolBufferException("Invalid base64 data", innerException); + } + + internal static InvalidProtocolBufferException InvalidEndTag() + { + return new InvalidProtocolBufferException( + "Protocol message end-group tag did not match expected tag."); + } + + internal static InvalidProtocolBufferException RecursionLimitExceeded() + { + return new InvalidProtocolBufferException( + "Protocol message had too many levels of nesting. May be malicious. " + + "Use CodedInputStream.SetRecursionLimit() to increase the depth limit."); + } + + internal static InvalidProtocolBufferException JsonRecursionLimitExceeded() + { + return new InvalidProtocolBufferException( + "Protocol message had too many levels of nesting. May be malicious. " + + "Use JsonParser.Settings to increase the depth limit."); + } + + internal static InvalidProtocolBufferException SizeLimitExceeded() + { + return new InvalidProtocolBufferException( + "Protocol message was too large. May be malicious. " + + "Use CodedInputStream.SetSizeLimit() to increase the size limit."); + } + + internal static InvalidProtocolBufferException InvalidMessageStreamTag() + { + return new InvalidProtocolBufferException( + "Stream of protocol messages had invalid tag. Expected tag is length-delimited field 1."); + } + + internal static InvalidProtocolBufferException MissingFields() + { + return new InvalidProtocolBufferException("Message was missing required fields"); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs.meta new file mode 100644 index 00000000..b9b95004 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/InvalidProtocolBufferException.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a160e176e560e834bac29808462085d1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs new file mode 100644 index 00000000..fbcc8397 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs @@ -0,0 +1,917 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using Google.Protobuf.Reflection; +using Google.Protobuf.WellKnownTypes; + +namespace Google.Protobuf { + /// + /// Reflection-based converter from messages to JSON. + /// + /// + /// + /// Instances of this class are thread-safe, with no mutable state. + /// + /// + /// This is a simple start to get JSON formatting working. As it's reflection-based, + /// it's not as quick as baking calls into generated messages - but is a simpler implementation. + /// (This code is generally not heavily optimized.) + /// + /// + public sealed class JsonFormatter { + internal const string AnyTypeUrlField = "@type"; + internal const string AnyDiagnosticValueField = "@value"; + internal const string AnyWellKnownTypeValueField = "value"; + private const string NameValueSeparator = ": "; + private const string ValueSeparator = ", "; + private const string MultilineValueSeparator = ","; + private const char ObjectOpenBracket = '{'; + private const char ObjectCloseBracket = '}'; + private const char ListBracketOpen = '['; + private const char ListBracketClose = ']'; + + /// + /// Returns a formatter using the default settings. + /// + public static JsonFormatter Default { get; } = new JsonFormatter(Settings.Default); + + // A JSON formatter which *only* exists + private static readonly JsonFormatter diagnosticFormatter = new JsonFormatter(Settings.Default); + + /// + /// The JSON representation of the first 160 characters of Unicode. + /// Empty strings are replaced by the static constructor. + /// + private static readonly string[] CommonRepresentations = { + // C0 (ASCII and derivatives) control characters + "\\u0000", "\\u0001", "\\u0002", "\\u0003", // 0x00 + "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000b", "\\f", "\\r", + "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013", // 0x10 + "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", + "\\u001c", "\\u001d", "\\u001e", "\\u001f", + // Escaping of " and \ are required by www.json.org string definition. + // Escaping of < and > are required for HTML security. + "", "", "\\\"", "", "", "", "", "", // 0x20 + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 0x30 + "", "", "", "", "\\u003c", "", "\\u003e", "", "", "", "", "", "", "", "", "", // 0x40 + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 0x50 + "", "", "", "", "\\\\", "", "", "", "", "", "", "", "", "", "", "", // 0x60 + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 0x70 + "", "", "", "", "", "", "", "\\u007f", + // C1 (ISO 8859 and Unicode) extended control characters + "\\u0080", "\\u0081", "\\u0082", "\\u0083", // 0x80 + "\\u0084", "\\u0085", "\\u0086", "\\u0087", "\\u0088", "\\u0089", "\\u008a", "\\u008b", + "\\u008c", "\\u008d", "\\u008e", "\\u008f", "\\u0090", "\\u0091", "\\u0092", + "\\u0093", // 0x90 + "\\u0094", "\\u0095", "\\u0096", "\\u0097", "\\u0098", "\\u0099", "\\u009a", "\\u009b", + "\\u009c", "\\u009d", "\\u009e", "\\u009f" + }; + + static JsonFormatter() { + for (int i = 0; i < CommonRepresentations.Length; i++) { + if (CommonRepresentations[i] == "") { + CommonRepresentations[i] = ((char)i).ToString(); + } + } + } + + private readonly Settings settings; + + private bool DiagnosticOnly => ReferenceEquals(this, diagnosticFormatter); + + /// + /// Creates a new formatted with the given settings. + /// + /// The settings. + public JsonFormatter(Settings settings) { + this.settings = ProtoPreconditions.CheckNotNull(settings, nameof(settings)); + } + + /// + /// Formats the specified message as JSON. + /// + /// The message to format. + /// This method delegates to Format(IMessage, int) with indentationLevel = + /// 0. The formatted message. + public string Format(IMessage message) => Format(message, indentationLevel: 0); + + /// + /// Formats the specified message as JSON. + /// + /// The message to format. + /// Indentation level to start at. + /// To keep consistent indentation when embedding a message inside another JSON string, + /// set . E.g: var response = $@"{{ + /// ""data"": { Format(message, indentationLevel: 1) } + /// }}" + /// + /// The formatted message. + public string Format(IMessage message, int indentationLevel) { + var writer = new StringWriter(); + Format(message, writer, indentationLevel); + return writer.ToString(); + } + + /// + /// Formats the specified message as JSON. + /// + /// The message to format. + /// The TextWriter to write the formatted message to. + /// This method delegates to Format(IMessage, TextWriter, int) with + /// indentationLevel = 0. The formatted message. + public void Format(IMessage message, TextWriter writer) => Format(message, writer, + indentationLevel: 0); + + /// + /// Formats the specified message as JSON. When is not null, + /// start indenting at the specified . + /// + /// The message to format. + /// The TextWriter to write the formatted message to. + /// Indentation level to start at. + /// To keep consistent indentation when embedding a message inside another JSON string, + /// set . + public void Format(IMessage message, TextWriter writer, int indentationLevel) { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(writer, nameof(writer)); + + if (message.Descriptor.IsWellKnownType) { + WriteWellKnownTypeValue(writer, message.Descriptor, message, indentationLevel); + } else { + WriteMessage(writer, message, indentationLevel); + } + } + + /// + /// Converts a message to JSON for diagnostic purposes with no extra context. + /// + /// + /// + /// This differs from calling on the default JSON + /// formatter in its handling of . As no type registry is available + /// in calls, the normal way of resolving the type of + /// an Any message cannot be applied. Instead, a JSON property named @value + /// is included with the base64 data from the property of the message. + /// + /// The value returned by this method is only designed to be used for diagnostic + /// purposes. It may not be parsable by , and may not be parsable + /// by other Protocol Buffer implementations. + /// + /// The message to format for diagnostic purposes. + /// The diagnostic-only JSON representation of the message + public static string ToDiagnosticString(IMessage message) { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + return diagnosticFormatter.Format(message); + } + + private void WriteMessage(TextWriter writer, IMessage message, int indentationLevel) { + if (message == null) { + WriteNull(writer); + return; + } + if (DiagnosticOnly) { + if (message is ICustomDiagnosticMessage customDiagnosticMessage) { + writer.Write(customDiagnosticMessage.ToDiagnosticString()); + return; + } + } + + WriteBracketOpen(writer, ObjectOpenBracket); + bool writtenFields = WriteMessageFields(writer, message, false, indentationLevel + 1); + WriteBracketClose(writer, ObjectCloseBracket, writtenFields, indentationLevel); + } + + private bool WriteMessageFields(TextWriter writer, IMessage message, + bool assumeFirstFieldWritten, int indentationLevel) { + var fields = message.Descriptor.Fields; + bool first = !assumeFirstFieldWritten; + // First non-oneof fields + foreach (var field in fields.InFieldNumberOrder()) { + var accessor = field.Accessor; + var value = accessor.GetValue(message); + if (!ShouldFormatFieldValue(message, field, value)) { + continue; + } + + MaybeWriteValueSeparator(writer, first); + MaybeWriteValueWhitespace(writer, indentationLevel); + + if (settings.PreserveProtoFieldNames) { + WriteString(writer, accessor.Descriptor.Name); + } else { + WriteString(writer, accessor.Descriptor.JsonName); + } + writer.Write(NameValueSeparator); + WriteValue(writer, value, indentationLevel); + + first = false; + } + return !first; + } + + private void MaybeWriteValueSeparator(TextWriter writer, bool first) { + if (first) { + return; + } + + writer.Write(settings.Indentation == null ? ValueSeparator : MultilineValueSeparator); + } + + /// + /// Determines whether or not a field value should be serialized according to the field, + /// its value in the message, and the settings of this formatter. + /// + private bool ShouldFormatFieldValue(IMessage message, FieldDescriptor field, object value) => + field.HasPresence + // Fields that support presence *just* use that + ? field.Accessor.HasValue(message) + // Otherwise, format if either we've been asked to format default values, or if it's + // not a default value anyway. + : settings.FormatDefaultValues || !IsDefaultValue(field, value); + + // Converted from java/core/src/main/java/com/google/protobuf/Descriptors.java + internal static string ToJsonName(string name) { + StringBuilder result = new StringBuilder(name.Length); + bool isNextUpperCase = false; + foreach (char ch in name) { + if (ch == '_') { + isNextUpperCase = true; + } else if (isNextUpperCase) { + result.Append(char.ToUpperInvariant(ch)); + isNextUpperCase = false; + } else { + result.Append(ch); + } + } + return result.ToString(); + } + + internal static string FromJsonName(string name) { + StringBuilder result = new StringBuilder(name.Length); + foreach (char ch in name) { + if (char.IsUpper(ch)) { + result.Append('_'); + result.Append(char.ToLowerInvariant(ch)); + } else { + result.Append(ch); + } + } + return result.ToString(); + } + + private static void WriteNull(TextWriter writer) { + writer.Write("null"); + } + + private static bool IsDefaultValue(FieldDescriptor descriptor, object value) { + if (descriptor.IsMap) { + IDictionary dictionary = (IDictionary)value; + return dictionary.Count == 0; + } + if (descriptor.IsRepeated) { + IList list = (IList)value; + return list.Count == 0; + } + return descriptor.FieldType switch { + FieldType.Bool => (bool)value == false, + FieldType.Bytes => (ByteString)value == ByteString.Empty, + FieldType.String => (string)value == "", + FieldType.Double => (double)value == 0.0, + FieldType.SInt32 or FieldType.Int32 or FieldType.SFixed32 or FieldType.Enum => + (int)value == 0, + FieldType.Fixed32 or FieldType.UInt32 => (uint)value == 0, + FieldType.Fixed64 or FieldType.UInt64 => (ulong)value == 0, + FieldType.SFixed64 or FieldType.Int64 or FieldType.SInt64 => (long)value == 0, + FieldType.Float => (float)value == 0f, + FieldType.Message or FieldType.Group => value == null, + _ => throw new ArgumentException("Invalid field type"), + }; + } + + /// + /// Writes a single value to the given writer as JSON. Only types understood by + /// Protocol Buffers can be written in this way. This method is only exposed for + /// advanced use cases; most users should be using + /// or . + /// + /// The writer to write the value to. Must not be null. + /// The value to write. May be null. + /// Delegates to WriteValue(TextWriter, object, int) with indentationLevel = + /// 0. + public void WriteValue(TextWriter writer, object value) => WriteValue(writer, value, 0); + + /// + /// Writes a single value to the given writer as JSON. Only types understood by + /// Protocol Buffers can be written in this way. This method is only exposed for + /// advanced use cases; most users should be using + /// or . + /// + /// The writer to write the value to. Must not be null. + /// The value to write. May be null. + /// The current indentationLevel. Not used when is null. + public void WriteValue(TextWriter writer, object value, int indentationLevel) { + if (value == null || value is NullValue) { + WriteNull(writer); + } else if (value is bool b) { + writer.Write(b ? "true" : "false"); + } else if (value is ByteString byteString) { + // Nothing in Base64 needs escaping + writer.Write('"'); + writer.Write(byteString.ToBase64()); + writer.Write('"'); + } else if (value is string str) { + WriteString(writer, str); + } else if (value is IDictionary dictionary) { + WriteDictionary(writer, dictionary, indentationLevel); + } else if (value is IList list) { + WriteList(writer, list, indentationLevel); + } else if (value is int || value is uint) { + IFormattable formattable = (IFormattable)value; + writer.Write(formattable.ToString("d", CultureInfo.InvariantCulture)); + } else if (value is long || value is ulong) { + writer.Write('"'); + IFormattable formattable = (IFormattable)value; + writer.Write(formattable.ToString("d", CultureInfo.InvariantCulture)); + writer.Write('"'); + } else if (value is System.Enum) { + if (settings.FormatEnumsAsIntegers) { + WriteValue(writer, (int)value); + } else { + string name = OriginalEnumValueHelper.GetOriginalName(value); + if (name != null) { + WriteString(writer, name); + } else { + WriteValue(writer, (int)value); + } + } + } else if (value is float || value is double) { + string text = ((IFormattable)value).ToString("r", CultureInfo.InvariantCulture); + if (text == "NaN" || text == "Infinity" || text == "-Infinity") { + writer.Write('"'); + writer.Write(text); + writer.Write('"'); + } else { + writer.Write(text); + } + } else if (value is IMessage message) { + Format(message, writer, indentationLevel); + } else { + throw new ArgumentException("Unable to format value of type " + value.GetType()); + } + } + + /// + /// Central interception point for well-known type formatting. Any well-known types which + /// don't need special handling can fall back to WriteMessage. We avoid assuming that the + /// values are using the embedded well-known types, in order to allow for dynamic messages + /// in the future. + /// + private void WriteWellKnownTypeValue(TextWriter writer, MessageDescriptor descriptor, + object value, int indentationLevel) { + // Currently, we can never actually get here, because null values are always handled by the + // caller. But if we *could*, this would do the right thing. + if (value == null) { + WriteNull(writer); + return; + } + // For wrapper types, the value will either be the (possibly boxed) "native" value, + // or the message itself if we're formatting it at the top level (e.g. just calling ToString + // on the object itself). If it's the message form, we can extract the value first, which + // *will* be the (possibly boxed) native value, and then proceed, writing it as if we were + // definitely in a field. (We never need to wrap it in an extra string... WriteValue will do + // the right thing.) + if (descriptor.IsWrapperType) { + if (value is IMessage message) { + value = message.Descriptor.Fields[WrappersReflection.WrapperValueFieldNumber] + .Accessor.GetValue(message); + } + WriteValue(writer, value); + return; + } + if (descriptor.FullName == Timestamp.Descriptor.FullName) { + WriteTimestamp(writer, (IMessage)value); + return; + } + if (descriptor.FullName == Duration.Descriptor.FullName) { + WriteDuration(writer, (IMessage)value); + return; + } + if (descriptor.FullName == FieldMask.Descriptor.FullName) { + WriteFieldMask(writer, (IMessage)value); + return; + } + if (descriptor.FullName == Struct.Descriptor.FullName) { + WriteStruct(writer, (IMessage)value, indentationLevel); + return; + } + if (descriptor.FullName == ListValue.Descriptor.FullName) { + var fieldAccessor = descriptor.Fields[ListValue.ValuesFieldNumber].Accessor; + WriteList(writer, (IList)fieldAccessor.GetValue((IMessage)value), indentationLevel); + return; + } + if (descriptor.FullName == Value.Descriptor.FullName) { + WriteStructFieldValue(writer, (IMessage)value, indentationLevel); + return; + } + if (descriptor.FullName == Any.Descriptor.FullName) { + WriteAny(writer, (IMessage)value, indentationLevel); + return; + } + WriteMessage(writer, (IMessage)value, indentationLevel); + } + + private void WriteTimestamp(TextWriter writer, IMessage value) { + // TODO: In the common case where this *is* using the built-in Timestamp type, we could + // avoid all the reflection at this point, by casting to Timestamp. In the interests of + // avoiding subtle bugs, don't do that until we've implemented DynamicMessage so that we can + // prove it still works in that case. + int nanos = (int)value.Descriptor.Fields[Timestamp.NanosFieldNumber].Accessor.GetValue(value); + long seconds = + (long)value.Descriptor.Fields[Timestamp.SecondsFieldNumber].Accessor.GetValue(value); + writer.Write(Timestamp.ToJson(seconds, nanos, DiagnosticOnly)); + } + + private void WriteDuration(TextWriter writer, IMessage value) { + // TODO: Same as for WriteTimestamp + int nanos = (int)value.Descriptor.Fields[Duration.NanosFieldNumber].Accessor.GetValue(value); + long seconds = + (long)value.Descriptor.Fields[Duration.SecondsFieldNumber].Accessor.GetValue(value); + writer.Write(Duration.ToJson(seconds, nanos, DiagnosticOnly)); + } + + private void WriteFieldMask(TextWriter writer, IMessage value) { + var paths = + (IList)value.Descriptor.Fields[FieldMask.PathsFieldNumber].Accessor.GetValue( + value); + writer.Write(FieldMask.ToJson(paths, DiagnosticOnly)); + } + + private void WriteAny(TextWriter writer, IMessage value, int indentationLevel) { + if (DiagnosticOnly) { + WriteDiagnosticOnlyAny(writer, value); + return; + } + + string typeUrl = + (string)value.Descriptor.Fields[Any.TypeUrlFieldNumber].Accessor.GetValue(value); + ByteString data = + (ByteString)value.Descriptor.Fields[Any.ValueFieldNumber].Accessor.GetValue(value); + string typeName = Any.GetTypeName(typeUrl); + MessageDescriptor descriptor = settings.TypeRegistry.Find(typeName); + if (descriptor == null) { + throw new InvalidOperationException( + $"Type registry has no descriptor for type name '{typeName}'"); + } + IMessage message = descriptor.Parser.ParseFrom(data); + WriteBracketOpen(writer, ObjectOpenBracket); + MaybeWriteValueWhitespace(writer, indentationLevel + 1); + WriteString(writer, AnyTypeUrlField); + writer.Write(NameValueSeparator); + WriteString(writer, typeUrl); + + if (descriptor.IsWellKnownType) { + writer.Write(ValueSeparator); + WriteString(writer, AnyWellKnownTypeValueField); + writer.Write(NameValueSeparator); + WriteWellKnownTypeValue(writer, descriptor, message, indentationLevel + 1); + } else { + WriteMessageFields(writer, message, true, indentationLevel + 1); + } + WriteBracketClose(writer, ObjectCloseBracket, true, indentationLevel); + } + + private void WriteDiagnosticOnlyAny(TextWriter writer, IMessage value) { + string typeUrl = + (string)value.Descriptor.Fields[Any.TypeUrlFieldNumber].Accessor.GetValue(value); + ByteString data = + (ByteString)value.Descriptor.Fields[Any.ValueFieldNumber].Accessor.GetValue(value); + writer.Write("{ "); + WriteString(writer, AnyTypeUrlField); + writer.Write(NameValueSeparator); + WriteString(writer, typeUrl); + writer.Write(ValueSeparator); + WriteString(writer, AnyDiagnosticValueField); + writer.Write(NameValueSeparator); + writer.Write('"'); + writer.Write(data.ToBase64()); + writer.Write('"'); + writer.Write(" }"); + } + + private void WriteStruct(TextWriter writer, IMessage message, int indentationLevel) { + WriteBracketOpen(writer, ObjectOpenBracket); + IDictionary fields = + (IDictionary)message.Descriptor.Fields[Struct.FieldsFieldNumber].Accessor.GetValue( + message); + bool first = true; + foreach (DictionaryEntry entry in fields) { + string key = (string)entry.Key; + IMessage value = (IMessage)entry.Value; + if (string.IsNullOrEmpty(key) || value == null) { + throw new InvalidOperationException( + "Struct fields cannot have an empty key or a null value."); + } + + MaybeWriteValueSeparator(writer, first); + MaybeWriteValueWhitespace(writer, indentationLevel + 1); + WriteString(writer, key); + writer.Write(NameValueSeparator); + WriteStructFieldValue(writer, value, indentationLevel + 1); + first = false; + } + WriteBracketClose(writer, ObjectCloseBracket, !first, indentationLevel); + } + + private void WriteStructFieldValue(TextWriter writer, IMessage message, int indentationLevel) { + var specifiedField = message.Descriptor.Oneofs[0].Accessor.GetCaseFieldDescriptor(message); + if (specifiedField == null) { + throw new InvalidOperationException("Value message must contain a value for the oneof."); + } + + object value = specifiedField.Accessor.GetValue(message); + + switch (specifiedField.FieldNumber) { + case Value.BoolValueFieldNumber: + case Value.StringValueFieldNumber: + case Value.NumberValueFieldNumber: + WriteValue(writer, value); + return; + case Value.StructValueFieldNumber: + case Value.ListValueFieldNumber: + // Structs and ListValues are nested messages, and already well-known types. + var nestedMessage = (IMessage)specifiedField.Accessor.GetValue(message); + WriteWellKnownTypeValue(writer, nestedMessage.Descriptor, nestedMessage, + indentationLevel); + return; + case Value.NullValueFieldNumber: + WriteNull(writer); + return; + default: + throw new InvalidOperationException("Unexpected case in struct field: " + + specifiedField.FieldNumber); + } + } + + internal void WriteList(TextWriter writer, IList list, int indentationLevel = 0) { + WriteBracketOpen(writer, ListBracketOpen); + + bool first = true; + foreach (var value in list) { + MaybeWriteValueSeparator(writer, first); + MaybeWriteValueWhitespace(writer, indentationLevel + 1); + WriteValue(writer, value, indentationLevel + 1); + first = false; + } + + WriteBracketClose(writer, ListBracketClose, !first, indentationLevel); + } + + internal void WriteDictionary(TextWriter writer, IDictionary dictionary, + int indentationLevel = 0) { + WriteBracketOpen(writer, ObjectOpenBracket); + + bool first = true; + // This will box each pair. Could use IDictionaryEnumerator, but that's ugly in terms of + // disposal. + foreach (DictionaryEntry pair in dictionary) { + string keyText; + if (pair.Key is string s) { + keyText = s; + } else if (pair.Key is bool b) { + keyText = b ? "true" : "false"; + } else if (pair.Key is int || pair.Key is uint || pair.Key is long || pair.Key is ulong) { + keyText = ((IFormattable)pair.Key).ToString("d", CultureInfo.InvariantCulture); + } else { + if (pair.Key == null) { + throw new ArgumentException("Dictionary has entry with null key"); + } + throw new ArgumentException("Unhandled dictionary key type: " + pair.Key.GetType()); + } + + MaybeWriteValueSeparator(writer, first); + MaybeWriteValueWhitespace(writer, indentationLevel + 1); + WriteString(writer, keyText); + writer.Write(NameValueSeparator); + WriteValue(writer, pair.Value, indentationLevel + 1); + first = false; + } + + WriteBracketClose(writer, ObjectCloseBracket, !first, indentationLevel); + } + + /// + /// Writes a string (including leading and trailing double quotes) to a builder, escaping as + /// required. + /// + /// + /// Other than surrogate pair handling, this code is mostly taken from + /// src/google/protobuf/util/internal/json_escaping.cc. + /// + internal static void WriteString(TextWriter writer, string text) { + writer.Write('"'); + for (int i = 0; i < text.Length; i++) { + char c = text[i]; + if (c < 0xa0) { + writer.Write(CommonRepresentations[c]); + continue; + } + if (char.IsHighSurrogate(c)) { + // Encountered first part of a surrogate pair. + // Check that we have the whole pair, and encode both parts as hex. + i++; + if (i == text.Length || !char.IsLowSurrogate(text[i])) { + throw new ArgumentException( + "String contains low surrogate not followed by high surrogate"); + } + HexEncodeUtf16CodeUnit(writer, c); + HexEncodeUtf16CodeUnit(writer, text[i]); + continue; + } else if (char.IsLowSurrogate(c)) { + throw new ArgumentException( + "String contains high surrogate not preceded by low surrogate"); + } + switch ((uint)c) { + // These are not required by json spec + // but used to prevent security bugs in javascript. + case 0xfeff: // Zero width no-break space + case 0xfff9: // Interlinear annotation anchor + case 0xfffa: // Interlinear annotation separator + case 0xfffb: // Interlinear annotation terminator + + case 0x00ad: // Soft-hyphen + case 0x06dd: // Arabic end of ayah + case 0x070f: // Syriac abbreviation mark + case 0x17b4: // Khmer vowel inherent Aq + case 0x17b5: // Khmer vowel inherent Aa + HexEncodeUtf16CodeUnit(writer, c); + break; + + default: + if ((c >= 0x0600 && c <= 0x0603) || // Arabic signs + (c >= 0x200b && c <= 0x200f) || // Zero width etc. + (c >= 0x2028 && c <= 0x202e) || // Separators etc. + (c >= 0x2060 && c <= 0x2064) || // Invisible etc. + (c >= 0x206a && c <= 0x206f)) { + HexEncodeUtf16CodeUnit(writer, c); + } else { + // No handling of surrogates here - that's done earlier + writer.Write(c); + } + break; + } + } + writer.Write('"'); + } + + private const string Hex = "0123456789abcdef"; + private static void HexEncodeUtf16CodeUnit(TextWriter writer, char c) { + writer.Write("\\u"); + writer.Write(Hex[(c >> 12) & 0xf]); + writer.Write(Hex[(c >> 8) & 0xf]); + writer.Write(Hex[(c >> 4) & 0xf]); + writer.Write(Hex[(c >> 0) & 0xf]); + } + + private void WriteBracketOpen(TextWriter writer, char openChar) { + writer.Write(openChar); + if (settings.Indentation == null) { + writer.Write(' '); + } + } + + private void WriteBracketClose(TextWriter writer, char closeChar, bool hasFields, + int indentationLevel) { + if (hasFields) { + if (settings.Indentation != null) { + writer.WriteLine(); + WriteIndentation(writer, indentationLevel); + } else { + writer.Write(" "); + } + } + + writer.Write(closeChar); + } + + private void MaybeWriteValueWhitespace(TextWriter writer, int indentationLevel) { + if (settings.Indentation != null) { + writer.WriteLine(); + WriteIndentation(writer, indentationLevel); + } + } + + private void WriteIndentation(TextWriter writer, int indentationLevel) { + for (int i = 0; i < indentationLevel; i++) { + writer.Write(settings.Indentation); + } + } + + /// + /// Settings controlling JSON formatting. + /// + public sealed class Settings { + /// + /// Default settings, as used by + /// + public static Settings Default { get; } + + // Workaround for the Mono compiler complaining about XML comments not being on + // valid language elements. + static Settings() { + Default = new Settings(false); + } + + /// + /// Whether fields which would otherwise not be included in the formatted data + /// should be formatted even when the value is not present, or has the default value. + /// This option only affects fields which don't support "presence" (e.g. + /// singular non-optional proto3 primitive fields). + /// + public bool FormatDefaultValues { get; } + + /// + /// The type registry used to format messages. + /// + public TypeRegistry TypeRegistry { get; } + + /// + /// Whether to format enums as ints. Defaults to false. + /// + public bool FormatEnumsAsIntegers { get; } + + /// + /// Whether to use the original proto field names as defined in the .proto file. Defaults to + /// false. + /// + public bool PreserveProtoFieldNames { get; } + + /// + /// Indentation string, used for formatting. Setting null disables indentation. + /// + public string Indentation { get; } + + /// + /// Creates a new object with the specified formatting of default + /// values and an empty type registry. + /// + /// true if default values (0, empty strings etc) + /// should be formatted; false otherwise. + public Settings(bool formatDefaultValues) : this(formatDefaultValues, TypeRegistry.Empty) {} + + /// + /// Creates a new object with the specified formatting of default + /// values and type registry. + /// + /// true if default values (0, empty strings etc) + /// should be formatted; false otherwise. The to use when formatting messages. + public Settings(bool formatDefaultValues, TypeRegistry typeRegistry) + : this(formatDefaultValues, typeRegistry, false, false) {} + + /// + /// Creates a new object with the specified parameters. + /// + /// true if default values (0, empty strings etc) + /// should be formatted; false otherwise. The to use when formatting messages. + /// TypeRegistry.Empty will be used if it is null. true to format the enums as integers; false to + /// format enums as enum names. true to + /// preserve proto field names; false to convert them to lowerCamelCase. The indentation string to use for multi-line formatting. null to + /// disable multi-line format. + private Settings(bool formatDefaultValues, TypeRegistry typeRegistry, + bool formatEnumsAsIntegers, bool preserveProtoFieldNames, + string indentation = null) { + FormatDefaultValues = formatDefaultValues; + TypeRegistry = typeRegistry ?? TypeRegistry.Empty; + FormatEnumsAsIntegers = formatEnumsAsIntegers; + PreserveProtoFieldNames = preserveProtoFieldNames; + Indentation = indentation; + } + + /// + /// Creates a new object with the specified formatting of default + /// values and the current settings. + /// + /// true if default values (0, empty strings etc) + /// should be formatted; false otherwise. + public Settings WithFormatDefaultValues(bool formatDefaultValues) => + new Settings(formatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, + PreserveProtoFieldNames, Indentation); + + /// + /// Creates a new object with the specified type registry and the + /// current settings. + /// + /// The to use when formatting messages. + public Settings WithTypeRegistry(TypeRegistry typeRegistry) => + new Settings(FormatDefaultValues, typeRegistry, FormatEnumsAsIntegers, + PreserveProtoFieldNames, Indentation); + + /// + /// Creates a new object with the specified enums formatting option and + /// the current settings. + /// + /// true to format the enums as integers; + /// false to format enums as enum names. + public Settings WithFormatEnumsAsIntegers(bool formatEnumsAsIntegers) => + new Settings(FormatDefaultValues, TypeRegistry, formatEnumsAsIntegers, + PreserveProtoFieldNames, Indentation); + + /// + /// Creates a new object with the specified field name formatting + /// option and the current settings. + /// + /// true to preserve proto field names; + /// false to convert them to lowerCamelCase. + public Settings WithPreserveProtoFieldNames(bool preserveProtoFieldNames) => + new Settings(FormatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, + preserveProtoFieldNames, Indentation); + + /// + /// Creates a new object with the specified indentation and the current + /// settings. + /// + /// The string to output for each level of indentation (nesting). + /// The default is two spaces per level. Use null to disable indentation entirely. + /// A non-null value for will insert additional line-breaks + /// to the JSON output. Each line will contain either a single value, or braces. The default + /// line-break is determined by , which is "\n" on + /// Unix platforms, and "\r\n" on Windows. If seems to + /// produce empty lines, you need to pass a that uses a "\n" + /// newline. See . + /// + public Settings WithIndentation(string indentation = " ") => + new Settings(FormatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, + PreserveProtoFieldNames, indentation); + } + + // Effectively a cache of mapping from enum values to the original name as specified in the + // proto file, fetched by reflection. The need for this is unfortunate, as is its unbounded + // size, but realistically it shouldn't cause issues. + private static class OriginalEnumValueHelper { + private static readonly ConcurrentDictionary> + dictionaries = new ConcurrentDictionary>(); + + [UnconditionalSuppressMessage( + "Trimming", "IL2072", + Justification = + "The field for the value must still be present. It will be returned by reflection, will be in this collection, and its name can be resolved.")] + [UnconditionalSuppressMessage( + "Trimming", "IL2067", + Justification = + "The field for the value must still be present. It will be returned by reflection, will be in this collection, and its name can be resolved.")] + internal static string GetOriginalName(object value) { + // Warnings are suppressed on this method. However, this code has been tested in an AOT app + // and verified that it works. Issue + // https://github.com/protocolbuffers/protobuf/issues/14788 discusses changes to guarantee + // that enum fields are never trimmed. + Dictionary nameMapping = + dictionaries.GetOrAdd(value.GetType(), static t => GetNameMapping(t)); + + // If this returns false, originalName will be null, which is what we want. + nameMapping.TryGetValue(value, out string originalName); + return originalName; + } + + private static Dictionary GetNameMapping([ + DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | + DynamicallyAccessedMemberTypes.NonPublicFields) + ] System.Type enumType) { + return enumType.GetTypeInfo() + .DeclaredFields.Where(f => f.IsStatic) + .Where(f => f.GetCustomAttributes() + .FirstOrDefault() + ?.PreferredAlias ?? + true) + .ToDictionary( + f => f.GetValue(null), + f => + f.GetCustomAttributes() + .FirstOrDefault() + // If the attribute hasn't been applied, fall back to the name of the field. + ?.Name ?? + f.Name); + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs.meta new file mode 100644 index 00000000..bb756768 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonFormatter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63dd1577ee490464d9f5a33870c5d966 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs new file mode 100644 index 00000000..fcf859da --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs @@ -0,0 +1,1077 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Reflection; +using Google.Protobuf.WellKnownTypes; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace Google.Protobuf +{ + /// + /// Reflection-based converter from JSON to messages. + /// + /// + /// + /// Instances of this class are thread-safe, with no mutable state. + /// + /// + /// This is a simple start to get JSON parsing working. As it's reflection-based, + /// it's not as quick as baking calls into generated messages - but is a simpler implementation. + /// (This code is generally not heavily optimized.) + /// + /// + public sealed class JsonParser + { + // Note: using 0-9 instead of \d to ensure no non-ASCII digits. + // This regex isn't a complete validator, but will remove *most* invalid input. We rely on parsing to do the rest. + private static readonly Regex TimestampRegex = new Regex(@"^(?[0-9]{4}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9])(?\.[0-9]{1,9})?(?(Z|[+-][0-1][0-9]:[0-5][0-9]))$", FrameworkPortability.CompiledRegexWhereAvailable); + private static readonly Regex DurationRegex = new Regex(@"^(?-)?(?[0-9]{1,12})(?\.[0-9]{1,9})?s$", FrameworkPortability.CompiledRegexWhereAvailable); + private static readonly int[] SubsecondScalingFactors = { 0, 100000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1 }; + private static readonly char[] FieldMaskPathSeparators = new[] { ',' }; + private static readonly EnumDescriptor NullValueDescriptor = StructReflection.Descriptor.EnumTypes.Single(ed => ed.ClrType == typeof(NullValue)); + + private static readonly JsonParser defaultInstance = new JsonParser(Settings.Default); + + // TODO: Consider introducing a class containing parse state of the parser, tokenizer and depth. That would simplify these handlers + // and the signatures of various methods. + private static readonly Dictionary> WellKnownTypeHandlers = new() + { + { Timestamp.Descriptor.FullName, (parser, message, tokenizer) => MergeTimestamp(message, tokenizer.Next()) }, + { Duration.Descriptor.FullName, (parser, message, tokenizer) => MergeDuration(message, tokenizer.Next()) }, + { Value.Descriptor.FullName, (parser, message, tokenizer) => parser.MergeStructValue(message, tokenizer) }, + { ListValue.Descriptor.FullName, (parser, message, tokenizer) => + parser.MergeRepeatedField(message, message.Descriptor.Fields[ListValue.ValuesFieldNumber], tokenizer) }, + { Struct.Descriptor.FullName, (parser, message, tokenizer) => parser.MergeStruct(message, tokenizer) }, + { Any.Descriptor.FullName, (parser, message, tokenizer) => parser.MergeAny(message, tokenizer) }, + { FieldMask.Descriptor.FullName, (parser, message, tokenizer) => MergeFieldMask(message, tokenizer.Next()) }, + { Int32Value.Descriptor.FullName, MergeWrapperField }, + { Int64Value.Descriptor.FullName, MergeWrapperField }, + { UInt32Value.Descriptor.FullName, MergeWrapperField }, + { UInt64Value.Descriptor.FullName, MergeWrapperField }, + { FloatValue.Descriptor.FullName, MergeWrapperField }, + { DoubleValue.Descriptor.FullName, MergeWrapperField }, + { BytesValue.Descriptor.FullName, MergeWrapperField }, + { StringValue.Descriptor.FullName, MergeWrapperField }, + { BoolValue.Descriptor.FullName, MergeWrapperField } + }; + + // Convenience method to avoid having to repeat the same code multiple times in the above + // dictionary initialization. + private static void MergeWrapperField(JsonParser parser, IMessage message, JsonTokenizer tokenizer) + { + parser.MergeField(message, message.Descriptor.Fields[WrappersReflection.WrapperValueFieldNumber], tokenizer); + } + + /// + /// Returns a formatter using the default settings. + /// + public static JsonParser Default { get { return defaultInstance; } } + + private readonly Settings settings; + + /// + /// Creates a new formatted with the given settings. + /// + /// The settings. + public JsonParser(Settings settings) + { + this.settings = ProtoPreconditions.CheckNotNull(settings, nameof(settings)); + } + + /// + /// Parses and merges the information into the given message. + /// + /// The message to merge the JSON information into. + /// The JSON to parse. + internal void Merge(IMessage message, string json) + { + Merge(message, new StringReader(json)); + } + + /// + /// Parses JSON read from and merges the information into the given message. + /// + /// The message to merge the JSON information into. + /// Reader providing the JSON to parse. + internal void Merge(IMessage message, TextReader jsonReader) + { + var tokenizer = JsonTokenizer.FromTextReader(jsonReader); + Merge(message, tokenizer); + var lastToken = tokenizer.Next(); + if (lastToken != JsonToken.EndDocument) + { + throw new InvalidProtocolBufferException("Expected end of JSON after object"); + } + } + + /// + /// Merges the given message using data from the given tokenizer. In most cases, the next + /// token should be a "start object" token, but wrapper types and nullity can invalidate + /// that assumption. This is implemented as an LL(1) recursive descent parser over the stream + /// of tokens provided by the tokenizer. This token stream is assumed to be valid JSON, with the + /// tokenizer performing that validation - but not every token stream is valid "protobuf JSON". + /// + private void Merge(IMessage message, JsonTokenizer tokenizer) + { + if (tokenizer.ObjectDepth > settings.RecursionLimit) + { + throw InvalidProtocolBufferException.JsonRecursionLimitExceeded(); + } + if (message.Descriptor.IsWellKnownType) + { + if (WellKnownTypeHandlers.TryGetValue(message.Descriptor.FullName, out Action handler)) + { + handler(this, message, tokenizer); + return; + } + // Well-known types with no special handling continue in the normal way. + } + var token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.StartObject) + { + throw new InvalidProtocolBufferException("Expected an object"); + } + var descriptor = message.Descriptor; + var jsonFieldMap = descriptor.Fields.ByJsonName(); + // All the oneof fields we've already accounted for - we can only see each of them once. + // The set is created lazily to avoid the overhead of creating a set for every message + // we parsed, when oneofs are relatively rare. + HashSet seenOneofs = null; + while (true) + { + token = tokenizer.Next(); + if (token.Type == JsonToken.TokenType.EndObject) + { + return; + } + if (token.Type != JsonToken.TokenType.Name) + { + throw new InvalidOperationException("Unexpected token type " + token.Type); + } + string name = token.StringValue; + if (jsonFieldMap.TryGetValue(name, out FieldDescriptor field)) + { + if (field.ContainingOneof != null) + { + if (seenOneofs == null) + { + seenOneofs = new HashSet(); + } + if (!seenOneofs.Add(field.ContainingOneof)) + { + throw new InvalidProtocolBufferException($"Multiple values specified for oneof {field.ContainingOneof.Name}"); + } + } + MergeField(message, field, tokenizer); + } + else + { + if (settings.IgnoreUnknownFields) + { + tokenizer.SkipValue(); + } + else + { + throw new InvalidProtocolBufferException("Unknown field: " + name); + } + } + } + } + + private void MergeField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) + { + var token = tokenizer.Next(); + if (token.Type == JsonToken.TokenType.Null) + { + // Clear the field if we see a null token, unless it's for a singular field of type + // google.protobuf.Value or google.protobuf.NullValue. + // Note: different from Java API, which just ignores it. + // TODO: Bring it more in line? Discuss... + if (field.IsMap || field.IsRepeated || + !(IsGoogleProtobufValueField(field) || IsGoogleProtobufNullValueField(field))) + { + field.Accessor.Clear(message); + return; + } + } + tokenizer.PushBack(token); + + if (field.IsMap) + { + MergeMapField(message, field, tokenizer); + } + else if (field.IsRepeated) + { + MergeRepeatedField(message, field, tokenizer); + } + else + { + if (TryParseSingleValue(field, tokenizer, out var value)) + { + field.Accessor.SetValue(message, value); + } + } + } + + private void MergeRepeatedField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) + { + var token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.StartArray) + { + throw new InvalidProtocolBufferException("Repeated field value was not an array. Token type: " + token.Type); + } + + IList list = (IList) field.Accessor.GetValue(message); + while (true) + { + token = tokenizer.Next(); + if (token.Type == JsonToken.TokenType.EndArray) + { + return; + } + tokenizer.PushBack(token); + if (TryParseSingleValue(field, tokenizer, out object value)) + { + if (value == null) + { + throw new InvalidProtocolBufferException("Repeated field elements cannot be null"); + } + list.Add(value); + } + } + } + + private void MergeMapField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) + { + // Map fields are always objects, even if the values are well-known types: ParseSingleValue handles those. + var token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.StartObject) + { + throw new InvalidProtocolBufferException("Expected an object to populate a map"); + } + + var type = field.MessageType; + var keyField = type.FindFieldByNumber(1); + var valueField = type.FindFieldByNumber(2); + if (keyField == null || valueField == null) + { + throw new InvalidProtocolBufferException("Invalid map field: " + field.FullName); + } + IDictionary dictionary = (IDictionary) field.Accessor.GetValue(message); + + while (true) + { + token = tokenizer.Next(); + if (token.Type == JsonToken.TokenType.EndObject) + { + return; + } + object key = ParseMapKey(keyField, token.StringValue); + if (TryParseSingleValue(valueField, tokenizer, out object value)) + { + dictionary[key] = value ?? throw new InvalidProtocolBufferException("Map values must not be null"); + } + } + } + + private static bool IsGoogleProtobufValueField(FieldDescriptor field) + { + return field.FieldType == FieldType.Message && + field.MessageType.FullName == Value.Descriptor.FullName; + } + + private static bool IsGoogleProtobufNullValueField(FieldDescriptor field) + { + return field.FieldType == FieldType.Enum && + field.EnumType.FullName == NullValueDescriptor.FullName; + } + + /// + /// Attempts to parse a single value from the JSON. When the value is completely invalid, + /// this will still throw an exception; when it's "conditionally invalid" (currently meaning + /// "when there's an unknown enum string value") the method returns false instead. + /// + /// + /// true if the value was parsed successfully; false for an ignorable parse failure. + /// + private bool TryParseSingleValue(FieldDescriptor field, JsonTokenizer tokenizer, out object value) + { + var token = tokenizer.Next(); + if (token.Type == JsonToken.TokenType.Null) + { + // TODO: In order to support dynamic messages, we should really build this up + // dynamically. + if (IsGoogleProtobufValueField(field)) + { + value = Value.ForNull(); + } + else if (IsGoogleProtobufNullValueField(field)) + { + value = NullValue.NullValue; + } + else + { + value = null; + } + return true; + } + + var fieldType = field.FieldType; + if (fieldType == FieldType.Message || fieldType == FieldType.Group) + { + // Parse wrapper types as their constituent types. + // TODO: What does this mean for null? + if (field.MessageType.IsWrapperType) + { + field = field.MessageType.Fields[WrappersReflection.WrapperValueFieldNumber]; + fieldType = field.FieldType; + } + else + { + // TODO: Merge the current value in message? (Public API currently doesn't make this relevant as we don't expose merging.) + tokenizer.PushBack(token); + IMessage subMessage = NewMessageForField(field); + Merge(subMessage, tokenizer); + value = subMessage; + return true; + } + } + + switch (token.Type) + { + case JsonToken.TokenType.True: + case JsonToken.TokenType.False: + if (fieldType == FieldType.Bool) + { + value = token.Type == JsonToken.TokenType.True; + return true; + } + // Fall through to "we don't support this type for this case"; could duplicate the behaviour of the default + // case instead, but this way we'd only need to change one place. + goto default; + case JsonToken.TokenType.StringValue: + if (field.FieldType != FieldType.Enum) + { + value = ParseSingleStringValue(field, token.StringValue); + return true; + } + else + { + return TryParseEnumStringValue(field, token.StringValue, out value); + } + // Note: not passing the number value itself here, as we may end up storing the string value in the token too. + case JsonToken.TokenType.Number: + value = ParseSingleNumberValue(field, token); + return true; + default: + throw new InvalidProtocolBufferException("Unsupported JSON token type " + token.Type + " for field type " + fieldType); + } + } + + /// + /// Parses into a new message. + /// + /// The type of message to create. + /// The JSON to parse. + /// The JSON does not comply with RFC 7159 + /// The JSON does not represent a Protocol Buffers message correctly + public T Parse(string json) where T : IMessage, new() + { + ProtoPreconditions.CheckNotNull(json, nameof(json)); + return Parse(new StringReader(json)); + } + + /// + /// Parses JSON read from into a new message. + /// + /// The type of message to create. + /// Reader providing the JSON to parse. + /// The JSON does not comply with RFC 7159 + /// The JSON does not represent a Protocol Buffers message correctly + public T Parse(TextReader jsonReader) where T : IMessage, new() + { + ProtoPreconditions.CheckNotNull(jsonReader, nameof(jsonReader)); + T message = new T(); + Merge(message, jsonReader); + return message; + } + + /// + /// Parses into a new message. + /// + /// The JSON to parse. + /// Descriptor of message type to parse. + /// The JSON does not comply with RFC 7159 + /// The JSON does not represent a Protocol Buffers message correctly + public IMessage Parse(string json, MessageDescriptor descriptor) + { + ProtoPreconditions.CheckNotNull(json, nameof(json)); + ProtoPreconditions.CheckNotNull(descriptor, nameof(descriptor)); + return Parse(new StringReader(json), descriptor); + } + + /// + /// Parses JSON read from into a new message. + /// + /// Reader providing the JSON to parse. + /// Descriptor of message type to parse. + /// The JSON does not comply with RFC 7159 + /// The JSON does not represent a Protocol Buffers message correctly + public IMessage Parse(TextReader jsonReader, MessageDescriptor descriptor) + { + ProtoPreconditions.CheckNotNull(jsonReader, nameof(jsonReader)); + ProtoPreconditions.CheckNotNull(descriptor, nameof(descriptor)); + IMessage message = descriptor.Parser.CreateTemplate(); + Merge(message, jsonReader); + return message; + } + + private void MergeStructValue(IMessage message, JsonTokenizer tokenizer) + { + var firstToken = tokenizer.Next(); + var fields = message.Descriptor.Fields; + switch (firstToken.Type) + { + case JsonToken.TokenType.Null: + fields[Value.NullValueFieldNumber].Accessor.SetValue(message, 0); + return; + case JsonToken.TokenType.StringValue: + fields[Value.StringValueFieldNumber].Accessor.SetValue(message, firstToken.StringValue); + return; + case JsonToken.TokenType.Number: + fields[Value.NumberValueFieldNumber].Accessor.SetValue(message, firstToken.NumberValue); + return; + case JsonToken.TokenType.False: + case JsonToken.TokenType.True: + fields[Value.BoolValueFieldNumber].Accessor.SetValue(message, firstToken.Type == JsonToken.TokenType.True); + return; + case JsonToken.TokenType.StartObject: + { + var field = fields[Value.StructValueFieldNumber]; + var structMessage = NewMessageForField(field); + tokenizer.PushBack(firstToken); + Merge(structMessage, tokenizer); + field.Accessor.SetValue(message, structMessage); + return; + } + case JsonToken.TokenType.StartArray: + { + var field = fields[Value.ListValueFieldNumber]; + var list = NewMessageForField(field); + tokenizer.PushBack(firstToken); + Merge(list, tokenizer); + field.Accessor.SetValue(message, list); + return; + } + default: + throw new InvalidOperationException("Unexpected token type: " + firstToken.Type); + } + } + + private void MergeStruct(IMessage message, JsonTokenizer tokenizer) + { + var token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.StartObject) + { + throw new InvalidProtocolBufferException("Expected object value for Struct"); + } + tokenizer.PushBack(token); + + var field = message.Descriptor.Fields[Struct.FieldsFieldNumber]; + MergeMapField(message, field, tokenizer); + } + + private void MergeAny(IMessage message, JsonTokenizer tokenizer) + { + // Record the token stream until we see the @type property. At that point, we can take the value, consult + // the type registry for the relevant message, and replay the stream, omitting the @type property. + var tokens = new List(); + + var token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.StartObject) + { + throw new InvalidProtocolBufferException("Expected object value for Any"); + } + int typeUrlObjectDepth = tokenizer.ObjectDepth; + + // The check for the property depth protects us from nested Any values which occur before the type URL + // for *this* Any. + while (token.Type != JsonToken.TokenType.Name || + token.StringValue != JsonFormatter.AnyTypeUrlField || + tokenizer.ObjectDepth != typeUrlObjectDepth) + { + tokens.Add(token); + token = tokenizer.Next(); + + if (tokenizer.ObjectDepth < typeUrlObjectDepth) + { + throw new InvalidProtocolBufferException("Any message with no @type"); + } + } + + // Don't add the @type property or its value to the recorded token list + token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.StringValue) + { + throw new InvalidProtocolBufferException("Expected string value for Any.@type"); + } + string typeUrl = token.StringValue; + string typeName = Any.GetTypeName(typeUrl); + + MessageDescriptor descriptor = settings.TypeRegistry.Find(typeName); + if (descriptor == null) + { + throw new InvalidOperationException($"Type registry has no descriptor for type name '{typeName}'"); + } + + // Now replay the token stream we've already read and anything that remains of the object, just parsing it + // as normal. Our original tokenizer should end up at the end of the object. + var replay = JsonTokenizer.FromReplayedTokens(tokens, tokenizer); + var body = descriptor.Parser.CreateTemplate(); + if (descriptor.IsWellKnownType) + { + MergeWellKnownTypeAnyBody(body, replay); + } + else + { + Merge(body, replay); + } + var data = body.ToByteString(); + + // Now that we have the message data, we can pack it into an Any (the message received as a parameter). + message.Descriptor.Fields[Any.TypeUrlFieldNumber].Accessor.SetValue(message, typeUrl); + message.Descriptor.Fields[Any.ValueFieldNumber].Accessor.SetValue(message, data); + } + + // Well-known types end up in a property called "value" in the JSON. As there's no longer a @type property + // in the given JSON token stream, we should *only* have tokens of start-object, name("value"), the value + // itself, and then end-object. + private void MergeWellKnownTypeAnyBody(IMessage body, JsonTokenizer tokenizer) + { + var token = tokenizer.Next(); // Definitely start-object; checked in previous method + token = tokenizer.Next(); + // TODO: What about an absent Int32Value, for example? + if (token.Type != JsonToken.TokenType.Name || token.StringValue != JsonFormatter.AnyWellKnownTypeValueField) + { + throw new InvalidProtocolBufferException($"Expected '{JsonFormatter.AnyWellKnownTypeValueField}' property for well-known type Any body"); + } + Merge(body, tokenizer); + token = tokenizer.Next(); + if (token.Type != JsonToken.TokenType.EndObject) + { + throw new InvalidProtocolBufferException($"Expected end-object token after @type/value for well-known type"); + } + } + + #region Utility methods which don't depend on the state (or settings) of the parser. + private static object ParseMapKey(FieldDescriptor field, string keyText) + { + switch (field.FieldType) + { + case FieldType.Bool: + if (keyText == "true") + { + return true; + } + if (keyText == "false") + { + return false; + } + throw new InvalidProtocolBufferException("Invalid string for bool map key: " + keyText); + case FieldType.String: + return keyText; + case FieldType.Int32: + case FieldType.SInt32: + case FieldType.SFixed32: + return ParseNumericString(keyText, int.Parse); + case FieldType.UInt32: + case FieldType.Fixed32: + return ParseNumericString(keyText, uint.Parse); + case FieldType.Int64: + case FieldType.SInt64: + case FieldType.SFixed64: + return ParseNumericString(keyText, long.Parse); + case FieldType.UInt64: + case FieldType.Fixed64: + return ParseNumericString(keyText, ulong.Parse); + default: + throw new InvalidProtocolBufferException("Invalid field type for map: " + field.FieldType); + } + } + + private static object ParseSingleNumberValue(FieldDescriptor field, JsonToken token) + { + double value = token.NumberValue; + checked + { + try + { + switch (field.FieldType) + { + case FieldType.Int32: + case FieldType.SInt32: + case FieldType.SFixed32: + CheckInteger(value); + return (int) value; + case FieldType.UInt32: + case FieldType.Fixed32: + CheckInteger(value); + return (uint) value; + case FieldType.Int64: + case FieldType.SInt64: + case FieldType.SFixed64: + CheckInteger(value); + return (long) value; + case FieldType.UInt64: + case FieldType.Fixed64: + CheckInteger(value); + return (ulong) value; + case FieldType.Double: + return value; + case FieldType.Float: + if (double.IsNaN(value)) + { + return float.NaN; + } + float converted = (float) value; + // If the value is out of range of float, the cast representation will be infinite. + // If the original value was infinite as well, that's fine - we'll return the 32-bit + // version (with the correct sign). + if (float.IsInfinity(converted) && !double.IsInfinity(value)) + { + throw new InvalidProtocolBufferException($"Value out of range: {value}"); + } + return converted; + case FieldType.Enum: + CheckInteger(value); + // Just return it as an int, and let the CLR convert it. + // Note that we deliberately don't check that it's a known value. + return (int) value; + default: + throw new InvalidProtocolBufferException($"Unsupported conversion from JSON number for field type {field.FieldType}"); + } + } + catch (OverflowException) + { + throw new InvalidProtocolBufferException($"Value out of range: {value}"); + } + } + } + + private static void CheckInteger(double value) + { + if (double.IsInfinity(value) || double.IsNaN(value)) + { + throw new InvalidProtocolBufferException($"Value not an integer: {value}"); + } + if (value != Math.Floor(value)) + { + throw new InvalidProtocolBufferException($"Value not an integer: {value}"); + } + } + + private static object ParseSingleStringValue(FieldDescriptor field, string text) + { + switch (field.FieldType) + { + case FieldType.String: + return text; + case FieldType.Bytes: + try + { + return ByteString.FromBase64(text); + } + catch (FormatException e) + { + throw InvalidProtocolBufferException.InvalidBase64(e); + } + case FieldType.Int32: + case FieldType.SInt32: + case FieldType.SFixed32: + return ParseNumericString(text, int.Parse); + case FieldType.UInt32: + case FieldType.Fixed32: + return ParseNumericString(text, uint.Parse); + case FieldType.Int64: + case FieldType.SInt64: + case FieldType.SFixed64: + return ParseNumericString(text, long.Parse); + case FieldType.UInt64: + case FieldType.Fixed64: + return ParseNumericString(text, ulong.Parse); + case FieldType.Double: + double d = ParseNumericString(text, double.Parse); + ValidateInfinityAndNan(text, double.IsPositiveInfinity(d), double.IsNegativeInfinity(d), double.IsNaN(d)); + return d; + case FieldType.Float: + float f = ParseNumericString(text, float.Parse); + ValidateInfinityAndNan(text, float.IsPositiveInfinity(f), float.IsNegativeInfinity(f), float.IsNaN(f)); + return f; + case FieldType.Enum: + throw new InvalidOperationException($"Use TryParseEnumStringValue for enums"); + default: + throw new InvalidProtocolBufferException($"Unsupported conversion from JSON string for field type {field.FieldType}"); + } + } + + private bool TryParseEnumStringValue(FieldDescriptor field, string text, out object value) + { + var enumValue = field.EnumType.FindValueByName(text); + if (enumValue == null) + { + if (settings.IgnoreUnknownFields) + { + value = null; + return false; + } + else + { + throw new InvalidProtocolBufferException($"Invalid enum value: {text} for enum type: {field.EnumType.FullName}"); + } + } + // Just return it as an int, and let the CLR convert it. + value = enumValue.Number; + return true; + } + + /// + /// Creates a new instance of the message type for the given field. + /// + private static IMessage NewMessageForField(FieldDescriptor field) + { + return field.MessageType.Parser.CreateTemplate(); + } + + private static T ParseNumericString(string text, Func parser) + { + // Can't prohibit this with NumberStyles. + if (text.StartsWith("+")) + { + throw new InvalidProtocolBufferException($"Invalid numeric value: {text}"); + } + if (text.StartsWith("0") && text.Length > 1) + { + if (text[1] >= '0' && text[1] <= '9') + { + throw new InvalidProtocolBufferException($"Invalid numeric value: {text}"); + } + } + else if (text.StartsWith("-0") && text.Length > 2) + { + if (text[2] >= '0' && text[2] <= '9') + { + throw new InvalidProtocolBufferException($"Invalid numeric value: {text}"); + } + } + try + { + return parser(text, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, CultureInfo.InvariantCulture); + } + catch (FormatException) + { + throw new InvalidProtocolBufferException($"Invalid numeric value for type: {text}"); + } + catch (OverflowException) + { + throw new InvalidProtocolBufferException($"Value out of range: {text}"); + } + } + + /// + /// Checks that any infinite/NaN values originated from the correct text. + /// This corrects the lenient whitespace handling of double.Parse/float.Parse, as well as the + /// way that Mono parses out-of-range values as infinity. + /// + private static void ValidateInfinityAndNan(string text, bool isPositiveInfinity, bool isNegativeInfinity, bool isNaN) + { + if ((isPositiveInfinity && text != "Infinity") || + (isNegativeInfinity && text != "-Infinity") || + (isNaN && text != "NaN")) + { + throw new InvalidProtocolBufferException($"Invalid numeric value: {text}"); + } + } + + private static void MergeTimestamp(IMessage message, JsonToken token) + { + if (token.Type != JsonToken.TokenType.StringValue) + { + throw new InvalidProtocolBufferException("Expected string value for Timestamp"); + } + var match = TimestampRegex.Match(token.StringValue); + if (!match.Success) + { + throw new InvalidProtocolBufferException($"Invalid Timestamp value: {token.StringValue}"); + } + var dateTime = match.Groups["datetime"].Value; + var subseconds = match.Groups["subseconds"].Value; + var offset = match.Groups["offset"].Value; + + try + { + DateTime parsed = DateTime.ParseExact( + dateTime, + "yyyy-MM-dd'T'HH:mm:ss", + CultureInfo.InvariantCulture, + DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + // TODO: It would be nice not to have to create all these objects... easy to optimize later though. + Timestamp timestamp = Timestamp.FromDateTime(parsed); + int nanosToAdd = 0; + if (subseconds != "") + { + // This should always work, as we've got 1-9 digits. + int parsedFraction = int.Parse(subseconds.Substring(1), CultureInfo.InvariantCulture); + nanosToAdd = parsedFraction * SubsecondScalingFactors[subseconds.Length]; + } + int secondsToAdd = 0; + if (offset != "Z") + { + // This is the amount we need to *subtract* from the local time to get to UTC - hence - => +1 and vice versa. + int sign = offset[0] == '-' ? 1 : -1; + int hours = int.Parse(offset.Substring(1, 2), CultureInfo.InvariantCulture); + int minutes = int.Parse(offset.Substring(4, 2)); + int totalMinutes = hours * 60 + minutes; + if (totalMinutes > 18 * 60) + { + throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue); + } + if (totalMinutes == 0 && sign == 1) + { + // This is an offset of -00:00, which means "unknown local offset". It makes no sense for a timestamp. + throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue); + } + // We need to *subtract* the offset from local time to get UTC. + secondsToAdd = sign * totalMinutes * 60; + } + // Ensure we've got the right signs. Currently unnecessary, but easy to do. + if (secondsToAdd < 0 && nanosToAdd > 0) + { + secondsToAdd++; + nanosToAdd -= Duration.NanosecondsPerSecond; + } + if (secondsToAdd != 0 || nanosToAdd != 0) + { + timestamp += new Duration { Nanos = nanosToAdd, Seconds = secondsToAdd }; + // The resulting timestamp after offset change would be out of our expected range. Currently the Timestamp message doesn't validate this + // anywhere, but we shouldn't parse it. + if (timestamp.Seconds < Timestamp.UnixSecondsAtBclMinValue || timestamp.Seconds > Timestamp.UnixSecondsAtBclMaxValue) + { + throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue); + } + } + message.Descriptor.Fields[Timestamp.SecondsFieldNumber].Accessor.SetValue(message, timestamp.Seconds); + message.Descriptor.Fields[Timestamp.NanosFieldNumber].Accessor.SetValue(message, timestamp.Nanos); + } + catch (FormatException) + { + throw new InvalidProtocolBufferException("Invalid Timestamp value: " + token.StringValue); + } + } + + private static void MergeDuration(IMessage message, JsonToken token) + { + if (token.Type != JsonToken.TokenType.StringValue) + { + throw new InvalidProtocolBufferException("Expected string value for Duration"); + } + var match = DurationRegex.Match(token.StringValue); + if (!match.Success) + { + throw new InvalidProtocolBufferException("Invalid Duration value: " + token.StringValue); + } + var sign = match.Groups["sign"].Value; + var secondsText = match.Groups["int"].Value; + // Prohibit leading insignficant zeroes + if (secondsText[0] == '0' && secondsText.Length > 1) + { + throw new InvalidProtocolBufferException("Invalid Duration value: " + token.StringValue); + } + var subseconds = match.Groups["subseconds"].Value; + var multiplier = sign == "-" ? -1 : 1; + + try + { + long seconds = long.Parse(secondsText, CultureInfo.InvariantCulture) * multiplier; + int nanos = 0; + if (subseconds != "") + { + // This should always work, as we've got 1-9 digits. + int parsedFraction = int.Parse(subseconds.Substring(1)); + nanos = parsedFraction * SubsecondScalingFactors[subseconds.Length] * multiplier; + } + if (!Duration.IsNormalized(seconds, nanos)) + { + throw new InvalidProtocolBufferException($"Invalid Duration value: {token.StringValue}"); + } + message.Descriptor.Fields[Duration.SecondsFieldNumber].Accessor.SetValue(message, seconds); + message.Descriptor.Fields[Duration.NanosFieldNumber].Accessor.SetValue(message, nanos); + } + catch (FormatException) + { + throw new InvalidProtocolBufferException($"Invalid Duration value: {token.StringValue}"); + } + } + + private static void MergeFieldMask(IMessage message, JsonToken token) + { + if (token.Type != JsonToken.TokenType.StringValue) + { + throw new InvalidProtocolBufferException("Expected string value for FieldMask"); + } + // TODO: Do we *want* to remove empty entries? Probably okay to treat "" as "no paths", but "foo,,bar"? + string[] jsonPaths = token.StringValue.Split(FieldMaskPathSeparators, StringSplitOptions.RemoveEmptyEntries); + IList messagePaths = (IList) message.Descriptor.Fields[FieldMask.PathsFieldNumber].Accessor.GetValue(message); + foreach (var path in jsonPaths) + { + messagePaths.Add(ToSnakeCase(path)); + } + } + + // Ported from src/google/protobuf/util/internal/utility.cc + private static string ToSnakeCase(string text) + { + var builder = new StringBuilder(text.Length * 2); + // Note: this is probably unnecessary now, but currently retained to be as close as possible to the + // C++, whilst still throwing an exception on underscores. + bool wasNotUnderscore = false; // Initialize to false for case 1 (below) + bool wasNotCap = false; + + for (int i = 0; i < text.Length; i++) + { + char c = text[i]; + if (c >= 'A' && c <= 'Z') // ascii_isupper + { + // Consider when the current character B is capitalized: + // 1) At beginning of input: "B..." => "b..." + // (e.g. "Biscuit" => "biscuit") + // 2) Following a lowercase: "...aB..." => "...a_b..." + // (e.g. "gBike" => "g_bike") + // 3) At the end of input: "...AB" => "...ab" + // (e.g. "GoogleLAB" => "google_lab") + // 4) Followed by a lowercase: "...ABc..." => "...a_bc..." + // (e.g. "GBike" => "g_bike") + if (wasNotUnderscore && // case 1 out + (wasNotCap || // case 2 in, case 3 out + (i + 1 < text.Length && // case 3 out + (text[i + 1] >= 'a' && text[i + 1] <= 'z')))) // ascii_islower(text[i + 1]) + { // case 4 in + // We add an underscore for case 2 and case 4. + builder.Append('_'); + } + // ascii_tolower, but we already know that c *is* an upper case ASCII character... + builder.Append((char) (c + 'a' - 'A')); + wasNotUnderscore = true; + wasNotCap = false; + } + else + { + builder.Append(c); + if (c == '_') + { + throw new InvalidProtocolBufferException($"Invalid field mask: {text}"); + } + wasNotUnderscore = true; + wasNotCap = true; + } + } + return builder.ToString(); + } + #endregion + + /// + /// Settings controlling JSON parsing. + /// + public sealed class Settings + { + /// + /// Default settings, as used by . This has the same default + /// recursion limit as , and an empty type registry. + /// + public static Settings Default { get; } + + // Workaround for the Mono compiler complaining about XML comments not being on + // valid language elements. + static Settings() + { + Default = new Settings(CodedInputStream.DefaultRecursionLimit); + } + + /// + /// The maximum depth of messages to parse. Note that this limit only applies to parsing + /// messages, not collections - so a message within a collection within a message only counts as + /// depth 2, not 3. + /// + public int RecursionLimit { get; } + + /// + /// The type registry used to parse messages. + /// + public TypeRegistry TypeRegistry { get; } + + /// + /// Whether the parser should ignore unknown fields (true) or throw an exception when + /// they are encountered (false). + /// + public bool IgnoreUnknownFields { get; } + + private Settings(int recursionLimit, TypeRegistry typeRegistry, bool ignoreUnknownFields) + { + RecursionLimit = recursionLimit; + TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, nameof(typeRegistry)); + IgnoreUnknownFields = ignoreUnknownFields; + } + + /// + /// Creates a new object with the specified recursion limit. + /// + /// The maximum depth of messages to parse + public Settings(int recursionLimit) : this(recursionLimit, TypeRegistry.Empty) + { + } + + /// + /// Creates a new object with the specified recursion limit and type registry. + /// + /// The maximum depth of messages to parse + /// The type registry used to parse messages + public Settings(int recursionLimit, TypeRegistry typeRegistry) : this(recursionLimit, typeRegistry, false) + { + } + + /// + /// Creates a new object set to either ignore unknown fields, or throw an exception + /// when unknown fields are encountered. + /// + /// true if unknown fields should be ignored when parsing; false to throw an exception. + public Settings WithIgnoreUnknownFields(bool ignoreUnknownFields) => new(RecursionLimit, TypeRegistry, ignoreUnknownFields); + + /// + /// Creates a new object based on this one, but with the specified recursion limit. + /// + /// The new recursion limit. + public Settings WithRecursionLimit(int recursionLimit) => new(recursionLimit, TypeRegistry, IgnoreUnknownFields); + + /// + /// Creates a new object based on this one, but with the specified type registry. + /// + /// The new type registry. Must not be null. + public Settings WithTypeRegistry(TypeRegistry typeRegistry) => + new(RecursionLimit, + ProtoPreconditions.CheckNotNull(typeRegistry, nameof(typeRegistry)), + IgnoreUnknownFields); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs.meta new file mode 100644 index 00000000..fdb7930b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonParser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fb7f5bd03bb6e854a9984a9ad6227ae6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs new file mode 100644 index 00000000..31238e83 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs @@ -0,0 +1,118 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf +{ + internal sealed class JsonToken : IEquatable + { + internal static JsonToken Null { get; } = new JsonToken(TokenType.Null); + internal static JsonToken False { get; } = new JsonToken(TokenType.False); + internal static JsonToken True { get; } = new JsonToken(TokenType.True); + internal static JsonToken StartObject { get; } = new JsonToken(TokenType.StartObject); + internal static JsonToken EndObject { get; } = new JsonToken(TokenType.EndObject); + internal static JsonToken StartArray { get; } = new JsonToken(TokenType.StartArray); + internal static JsonToken EndArray { get; } = new JsonToken(TokenType.EndArray); + internal static JsonToken EndDocument { get; } = new JsonToken(TokenType.EndDocument); + + internal static JsonToken Name(string name) + { + return new JsonToken(TokenType.Name, stringValue: name); + } + + internal static JsonToken Value(string value) + { + return new JsonToken(TokenType.StringValue, stringValue: value); + } + + internal static JsonToken Value(double value) + { + return new JsonToken(TokenType.Number, numberValue: value); + } + + internal enum TokenType + { + Null, + False, + True, + StringValue, + Number, + Name, + StartObject, + EndObject, + StartArray, + EndArray, + EndDocument + } + + // A value is a string, number, array, object, null, true or false + // Arrays and objects have start/end + // A document consists of a value + // Objects are name/value sequences. + + private readonly TokenType type; + private readonly string stringValue; + private readonly double numberValue; + + internal TokenType Type => type; + internal string StringValue => stringValue; + internal double NumberValue => numberValue; + + private JsonToken(TokenType type, string stringValue = null, double numberValue = 0) + { + this.type = type; + this.stringValue = stringValue; + this.numberValue = numberValue; + } + + public override bool Equals(object obj) => Equals(obj as JsonToken); + + public override int GetHashCode() + { + unchecked + { + int hash = 17; + hash = hash * 31 + (int) type; + hash = hash * 31 + stringValue == null ? 0 : stringValue.GetHashCode(); + hash = hash * 31 + numberValue.GetHashCode(); + return hash; + } + } + + public override string ToString() + { + return type switch + { + TokenType.Null => "null", + TokenType.True => "true", + TokenType.False => "false", + TokenType.Name => $"name ({stringValue})", + TokenType.StringValue => $"value ({stringValue})", + TokenType.Number => $"number ({numberValue})", + TokenType.StartObject => "start-object", + TokenType.EndObject => "end-object", + TokenType.StartArray => "start-array", + TokenType.EndArray => "end-array", + TokenType.EndDocument => "end-document", + _ => throw new InvalidOperationException($"Token is of unknown type {type}"), + }; + } + + public bool Equals(JsonToken other) + { + if (other is null) + { + return false; + } + // Note use of other.numberValue.Equals rather than ==, so that NaN compares appropriately. + return other.type == type && other.stringValue == stringValue && other.numberValue.Equals(numberValue); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs.meta new file mode 100644 index 00000000..68b5d302 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonToken.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5566a936b9c2c1449e2a6e8fce23559 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs new file mode 100644 index 00000000..f89e36ad --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs @@ -0,0 +1,812 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; + +namespace Google.Protobuf +{ + /// + /// Simple but strict JSON tokenizer, rigidly following RFC 7159. + /// + /// + /// + /// This tokenizer is stateful, and only returns "useful" tokens - names, values etc. + /// It does not create tokens for the separator between names and values, or for the comma + /// between values. It validates the token stream as it goes - so callers can assume that the + /// tokens it produces are appropriate. For example, it would never produce "start object, end array." + /// + /// Implementation details: the base class handles single token push-back and + /// Not thread-safe. + /// + internal abstract class JsonTokenizer + { + private JsonToken bufferedToken; + + /// + /// Creates a tokenizer that reads from the given text reader. + /// + internal static JsonTokenizer FromTextReader(TextReader reader) + { + return new JsonTextTokenizer(reader); + } + + /// + /// Creates a tokenizer that first replays the given list of tokens, then continues reading + /// from another tokenizer. Note that if the returned tokenizer is "pushed back", that does not push back + /// on the continuation tokenizer, or vice versa. Care should be taken when using this method - it was + /// created for the sake of Any parsing. + /// + internal static JsonTokenizer FromReplayedTokens(IList tokens, JsonTokenizer continuation) + { + return new JsonReplayTokenizer(tokens, continuation); + } + + /// + /// Returns the depth of the stack, purely in objects (not collections). + /// Informally, this is the number of remaining unclosed '{' characters we have. + /// + internal int ObjectDepth { get; private set; } + + // TODO: Why do we allow a different token to be pushed back? It might be better to always remember the previous + // token returned, and allow a parameterless Rewind() method (which could only be called once, just like the current PushBack). + internal void PushBack(JsonToken token) + { + if (bufferedToken != null) + { + throw new InvalidOperationException("Can't push back twice"); + } + bufferedToken = token; + if (token.Type == JsonToken.TokenType.StartObject) + { + ObjectDepth--; + } + else if (token.Type == JsonToken.TokenType.EndObject) + { + ObjectDepth++; + } + } + + /// + /// Returns the next JSON token in the stream. An EndDocument token is returned to indicate the end of the stream, + /// after which point Next() should not be called again. + /// + /// This implementation provides single-token buffering, and calls if there is no buffered token. + /// The next token in the stream. This is never null. + /// This method is called after an EndDocument token has been returned + /// The input text does not comply with RFC 7159 + internal JsonToken Next() + { + JsonToken tokenToReturn; + if (bufferedToken != null) + { + tokenToReturn = bufferedToken; + bufferedToken = null; + } + else + { + tokenToReturn = NextImpl(); + } + if (tokenToReturn.Type == JsonToken.TokenType.StartObject) + { + ObjectDepth++; + } + else if (tokenToReturn.Type == JsonToken.TokenType.EndObject) + { + ObjectDepth--; + } + return tokenToReturn; + } + + /// + /// Returns the next JSON token in the stream, when requested by the base class. (The method delegates + /// to this if it doesn't have a buffered token.) + /// + /// This method is called after an EndDocument token has been returned + /// The input text does not comply with RFC 7159 + protected abstract JsonToken NextImpl(); + + /// + /// Skips the value we're about to read. This must only be called immediately after reading a property name. + /// If the value is an object or an array, the complete object/array is skipped. + /// + internal void SkipValue() + { + // We'll assume that Next() makes sure that the end objects and end arrays are all valid. + // All we care about is the total nesting depth we need to close. + int depth = 0; + + // do/while rather than while loop so that we read at least one token. + do + { + var token = Next(); + switch (token.Type) + { + case JsonToken.TokenType.EndArray: + case JsonToken.TokenType.EndObject: + depth--; + break; + case JsonToken.TokenType.StartArray: + case JsonToken.TokenType.StartObject: + depth++; + break; + } + } while (depth != 0); + } + + /// + /// Tokenizer which first exhausts a list of tokens, then consults another tokenizer. + /// + private class JsonReplayTokenizer : JsonTokenizer + { + private readonly IList tokens; + private readonly JsonTokenizer nextTokenizer; + private int nextTokenIndex; + + internal JsonReplayTokenizer(IList tokens, JsonTokenizer nextTokenizer) + { + this.tokens = tokens; + this.nextTokenizer = nextTokenizer; + } + + // FIXME: Object depth not maintained... + protected override JsonToken NextImpl() + { + if (nextTokenIndex >= tokens.Count) + { + return nextTokenizer.Next(); + } + return tokens[nextTokenIndex++]; + } + } + + /// + /// Tokenizer which does all the *real* work of parsing JSON. + /// + private sealed class JsonTextTokenizer : JsonTokenizer + { + // The set of states in which a value is valid next token. + private static readonly State ValueStates = State.ArrayStart | State.ArrayAfterComma | State.ObjectAfterColon | State.StartOfDocument; + + private readonly Stack containerStack = new Stack(); + private readonly PushBackReader reader; + private State state; + + internal JsonTextTokenizer(TextReader reader) + { + this.reader = new PushBackReader(reader); + state = State.StartOfDocument; + containerStack.Push(ContainerType.Document); + } + + /// + /// This method essentially just loops through characters skipping whitespace, validating and + /// changing state (e.g. from ObjectBeforeColon to ObjectAfterColon) + /// until it reaches something which will be a genuine token (e.g. a start object, or a value) at which point + /// it returns the token. Although the method is large, it would be relatively hard to break down further... most + /// of it is the large switch statement, which sometimes returns and sometimes doesn't. + /// + protected override JsonToken NextImpl() + { + if (state == State.ReaderExhausted) + { + throw new InvalidOperationException("Next() called after end of document"); + } + while (true) + { + var next = reader.Read(); + switch (next) + { + case -1: + ValidateState(State.ExpectedEndOfDocument, "Unexpected end of document in state: "); + state = State.ReaderExhausted; + return JsonToken.EndDocument; + + // Skip whitespace between tokens + case ' ': + case '\t': + case '\r': + case '\n': + break; + case ':': + ValidateState(State.ObjectBeforeColon, "Invalid state to read a colon: "); + state = State.ObjectAfterColon; + break; + case ',': + ValidateState(State.ObjectAfterProperty | State.ArrayAfterValue, "Invalid state to read a comma: "); + state = state == State.ObjectAfterProperty ? State.ObjectAfterComma : State.ArrayAfterComma; + break; + case '"': + string stringValue = ReadString(); + if ((state & (State.ObjectStart | State.ObjectAfterComma)) != 0) + { + state = State.ObjectBeforeColon; + return JsonToken.Name(stringValue); + } + else + { + ValidateAndModifyStateForValue("Invalid state to read a double quote: "); + return JsonToken.Value(stringValue); + } + case '{': + ValidateState(ValueStates, "Invalid state to read an open brace: "); + state = State.ObjectStart; + containerStack.Push(ContainerType.Object); + return JsonToken.StartObject; + case '}': + ValidateState(State.ObjectAfterProperty | State.ObjectStart, "Invalid state to read a close brace: "); + PopContainer(); + return JsonToken.EndObject; + case '[': + ValidateState(ValueStates, "Invalid state to read an open square bracket: "); + state = State.ArrayStart; + containerStack.Push(ContainerType.Array); + return JsonToken.StartArray; + case ']': + ValidateState(State.ArrayAfterValue | State.ArrayStart, "Invalid state to read a close square bracket: "); + PopContainer(); + return JsonToken.EndArray; + case 'n': // Start of null + ConsumeLiteral("null"); + ValidateAndModifyStateForValue("Invalid state to read a null literal: "); + return JsonToken.Null; + case 't': // Start of true + ConsumeLiteral("true"); + ValidateAndModifyStateForValue("Invalid state to read a true literal: "); + return JsonToken.True; + case 'f': // Start of false + ConsumeLiteral("false"); + ValidateAndModifyStateForValue("Invalid state to read a false literal: "); + return JsonToken.False; + case '-': // Start of a number + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + double number = ReadNumber((char) next); + ValidateAndModifyStateForValue("Invalid state to read a number token: "); + return JsonToken.Value(number); + default: + throw new InvalidJsonException($"Invalid first character of token: {(char) next}"); + } + } + } + + private void ValidateState(State validStates, string errorPrefix) + { + if ((validStates & state) == 0) + { + throw reader.CreateException(errorPrefix + state); + } + } + + /// + /// Reads a string token. It is assumed that the opening " has already been read. + /// + private string ReadString() + { + //builder will not be released in case of an exception, but this is not a problem and we will create new on next Acquire + var builder = StringBuilderCache.Acquire(); + bool haveHighSurrogate = false; + while (true) + { + char c = reader.ReadOrFail("Unexpected end of text while reading string"); + if (c < ' ') + { + throw reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in string literal: U+{0:x4}", (int) c)); + } + if (c == '"') + { + if (haveHighSurrogate) + { + throw reader.CreateException("Invalid use of surrogate pair code units"); + } + return StringBuilderCache.GetStringAndRelease(builder); + } + if (c == '\\') + { + c = ReadEscapedCharacter(); + } + // TODO: Consider only allowing surrogate pairs that are either both escaped, + // or both not escaped. It would be a very odd text stream that contained a "lone" high surrogate + // followed by an escaped low surrogate or vice versa... and that couldn't even be represented in UTF-8. + if (haveHighSurrogate != char.IsLowSurrogate(c)) + { + throw reader.CreateException("Invalid use of surrogate pair code units"); + } + haveHighSurrogate = char.IsHighSurrogate(c); + builder.Append(c); + } + } + + /// + /// Reads an escaped character. It is assumed that the leading backslash has already been read. + /// + private char ReadEscapedCharacter() + { + char c = reader.ReadOrFail("Unexpected end of text while reading character escape sequence"); + return c switch + { + 'n' => '\n', + '\\' => '\\', + 'b' => '\b', + 'f' => '\f', + 'r' => '\r', + 't' => '\t', + '"' => '"', + '/' => '/', + 'u' => ReadUnicodeEscape(), + _ => throw reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in character escape sequence: U+{0:x4}", (int)c)), + }; + } + + /// + /// Reads an escaped Unicode 4-nybble hex sequence. It is assumed that the leading \u has already been read. + /// + private char ReadUnicodeEscape() + { + int result = 0; + for (int i = 0; i < 4; i++) + { + char c = reader.ReadOrFail("Unexpected end of text while reading Unicode escape sequence"); + int nybble; + if (c >= '0' && c <= '9') + { + nybble = c - '0'; + } + else if (c >= 'a' && c <= 'f') + { + nybble = c - 'a' + 10; + } + else if (c >= 'A' && c <= 'F') + { + nybble = c - 'A' + 10; + } + else + { + throw reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in character escape sequence: U+{0:x4}", (int) c)); + } + result = (result << 4) + nybble; + } + return (char) result; + } + + /// + /// Consumes a text-only literal, throwing an exception if the read text doesn't match it. + /// It is assumed that the first letter of the literal has already been read. + /// + private void ConsumeLiteral(string text) + { + for (int i = 1; i < text.Length; i++) + { + int next = reader.Read(); + if (next != text[i]) + { + // Only check for "end of text" when we've detected that the character differs from the + // expected one. + var message = next == -1 + ? $"Unexpected end of text while reading literal token {text}" + : $"Unexpected character while reading literal token {text}"; + throw reader.CreateException(message); + } + } + } + + private double ReadNumber(char initialCharacter) + { + //builder will not be released in case of an exception, but this is not a problem and we will create new on next Acquire + var builder = StringBuilderCache.Acquire(); + if (initialCharacter == '-') + { + builder.Append("-"); + } + else + { + reader.PushBack(initialCharacter); + } + // Each method returns the character it read that doesn't belong in that part, + // so we know what to do next, including pushing the character back at the end. + // null is returned for "end of text". + int next = ReadInt(builder); + if (next == '.') + { + next = ReadFrac(builder); + } + if (next == 'e' || next == 'E') + { + next = ReadExp(builder); + } + // If we read a character which wasn't part of the number, push it back so we can read it again + // to parse the next token. + if (next != -1) + { + reader.PushBack((char) next); + } + + // TODO: What exception should we throw if the value can't be represented as a double? + var builderValue = StringBuilderCache.GetStringAndRelease(builder); + try + { + double result = double.Parse(builderValue, + NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, + CultureInfo.InvariantCulture); + + // .NET Core 3.0 and later returns infinity if the number is too large or small to be represented. + // For compatibility with other Protobuf implementations the tokenizer should still throw. + if (double.IsInfinity(result)) + { + throw reader.CreateException("Numeric value out of range: " + builderValue); + } + + return result; + } + catch (OverflowException) + { + throw reader.CreateException("Numeric value out of range: " + builderValue); + } + } + + /// + /// Copies an integer into a StringBuilder. + /// + /// The builder to read the number into + /// The character following the integer, or -1 for end-of-text. + private int ReadInt(StringBuilder builder) + { + char first = reader.ReadOrFail("Invalid numeric literal"); + if (first < '0' || first > '9') + { + throw reader.CreateException("Invalid numeric literal"); + } + builder.Append(first); + int next = ConsumeDigits(builder, out int digitCount); + if (first == '0' && digitCount != 0) + { + throw reader.CreateException("Invalid numeric literal: leading 0 for non-zero value."); + } + return next; + } + + /// + /// Copies the fractional part of an integer into a StringBuilder, assuming reader is positioned after a period. + /// + /// The builder to read the number into + /// The character following the fractional part, or -1 for end-of-text. + private int ReadFrac(StringBuilder builder) + { + builder.Append('.'); // Already consumed this + int next = ConsumeDigits(builder, out int digitCount); + if (digitCount == 0) + { + throw reader.CreateException("Invalid numeric literal: fraction with no trailing digits"); + } + return next; + } + + /// + /// Copies the exponent part of a number into a StringBuilder, with an assumption that the reader is already positioned after the "e". + /// + /// The builder to read the number into + /// The character following the exponent, or -1 for end-of-text. + private int ReadExp(StringBuilder builder) + { + builder.Append('E'); // Already consumed this (or 'e') + int next = reader.Read(); + if (next == -1) + { + throw reader.CreateException("Invalid numeric literal: exponent with no trailing digits"); + } + if (next == '-' || next == '+') + { + builder.Append((char) next); + } + else + { + reader.PushBack((char) next); + } + next = ConsumeDigits(builder, out int digitCount); + if (digitCount == 0) + { + throw reader.CreateException("Invalid numeric literal: exponent without value"); + } + return next; + } + + /// + /// Copies a sequence of digits into a StringBuilder. + /// + /// The builder to read the number into + /// The number of digits appended to the builder + /// The character following the digits, or -1 for end-of-text. + private int ConsumeDigits(StringBuilder builder, out int count) + { + count = 0; + while (true) + { + int next = reader.Read(); + if (next == -1 || next < '0' || next > '9') + { + return next; + } + count++; + builder.Append((char) next); + } + } + + /// + /// Validates that we're in a valid state to read a value (using the given error prefix if necessary) + /// and changes the state to the appropriate one, e.g. ObjectAfterColon to ObjectAfterProperty. + /// + private void ValidateAndModifyStateForValue(string errorPrefix) + { + ValidateState(ValueStates, errorPrefix); + switch (state) + { + case State.StartOfDocument: + state = State.ExpectedEndOfDocument; + return; + case State.ObjectAfterColon: + state = State.ObjectAfterProperty; + return; + case State.ArrayStart: + case State.ArrayAfterComma: + state = State.ArrayAfterValue; + return; + default: + throw new InvalidOperationException("ValidateAndModifyStateForValue does not handle all value states (and should)"); + } + } + + /// + /// Pops the top-most container, and sets the state to the appropriate one for the end of a value + /// in the parent container. + /// + private void PopContainer() + { + containerStack.Pop(); + var parent = containerStack.Peek(); + state = parent switch + { + ContainerType.Object => State.ObjectAfterProperty, + ContainerType.Array => State.ArrayAfterValue, + ContainerType.Document => State.ExpectedEndOfDocument, + _ => throw new InvalidOperationException("Unexpected container type: " + parent), + }; + } + + private enum ContainerType + { + Document, Object, Array + } + + /// + /// Possible states of the tokenizer. + /// + /// + /// This is a flags enum purely so we can simply and efficiently represent a set of valid states + /// for checking. + /// + /// Each is documented with an example, + /// where ^ represents the current position within the text stream. The examples all use string values, + /// but could be any value, including nested objects/arrays. + /// The complete state of the tokenizer also includes a stack to indicate the contexts (arrays/objects). + /// Any additional notional state of "AfterValue" indicates that a value has been completed, at which + /// point there's an immediate transition to ExpectedEndOfDocument, ObjectAfterProperty or ArrayAfterValue. + /// + /// + /// These states were derived manually by reading RFC 7159 carefully. + /// + /// + [Flags] + private enum State + { + /// + /// ^ { "foo": "bar" } + /// Before the value in a document. Next states: ObjectStart, ArrayStart, "AfterValue" + /// + StartOfDocument = 1 << 0, + /// + /// { "foo": "bar" } ^ + /// After the value in a document. Next states: ReaderExhausted + /// + ExpectedEndOfDocument = 1 << 1, + /// + /// { "foo": "bar" } ^ (and already read to the end of the reader) + /// Terminal state. + /// + ReaderExhausted = 1 << 2, + /// + /// { ^ "foo": "bar" } + /// Before the *first* property in an object. + /// Next states: + /// "AfterValue" (empty object) + /// ObjectBeforeColon (read a name) + /// + ObjectStart = 1 << 3, + /// + /// { "foo" ^ : "bar", "x": "y" } + /// Next state: ObjectAfterColon + /// + ObjectBeforeColon = 1 << 4, + /// + /// { "foo" : ^ "bar", "x": "y" } + /// Before any property other than the first in an object. + /// (Equivalently: after any property in an object) + /// Next states: + /// "AfterValue" (value is simple) + /// ObjectStart (value is object) + /// ArrayStart (value is array) + /// + ObjectAfterColon = 1 << 5, + /// + /// { "foo" : "bar" ^ , "x" : "y" } + /// At the end of a property, so expecting either a comma or end-of-object + /// Next states: ObjectAfterComma or "AfterValue" + /// + ObjectAfterProperty = 1 << 6, + /// + /// { "foo":"bar", ^ "x":"y" } + /// Read the comma after the previous property, so expecting another property. + /// This is like ObjectStart, but closing brace isn't valid here + /// Next state: ObjectBeforeColon. + /// + ObjectAfterComma = 1 << 7, + /// + /// [ ^ "foo", "bar" ] + /// Before the *first* value in an array. + /// Next states: + /// "AfterValue" (read a value) + /// "AfterValue" (end of array; will pop stack) + /// + ArrayStart = 1 << 8, + /// + /// [ "foo" ^ , "bar" ] + /// After any value in an array, so expecting either a comma or end-of-array + /// Next states: ArrayAfterComma or "AfterValue" + /// + ArrayAfterValue = 1 << 9, + /// + /// [ "foo", ^ "bar" ] + /// After a comma in an array, so there *must* be another value (simple or complex). + /// Next states: "AfterValue" (simple value), StartObject, StartArray + /// + ArrayAfterComma = 1 << 10 + } + + /// + /// Wrapper around a text reader allowing small amounts of buffering and location handling. + /// + private class PushBackReader + { + // TODO: Add locations for errors etc. + + private readonly TextReader reader; + + internal PushBackReader(TextReader reader) + { + // TODO: Wrap the reader in a BufferedReader? + this.reader = reader; + } + + /// + /// The buffered next character, if we have one, or -1 if there is no buffered character. + /// + private int nextChar = -1; + + /// + /// Returns the next character in the stream, or -1 if we have reached the end of the stream. + /// + internal int Read() + { + if (nextChar != -1) + { + int tmp = nextChar; + nextChar = -1; + return tmp; + } + return reader.Read(); + } + + /// + /// Reads the next character from the underlying reader, throwing an + /// with the specified message if there are no more characters available. + /// + internal char ReadOrFail(string messageOnFailure) + { + int next = Read(); + if (next == -1) + { + throw CreateException(messageOnFailure); + } + return (char) next; + } + + internal void PushBack(char c) + { + if (nextChar != -1) + { + throw new InvalidOperationException("Cannot push back when already buffering a character"); + } + nextChar = c; + } + + /// + /// Creates a new exception appropriate for the current state of the reader. + /// + internal InvalidJsonException CreateException(string message) + { + // TODO: Keep track of and use the location. + return new InvalidJsonException(message); + } + } + + /// + /// Provide a cached reusable instance of stringbuilder per thread. + /// Copied from https://github.com/dotnet/runtime/blob/main/src/libraries/Common/src/System/Text/StringBuilderCache.cs + /// + private static class StringBuilderCache + { + private const int MaxCachedStringBuilderSize = 360; + private const int DefaultStringBuilderCapacity = 16; // == StringBuilder.DefaultCapacity + + [ThreadStatic] + private static StringBuilder cachedInstance; + + /// Get a StringBuilder for the specified capacity. + /// If a StringBuilder of an appropriate size is cached, it will be returned and the cache emptied. + public static StringBuilder Acquire(int capacity = DefaultStringBuilderCapacity) + { + if (capacity <= MaxCachedStringBuilderSize) + { + StringBuilder sb = cachedInstance; + if (sb != null) + { + // Avoid stringbuilder block fragmentation by getting a new StringBuilder + // when the requested size is larger than the current capacity + if (capacity <= sb.Capacity) + { + cachedInstance = null; + sb.Clear(); + return sb; + } + } + } + + return new StringBuilder(capacity); + } + + /// Place the specified builder in the cache if it is not too big. + private static void Release(StringBuilder sb) + { + if (sb.Capacity <= MaxCachedStringBuilderSize) + { + cachedInstance = cachedInstance?.Capacity >= sb.Capacity ? cachedInstance : sb; + } + } + + /// ToString() the stringbuilder, Release it to the cache, and return the resulting string. + public static string GetStringAndRelease(StringBuilder sb) + { + string result = sb.ToString(); + Release(sb); + return result; + } + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs.meta new file mode 100644 index 00000000..dcba46be --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/JsonTokenizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30766ac4e6327c34fad6f3f76582eb26 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs new file mode 100644 index 00000000..3e42aeba --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs @@ -0,0 +1,64 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.IO; + +namespace Google.Protobuf +{ + /// + /// Stream implementation which proxies another stream, only allowing a certain amount + /// of data to be read. Note that this is only used to read delimited streams, so it + /// doesn't attempt to implement everything. + /// + internal sealed class LimitedInputStream : Stream + { + private readonly Stream proxied; + private int bytesLeft; + + internal LimitedInputStream(Stream proxied, int size) + { + this.proxied = proxied; + bytesLeft = size; + } + + public override bool CanRead => true; + public override bool CanSeek => false; + public override bool CanWrite => false; + + public override void Flush() + { + } + + public override long Length => throw new NotSupportedException(); + + public override long Position + { + get => throw new NotSupportedException(); + set => throw new NotSupportedException(); + } + + public override int Read(byte[] buffer, int offset, int count) + { + if (bytesLeft > 0) + { + int bytesRead = proxied.Read(buffer, offset, Math.Min(bytesLeft, count)); + bytesLeft -= bytesRead; + return bytesRead; + } + return 0; + } + + public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); + + public override void SetLength(long value) => throw new NotSupportedException(); + + public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException(); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs.meta new file mode 100644 index 00000000..582560d0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/LimitedInputStream.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae351a949e399ac4bac5fa72c263c2b6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs new file mode 100644 index 00000000..4a40cfe6 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs @@ -0,0 +1,329 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Reflection; +using System.Buffers; +using System.Collections; +using System; +using System.IO; +using System.Linq; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Extension methods on and . + /// + public static class MessageExtensions + { + /// + /// Merges data from the given byte array into an existing message. + /// + /// The message to merge the data into. + /// The data to merge, which must be protobuf-encoded binary data. + public static void MergeFrom(this IMessage message, byte[] data) => + MergeFrom(message, data, false, null); + + /// + /// Merges data from the given byte array slice into an existing message. + /// + /// The message to merge the data into. + /// The data containing the slice to merge, which must be protobuf-encoded binary data. + /// The offset of the slice to merge. + /// The length of the slice to merge. + public static void MergeFrom(this IMessage message, byte[] data, int offset, int length) => + MergeFrom(message, data, offset, length, false, null); + + public static void MergeFromEx(this IMessage message, CodedInputStream input, byte[] data, int offset, int length) => + MergeFrom(message, input, data, offset, length, false, null); + + /// + /// Merges data from the given byte string into an existing message. + /// + /// The message to merge the data into. + /// The data to merge, which must be protobuf-encoded binary data. + public static void MergeFrom(this IMessage message, ByteString data) => + MergeFrom(message, data, false, null); + + /// + /// Merges data from the given stream into an existing message. + /// + /// The message to merge the data into. + /// Stream containing the data to merge, which must be protobuf-encoded binary data. + public static void MergeFrom(this IMessage message, Stream input) => + MergeFrom(message, input, false, null); + + /// + /// Merges data from the given span into an existing message. + /// + /// The message to merge the data into. + /// Span containing the data to merge, which must be protobuf-encoded binary data. + [SecuritySafeCritical] + public static void MergeFrom(this IMessage message, ReadOnlySpan span) => + MergeFrom(message, span, false, null); + + /// + /// Merges data from the given sequence into an existing message. + /// + /// The message to merge the data into. + /// Sequence from the specified data to merge, which must be protobuf-encoded binary data. + [SecuritySafeCritical] + public static void MergeFrom(this IMessage message, ReadOnlySequence sequence) => + MergeFrom(message, sequence, false, null); + + /// + /// Merges length-delimited data from the given stream into an existing message. + /// + /// + /// The stream is expected to contain a length and then the data. Only the amount of data + /// specified by the length will be consumed. + /// + /// The message to merge the data into. + /// Stream containing the data to merge, which must be protobuf-encoded binary data. + public static void MergeDelimitedFrom(this IMessage message, Stream input) => + MergeDelimitedFrom(message, input, false, null); + + /// + /// Converts the given message into a byte array in protobuf encoding. + /// + /// The message to convert. + /// The message data as a byte array. + public static byte[] ToByteArray(this IMessage message) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + byte[] result = new byte[message.CalculateSize()]; + CodedOutputStream output = new CodedOutputStream(result); + message.WriteTo(output); + output.CheckNoSpaceLeft(); + return result; + } + + /// + /// Writes the given message data to the given stream in protobuf encoding. + /// + /// The message to write to the stream. + /// The stream to write to. + public static void WriteTo(this IMessage message, Stream output) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(output, nameof(output)); + CodedOutputStream codedOutput = new CodedOutputStream(output); + message.WriteTo(codedOutput); + codedOutput.Flush(); + } + + /// + /// Writes the length and then data of the given message to a stream. + /// + /// The message to write. + /// The output stream to write to. + public static void WriteDelimitedTo(this IMessage message, Stream output) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(output, nameof(output)); + CodedOutputStream codedOutput = new CodedOutputStream(output); + codedOutput.WriteLength(message.CalculateSize()); + message.WriteTo(codedOutput); + codedOutput.Flush(); + } + + /// + /// Converts the given message into a byte string in protobuf encoding. + /// + /// The message to convert. + /// The message data as a byte string. + public static ByteString ToByteString(this IMessage message) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + return ByteString.AttachBytes(message.ToByteArray()); + } + + /// + /// Writes the given message data to the given buffer writer in protobuf encoding. + /// + /// The message to write to the stream. + /// The stream to write to. + [SecuritySafeCritical] + public static void WriteTo(this IMessage message, IBufferWriter output) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(output, nameof(output)); + + WriteContext.Initialize(output, out WriteContext ctx); + WritingPrimitivesMessages.WriteRawMessage(ref ctx, message); + ctx.Flush(); + } + + /// + /// Writes the given message data to the given span in protobuf encoding. + /// The size of the destination span needs to fit the serialized size + /// of the message exactly, otherwise an exception is thrown. + /// + /// The message to write to the stream. + /// The span to write to. Size must match size of the message exactly. + [SecuritySafeCritical] + public static void WriteTo(this IMessage message, Span output) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + + WriteContext.Initialize(ref output, out WriteContext ctx); + WritingPrimitivesMessages.WriteRawMessage(ref ctx, message); + ctx.CheckNoSpaceLeft(); + } + + /// + /// Checks if all required fields in a message have values set. For proto3 messages, this returns true. + /// + public static bool IsInitialized(this IMessage message) + { + if (message.Descriptor.File.Edition == Edition.Proto3) + { + return true; + } + + if (!message.Descriptor.IsExtensionsInitialized(message)) + { + return false; + } + + return message.Descriptor + .Fields + .InDeclarationOrder() + .All(f => + { + if (f.IsMap) + { + var valueField = f.MessageType.Fields[2]; + if (valueField.FieldType == FieldType.Message) + { + var map = (IDictionary)f.Accessor.GetValue(message); + return map.Values.Cast().All(IsInitialized); + } + else + { + return true; + } + } + else if (f.IsRepeated && f.FieldType == FieldType.Message || f.FieldType == FieldType.Group) + { + var enumerable = (IEnumerable)f.Accessor.GetValue(message); + return enumerable.Cast().All(IsInitialized); + } + else if (f.FieldType == FieldType.Message || f.FieldType == FieldType.Group) + { + if (f.Accessor.HasValue(message)) + { + return ((IMessage)f.Accessor.GetValue(message)).IsInitialized(); + } + else + { + return !f.IsRequired; + } + } + else if (f.IsRequired) + { + return f.Accessor.HasValue(message); + } + else + { + return true; + } + }); + } + + // Implementations allowing unknown fields to be discarded. + internal static void MergeFrom(this IMessage message, byte[] data, bool discardUnknownFields, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(data, nameof(data)); + CodedInputStream input = new CodedInputStream(data) + { + DiscardUnknownFields = discardUnknownFields, + ExtensionRegistry = registry + }; + message.MergeFrom(input); + input.CheckReadEndOfStreamTag(); + } + + internal static void MergeFrom(this IMessage message, byte[] data, int offset, int length, bool discardUnknownFields, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(data, nameof(data)); + CodedInputStream input = new CodedInputStream(data, offset, length) + { + DiscardUnknownFields = discardUnknownFields, + ExtensionRegistry = registry + }; + message.MergeFrom(input); + input.CheckReadEndOfStreamTag(); + } + + internal static void MergeFrom(this IMessage message, CodedInputStream input, byte[] data, int offset, int length, bool discardUnknownFields, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(data, nameof(data)); + input.Reset(data, offset, length, discardUnknownFields, registry); + message.MergeFrom(input); + input.CheckReadEndOfStreamTag(); + } + + internal static void MergeFrom(this IMessage message, ByteString data, bool discardUnknownFields, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(data, nameof(data)); + CodedInputStream input = data.CreateCodedInput(); + input.DiscardUnknownFields = discardUnknownFields; + input.ExtensionRegistry = registry; + message.MergeFrom(input); + input.CheckReadEndOfStreamTag(); + } + + internal static void MergeFrom(this IMessage message, Stream input, bool discardUnknownFields, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(input, nameof(input)); + CodedInputStream codedInput = new CodedInputStream(input) + { + DiscardUnknownFields = discardUnknownFields, + ExtensionRegistry = registry + }; + message.MergeFrom(codedInput); + codedInput.CheckReadEndOfStreamTag(); + } + + [SecuritySafeCritical] + internal static void MergeFrom(this IMessage message, ReadOnlySequence data, bool discardUnknownFields, ExtensionRegistry registry) + { + ParseContext.Initialize(data, out ParseContext ctx); + ctx.DiscardUnknownFields = discardUnknownFields; + ctx.ExtensionRegistry = registry; + ParsingPrimitivesMessages.ReadRawMessage(ref ctx, message); + ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref ctx.state); + } + + [SecuritySafeCritical] + internal static void MergeFrom(this IMessage message, ReadOnlySpan data, bool discardUnknownFields, ExtensionRegistry registry) + { + ParseContext.Initialize(data, out ParseContext ctx); + ctx.DiscardUnknownFields = discardUnknownFields; + ctx.ExtensionRegistry = registry; + ParsingPrimitivesMessages.ReadRawMessage(ref ctx, message); + ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref ctx.state); + } + + internal static void MergeDelimitedFrom(this IMessage message, Stream input, bool discardUnknownFields, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(input, nameof(input)); + int size = (int)CodedInputStream.ReadRawVarint32(input); + Stream limitedStream = new LimitedInputStream(input, size); + MergeFrom(message, limitedStream, discardUnknownFields, registry); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs.meta new file mode 100644 index 00000000..b9a15da5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21e36c25ae9776b4e90fba4c2f6ed3eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs new file mode 100644 index 00000000..86ef16dc --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs @@ -0,0 +1,388 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Buffers; +using System.IO; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// A general message parser, typically used by reflection-based code as all the methods + /// return simple . + /// + public class MessageParser + { + private readonly Func factory; + private protected bool DiscardUnknownFields { get; } + + internal ExtensionRegistry Extensions { get; } + + internal MessageParser(Func factory, bool discardUnknownFields, ExtensionRegistry extensions) + { + this.factory = factory; + DiscardUnknownFields = discardUnknownFields; + Extensions = extensions; + } + + /// + /// Creates a template instance ready for population. + /// + /// An empty message. + internal IMessage CreateTemplate() + { + return factory(); + } + + /// + /// Parses a message from a byte array. + /// + /// The byte array containing the message. Must not be null. + /// The newly parsed message. + public IMessage ParseFrom(byte[] data) + { + IMessage message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from a byte array slice. + /// + /// The byte array containing the message. Must not be null. + /// The offset of the slice to parse. + /// The length of the slice to parse. + /// The newly parsed message. + public IMessage ParseFrom(byte[] data, int offset, int length) + { + IMessage message = factory(); + message.MergeFrom(data, offset, length, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given byte string. + /// + /// The data to parse. + /// The parsed message. + public IMessage ParseFrom(ByteString data) + { + IMessage message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given stream. + /// + /// The stream to parse. + /// The parsed message. + public IMessage ParseFrom(Stream input) + { + IMessage message = factory(); + message.MergeFrom(input, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given sequence. + /// + /// The data to parse. + /// The parsed message. + [SecuritySafeCritical] + public IMessage ParseFrom(ReadOnlySequence data) + { + IMessage message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given span. + /// + /// The data to parse. + /// The parsed message. + [SecuritySafeCritical] + public IMessage ParseFrom(ReadOnlySpan data) + { + IMessage message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a length-delimited message from the given stream. + /// + /// + /// The stream is expected to contain a length and then the data. Only the amount of data + /// specified by the length will be consumed. + /// + /// The stream to parse. + /// The parsed message. + public IMessage ParseDelimitedFrom(Stream input) + { + IMessage message = factory(); + message.MergeDelimitedFrom(input, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given coded input stream. + /// + /// The stream to parse. + /// The parsed message. + public IMessage ParseFrom(CodedInputStream input) + { + IMessage message = factory(); + MergeFrom(message, input); + return message; + } + + /// + /// Parses a message from the given JSON. + /// + /// This method always uses the default JSON parser; it is not affected by . + /// To ignore unknown fields when parsing JSON, create a using a + /// with set to true and call directly. + /// + /// The JSON to parse. + /// The parsed message. + /// The JSON does not comply with RFC 7159 + /// The JSON does not represent a Protocol Buffers message correctly + public IMessage ParseJson(string json) + { + IMessage message = factory(); + JsonParser.Default.Merge(message, json); + return message; + } + + // TODO: When we're using a C# 7.1 compiler, make this private protected. + internal void MergeFrom(IMessage message, CodedInputStream codedInput) + { + bool originalDiscard = codedInput.DiscardUnknownFields; + ExtensionRegistry originalRegistry = codedInput.ExtensionRegistry; + try + { + codedInput.DiscardUnknownFields = DiscardUnknownFields; + codedInput.ExtensionRegistry = Extensions; + message.MergeFrom(codedInput); + } + finally + { + codedInput.DiscardUnknownFields = originalDiscard; + codedInput.ExtensionRegistry = originalRegistry; + } + } + + /// + /// Creates a new message parser which optionally discards unknown fields when parsing. + /// + /// Note that this does not affect the behavior of + /// at all. To ignore unknown fields when parsing JSON, create a using a + /// with set to true and call directly. + /// Whether or not to discard unknown fields when parsing. + /// A newly configured message parser. + public MessageParser WithDiscardUnknownFields(bool discardUnknownFields) => + new MessageParser(factory, discardUnknownFields, Extensions); + + /// + /// Creates a new message parser which registers extensions from the specified registry upon creating the message instance + /// + /// The extensions to register + /// A newly configured message parser. + public MessageParser WithExtensionRegistry(ExtensionRegistry registry) => + new MessageParser(factory, DiscardUnknownFields, registry); + } + + /// + /// A parser for a specific message type. + /// + /// + ///

+ /// This delegates most behavior to the + /// implementation within the original type, but + /// provides convenient overloads to parse from a variety of sources. + ///

+ ///

+ /// Most applications will never need to create their own instances of this type; + /// instead, use the static Parser property of a generated message type to obtain a + /// parser for that type. + ///

+ ///
+ /// The type of message to be parsed. + public sealed class MessageParser : MessageParser where T : IMessage + { + // Implementation note: all the methods here *could* just delegate up to the base class and cast the result. + // The current implementation avoids a virtual method call and a cast, which *may* be significant in some cases. + // Benchmarking work is required to measure the significance - but it's only a few lines of code in any case. + // The API wouldn't change anyway - just the implementation - so this work can be deferred. + private readonly Func factory; + + /// + /// Creates a new parser. + /// + /// + /// The factory method is effectively an optimization over using a generic constraint + /// to require a parameterless constructor: delegates are significantly faster to execute. + /// + /// Function to invoke when a new, empty message is required. + public MessageParser(Func factory) : this(factory, false, null) + { + } + + internal MessageParser(Func factory, bool discardUnknownFields, ExtensionRegistry extensions) : base(() => factory(), discardUnknownFields, extensions) + { + this.factory = factory; + } + + /// + /// Creates a template instance ready for population. + /// + /// An empty message. + internal new T CreateTemplate() + { + return factory(); + } + + /// + /// Parses a message from a byte array. + /// + /// The byte array containing the message. Must not be null. + /// The newly parsed message. + public new T ParseFrom(byte[] data) + { + T message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from a byte array slice. + /// + /// The byte array containing the message. Must not be null. + /// The offset of the slice to parse. + /// The length of the slice to parse. + /// The newly parsed message. + public new T ParseFrom(byte[] data, int offset, int length) + { + T message = factory(); + message.MergeFrom(data, offset, length, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given byte string. + /// + /// The data to parse. + /// The parsed message. + public new T ParseFrom(ByteString data) + { + T message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given stream. + /// + /// The stream to parse. + /// The parsed message. + public new T ParseFrom(Stream input) + { + T message = factory(); + message.MergeFrom(input, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given sequence. + /// + /// The data to parse. + /// The parsed message. + [SecuritySafeCritical] + public new T ParseFrom(ReadOnlySequence data) + { + T message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given span. + /// + /// The data to parse. + /// The parsed message. + [SecuritySafeCritical] + public new T ParseFrom(ReadOnlySpan data) + { + T message = factory(); + message.MergeFrom(data, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a length-delimited message from the given stream. + /// + /// + /// The stream is expected to contain a length and then the data. Only the amount of data + /// specified by the length will be consumed. + /// + /// The stream to parse. + /// The parsed message. + public new T ParseDelimitedFrom(Stream input) + { + T message = factory(); + message.MergeDelimitedFrom(input, DiscardUnknownFields, Extensions); + return message; + } + + /// + /// Parses a message from the given coded input stream. + /// + /// The stream to parse. + /// The parsed message. + public new T ParseFrom(CodedInputStream input) + { + T message = factory(); + MergeFrom(message, input); + return message; + } + + /// + /// Parses a message from the given JSON. + /// + /// The JSON to parse. + /// The parsed message. + /// The JSON does not comply with RFC 7159 + /// The JSON does not represent a Protocol Buffers message correctly + public new T ParseJson(string json) + { + T message = factory(); + JsonParser.Default.Merge(message, json); + return message; + } + + /// + /// Creates a new message parser which optionally discards unknown fields when parsing. + /// + /// Whether or not to discard unknown fields when parsing. + /// A newly configured message parser. + public new MessageParser WithDiscardUnknownFields(bool discardUnknownFields) => + new MessageParser(factory, discardUnknownFields, Extensions); + + /// + /// Creates a new message parser which registers extensions from the specified registry upon creating the message instance + /// + /// The extensions to register + /// A newly configured message parser. + public new MessageParser WithExtensionRegistry(ExtensionRegistry registry) => + new MessageParser(factory, DiscardUnknownFields, registry); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs.meta new file mode 100644 index 00000000..ea047c6a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/MessageParser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d71cc2c43a7ec447a0133fdba29db40 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs new file mode 100644 index 00000000..b2c6a67b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs @@ -0,0 +1,42 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf +{ + /// + /// Struct used to hold the keys for the fieldByNumber table in DescriptorPool and the keys for the + /// extensionByNumber table in ExtensionRegistry. + /// + internal struct ObjectIntPair : IEquatable> where T : class + { + private readonly int number; + private readonly T obj; + + internal ObjectIntPair(T obj, int number) + { + this.number = number; + this.obj = obj; + } + + public bool Equals(ObjectIntPair other) + { + return obj == other.obj + && number == other.number; + } + + public override bool Equals(object obj) => obj is ObjectIntPair pair && Equals(pair); + + public override int GetHashCode() + { + return obj.GetHashCode() * ((1 << 16) - 1) + number; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs.meta new file mode 100644 index 00000000..2c308543 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ObjectIntPair.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 05d3b3a4013f0bd40b93830291806f1c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs new file mode 100644 index 00000000..79a4758c --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs @@ -0,0 +1,267 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Buffers; +using System.Runtime.CompilerServices; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// An opaque struct that represents the current parsing state and is passed along + /// as the parsing proceeds. + /// All the public methods are intended to be invoked only by the generated code, + /// users should never invoke them directly. + /// + [SecuritySafeCritical] + public ref struct ParseContext + { + internal const int DefaultRecursionLimit = 100; + internal const int DefaultSizeLimit = int.MaxValue; + + internal ReadOnlySpan buffer; + internal ParserInternalState state; + + /// + /// Initialize a , building all from defaults and + /// the given . + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void Initialize(ReadOnlySpan buffer, out ParseContext ctx) + { + ParserInternalState state = default; + state.sizeLimit = DefaultSizeLimit; + state.recursionLimit = DefaultRecursionLimit; + state.currentLimit = int.MaxValue; + state.bufferSize = buffer.Length; + // Equivalent to Initialize(buffer, ref state, out ctx); + ctx.buffer = buffer; + ctx.state = state; + } + + /// + /// Initialize a using existing , e.g. from . + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void Initialize(ReadOnlySpan buffer, ref ParserInternalState state, out ParseContext ctx) + { + // Note: if this code ever changes, also change the initialization above. + ctx.buffer = buffer; + ctx.state = state; + } + + /// + /// Creates a ParseContext instance from CodedInputStream. + /// WARNING: internally this copies the CodedInputStream's state, so after done with the ParseContext, + /// the CodedInputStream's state needs to be updated. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void Initialize(CodedInputStream input, out ParseContext ctx) + { + ctx.buffer = new ReadOnlySpan(input.InternalBuffer); + // ideally we would use a reference to the original state, but that doesn't seem possible + // so we just copy the struct that holds the state. We will need to later store the state back + // into CodedInputStream if we want to keep it usable. + ctx.state = input.InternalState; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void Initialize(ReadOnlySequence input, out ParseContext ctx) + { + Initialize(input, DefaultRecursionLimit, out ctx); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void Initialize(ReadOnlySequence input, int recursionLimit, out ParseContext ctx) + { + ctx.buffer = default; + ctx.state = default; + ctx.state.lastTag = 0; + ctx.state.recursionDepth = 0; + ctx.state.sizeLimit = DefaultSizeLimit; + ctx.state.recursionLimit = recursionLimit; + ctx.state.currentLimit = int.MaxValue; + SegmentedBufferHelper.Initialize(input, out ctx.state.segmentedBufferHelper, out ctx.buffer); + ctx.state.bufferPos = 0; + ctx.state.bufferSize = ctx.buffer.Length; + + ctx.state.DiscardUnknownFields = false; + ctx.state.ExtensionRegistry = null; + } + + /// + /// Returns the last tag read, or 0 if no tags have been read or we've read beyond + /// the end of the input. + /// + internal uint LastTag => state.lastTag; + + /// + /// Internal-only property; when set to true, unknown fields will be discarded while parsing. + /// + internal bool DiscardUnknownFields + { + get => state.DiscardUnknownFields; + set => state.DiscardUnknownFields = value; + } + + /// + /// Internal-only property; provides extension identifiers to compatible messages while parsing. + /// + internal ExtensionRegistry ExtensionRegistry + { + get => state.ExtensionRegistry; + set => state.ExtensionRegistry = value; + } + + /// + /// Reads a field tag, returning the tag of 0 for "end of input". + /// + /// + /// If this method returns 0, it doesn't necessarily mean the end of all + /// the data in this CodedInputReader; it may be the end of the logical input + /// for an embedded message, for example. + /// + /// The next field tag, or 0 for end of input. (0 is never a valid tag.) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint ReadTag() => ParsingPrimitives.ParseTag(ref buffer, ref state); + + /// + /// Reads a double field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double ReadDouble() => ParsingPrimitives.ParseDouble(ref buffer, ref state); + + /// + /// Reads a float field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float ReadFloat() => ParsingPrimitives.ParseFloat(ref buffer, ref state); + + /// + /// Reads a uint64 field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong ReadUInt64() => ParsingPrimitives.ParseRawVarint64(ref buffer, ref state); + + /// + /// Reads an int64 field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long ReadInt64() => (long)ParsingPrimitives.ParseRawVarint64(ref buffer, ref state); + + /// + /// Reads an int32 field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int ReadInt32() => (int)ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + + /// + /// Reads a fixed64 field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong ReadFixed64() => ParsingPrimitives.ParseRawLittleEndian64(ref buffer, ref state); + + /// + /// Reads a fixed32 field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint ReadFixed32() => ParsingPrimitives.ParseRawLittleEndian32(ref buffer, ref state); + + /// + /// Reads a bool field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool ReadBool() => ParsingPrimitives.ParseRawVarint64(ref buffer, ref state) != 0; + + /// + /// Reads a string field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ReadString() => ParsingPrimitives.ReadString(ref buffer, ref state); + + /// + /// Reads an embedded message field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ReadMessage(IMessage message) => ParsingPrimitivesMessages.ReadMessage(ref this, message); + + /// + /// Reads an embedded group field from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ReadGroup(IMessage message) => ParsingPrimitivesMessages.ReadGroup(ref this, message); + + /// + /// Reads a bytes field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ByteString ReadBytes() => ParsingPrimitives.ReadBytes(ref buffer, ref state); + + /// + /// Reads a uint32 field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint ReadUInt32() => ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + + /// + /// Reads an enum field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int ReadEnum() + { + // Currently just a pass-through, but it's nice to separate it logically from WriteInt32. + return (int)ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + } + + /// + /// Reads an sfixed32 field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int ReadSFixed32() => (int)ParsingPrimitives.ParseRawLittleEndian32(ref buffer, ref state); + + /// + /// Reads an sfixed64 field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long ReadSFixed64() => (long)ParsingPrimitives.ParseRawLittleEndian64(ref buffer, ref state); + + /// + /// Reads an sint32 field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int ReadSInt32() => ParsingPrimitives.DecodeZigZag32(ParsingPrimitives.ParseRawVarint32(ref buffer, ref state)); + + /// + /// Reads an sint64 field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long ReadSInt64() => ParsingPrimitives.DecodeZigZag64(ParsingPrimitives.ParseRawVarint64(ref buffer, ref state)); + + /// + /// Reads a length for length-delimited data. + /// + /// + /// This is internally just reading a varint, but this method exists + /// to make the calling code clearer. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int ReadLength() => (int)ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + + internal void CopyStateTo(CodedInputStream input) + { + input.InternalState = state; + } + + internal void LoadStateFrom(CodedInputStream input) + { + state = input.InternalState; + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs.meta new file mode 100644 index 00000000..22b78531 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParseContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 88566e0590b24674796b6cf6437074cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs new file mode 100644 index 00000000..0c20446e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs @@ -0,0 +1,80 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf +{ + // warning: this is a mutable struct, so it needs to be only passed as a ref! + internal struct ParserInternalState + { + // NOTE: the Span representing the current buffer is kept separate so that this doesn't have to be a ref struct and so it can + // be included in CodedInputStream's internal state + + /// + /// The position within the current buffer (i.e. the next byte to read) + /// + internal int bufferPos; + + /// + /// Size of the current buffer + /// + internal int bufferSize; + + /// + /// If we are currently inside a length-delimited block, this is the number of + /// bytes in the buffer that are still available once we leave the delimited block. + /// + internal int bufferSizeAfterLimit; + + /// + /// The absolute position of the end of the current length-delimited block (including totalBytesRetired) + /// + internal int currentLimit; + + /// + /// The total number of consumed before the start of the current buffer. The + /// total bytes read up to the current position can be computed as + /// totalBytesRetired + bufferPos. + /// + internal int totalBytesRetired; + + internal int recursionDepth; // current recursion depth + + internal SegmentedBufferHelper segmentedBufferHelper; + + /// + /// The last tag we read. 0 indicates we've read to the end of the stream + /// (or haven't read anything yet). + /// + internal uint lastTag; + + /// + /// The next tag, used to store the value read by PeekTag. + /// + internal uint nextTag; + internal bool hasNextTag; + + // these fields are configuration, they should be readonly + internal int sizeLimit; + internal int recursionLimit; + + // If non-null, the top level parse method was started with given coded input stream as an argument + // which also means we can potentially fallback to calling MergeFrom(CodedInputStream cis) if needed. + internal CodedInputStream CodedInputStream => segmentedBufferHelper.CodedInputStream; + + /// + /// Internal-only property; when set to true, unknown fields will be discarded while parsing. + /// + internal bool DiscardUnknownFields { get; set; } + + /// + /// Internal-only property; provides extension identifiers to compatible messages while parsing. + /// + internal ExtensionRegistry ExtensionRegistry { get; set; } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs.meta new file mode 100644 index 00000000..e87ad67b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParserInternalState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40ba41373ca7a574aa07ee5da3f4107e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs new file mode 100644 index 00000000..0c342049 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs @@ -0,0 +1,789 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Buffers; +using System.Buffers.Binary; +using System.Collections.Generic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Primitives for parsing protobuf wire format. + /// + [SecuritySafeCritical] + internal static class ParsingPrimitives + { + private const int StackallocThreshold = 256; + + /// + /// Reads a length for length-delimited data. + /// + /// + /// This is internally just reading a varint, but this method exists + /// to make the calling code clearer. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ParseLength(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + return (int)ParseRawVarint32(ref buffer, ref state); + } + + /// + /// Parses the next tag. + /// If the end of logical stream was reached, an invalid tag of 0 is returned. + /// + public static uint ParseTag(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + // The "nextTag" logic is there only as an optimization for reading non-packed repeated / map + // fields and is strictly speaking not necessary. + // TODO: look into simplifying the ParseTag logic. + if (state.hasNextTag) + { + state.lastTag = state.nextTag; + state.hasNextTag = false; + return state.lastTag; + } + + // Optimize for the incredibly common case of having at least two bytes left in the buffer, + // and those two bytes being enough to get the tag. This will be true for fields up to 4095. + if (state.bufferPos + 2 <= state.bufferSize) + { + int tmp = buffer[state.bufferPos++]; + if (tmp < 128) + { + state.lastTag = (uint)tmp; + } + else + { + int result = tmp & 0x7f; + if ((tmp = buffer[state.bufferPos++]) < 128) + { + result |= tmp << 7; + state.lastTag = (uint) result; + } + else + { + // Nope, rewind and go the potentially slow route. + state.bufferPos -= 2; + state.lastTag = ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + } + } + } + else + { + if (SegmentedBufferHelper.IsAtEnd(ref buffer, ref state)) + { + state.lastTag = 0; + return 0; + } + + state.lastTag = ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + } + if (WireFormat.GetTagFieldNumber(state.lastTag) == 0) + { + // If we actually read a tag with a field of 0, that's not a valid tag. + throw InvalidProtocolBufferException.InvalidTag(); + } + return state.lastTag; + } + + /// + /// Peeks at the next tag in the stream. If it matches , + /// the tag is consumed and the method returns true; otherwise, the + /// stream is left in the original position and the method returns false. + /// + public static bool MaybeConsumeTag(ref ReadOnlySpan buffer, ref ParserInternalState state, uint tag) + { + if (PeekTag(ref buffer, ref state) == tag) + { + state.hasNextTag = false; + return true; + } + return false; + } + + /// + /// Peeks at the next field tag. This is like calling , but the + /// tag is not consumed. (So a subsequent call to will return the + /// same value.) + /// + public static uint PeekTag(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + if (state.hasNextTag) + { + return state.nextTag; + } + + uint savedLast = state.lastTag; + state.nextTag = ParseTag(ref buffer, ref state); + state.hasNextTag = true; + state.lastTag = savedLast; // Undo the side effect of ReadTag + return state.nextTag; + } + + /// + /// Parses a raw varint. + /// + public static ulong ParseRawVarint64(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + if (state.bufferPos + 10 > state.bufferSize) + { + return ParseRawVarint64SlowPath(ref buffer, ref state); + } + + ulong result = buffer[state.bufferPos++]; + if (result < 128) + { + return result; + } + result &= 0x7f; + int shift = 7; + do + { + byte b = buffer[state.bufferPos++]; + result |= (ulong)(b & 0x7F) << shift; + if (b < 0x80) + { + return result; + } + shift += 7; + } + while (shift < 64); + + throw InvalidProtocolBufferException.MalformedVarint(); + } + + private static ulong ParseRawVarint64SlowPath(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int shift = 0; + ulong result = 0; + do + { + byte b = ReadRawByte(ref buffer, ref state); + result |= (ulong)(b & 0x7F) << shift; + if (b < 0x80) + { + return result; + } + shift += 7; + } + while (shift < 64); + + throw InvalidProtocolBufferException.MalformedVarint(); + } + + /// + /// Parses a raw Varint. If larger than 32 bits, discard the upper bits. + /// This method is optimised for the case where we've got lots of data in the buffer. + /// That means we can check the size just once, then just read directly from the buffer + /// without constant rechecking of the buffer length. + /// + public static uint ParseRawVarint32(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + if (state.bufferPos + 5 > state.bufferSize) + { + return ParseRawVarint32SlowPath(ref buffer, ref state); + } + + int tmp = buffer[state.bufferPos++]; + if (tmp < 128) + { + return (uint)tmp; + } + int result = tmp & 0x7f; + if ((tmp = buffer[state.bufferPos++]) < 128) + { + result |= tmp << 7; + } + else + { + result |= (tmp & 0x7f) << 7; + if ((tmp = buffer[state.bufferPos++]) < 128) + { + result |= tmp << 14; + } + else + { + result |= (tmp & 0x7f) << 14; + if ((tmp = buffer[state.bufferPos++]) < 128) + { + result |= tmp << 21; + } + else + { + result |= (tmp & 0x7f) << 21; + result |= (tmp = buffer[state.bufferPos++]) << 28; + if (tmp >= 128) + { + // Discard upper 32 bits. + // Note that this has to use ReadRawByte() as we only ensure we've + // got at least 5 bytes at the start of the method. This lets us + // use the fast path in more cases, and we rarely hit this section of code. + for (int i = 0; i < 5; i++) + { + if (ReadRawByte(ref buffer, ref state) < 128) + { + return (uint) result; + } + } + throw InvalidProtocolBufferException.MalformedVarint(); + } + } + } + } + return (uint)result; + } + + private static uint ParseRawVarint32SlowPath(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int tmp = ReadRawByte(ref buffer, ref state); + if (tmp < 128) + { + return (uint) tmp; + } + int result = tmp & 0x7f; + if ((tmp = ReadRawByte(ref buffer, ref state)) < 128) + { + result |= tmp << 7; + } + else + { + result |= (tmp & 0x7f) << 7; + if ((tmp = ReadRawByte(ref buffer, ref state)) < 128) + { + result |= tmp << 14; + } + else + { + result |= (tmp & 0x7f) << 14; + if ((tmp = ReadRawByte(ref buffer, ref state)) < 128) + { + result |= tmp << 21; + } + else + { + result |= (tmp & 0x7f) << 21; + result |= (tmp = ReadRawByte(ref buffer, ref state)) << 28; + if (tmp >= 128) + { + // Discard upper 32 bits. + for (int i = 0; i < 5; i++) + { + if (ReadRawByte(ref buffer, ref state) < 128) + { + return (uint) result; + } + } + throw InvalidProtocolBufferException.MalformedVarint(); + } + } + } + } + return (uint) result; + } + + /// + /// Parses a 32-bit little-endian integer. + /// + public static uint ParseRawLittleEndian32(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + const int uintLength = sizeof(uint); + const int ulongLength = sizeof(ulong); + if (state.bufferPos + ulongLength > state.bufferSize) + { + return ParseRawLittleEndian32SlowPath(ref buffer, ref state); + } + // ReadUInt32LittleEndian is many times slower than ReadUInt64LittleEndian (at least on some runtimes) + // so it's faster better to use ReadUInt64LittleEndian and truncate the result. + uint result = (uint) BinaryPrimitives.ReadUInt64LittleEndian(buffer.Slice(state.bufferPos, ulongLength)); + state.bufferPos += uintLength; + return result; + } + + private static uint ParseRawLittleEndian32SlowPath(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + uint b1 = ReadRawByte(ref buffer, ref state); + uint b2 = ReadRawByte(ref buffer, ref state); + uint b3 = ReadRawByte(ref buffer, ref state); + uint b4 = ReadRawByte(ref buffer, ref state); + return b1 | (b2 << 8) | (b3 << 16) | (b4 << 24); + } + + /// + /// Parses a 64-bit little-endian integer. + /// + public static ulong ParseRawLittleEndian64(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + const int length = sizeof(ulong); + if (state.bufferPos + length > state.bufferSize) + { + return ParseRawLittleEndian64SlowPath(ref buffer, ref state); + } + ulong result = BinaryPrimitives.ReadUInt64LittleEndian(buffer.Slice(state.bufferPos, length)); + state.bufferPos += length; + return result; + } + + private static ulong ParseRawLittleEndian64SlowPath(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + ulong b1 = ReadRawByte(ref buffer, ref state); + ulong b2 = ReadRawByte(ref buffer, ref state); + ulong b3 = ReadRawByte(ref buffer, ref state); + ulong b4 = ReadRawByte(ref buffer, ref state); + ulong b5 = ReadRawByte(ref buffer, ref state); + ulong b6 = ReadRawByte(ref buffer, ref state); + ulong b7 = ReadRawByte(ref buffer, ref state); + ulong b8 = ReadRawByte(ref buffer, ref state); + return b1 | (b2 << 8) | (b3 << 16) | (b4 << 24) + | (b5 << 32) | (b6 << 40) | (b7 << 48) | (b8 << 56); + } + + /// + /// Parses a double value. + /// + public static double ParseDouble(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + const int length = sizeof(double); + if (!BitConverter.IsLittleEndian || state.bufferPos + length > state.bufferSize) + { + return BitConverter.Int64BitsToDouble((long)ParseRawLittleEndian64(ref buffer, ref state)); + } + // ReadUnaligned uses processor architecture for endianness. + double result = Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(buffer.Slice(state.bufferPos, length))); + state.bufferPos += length; + return result; + } + + /// + /// Parses a float value. + /// + public static float ParseFloat(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + const int length = sizeof(float); + if (!BitConverter.IsLittleEndian || state.bufferPos + length > state.bufferSize) + { + return ParseFloatSlow(ref buffer, ref state); + } + // ReadUnaligned uses processor architecture for endianness. + float result = Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(buffer.Slice(state.bufferPos, length))); + state.bufferPos += length; + return result; + } + + private static unsafe float ParseFloatSlow(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + const int length = sizeof(float); + byte* stackBuffer = stackalloc byte[length]; + Span tempSpan = new Span(stackBuffer, length); + for (int i = 0; i < length; i++) + { + tempSpan[i] = ReadRawByte(ref buffer, ref state); + } + + // Content is little endian. Reverse if needed to match endianness of architecture. + if (!BitConverter.IsLittleEndian) + { + tempSpan.Reverse(); + } + return Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(tempSpan)); + } + + /// + /// Reads a fixed size of bytes from the input. + /// + /// + /// the end of the stream or the current limit was reached + /// + public static byte[] ReadRawBytes(ref ReadOnlySpan buffer, ref ParserInternalState state, int size) + { + if (size < 0) + { + throw InvalidProtocolBufferException.NegativeSize(); + } + + if (size <= state.bufferSize - state.bufferPos) + { + // We have all the bytes we need already. + byte[] bytes = new byte[size]; + buffer.Slice(state.bufferPos, size).CopyTo(bytes); + state.bufferPos += size; + return bytes; + } + + return ReadRawBytesSlow(ref buffer, ref state, size); + } + + private static byte[] ReadRawBytesSlow(ref ReadOnlySpan buffer, ref ParserInternalState state, int size) + { + ValidateCurrentLimit(ref buffer, ref state, size); + + if ((!state.segmentedBufferHelper.TotalLength.HasValue && size < buffer.Length) || + IsDataAvailableInSource(ref state, size)) + { + // Reading more bytes than are in the buffer, but not an excessive number + // of bytes. We can safely allocate the resulting array ahead of time. + + byte[] bytes = new byte[size]; + ReadRawBytesIntoSpan(ref buffer, ref state, size, bytes); + return bytes; + } + else + { + // The size is very large. For security reasons, we can't allocate the + // entire byte array yet. The size comes directly from the input, so a + // maliciously-crafted message could provide a bogus very large size in + // order to trick the app into allocating a lot of memory. We avoid this + // by allocating and reading only a small chunk at a time, so that the + // malicious message must actually *be* extremely large to cause + // problems. Meanwhile, we limit the allowed size of a message elsewhere. + + List chunks = new List(); + + int pos = state.bufferSize - state.bufferPos; + byte[] firstChunk = new byte[pos]; + buffer.Slice(state.bufferPos, pos).CopyTo(firstChunk); + chunks.Add(firstChunk); + state.bufferPos = state.bufferSize; + + // Read all the rest of the bytes we need. + int sizeLeft = size - pos; + while (sizeLeft > 0) + { + state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); + byte[] chunk = new byte[Math.Min(sizeLeft, state.bufferSize)]; + + buffer.Slice(0, chunk.Length) + .CopyTo(chunk); + state.bufferPos += chunk.Length; + sizeLeft -= chunk.Length; + chunks.Add(chunk); + } + + // OK, got everything. Now concatenate it all into one buffer. + byte[] bytes = new byte[size]; + int newPos = 0; + foreach (byte[] chunk in chunks) + { + Buffer.BlockCopy(chunk, 0, bytes, newPos, chunk.Length); + newPos += chunk.Length; + } + + // Done. + return bytes; + } + } + + /// + /// Reads and discards bytes. + /// + /// the end of the stream + /// or the current limit was reached + public static void SkipRawBytes(ref ReadOnlySpan buffer, ref ParserInternalState state, int size) + { + if (size < 0) + { + throw InvalidProtocolBufferException.NegativeSize(); + } + + ValidateCurrentLimit(ref buffer, ref state, size); + + if (size <= state.bufferSize - state.bufferPos) + { + // We have all the bytes we need already. + state.bufferPos += size; + } + else + { + // Skipping more bytes than are in the buffer. First skip what we have. + int pos = state.bufferSize - state.bufferPos; + state.bufferPos = state.bufferSize; + + // TODO: If our segmented buffer is backed by a Stream that is seekable, we could skip the bytes more efficiently + // by simply updating stream's Position property. This used to be supported in the past, but the support was dropped + // because it would make the segmentedBufferHelper more complex. Support can be reintroduced if needed. + state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); + + while (size - pos > state.bufferSize) + { + pos += state.bufferSize; + state.bufferPos = state.bufferSize; + state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); + } + + state.bufferPos = size - pos; + } + } + + /// + /// Reads a string field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string ReadString(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int length = ParsingPrimitives.ParseLength(ref buffer, ref state); + return ParsingPrimitives.ReadRawString(ref buffer, ref state, length); + } + + /// + /// Reads a bytes field value from the input. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteString ReadBytes(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int length = ParsingPrimitives.ParseLength(ref buffer, ref state); + return ByteString.AttachBytes(ParsingPrimitives.ReadRawBytes(ref buffer, ref state, length)); + } + + /// + /// Reads a UTF-8 string from the next "length" bytes. + /// + /// + /// the end of the stream or the current limit was reached + /// + [SecuritySafeCritical] + public static string ReadRawString(ref ReadOnlySpan buffer, ref ParserInternalState state, int length) + { + // No need to read any data for an empty string. + if (length == 0) + { + return string.Empty; + } + + if (length < 0) + { + throw InvalidProtocolBufferException.NegativeSize(); + } + +#if GOOGLE_PROTOBUF_SUPPORT_FAST_STRING + if (length <= state.bufferSize - state.bufferPos) + { + // Fast path: all bytes to decode appear in the same span. + ReadOnlySpan data = buffer.Slice(state.bufferPos, length); + + string value; + unsafe + { + fixed (byte* sourceBytes = &MemoryMarshal.GetReference(data)) + { + value = WritingPrimitives.Utf8Encoding.GetString(sourceBytes, length); + } + } + + state.bufferPos += length; + return value; + } +#endif + + return ReadStringSlow(ref buffer, ref state, length); + } + + /// + /// Reads a string assuming that it is spread across multiple spans in a . + /// + private static string ReadStringSlow(ref ReadOnlySpan buffer, ref ParserInternalState state, int length) + { + ValidateCurrentLimit(ref buffer, ref state, length); + +#if GOOGLE_PROTOBUF_SUPPORT_FAST_STRING + if (IsDataAvailable(ref state, length)) + { + // Read string data into a temporary buffer, either stackalloc'ed or from ArrayPool + // Once all data is read then call Encoding.GetString on buffer and return to pool if needed. + + byte[] byteArray = null; + Span byteSpan = length <= StackallocThreshold ? + stackalloc byte[length] : + (byteArray = ArrayPool.Shared.Rent(length)); + + try + { + unsafe + { + fixed (byte* pByteSpan = &MemoryMarshal.GetReference(byteSpan)) + { + // Compiler doesn't like that a potentially stackalloc'd Span is being used + // in a method with a "ref Span buffer" argument. If the stackalloc'd span was assigned + // to the ref argument then bad things would happen. We'll never do that so it is ok. + // Make compiler happy by passing a new span created from pointer. + var tempSpan = new Span(pByteSpan, byteSpan.Length); + ReadRawBytesIntoSpan(ref buffer, ref state, length, tempSpan); + + return WritingPrimitives.Utf8Encoding.GetString(pByteSpan, length); + } + } + } + finally + { + if (byteArray != null) + { + ArrayPool.Shared.Return(byteArray); + } + } + } +#endif + + // Slow path: Build a byte array first then copy it. + // This will be called when reading from a Stream because we don't know the length of the stream, + // or there is not enough data in the sequence. If there is not enough data then ReadRawBytes will + // throw an exception. + return WritingPrimitives.Utf8Encoding.GetString(ReadRawBytes(ref buffer, ref state, length), 0, length); + } + + /// + /// Validates that the specified size doesn't exceed the current limit. If it does then remaining bytes + /// are skipped and an error is thrown. + /// + private static void ValidateCurrentLimit(ref ReadOnlySpan buffer, ref ParserInternalState state, int size) + { + if (state.totalBytesRetired + state.bufferPos + size > state.currentLimit) + { + // Read to the end of the stream (up to the current limit) anyway. + SkipRawBytes(ref buffer, ref state, state.currentLimit - state.totalBytesRetired - state.bufferPos); + // Then fail. + throw InvalidProtocolBufferException.TruncatedMessage(); + } + } + + [SecuritySafeCritical] + private static byte ReadRawByte(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + if (state.bufferPos == state.bufferSize) + { + state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); + } + return buffer[state.bufferPos++]; + } + + /// + /// Reads a varint from the input one byte at a time, so that it does not + /// read any bytes after the end of the varint. If you simply wrapped the + /// stream in a CodedInputStream and used ReadRawVarint32(Stream) + /// then you would probably end up reading past the end of the varint since + /// CodedInputStream buffers its input. + /// + /// + /// + public static uint ReadRawVarint32(Stream input) + { + int result = 0; + int offset = 0; + for (; offset < 32; offset += 7) + { + int b = input.ReadByte(); + if (b == -1) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + result |= (b & 0x7f) << offset; + if ((b & 0x80) == 0) + { + return (uint) result; + } + } + // Keep reading up to 64 bits. + for (; offset < 64; offset += 7) + { + int b = input.ReadByte(); + if (b == -1) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + if ((b & 0x80) == 0) + { + return (uint) result; + } + } + throw InvalidProtocolBufferException.MalformedVarint(); + } + + /// + /// Decode a 32-bit value with ZigZag encoding. + /// + /// + /// ZigZag encodes signed integers into values that can be efficiently + /// encoded with varint. (Otherwise, negative values must be + /// sign-extended to 32 bits to be varint encoded, thus always taking + /// 5 bytes on the wire.) + /// + public static int DecodeZigZag32(uint n) + { + return (int)(n >> 1) ^ -(int)(n & 1); + } + + /// + /// Decode a 64-bit value with ZigZag encoding. + /// + /// + /// ZigZag encodes signed integers into values that can be efficiently + /// encoded with varint. (Otherwise, negative values must be + /// sign-extended to 64 bits to be varint encoded, thus always taking + /// 10 bytes on the wire.) + /// + public static long DecodeZigZag64(ulong n) + { + return (long)(n >> 1) ^ -(long)(n & 1); + } + + /// + /// Checks whether there is known data available of the specified size remaining to parse. + /// When parsing from a Stream this can return false because we have no knowledge of the amount + /// of data remaining in the stream until it is read. + /// + public static bool IsDataAvailable(ref ParserInternalState state, int size) + { + // Data fits in remaining buffer + if (size <= state.bufferSize - state.bufferPos) + { + return true; + } + + return IsDataAvailableInSource(ref state, size); + } + + /// + /// Checks whether there is known data available of the specified size remaining to parse + /// in the underlying data source. + /// When parsing from a Stream this will return false because we have no knowledge of the amount + /// of data remaining in the stream until it is read. + /// + private static bool IsDataAvailableInSource(ref ParserInternalState state, int size) + { + // Data fits in remaining source data. + // Note that this will never be true when reading from a stream as the total length is unknown. + return size <= state.segmentedBufferHelper.TotalLength - state.totalBytesRetired - state.bufferPos; + } + + /// + /// Read raw bytes of the specified length into a span. The amount of data available and the current limit should + /// be checked before calling this method. + /// + private static void ReadRawBytesIntoSpan(ref ReadOnlySpan buffer, ref ParserInternalState state, int length, Span byteSpan) + { + int remainingByteLength = length; + while (remainingByteLength > 0) + { + if (state.bufferSize - state.bufferPos == 0) + { + state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); + } + + ReadOnlySpan unreadSpan = buffer.Slice(state.bufferPos, Math.Min(remainingByteLength, state.bufferSize - state.bufferPos)); + unreadSpan.CopyTo(byteSpan.Slice(length - remainingByteLength)); + + remainingByteLength -= unreadSpan.Length; + state.bufferPos += unreadSpan.Length; + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs.meta new file mode 100644 index 00000000..0ac5b45d --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitives.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98f335fa8d02cad408ac030a02f7e29d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs new file mode 100644 index 00000000..d06ea730 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs @@ -0,0 +1,267 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Buffers; +using System.Collections.Generic; +using System.Security; +using Google.Protobuf.Collections; + +namespace Google.Protobuf +{ + /// + /// Reading and skipping messages / groups + /// + [SecuritySafeCritical] + internal static class ParsingPrimitivesMessages + { + private static readonly byte[] ZeroLengthMessageStreamData = new byte[] { 0 }; + + public static void SkipLastField(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + if (state.lastTag == 0) + { + throw new InvalidOperationException("SkipLastField cannot be called at the end of a stream"); + } + switch (WireFormat.GetTagWireType(state.lastTag)) + { + case WireFormat.WireType.StartGroup: + SkipGroup(ref buffer, ref state, state.lastTag); + break; + case WireFormat.WireType.EndGroup: + throw new InvalidProtocolBufferException( + "SkipLastField called on an end-group tag, indicating that the corresponding start-group was missing"); + case WireFormat.WireType.Fixed32: + ParsingPrimitives.ParseRawLittleEndian32(ref buffer, ref state); + break; + case WireFormat.WireType.Fixed64: + ParsingPrimitives.ParseRawLittleEndian64(ref buffer, ref state); + break; + case WireFormat.WireType.LengthDelimited: + var length = ParsingPrimitives.ParseLength(ref buffer, ref state); + ParsingPrimitives.SkipRawBytes(ref buffer, ref state, length); + break; + case WireFormat.WireType.Varint: + ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + break; + } + } + + /// + /// Skip a group. + /// + public static void SkipGroup(ref ReadOnlySpan buffer, ref ParserInternalState state, uint startGroupTag) + { + // Note: Currently we expect this to be the way that groups are read. We could put the recursion + // depth changes into the ReadTag method instead, potentially... + state.recursionDepth++; + if (state.recursionDepth >= state.recursionLimit) + { + throw InvalidProtocolBufferException.RecursionLimitExceeded(); + } + uint tag; + while (true) + { + tag = ParsingPrimitives.ParseTag(ref buffer, ref state); + if (tag == 0) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + // Can't call SkipLastField for this case- that would throw. + if (WireFormat.GetTagWireType(tag) == WireFormat.WireType.EndGroup) + { + break; + } + // This recursion will allow us to handle nested groups. + SkipLastField(ref buffer, ref state); + } + int startField = WireFormat.GetTagFieldNumber(startGroupTag); + int endField = WireFormat.GetTagFieldNumber(tag); + if (startField != endField) + { + throw new InvalidProtocolBufferException( + $"Mismatched end-group tag. Started with field {startField}; ended with field {endField}"); + } + state.recursionDepth--; + } + + public static void ReadMessage(ref ParseContext ctx, IMessage message) + { + int length = ParsingPrimitives.ParseLength(ref ctx.buffer, ref ctx.state); + if (ctx.state.recursionDepth >= ctx.state.recursionLimit) + { + throw InvalidProtocolBufferException.RecursionLimitExceeded(); + } + int oldLimit = SegmentedBufferHelper.PushLimit(ref ctx.state, length); + ++ctx.state.recursionDepth; + + ReadRawMessage(ref ctx, message); + + CheckReadEndOfStreamTag(ref ctx.state); + // Check that we've read exactly as much data as expected. + if (!SegmentedBufferHelper.IsReachedLimit(ref ctx.state)) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + --ctx.state.recursionDepth; + SegmentedBufferHelper.PopLimit(ref ctx.state, oldLimit); + } + + public static KeyValuePair ReadMapEntry(ref ParseContext ctx, MapField.Codec codec) + { + int length = ParsingPrimitives.ParseLength(ref ctx.buffer, ref ctx.state); + if (ctx.state.recursionDepth >= ctx.state.recursionLimit) + { + throw InvalidProtocolBufferException.RecursionLimitExceeded(); + } + int oldLimit = SegmentedBufferHelper.PushLimit(ref ctx.state, length); + ++ctx.state.recursionDepth; + + TKey key = codec.KeyCodec.DefaultValue; + TValue value = codec.ValueCodec.DefaultValue; + + uint tag; + while ((tag = ctx.ReadTag()) != 0) + { + if (tag == codec.KeyCodec.Tag) + { + key = codec.KeyCodec.Read(ref ctx); + } + else if (tag == codec.ValueCodec.Tag) + { + value = codec.ValueCodec.Read(ref ctx); + } + else + { + SkipLastField(ref ctx.buffer, ref ctx.state); + } + } + + // Corner case: a map entry with a key but no value, where the value type is a message. + // Read it as if we'd seen input with no data (i.e. create a "default" message). + if (value == null) + { + if (ctx.state.CodedInputStream != null) + { + // the decoded message might not support parsing from ParseContext, so + // we need to allow fallback to the legacy MergeFrom(CodedInputStream) parsing. + value = codec.ValueCodec.Read(new CodedInputStream(ZeroLengthMessageStreamData)); + } + else + { + ParseContext.Initialize(new ReadOnlySequence(ZeroLengthMessageStreamData), out ParseContext zeroLengthCtx); + value = codec.ValueCodec.Read(ref zeroLengthCtx); + } + } + + CheckReadEndOfStreamTag(ref ctx.state); + // Check that we've read exactly as much data as expected. + if (!SegmentedBufferHelper.IsReachedLimit(ref ctx.state)) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + --ctx.state.recursionDepth; + SegmentedBufferHelper.PopLimit(ref ctx.state, oldLimit); + + return new KeyValuePair(key, value); + } + + public static void ReadGroup(ref ParseContext ctx, IMessage message) + { + if (ctx.state.recursionDepth >= ctx.state.recursionLimit) + { + throw InvalidProtocolBufferException.RecursionLimitExceeded(); + } + ++ctx.state.recursionDepth; + + uint tag = ctx.state.lastTag; + int fieldNumber = WireFormat.GetTagFieldNumber(tag); + ReadRawMessage(ref ctx, message); + CheckLastTagWas(ref ctx.state, WireFormat.MakeTag(fieldNumber, WireFormat.WireType.EndGroup)); + + --ctx.state.recursionDepth; + } + + public static void ReadGroup(ref ParseContext ctx, int fieldNumber, UnknownFieldSet set) + { + if (ctx.state.recursionDepth >= ctx.state.recursionLimit) + { + throw InvalidProtocolBufferException.RecursionLimitExceeded(); + } + ++ctx.state.recursionDepth; + + set.MergeGroupFrom(ref ctx); + CheckLastTagWas(ref ctx.state, WireFormat.MakeTag(fieldNumber, WireFormat.WireType.EndGroup)); + + --ctx.state.recursionDepth; + } + + public static void ReadRawMessage(ref ParseContext ctx, IMessage message) + { + if (message is IBufferMessage bufferMessage) + { + bufferMessage.InternalMergeFrom(ref ctx); + } + else + { + // If we reached here, it means we've ran into a nested message with older generated code + // which doesn't provide the InternalMergeFrom method that takes a ParseContext. + // With a slight performance overhead, we can still parse this message just fine, + // but we need to find the original CodedInputStream instance that initiated this + // parsing process and make sure its internal state is up to date. + // Note that this performance overhead is not very high (basically copying contents of a struct) + // and it will only be incurred in case the application mixes older and newer generated code. + // Regenerating the code from .proto files will remove this overhead because it will + // generate the InternalMergeFrom method we need. + + if (ctx.state.CodedInputStream == null) + { + // This can only happen when the parsing started without providing a CodedInputStream instance + // (e.g. ParseContext was created directly from a ReadOnlySequence). + // That also means that one of the new parsing APIs was used at the top level + // and in such case it is reasonable to require that all the nested message provide + // up-to-date generated code with ParseContext support (and fail otherwise). + throw new InvalidProtocolBufferException($"Message {message.GetType().Name} doesn't provide the generated method that enables ParseContext-based parsing. You might need to regenerate the generated protobuf code."); + } + + ctx.CopyStateTo(ctx.state.CodedInputStream); + try + { + // fallback parse using the CodedInputStream that started current parsing tree + message.MergeFrom(ctx.state.CodedInputStream); + } + finally + { + ctx.LoadStateFrom(ctx.state.CodedInputStream); + } + } + } + + /// + /// Verifies that the last call to ReadTag() returned tag 0 - in other words, + /// we've reached the end of the stream when we expected to. + /// + /// The + /// tag read was not the one specified + public static void CheckReadEndOfStreamTag(ref ParserInternalState state) + { + if (state.lastTag != 0) + { + throw InvalidProtocolBufferException.MoreDataAvailable(); + } + } + + private static void CheckLastTagWas(ref ParserInternalState state, uint expectedTag) + { + if (state.lastTag != expectedTag) { + throw InvalidProtocolBufferException.InvalidEndTag(); + } + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs.meta new file mode 100644 index 00000000..8b5ed905 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesMessages.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d31c64358a03d3945ba46801f49c5870 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs new file mode 100644 index 00000000..78305acf --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs @@ -0,0 +1,324 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Fast parsing primitives for wrapper types + /// + [SecuritySafeCritical] + internal static class ParsingPrimitivesWrappers + { + internal static float? ReadFloatWrapperLittleEndian(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + // length:1 + tag:1 + value:4 = 6 bytes + if (state.bufferPos + 6 <= state.bufferSize) + { + // The entire wrapper message is already contained in `buffer`. + int length = buffer[state.bufferPos]; + if (length == 0) + { + state.bufferPos++; + return 0F; + } + // tag:1 + value:4 = length of 5 bytes + // field=1, type=32-bit = tag of 13 + if (length != 5 || buffer[state.bufferPos + 1] != 13) + { + return ReadFloatWrapperSlow(ref buffer, ref state); + } + state.bufferPos += 2; + return ParsingPrimitives.ParseFloat(ref buffer, ref state); + } + else + { + return ReadFloatWrapperSlow(ref buffer, ref state); + } + } + + internal static float? ReadFloatWrapperSlow(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int length = ParsingPrimitives.ParseLength(ref buffer, ref state); + if (length == 0) + { + return 0F; + } + int finalBufferPos = state.totalBytesRetired + state.bufferPos + length; + float result = 0F; + do + { + // field=1, type=32-bit = tag of 13 + if (ParsingPrimitives.ParseTag(ref buffer, ref state) == 13) + { + result = ParsingPrimitives.ParseFloat(ref buffer, ref state); + } + else + { + ParsingPrimitivesMessages.SkipLastField(ref buffer, ref state); + } + } + while (state.totalBytesRetired + state.bufferPos < finalBufferPos); + return result; + } + + internal static double? ReadDoubleWrapperLittleEndian(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + // length:1 + tag:1 + value:8 = 10 bytes + if (state.bufferPos + 10 <= state.bufferSize) + { + // The entire wrapper message is already contained in `buffer`. + int length = buffer[state.bufferPos]; + if (length == 0) + { + state.bufferPos++; + return 0D; + } + // tag:1 + value:8 = length of 9 bytes + // field=1, type=64-bit = tag of 9 + if (length != 9 || buffer[state.bufferPos + 1] != 9) + { + return ReadDoubleWrapperSlow(ref buffer, ref state); + } + state.bufferPos += 2; + return ParsingPrimitives.ParseDouble(ref buffer, ref state); + } + else + { + return ReadDoubleWrapperSlow(ref buffer, ref state); + } + } + + internal static double? ReadDoubleWrapperSlow(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int length = ParsingPrimitives.ParseLength(ref buffer, ref state); + if (length == 0) + { + return 0D; + } + int finalBufferPos = state.totalBytesRetired + state.bufferPos + length; + double result = 0D; + do + { + // field=1, type=64-bit = tag of 9 + if (ParsingPrimitives.ParseTag(ref buffer, ref state) == 9) + { + result = ParsingPrimitives.ParseDouble(ref buffer, ref state); + } + else + { + ParsingPrimitivesMessages.SkipLastField(ref buffer, ref state); + } + } + while (state.totalBytesRetired + state.bufferPos < finalBufferPos); + return result; + } + + internal static bool? ReadBoolWrapper(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + return ReadUInt64Wrapper(ref buffer, ref state) != 0; + } + + internal static uint? ReadUInt32Wrapper(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + // field=1, type=varint = tag of 8 + const int expectedTag = 8; + // length:1 + tag:1 + value:10(varint64-max) = 12 bytes + // Value can be 64 bits for negative integers + if (state.bufferPos + 12 <= state.bufferSize) + { + // The entire wrapper message is already contained in `buffer`. + int pos0 = state.bufferPos; + int length = buffer[state.bufferPos++]; + if (length == 0) + { + return 0; + } + // Length will always fit in a single byte. + if (length >= 128) + { + state.bufferPos = pos0; + return ReadUInt32WrapperSlow(ref buffer, ref state); + } + int finalBufferPos = state.bufferPos + length; + if (buffer[state.bufferPos++] != expectedTag) + { + state.bufferPos = pos0; + return ReadUInt32WrapperSlow(ref buffer, ref state); + } + var result = ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + // Verify this message only contained a single field. + if (state.bufferPos != finalBufferPos) + { + state.bufferPos = pos0; + return ReadUInt32WrapperSlow(ref buffer, ref state); + } + return result; + } + else + { + return ReadUInt32WrapperSlow(ref buffer, ref state); + } + } + + internal static uint? ReadUInt32WrapperSlow(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + int length = ParsingPrimitives.ParseLength(ref buffer, ref state); + if (length == 0) + { + return 0; + } + int finalBufferPos = state.totalBytesRetired + state.bufferPos + length; + uint result = 0; + do + { + // field=1, type=varint = tag of 8 + if (ParsingPrimitives.ParseTag(ref buffer, ref state) == 8) + { + result = ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); + } + else + { + ParsingPrimitivesMessages.SkipLastField(ref buffer, ref state); + } + } + while (state.totalBytesRetired + state.bufferPos < finalBufferPos); + return result; + } + + internal static int? ReadInt32Wrapper(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + return (int?)ReadUInt32Wrapper(ref buffer, ref state); + } + + internal static ulong? ReadUInt64Wrapper(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + // field=1, type=varint = tag of 8 + const int expectedTag = 8; + // length:1 + tag:1 + value:10(varint64-max) = 12 bytes + if (state.bufferPos + 12 <= state.bufferSize) + { + // The entire wrapper message is already contained in `buffer`. + int pos0 = state.bufferPos; + int length = buffer[state.bufferPos++]; + if (length == 0) + { + return 0L; + } + // Length will always fit in a single byte. + if (length >= 128) + { + state.bufferPos = pos0; + return ReadUInt64WrapperSlow(ref buffer, ref state); + } + int finalBufferPos = state.bufferPos + length; + if (buffer[state.bufferPos++] != expectedTag) + { + state.bufferPos = pos0; + return ReadUInt64WrapperSlow(ref buffer, ref state); + } + var result = ParsingPrimitives.ParseRawVarint64(ref buffer, ref state); + // Verify this message only contained a single field. + if (state.bufferPos != finalBufferPos) + { + state.bufferPos = pos0; + return ReadUInt64WrapperSlow(ref buffer, ref state); + } + return result; + } + else + { + return ReadUInt64WrapperSlow(ref buffer, ref state); + } + } + + internal static ulong? ReadUInt64WrapperSlow(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + // field=1, type=varint = tag of 8 + const int expectedTag = 8; + int length = ParsingPrimitives.ParseLength(ref buffer, ref state); + if (length == 0) + { + return 0L; + } + int finalBufferPos = state.totalBytesRetired + state.bufferPos + length; + ulong result = 0L; + do + { + if (ParsingPrimitives.ParseTag(ref buffer, ref state) == expectedTag) + { + result = ParsingPrimitives.ParseRawVarint64(ref buffer, ref state); + } + else + { + ParsingPrimitivesMessages.SkipLastField(ref buffer, ref state); + } + } + while (state.totalBytesRetired + state.bufferPos < finalBufferPos); + return result; + } + + internal static long? ReadInt64Wrapper(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + return (long?)ReadUInt64Wrapper(ref buffer, ref state); + } + + internal static float? ReadFloatWrapperLittleEndian(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadFloatWrapperLittleEndian(ref ctx.buffer, ref ctx.state); + } + + internal static float? ReadFloatWrapperSlow(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadFloatWrapperSlow(ref ctx.buffer, ref ctx.state); + } + + internal static double? ReadDoubleWrapperLittleEndian(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadDoubleWrapperLittleEndian(ref ctx.buffer, ref ctx.state); + } + + internal static double? ReadDoubleWrapperSlow(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadDoubleWrapperSlow(ref ctx.buffer, ref ctx.state); + } + + internal static bool? ReadBoolWrapper(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadBoolWrapper(ref ctx.buffer, ref ctx.state); + } + + internal static uint? ReadUInt32Wrapper(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadUInt32Wrapper(ref ctx.buffer, ref ctx.state); + } + + internal static int? ReadInt32Wrapper(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadInt32Wrapper(ref ctx.buffer, ref ctx.state); + } + + internal static ulong? ReadUInt64Wrapper(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadUInt64Wrapper(ref ctx.buffer, ref ctx.state); + } + + internal static ulong? ReadUInt64WrapperSlow(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadUInt64WrapperSlow(ref ctx.buffer, ref ctx.state); + } + + internal static long? ReadInt64Wrapper(ref ParseContext ctx) + { + return ParsingPrimitivesWrappers.ReadInt64Wrapper(ref ctx.buffer, ref ctx.state); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs.meta new file mode 100644 index 00000000..3822ff9e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ParsingPrimitivesWrappers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0927c986d1cbe2d4a833a6c3d6fdc6c6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties.meta new file mode 100644 index 00000000..e876d0dd --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e79c1a9373841064aaa1937443f9996c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..33aa59ee --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Runtime.CompilerServices; +using System.Security; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. + +#if !NCRUNCH +[assembly: AllowPartiallyTrustedCallers] +#endif + +#if SIGNING_DISABLED +[assembly: InternalsVisibleTo("Google.Protobuf.Test")] +#else +[assembly: InternalsVisibleTo("Google.Protobuf.Test, PublicKey=" + + "002400000480000094000000060200000024000052534131000400000100010025800fbcfc63a1" + + "7c66b303aae80b03a6beaa176bb6bef883be436f2a1579edd80ce23edf151a1f4ced97af83abcd" + + "981207041fd5b2da3b498346fcfcd94910d52f25537c4a43ce3fbe17dc7d43e6cbdb4d8f1242dc" + + "b6bd9b5906be74da8daa7d7280f97130f318a16c07baf118839b156299a48522f9fae2371c9665" + + "c5ae9cb6")] +#endif \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs.meta new file mode 100644 index 00000000..dd828312 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Properties/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2c62632d01729a74e8433d32b97736a6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs new file mode 100644 index 00000000..5991f826 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs @@ -0,0 +1,56 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf +{ + /// + /// Helper methods for throwing exceptions when preconditions are not met. + /// + /// + /// This class is used internally and by generated code; it is not particularly + /// expected to be used from application code, although nothing prevents it + /// from being used that way. + /// + public static class ProtoPreconditions + { + /// + /// Throws an ArgumentNullException if the given value is null, otherwise + /// return the value to the caller. + /// + public static T CheckNotNull(T value, string name) where T : class + { + if (value == null) + { + throw new ArgumentNullException(name); + } + return value; + } + + /// + /// Throws an ArgumentNullException if the given value is null, otherwise + /// return the value to the caller. + /// + /// + /// This is equivalent to but without the type parameter + /// constraint. In most cases, the constraint is useful to prevent you from calling CheckNotNull + /// with a value type - but it gets in the way if either you want to use it with a nullable + /// value type, or you want to use it with an unconstrained type parameter. + /// + internal static T CheckNotNullUnconstrained(T value, string name) + { + if (value == null) + { + throw new ArgumentNullException(name); + } + return value; + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs.meta new file mode 100644 index 00000000..1d9114e5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/ProtoPreconditions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 80df13305b55912419f782cde224aaef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection.meta new file mode 100644 index 00000000..b0db5fe2 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7c3a7e4395145f04a9606a01cdb7ff7c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs new file mode 100644 index 00000000..43b5a4c5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs @@ -0,0 +1,313 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2017 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Reflection; + +namespace Google.Protobuf.Reflection +{ + /// + /// Container for a set of custom options specified within a message, field etc. + /// + /// + /// + /// This type is publicly immutable, but internally mutable. It is only populated + /// by the descriptor parsing code - by the time any user code is able to see an instance, + /// it will be fully initialized. + /// + /// + /// If an option is requested using the incorrect method, an answer may still be returned: all + /// of the numeric types are represented internally using 64-bit integers, for example. It is up to + /// the caller to ensure that they make the appropriate method call for the option they're interested in. + /// Note that enum options are simply stored as integers, so the value should be fetched using + /// and then cast appropriately. + /// + /// + /// Repeated options are currently not supported. Asking for a single value of an option + /// which was actually repeated will return the last value, except for message types where + /// all the set values are merged together. + /// + /// + [DebuggerDisplay("Count = {DebugCount}")] + [DebuggerTypeProxy(typeof(CustomOptionsDebugView))] + public sealed class CustomOptions + { + private const string UnreferencedCodeMessage = "CustomOptions is incompatible with trimming."; + + private static readonly object[] EmptyParameters = new object[0]; + private readonly IDictionary values; + + internal CustomOptions(IDictionary values) + { + this.values = values; + } + + /// + /// Retrieves a Boolean value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetBool(int field, out bool value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a signed 32-bit integer value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetInt32(int field, out int value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a signed 64-bit integer value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetInt64(int field, out long value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves an unsigned 32-bit integer value for the specified option field, + /// assuming a fixed-length representation. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetFixed32(int field, out uint value) => TryGetUInt32(field, out value); + + /// + /// Retrieves an unsigned 64-bit integer value for the specified option field, + /// assuming a fixed-length representation. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetFixed64(int field, out ulong value) => TryGetUInt64(field, out value); + + /// + /// Retrieves a signed 32-bit integer value for the specified option field, + /// assuming a fixed-length representation. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetSFixed32(int field, out int value) => TryGetInt32(field, out value); + + /// + /// Retrieves a signed 64-bit integer value for the specified option field, + /// assuming a fixed-length representation. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetSFixed64(int field, out long value) => TryGetInt64(field, out value); + + /// + /// Retrieves a signed 32-bit integer value for the specified option field, + /// assuming a zigzag encoding. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetSInt32(int field, out int value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a signed 64-bit integer value for the specified option field, + /// assuming a zigzag encoding. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetSInt64(int field, out long value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves an unsigned 32-bit integer value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetUInt32(int field, out uint value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves an unsigned 64-bit integer value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetUInt64(int field, out ulong value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a 32-bit floating point value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetFloat(int field, out float value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a 64-bit floating point value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetDouble(int field, out double value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a string value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetString(int field, out string value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a bytes value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetBytes(int field, out ByteString value) => TryGetPrimitiveValue(field, out value); + + /// + /// Retrieves a message value for the specified option field. + /// + /// The field to fetch the value for. + /// The output variable to populate. + /// true if a suitable value for the field was found; false otherwise. + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + public bool TryGetMessage(int field, out T value) where T : class, IMessage, new() + { + if (values == null) + { + value = default; + return false; + } + + if (values.TryGetValue(field, out IExtensionValue extensionValue)) + { + if (extensionValue is ExtensionValue single) + { + ByteString bytes = single.GetValue().ToByteString(); + value = new T(); + value.MergeFrom(bytes); + return true; + } + else if (extensionValue is RepeatedExtensionValue repeated) + { + value = repeated.GetValue() + .Select(v => v.ToByteString()) + .Aggregate(new T(), (t, b) => + { + t.MergeFrom(b); + return t; + }); + return true; + } + } + + value = null; + return false; + } + + [RequiresUnreferencedCode(UnreferencedCodeMessage)] + private bool TryGetPrimitiveValue(int field, out T value) + { + if (values == null) + { + value = default; + return false; + } + + if (values.TryGetValue(field, out IExtensionValue extensionValue)) + { + if (extensionValue is ExtensionValue single) + { + value = single.GetValue(); + return true; + } + else if (extensionValue is RepeatedExtensionValue repeated) + { + if (repeated.GetValue().Count != 0) + { + RepeatedField repeatedField = repeated.GetValue(); + value = repeatedField[repeatedField.Count - 1]; + return true; + } + } + else // and here we find explicit enum handling since T : Enum ! x is ExtensionValue + { + var type = extensionValue.GetType(); + if (type.GetGenericTypeDefinition() == typeof(ExtensionValue<>)) + { + var typeInfo = type.GetTypeInfo(); + var typeArgs = typeInfo.GenericTypeArguments; + if (typeArgs.Length == 1 && typeArgs[0].GetTypeInfo().IsEnum) + { + value = (T)typeInfo.GetDeclaredMethod(nameof(ExtensionValue.GetValue)).Invoke(extensionValue, EmptyParameters); + return true; + } + } + else if (type.GetGenericTypeDefinition() == typeof(RepeatedExtensionValue<>)) + { + var typeInfo = type.GetTypeInfo(); + var typeArgs = typeInfo.GenericTypeArguments; + if (typeArgs.Length == 1 && typeArgs[0].GetTypeInfo().IsEnum) + { + var values = (IList)typeInfo.GetDeclaredMethod(nameof(RepeatedExtensionValue.GetValue)).Invoke(extensionValue, EmptyParameters); + if (values.Count != 0) + { + value = (T)values[values.Count - 1]; + return true; + } + } + } + } + } + + value = default; + return false; + } + + private int DebugCount => values?.Count ?? 0; + + private sealed class CustomOptionsDebugView + { + private readonly CustomOptions customOptions; + + public CustomOptionsDebugView(CustomOptions customOptions) + { + this.customOptions = customOptions; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public KeyValuePair[] Items => customOptions.values?.ToArray() ?? new KeyValuePair[0]; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs.meta new file mode 100644 index 00000000..17084684 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/CustomOptions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58bd1b29dd35c334782e661daa1d3daf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs new file mode 100644 index 00000000..c7ea7e16 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs @@ -0,0 +1,14984 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/descriptor.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 Google.Protobuf.Reflection { + + /// Holder for reflection information generated from google/protobuf/descriptor.proto + public static partial class DescriptorReflection { + + #region Descriptor + /// File descriptor for google/protobuf/descriptor.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static DescriptorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bxIPZ29vZ2xlLnBy", + "b3RvYnVmIlUKEUZpbGVEZXNjcmlwdG9yU2V0EjIKBGZpbGUYASADKAsyJC5n", + "b29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byoMCIDsyv8BEIHs", + "yv8BIoYEChNGaWxlRGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkSDwoH", + "cGFja2FnZRgCIAEoCRISCgpkZXBlbmRlbmN5GAMgAygJEhkKEXB1YmxpY19k", + "ZXBlbmRlbmN5GAogAygFEhcKD3dlYWtfZGVwZW5kZW5jeRgLIAMoBRI2Cgxt", + "ZXNzYWdlX3R5cGUYBCADKAsyIC5nb29nbGUucHJvdG9idWYuRGVzY3JpcHRv", + "clByb3RvEjcKCWVudW1fdHlwZRgFIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5F", + "bnVtRGVzY3JpcHRvclByb3RvEjgKB3NlcnZpY2UYBiADKAsyJy5nb29nbGUu", + "cHJvdG9idWYuU2VydmljZURlc2NyaXB0b3JQcm90bxI4CglleHRlbnNpb24Y", + "ByADKAsyJS5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJvdG8S", + "LQoHb3B0aW9ucxgIIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9u", + "cxI5ChBzb3VyY2VfY29kZV9pbmZvGAkgASgLMh8uZ29vZ2xlLnByb3RvYnVm", + "LlNvdXJjZUNvZGVJbmZvEg4KBnN5bnRheBgMIAEoCRIpCgdlZGl0aW9uGA4g", + "ASgOMhguZ29vZ2xlLnByb3RvYnVmLkVk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VuZXJpY19zZXJ2", + "aWNlcxgQIAEoCDoFZmFsc2USJAoVamF2YV9nZW5lcmljX3NlcnZpY2VzGBEg", + "ASgIOgVmYWxzZRIiChNweV9nZW5lcmljX3NlcnZpY2VzGBIgASgIOgVmYWxz", + "ZRIZCgpkZXByZWNhdGVkGBcgASgIOgVmYWxzZRIeChBjY19lbmFibGVfYXJl", + "bmFzGB8gASgIOgR0cnVlEhkKEW9iamNfY2xhc3NfcHJlZml4GCQgASgJEhgK", + "EGNzaGFycF9uYW1lc3BhY2UYJSABKAkSFAoMc3dpZnRfcHJlZml4GCcgASgJ", + "EhgKEHBocF9jbGFzc19wcmVmaXgYKCABKAkSFQoNcGhwX25hbWVzcGFjZRgp", + "IAEoCRIeChZwaHBfbWV0YWRhdGFfbmFtZXNwYWNlGCwgASgJEhQKDHJ1Ynlf", + "cGFja2FnZRgtIAEoCRItCghmZWF0dXJlcxgyIAEoCzIbLmdvb2dsZS5wcm90", + "b2J1Zi5GZWF0dXJlU2V0EkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMo", + "CzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uIjoKDE9w", + "dGltaXplTW9kZRIJCgVTUEVFRBABEg0KCUNPREVfU0laRRACEhAKDExJVEVf", + "UlVOVElNRRADKgkI6AcQgICAgAJKBAgqECtKBAgmECdSFHBocF9nZW5lcmlj", + "X3NlcnZpY2VzIucCCg5NZXNzYWdlT3B0aW9ucxImChdtZXNzYWdlX3NldF93", + "aXJlX2Zvcm1hdBgBIAEoCDoFZmFsc2USLgofbm9fc3RhbmRhcmRfZGVzY3Jp", + "cHRvcl9hY2Nlc3NvchgCIAEoCDoFZmFsc2USGQoKZGVwcmVjYXRlZBgDIAEo", + "CDoFZmFsc2USEQoJbWFwX2VudHJ5GAcgASgIEjIKJmRlcHJlY2F0ZWRfbGVn", + "YWN5X2pzb25fZmllbGRfY29uZmxpY3RzGAsgASgIQgIYARItCghmZW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PcHRpb24q", + "CQjoBxCAgICAAiKqAQoOU2VydmljZU9wdGlvbnMSLQoIZmVhdHVyZXMYIiAB", + "KAsyGy5nb29nbGUucHJvdG9idWYuRmVhdHVyZVNldBIZCgpkZXByZWNhdGVk", + "GCEgASgIOgVmYWxzZRJDChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsy", + "JC5nb29nbGUucHJvdG9idWYuVW5pbnRlcnByZXRlZE9wdGlvbioJCOgHEICA", + "gIACItwCCg1NZXRob2RPcHRpb25zEhkKCmRlcHJlY2F0ZWQYISABKAg6BWZh", + "bHNlEl8KEWlkZW1wb3RlbmN5X2xldmVsGCIgASgOMi8uZ29vZ2xlLnByb3Rv", + "YnVmLk1ldGhvZE9wdGlvbnMuSWRlbXBvdGVuY3lMZXZlbDoTSURFTVBPVEVO", + "Q1lfVU5LTk9XThItCghmZWF0dXJlcxgjIAEoCzIbLmdvb2dsZS5wcm90b2J1", + "Zi5GZWF0dXJlU2V0EkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIk", + "Lmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uIlAKEElkZW1w", + "b3RlbmN5TGV2ZWwSFwoTSURFTVBPVEVOQ1lfVU5LTk9XThAAEhMKD05PX1NJ", + "REVfRUZGRUNUUxABEg4KCklERU1QT1RFTlQQAioJCOgHEICAgIACIp4CChNV", + "bmludGVycHJldGVkT3B0aW9uEjsKBG5hbWUYAiADKAsyLS5nb29nbGUucHJv", + "dG9idWYuVW5pbnRlcnByZXRlZE9wdGlvbi5OYW1lUGFydBIYChBpZGVudGlm", + "aWVyX3ZhbHVlGAMgASgJEhoKEnBvc2l0aXZlX2ludF92YWx1ZRgEIAEoBBIa", + "ChJuZWdhdGl2ZV9pbnRfdmFsdWUYBSABKAMSFAoMZG91YmxlX3ZhbHVlGAYg", + "ASgBEhQKDHN0cmluZ192YWx1ZRgHIAEoDBIXCg9hZ2dyZWdhdGVfdmFsdWUY",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X0JFU1RfRUZGT1JUGIQHogEK", + "EgVBTExPVxjnB7IBAwjoByJcCg1GaWVsZFByZXNlbmNlEhoKFkZJRUxEX1BS", + "RVNFTkNFX1VOS05PV04QABIMCghFWFBMSUNJVBABEgwKCElNUExJQ0lUEAIS", + "EwoPTEVHQUNZX1JFUVVJUkVEEAMiNwoIRW51bVR5cGUSFQoRRU5VTV9UWVBF", + "X1VOS05PV04QABIICgRPUEVOEAESCgoGQ0xPU0VEEAIiVgoVUmVwZWF0ZWRG", + "aWVsZEVuY29kaW5nEiMKH1JFUEVBVEVEX0ZJRUxEX0VOQ09ESU5HX1VOS05P", + "V04QABIKCgZQQUNLRUQQARIMCghFWFBBTkRFRBACIkkKDlV0ZjhWYWxpZGF0", + "aW9uEhsKF1VURjhfVkFMSURBVElPTl9VTktOT1dOEAASCgoGVkVSSUZZEAIS", + "CAoETk9ORRADIgQIARABIlMKD01lc3NhZ2VFbmNvZGluZxIcChhNRVNTQUdF", + "X0VOQ09ESU5HX1VOS05PV04QABITCg9MRU5HVEhfUFJFRklYRUQQARINCglE", + "RUxJTUlURUQQAiJICgpKc29uRm9ybWF0EhcKE0pTT05fRk9STUFUX1VOS05P", + "V04QABIJCgVBTExPVxABEhYKEkxFR0FDWV9CRVNUX0VGRk9SVBACKgYI6AcQ", + "i04qBgiLThCQTioGCJBOEJFOSgYI5wcQ6AcimAMKEkZlYXR1cmVTZXREZWZh", + "dWx0cxJOCghkZWZhdWx0cxgBIAMoCzI8Lmdvb2dsZS5wcm90b2J1Zi5GZWF0", + "dXJlU2V0RGVmYXVsdHMuRmVhdHVyZVNldEVkaXRpb25EZWZhdWx0EjEKD21p", + "bmltdW1fZWRpdGlvbhgEIAEoDjIYLmdvb2dsZS5wcm90b2J1Zi5FZGl0aW9u", + "EjEKD21heGltdW1fZWRpdGlvbhgFIAEoDjIYLmdvb2dsZS5wcm90b2J1Zi5F", + "ZGl0aW9uGssBChhGZWF0dXJlU2V0RWRpdGlvbkRlZmF1bHQSK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JT05fUFJPVE8yEOYHEhMKDkVE", + "SVRJT05fUFJPVE8zEOcHEhEKDEVESVRJT05fMjAyMxDoBxIRCgxFRElUSU9O", + "XzIwMjQQ6QcSFwoTRURJVElPTl8xX1RFU1RfT05MWRABEhcKE0VESVRJT05f", + "Ml9URVNUX09OTFkQAhIdChdFRElUSU9OXzk5OTk3X1RFU1RfT05MWRCdjQYS", + "HQoXRURJVElPTl85OTk5OF9URVNUX09OTFkQno0GEh0KF0VESVRJT05fOTk5", + "OTlfVEVTVF9PTkxZEJ+NBhITCgtFRElUSU9OX01BWBD/////B0J+ChNjb20u", + "Z29vZ2xlLnByb3RvYnVmQhBEZXNjcmlwdG9yUHJvdG9zSAFaLWdvb2dsZS5n", + "b2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2Rlc2NyaXB0b3JwYvgBAaICA0dQ", + "QqoCGkdvb2dsZS5Qcm90b2J1Zi5SZWZsZWN0aW9u")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.Reflection.Edition), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileDescriptorSet), global::Google.Protobuf.Reflection.FileDescriptorSet.Parser, new[]{ "File" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileDescriptorProto), global::Google.Protobuf.Reflection.FileDescriptorProto.Parser, new[]{ "Name", "Package", "Dependency", "PublicDependency", "WeakDependency", "MessageType", "EnumType", "Service", "Extension", "Options", "SourceCodeInfo", "Syntax", "Edition" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.DescriptorProto), global::Google.Protobuf.Reflection.DescriptorProto.Parser, new[]{ "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "OneofDecl", "Options", "ReservedRange", "ReservedName" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange), global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange.Parser, new[]{ "Start", "End", "Options" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange), global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange.Parser, new[]{ "Start", "End" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ExtensionRangeOptions), global::Google.Protobuf.Reflection.ExtensionRangeOptions.Parser, new[]{ "UninterpretedOption", "Declaration", "Features", "Verification" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.Declaration), global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.Declaration.Parser, new[]{ "Number", "FullName", "Type", "Reserved", "Repeated" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldDescriptorProto), global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser, new[]{ "Name", "Number", "Label", "Type", "TypeName", "Extendee", "DefaultValue", "OneofIndex", "JsonName", "Options", "Proto3Optional" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type), typeof(global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.OneofDescriptorProto), global::Google.Protobuf.Reflection.OneofDescriptorProto.Parser, new[]{ "Name", "Options" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumDescriptorProto), global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser, new[]{ "Name", "Value", "Options", "ReservedRange", "ReservedName" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange), global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange.Parser, new[]{ "Start", "End" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumValueDescriptorProto), global::Google.Protobuf.Reflection.EnumValueDescriptorProto.Parser, new[]{ "Name", "Number", "Options" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceDescriptorProto), global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser, new[]{ "Name", "Method", "Options" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodDescriptorProto), global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser, new[]{ "Name", "InputType", "OutputType", "Options", "ClientStreaming", "ServerStreaming" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FileOptions), global::Google.Protobuf.Reflection.FileOptions.Parser, new[]{ "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHash", "JavaStringCheckUtf8", "OptimizeFor", "GoPackage", "CcGenericServices", "JavaGenericServices", "PyGenericServices", "Deprecated", "CcEnableArenas", "ObjcClassPrefix", "CsharpNamespace", "SwiftPrefix", "PhpClassPrefix", "PhpNamespace", "PhpMetadataNamespace", "RubyPackage", "Features", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MessageOptions), global::Google.Protobuf.Reflection.MessageOptions.Parser, new[]{ "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEntry", "DeprecatedLegacyJsonFieldConflicts", "Features", "UninterpretedOption" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldOptions), global::Google.Protobuf.Reflection.FieldOptions.Parser, new[]{ "Ctype", "Packed", "Jstype", "Lazy", "UnverifiedLazy", "Deprecated", "Weak", "DebugRedact", "Retention", "Targets", "EditionDefaults", "Features", "FeatureSupport", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.CType), typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.JSType), typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention), typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.OptionTargetType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.EditionDefault), global::Google.Protobuf.Reflection.FieldOptions.Types.EditionDefault.Parser, new[]{ "Edition", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport), global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport.Parser, new[]{ "EditionIntroduced", "EditionDeprecated", "DeprecationWarning", "EditionRemoved" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.OneofOptions), global::Google.Protobuf.Reflection.OneofOptions.Parser, new[]{ "Features", "UninterpretedOption" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumOptions), global::Google.Protobuf.Reflection.EnumOptions.Parser, new[]{ "AllowAlias", "Deprecated", "DeprecatedLegacyJsonFieldConflicts", "Features", "UninterpretedOption" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.EnumValueOptions), global::Google.Protobuf.Reflection.EnumValueOptions.Parser, new[]{ "Deprecated", "Features", "DebugRedact", "FeatureSupport", "UninterpretedOption" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceOptions), global::Google.Protobuf.Reflection.ServiceOptions.Parser, new[]{ "Features", "Deprecated", "UninterpretedOption" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodOptions), global::Google.Protobuf.Reflection.MethodOptions.Parser, new[]{ "Deprecated", "IdempotencyLevel", "Features", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.UninterpretedOption), global::Google.Protobuf.Reflection.UninterpretedOption.Parser, new[]{ "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", "AggregateValue" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart), global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart.Parser, new[]{ "NamePart_", "IsExtension" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FeatureSet), global::Google.Protobuf.Reflection.FeatureSet.Parser, new[]{ "FieldPresence", "EnumType", "RepeatedFieldEncoding", "Utf8Validation", "MessageEncoding", "JsonFormat" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FeatureSetDefaults), global::Google.Protobuf.Reflection.FeatureSetDefaults.Parser, new[]{ "Defaults", "MinimumEdition", "MaximumEdition" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FeatureSetDefaults.Types.FeatureSetEditionDefault), global::Google.Protobuf.Reflection.FeatureSetDefaults.Types.FeatureSetEditionDefault.Parser, new[]{ "Edition", "OverridableFeatures", "FixedFeatures" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo), global::Google.Protobuf.Reflection.SourceCodeInfo.Parser, new[]{ "Location" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location), global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser, new[]{ "Path", "Span", "LeadingComments", "TrailingComments", "LeadingDetachedComments" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo), global::Google.Protobuf.Reflection.GeneratedCodeInfo.Parser, new[]{ "Annotation" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation), global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Parser, new[]{ "Path", "SourceFile", "Begin", "End", "Semantic" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic) }, null, null)}) + })); + } + #endregion + + } + #region Enums + /// + /// The full set of known editions. + /// + public enum Edition { + /// + /// A placeholder for an unknown edition value. + /// + [pbr::OriginalName("EDITION_UNKNOWN")] Unknown = 0, + /// + /// A placeholder edition for specifying default behaviors *before* a feature + /// was first introduced. This is effectively an "infinite past". + /// + [pbr::OriginalName("EDITION_LEGACY")] Legacy = 900, + /// + /// Legacy syntax "editions". These pre-date editions, but behave much like + /// distinct editions. These can't be used to specify the edition of proto + /// files, but feature definitions must supply proto2/proto3 defaults for + /// backwards compatibility. + /// + [pbr::OriginalName("EDITION_PROTO2")] Proto2 = 998, + [pbr::OriginalName("EDITION_PROTO3")] Proto3 = 999, + /// + /// Editions that have been released. The specific values are arbitrary and + /// should not be depended on, but they will always be time-ordered for easy + /// comparison. + /// + [pbr::OriginalName("EDITION_2023")] _2023 = 1000, + [pbr::OriginalName("EDITION_2024")] _2024 = 1001, + /// + /// Placeholder editions for testing feature resolution. These should not be + /// used or relied on outside of tests. + /// + [pbr::OriginalName("EDITION_1_TEST_ONLY")] _1TestOnly = 1, + [pbr::OriginalName("EDITION_2_TEST_ONLY")] _2TestOnly = 2, + [pbr::OriginalName("EDITION_99997_TEST_ONLY")] _99997TestOnly = 99997, + [pbr::OriginalName("EDITION_99998_TEST_ONLY")] _99998TestOnly = 99998, + [pbr::OriginalName("EDITION_99999_TEST_ONLY")] _99999TestOnly = 99999, + /// + /// Placeholder for specifying unbounded edition support. This should only + /// ever be used by plugins that can expect to never require any changes to + /// support a new edition. + /// + [pbr::OriginalName("EDITION_MAX")] Max = 2147483647, + } + + #endregion + + #region Messages + /// + /// The protocol compiler can output a FileDescriptorSet containing the .proto + /// files it parses. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FileDescriptorSet : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileDescriptorSet()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FileDescriptorSet() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileDescriptorSet(FileDescriptorSet other) : this() { + file_ = other.file_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileDescriptorSet Clone() { + return new FileDescriptorSet(this); + } + + /// Field number for the "file" field. + public const int FileFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_file_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser); + private readonly pbc::RepeatedField file_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField File { + get { return file_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FileDescriptorSet); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FileDescriptorSet other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!file_.Equals(other.file_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 ^= file_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 + file_.WriteTo(output, _repeated_file_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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) { + file_.WriteTo(ref output, _repeated_file_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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; + size += file_.CalculateSize(_repeated_file_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FileDescriptorSet other) { + if (other == null) { + return; + } + file_.Add(other.file_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 10: { + file_.AddEntriesFrom(input, _repeated_file_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 10: { + file_.AddEntriesFrom(ref input, _repeated_file_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + /// + /// Describes a complete .proto file. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FileDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileDescriptorProto()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FileDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileDescriptorProto(FileDescriptorProto other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_; + package_ = other.package_; + dependency_ = other.dependency_.Clone(); + publicDependency_ = other.publicDependency_.Clone(); + weakDependency_ = other.weakDependency_.Clone(); + messageType_ = other.messageType_.Clone(); + enumType_ = other.enumType_.Clone(); + service_ = other.service_.Clone(); + extension_ = other.extension_.Clone(); + options_ = other.options_ != null ? other.options_.Clone() : null; + sourceCodeInfo_ = other.sourceCodeInfo_ != null ? other.sourceCodeInfo_.Clone() : null; + syntax_ = other.syntax_; + edition_ = other.edition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileDescriptorProto Clone() { + return new FileDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + /// + /// file name, relative to root of source tree + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "package" field. + public const int PackageFieldNumber = 2; + private readonly static string PackageDefaultValue = ""; + + private string package_; + /// + /// e.g. "foo", "foo.bar", etc. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Package { + get { return package_ ?? PackageDefaultValue; } + set { + package_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "package" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPackage { + get { return package_ != null; } + } + /// Clears the value of the "package" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPackage() { + package_ = null; + } + + /// Field number for the "dependency" field. + public const int DependencyFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_dependency_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField dependency_ = new pbc::RepeatedField(); + /// + /// Names of files imported by this file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Dependency { + get { return dependency_; } + } + + /// Field number for the "public_dependency" field. + public const int PublicDependencyFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_publicDependency_codec + = pb::FieldCodec.ForInt32(80); + private readonly pbc::RepeatedField publicDependency_ = new pbc::RepeatedField(); + /// + /// Indexes of the public imported files in the dependency list above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField PublicDependency { + get { return publicDependency_; } + } + + /// Field number for the "weak_dependency" field. + public const int WeakDependencyFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_weakDependency_codec + = pb::FieldCodec.ForInt32(88); + private readonly pbc::RepeatedField weakDependency_ = new pbc::RepeatedField(); + /// + /// Indexes of the weak imported files in the dependency list. + /// For Google-internal migration only. Do not use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField WeakDependency { + get { return weakDependency_; } + } + + /// Field number for the "message_type" field. + public const int MessageTypeFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_messageType_codec + = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.DescriptorProto.Parser); + private readonly pbc::RepeatedField messageType_ = new pbc::RepeatedField(); + /// + /// All top-level definitions in this file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MessageType { + get { return messageType_; } + } + + /// Field number for the "enum_type" field. + public const int EnumTypeFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_enumType_codec + = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); + private readonly pbc::RepeatedField enumType_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnumType { + get { return enumType_; } + } + + /// Field number for the "service" field. + public const int ServiceFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_service_codec + = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.ServiceDescriptorProto.Parser); + private readonly pbc::RepeatedField service_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Service { + get { return service_; } + } + + /// Field number for the "extension" field. + public const int ExtensionFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_extension_codec + = pb::FieldCodec.ForMessage(58, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); + private readonly pbc::RepeatedField extension_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Extension { + get { return extension_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 8; + private global::Google.Protobuf.Reflection.FileOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FileOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + /// Field number for the "source_code_info" field. + public const int SourceCodeInfoFieldNumber = 9; + private global::Google.Protobuf.Reflection.SourceCodeInfo sourceCodeInfo_; + /// + /// This field contains optional information about the original source code. + /// You may safely remove this entire field without harming runtime + /// functionality of the descriptors -- the information is needed only by + /// development tools. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.SourceCodeInfo SourceCodeInfo { + get { return sourceCodeInfo_; } + set { + sourceCodeInfo_ = value; + } + } + + /// Field number for the "syntax" field. + public const int SyntaxFieldNumber = 12; + private readonly static string SyntaxDefaultValue = ""; + + private string syntax_; + /// + /// The syntax of the proto file. + /// The supported values are "proto2", "proto3", and "editions". + /// + /// If `edition` is present, this value must be "editions". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Syntax { + get { return syntax_ ?? SyntaxDefaultValue; } + set { + syntax_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "syntax" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSyntax { + get { return syntax_ != null; } + } + /// Clears the value of the "syntax" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSyntax() { + syntax_ = null; + } + + /// Field number for the "edition" field. + public const int EditionFieldNumber = 14; + private readonly static global::Google.Protobuf.Reflection.Edition EditionDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition edition_; + /// + /// The edition of the proto file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition Edition { + get { if ((_hasBits0 & 1) != 0) { return edition_; } else { return EditionDefaultValue; } } + set { + _hasBits0 |= 1; + edition_ = value; + } + } + /// Gets whether the "edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEdition { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEdition() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FileDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FileDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Package != other.Package) return false; + if(!dependency_.Equals(other.dependency_)) return false; + if(!publicDependency_.Equals(other.publicDependency_)) return false; + if(!weakDependency_.Equals(other.weakDependency_)) return false; + if(!messageType_.Equals(other.messageType_)) return false; + if(!enumType_.Equals(other.enumType_)) return false; + if(!service_.Equals(other.service_)) return false; + if(!extension_.Equals(other.extension_)) return false; + if (!object.Equals(Options, other.Options)) return false; + if (!object.Equals(SourceCodeInfo, other.SourceCodeInfo)) return false; + if (Syntax != other.Syntax) return false; + if (Edition != other.Edition) 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 (HasName) hash ^= Name.GetHashCode(); + if (HasPackage) hash ^= Package.GetHashCode(); + hash ^= dependency_.GetHashCode(); + hash ^= publicDependency_.GetHashCode(); + hash ^= weakDependency_.GetHashCode(); + hash ^= messageType_.GetHashCode(); + hash ^= enumType_.GetHashCode(); + hash ^= service_.GetHashCode(); + hash ^= extension_.GetHashCode(); + if (options_ != null) hash ^= Options.GetHashCode(); + if (sourceCodeInfo_ != null) hash ^= SourceCodeInfo.GetHashCode(); + if (HasSyntax) hash ^= Syntax.GetHashCode(); + if (HasEdition) hash ^= Edition.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasPackage) { + output.WriteRawTag(18); + output.WriteString(Package); + } + dependency_.WriteTo(output, _repeated_dependency_codec); + messageType_.WriteTo(output, _repeated_messageType_codec); + enumType_.WriteTo(output, _repeated_enumType_codec); + service_.WriteTo(output, _repeated_service_codec); + extension_.WriteTo(output, _repeated_extension_codec); + if (options_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Options); + } + if (sourceCodeInfo_ != null) { + output.WriteRawTag(74); + output.WriteMessage(SourceCodeInfo); + } + publicDependency_.WriteTo(output, _repeated_publicDependency_codec); + weakDependency_.WriteTo(output, _repeated_weakDependency_codec); + if (HasSyntax) { + output.WriteRawTag(98); + output.WriteString(Syntax); + } + if (HasEdition) { + output.WriteRawTag(112); + output.WriteEnum((int) Edition); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasPackage) { + output.WriteRawTag(18); + output.WriteString(Package); + } + dependency_.WriteTo(ref output, _repeated_dependency_codec); + messageType_.WriteTo(ref output, _repeated_messageType_codec); + enumType_.WriteTo(ref output, _repeated_enumType_codec); + service_.WriteTo(ref output, _repeated_service_codec); + extension_.WriteTo(ref output, _repeated_extension_codec); + if (options_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Options); + } + if (sourceCodeInfo_ != null) { + output.WriteRawTag(74); + output.WriteMessage(SourceCodeInfo); + } + publicDependency_.WriteTo(ref output, _repeated_publicDependency_codec); + weakDependency_.WriteTo(ref output, _repeated_weakDependency_codec); + if (HasSyntax) { + output.WriteRawTag(98); + output.WriteString(Syntax); + } + if (HasEdition) { + output.WriteRawTag(112); + output.WriteEnum((int) Edition); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (HasPackage) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Package); + } + size += dependency_.CalculateSize(_repeated_dependency_codec); + size += publicDependency_.CalculateSize(_repeated_publicDependency_codec); + size += weakDependency_.CalculateSize(_repeated_weakDependency_codec); + size += messageType_.CalculateSize(_repeated_messageType_codec); + size += enumType_.CalculateSize(_repeated_enumType_codec); + size += service_.CalculateSize(_repeated_service_codec); + size += extension_.CalculateSize(_repeated_extension_codec); + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (sourceCodeInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceCodeInfo); + } + if (HasSyntax) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Syntax); + } + if (HasEdition) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Edition); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FileDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + if (other.HasPackage) { + Package = other.Package; + } + dependency_.Add(other.dependency_); + publicDependency_.Add(other.publicDependency_); + weakDependency_.Add(other.weakDependency_); + messageType_.Add(other.messageType_); + enumType_.Add(other.enumType_); + service_.Add(other.service_); + extension_.Add(other.extension_); + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.FileOptions(); + } + Options.MergeFrom(other.Options); + } + if (other.sourceCodeInfo_ != null) { + if (sourceCodeInfo_ == null) { + SourceCodeInfo = new global::Google.Protobuf.Reflection.SourceCodeInfo(); + } + SourceCodeInfo.MergeFrom(other.SourceCodeInfo); + } + if (other.HasSyntax) { + Syntax = other.Syntax; + } + if (other.HasEdition) { + Edition = other.Edition; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Package = input.ReadString(); + break; + } + case 26: { + dependency_.AddEntriesFrom(input, _repeated_dependency_codec); + break; + } + case 34: { + messageType_.AddEntriesFrom(input, _repeated_messageType_codec); + break; + } + case 42: { + enumType_.AddEntriesFrom(input, _repeated_enumType_codec); + break; + } + case 50: { + service_.AddEntriesFrom(input, _repeated_service_codec); + break; + } + case 58: { + extension_.AddEntriesFrom(input, _repeated_extension_codec); + break; + } + case 66: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.FileOptions(); + } + input.ReadMessage(Options); + break; + } + case 74: { + if (sourceCodeInfo_ == null) { + SourceCodeInfo = new global::Google.Protobuf.Reflection.SourceCodeInfo(); + } + input.ReadMessage(SourceCodeInfo); + break; + } + case 82: + case 80: { + publicDependency_.AddEntriesFrom(input, _repeated_publicDependency_codec); + break; + } + case 90: + case 88: { + weakDependency_.AddEntriesFrom(input, _repeated_weakDependency_codec); + break; + } + case 98: { + Syntax = input.ReadString(); + break; + } + case 112: { + Edition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Package = input.ReadString(); + break; + } + case 26: { + dependency_.AddEntriesFrom(ref input, _repeated_dependency_codec); + break; + } + case 34: { + messageType_.AddEntriesFrom(ref input, _repeated_messageType_codec); + break; + } + case 42: { + enumType_.AddEntriesFrom(ref input, _repeated_enumType_codec); + break; + } + case 50: { + service_.AddEntriesFrom(ref input, _repeated_service_codec); + break; + } + case 58: { + extension_.AddEntriesFrom(ref input, _repeated_extension_codec); + break; + } + case 66: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.FileOptions(); + } + input.ReadMessage(Options); + break; + } + case 74: { + if (sourceCodeInfo_ == null) { + SourceCodeInfo = new global::Google.Protobuf.Reflection.SourceCodeInfo(); + } + input.ReadMessage(SourceCodeInfo); + break; + } + case 82: + case 80: { + publicDependency_.AddEntriesFrom(ref input, _repeated_publicDependency_codec); + break; + } + case 90: + case 88: { + weakDependency_.AddEntriesFrom(ref input, _repeated_weakDependency_codec); + break; + } + case 98: { + Syntax = input.ReadString(); + break; + } + case 112: { + Edition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Describes a message type. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DescriptorProto()); + 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::Google.Protobuf.Reflection.DescriptorReflection.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 DescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DescriptorProto(DescriptorProto other) : this() { + name_ = other.name_; + field_ = other.field_.Clone(); + extension_ = other.extension_.Clone(); + nestedType_ = other.nestedType_.Clone(); + enumType_ = other.enumType_.Clone(); + extensionRange_ = other.extensionRange_.Clone(); + oneofDecl_ = other.oneofDecl_.Clone(); + options_ = other.options_ != null ? other.options_.Clone() : null; + reservedRange_ = other.reservedRange_.Clone(); + reservedName_ = other.reservedName_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DescriptorProto Clone() { + return new DescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "field" field. + public const int FieldFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_field_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); + private readonly pbc::RepeatedField field_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Field { + get { return field_; } + } + + /// Field number for the "extension" field. + public const int ExtensionFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_extension_codec + = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.FieldDescriptorProto.Parser); + private readonly pbc::RepeatedField extension_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Extension { + get { return extension_; } + } + + /// Field number for the "nested_type" field. + public const int NestedTypeFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_nestedType_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.Reflection.DescriptorProto.Parser); + private readonly pbc::RepeatedField nestedType_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField NestedType { + get { return nestedType_; } + } + + /// Field number for the "enum_type" field. + public const int EnumTypeFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_enumType_codec + = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumDescriptorProto.Parser); + private readonly pbc::RepeatedField enumType_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnumType { + get { return enumType_; } + } + + /// Field number for the "extension_range" field. + public const int ExtensionRangeFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_extensionRange_codec + = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange.Parser); + private readonly pbc::RepeatedField extensionRange_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ExtensionRange { + get { return extensionRange_; } + } + + /// Field number for the "oneof_decl" field. + public const int OneofDeclFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_oneofDecl_codec + = pb::FieldCodec.ForMessage(66, global::Google.Protobuf.Reflection.OneofDescriptorProto.Parser); + private readonly pbc::RepeatedField oneofDecl_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField OneofDecl { + get { return oneofDecl_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 7; + private global::Google.Protobuf.Reflection.MessageOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.MessageOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + /// Field number for the "reserved_range" field. + public const int ReservedRangeFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_reservedRange_codec + = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange.Parser); + private readonly pbc::RepeatedField reservedRange_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReservedRange { + get { return reservedRange_; } + } + + /// Field number for the "reserved_name" field. + public const int ReservedNameFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_reservedName_codec + = pb::FieldCodec.ForString(82); + private readonly pbc::RepeatedField reservedName_ = new pbc::RepeatedField(); + /// + /// Reserved field names, which may not be used by fields in the same message. + /// A given name may only be reserved once. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReservedName { + get { return reservedName_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!field_.Equals(other.field_)) return false; + if(!extension_.Equals(other.extension_)) return false; + if(!nestedType_.Equals(other.nestedType_)) return false; + if(!enumType_.Equals(other.enumType_)) return false; + if(!extensionRange_.Equals(other.extensionRange_)) return false; + if(!oneofDecl_.Equals(other.oneofDecl_)) return false; + if (!object.Equals(Options, other.Options)) return false; + if(!reservedRange_.Equals(other.reservedRange_)) return false; + if(!reservedName_.Equals(other.reservedName_)) 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 (HasName) hash ^= Name.GetHashCode(); + hash ^= field_.GetHashCode(); + hash ^= extension_.GetHashCode(); + hash ^= nestedType_.GetHashCode(); + hash ^= enumType_.GetHashCode(); + hash ^= extensionRange_.GetHashCode(); + hash ^= oneofDecl_.GetHashCode(); + if (options_ != null) hash ^= Options.GetHashCode(); + hash ^= reservedRange_.GetHashCode(); + hash ^= reservedName_.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + field_.WriteTo(output, _repeated_field_codec); + nestedType_.WriteTo(output, _repeated_nestedType_codec); + enumType_.WriteTo(output, _repeated_enumType_codec); + extensionRange_.WriteTo(output, _repeated_extensionRange_codec); + extension_.WriteTo(output, _repeated_extension_codec); + if (options_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Options); + } + oneofDecl_.WriteTo(output, _repeated_oneofDecl_codec); + reservedRange_.WriteTo(output, _repeated_reservedRange_codec); + reservedName_.WriteTo(output, _repeated_reservedName_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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + field_.WriteTo(ref output, _repeated_field_codec); + nestedType_.WriteTo(ref output, _repeated_nestedType_codec); + enumType_.WriteTo(ref output, _repeated_enumType_codec); + extensionRange_.WriteTo(ref output, _repeated_extensionRange_codec); + extension_.WriteTo(ref output, _repeated_extension_codec); + if (options_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Options); + } + oneofDecl_.WriteTo(ref output, _repeated_oneofDecl_codec); + reservedRange_.WriteTo(ref output, _repeated_reservedRange_codec); + reservedName_.WriteTo(ref output, _repeated_reservedName_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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += field_.CalculateSize(_repeated_field_codec); + size += extension_.CalculateSize(_repeated_extension_codec); + size += nestedType_.CalculateSize(_repeated_nestedType_codec); + size += enumType_.CalculateSize(_repeated_enumType_codec); + size += extensionRange_.CalculateSize(_repeated_extensionRange_codec); + size += oneofDecl_.CalculateSize(_repeated_oneofDecl_codec); + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + size += reservedRange_.CalculateSize(_repeated_reservedRange_codec); + size += reservedName_.CalculateSize(_repeated_reservedName_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + field_.Add(other.field_); + extension_.Add(other.extension_); + nestedType_.Add(other.nestedType_); + enumType_.Add(other.enumType_); + extensionRange_.Add(other.extensionRange_); + oneofDecl_.Add(other.oneofDecl_); + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.MessageOptions(); + } + Options.MergeFrom(other.Options); + } + reservedRange_.Add(other.reservedRange_); + reservedName_.Add(other.reservedName_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + field_.AddEntriesFrom(input, _repeated_field_codec); + break; + } + case 26: { + nestedType_.AddEntriesFrom(input, _repeated_nestedType_codec); + break; + } + case 34: { + enumType_.AddEntriesFrom(input, _repeated_enumType_codec); + break; + } + case 42: { + extensionRange_.AddEntriesFrom(input, _repeated_extensionRange_codec); + break; + } + case 50: { + extension_.AddEntriesFrom(input, _repeated_extension_codec); + break; + } + case 58: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.MessageOptions(); + } + input.ReadMessage(Options); + break; + } + case 66: { + oneofDecl_.AddEntriesFrom(input, _repeated_oneofDecl_codec); + break; + } + case 74: { + reservedRange_.AddEntriesFrom(input, _repeated_reservedRange_codec); + break; + } + case 82: { + reservedName_.AddEntriesFrom(input, _repeated_reservedName_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + field_.AddEntriesFrom(ref input, _repeated_field_codec); + break; + } + case 26: { + nestedType_.AddEntriesFrom(ref input, _repeated_nestedType_codec); + break; + } + case 34: { + enumType_.AddEntriesFrom(ref input, _repeated_enumType_codec); + break; + } + case 42: { + extensionRange_.AddEntriesFrom(ref input, _repeated_extensionRange_codec); + break; + } + case 50: { + extension_.AddEntriesFrom(ref input, _repeated_extension_codec); + break; + } + case 58: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.MessageOptions(); + } + input.ReadMessage(Options); + break; + } + case 66: { + oneofDecl_.AddEntriesFrom(ref input, _repeated_oneofDecl_codec); + break; + } + case 74: { + reservedRange_.AddEntriesFrom(ref input, _repeated_reservedRange_codec); + break; + } + case 82: { + reservedName_.AddEntriesFrom(ref input, _repeated_reservedName_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the DescriptorProto message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ExtensionRange : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExtensionRange()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[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 ExtensionRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExtensionRange(ExtensionRange other) : this() { + _hasBits0 = other._hasBits0; + start_ = other.start_; + end_ = other.end_; + options_ = other.options_ != null ? other.options_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExtensionRange Clone() { + return new ExtensionRange(this); + } + + /// Field number for the "start" field. + public const int StartFieldNumber = 1; + private readonly static int StartDefaultValue = 0; + + private int start_; + /// + /// Inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Start { + get { if ((_hasBits0 & 1) != 0) { return start_; } else { return StartDefaultValue; } } + set { + _hasBits0 |= 1; + start_ = value; + } + } + /// Gets whether the "start" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasStart { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "start" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStart() { + _hasBits0 &= ~1; + } + + /// Field number for the "end" field. + public const int EndFieldNumber = 2; + private readonly static int EndDefaultValue = 0; + + private int end_; + /// + /// Exclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int End { + get { if ((_hasBits0 & 2) != 0) { return end_; } else { return EndDefaultValue; } } + set { + _hasBits0 |= 2; + end_ = value; + } + } + /// Gets whether the "end" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEnd { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "end" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEnd() { + _hasBits0 &= ~2; + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private global::Google.Protobuf.Reflection.ExtensionRangeOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.ExtensionRangeOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExtensionRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExtensionRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Start != other.Start) return false; + if (End != other.End) return false; + if (!object.Equals(Options, other.Options)) 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 (HasStart) hash ^= Start.GetHashCode(); + if (HasEnd) hash ^= End.GetHashCode(); + if (options_ != null) hash ^= Options.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 (HasStart) { + output.WriteRawTag(8); + output.WriteInt32(Start); + } + if (HasEnd) { + output.WriteRawTag(16); + output.WriteInt32(End); + } + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + 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 (HasStart) { + output.WriteRawTag(8); + output.WriteInt32(Start); + } + if (HasEnd) { + output.WriteRawTag(16); + output.WriteInt32(End); + } + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + 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 (HasStart) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); + } + if (HasEnd) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); + } + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExtensionRange other) { + if (other == null) { + return; + } + if (other.HasStart) { + Start = other.Start; + } + if (other.HasEnd) { + End = other.End; + } + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.ExtensionRangeOptions(); + } + Options.MergeFrom(other.Options); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Start = input.ReadInt32(); + break; + } + case 16: { + End = input.ReadInt32(); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.ExtensionRangeOptions(); + } + input.ReadMessage(Options); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Start = input.ReadInt32(); + break; + } + case 16: { + End = input.ReadInt32(); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.ExtensionRangeOptions(); + } + input.ReadMessage(Options); + break; + } + } + } + } + #endif + + } + + /// + /// Range of reserved tag numbers. Reserved tag numbers may not be used by + /// fields or extension ranges in the same message. Reserved ranges may + /// not overlap. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReservedRange : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReservedRange()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[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 ReservedRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReservedRange(ReservedRange other) : this() { + _hasBits0 = other._hasBits0; + start_ = other.start_; + end_ = other.end_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReservedRange Clone() { + return new ReservedRange(this); + } + + /// Field number for the "start" field. + public const int StartFieldNumber = 1; + private readonly static int StartDefaultValue = 0; + + private int start_; + /// + /// Inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Start { + get { if ((_hasBits0 & 1) != 0) { return start_; } else { return StartDefaultValue; } } + set { + _hasBits0 |= 1; + start_ = value; + } + } + /// Gets whether the "start" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasStart { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "start" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStart() { + _hasBits0 &= ~1; + } + + /// Field number for the "end" field. + public const int EndFieldNumber = 2; + private readonly static int EndDefaultValue = 0; + + private int end_; + /// + /// Exclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int End { + get { if ((_hasBits0 & 2) != 0) { return end_; } else { return EndDefaultValue; } } + set { + _hasBits0 |= 2; + end_ = value; + } + } + /// Gets whether the "end" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEnd { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "end" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEnd() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReservedRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReservedRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Start != other.Start) return false; + if (End != other.End) 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 (HasStart) hash ^= Start.GetHashCode(); + if (HasEnd) hash ^= End.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 (HasStart) { + output.WriteRawTag(8); + output.WriteInt32(Start); + } + if (HasEnd) { + output.WriteRawTag(16); + output.WriteInt32(End); + } + 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 (HasStart) { + output.WriteRawTag(8); + output.WriteInt32(Start); + } + if (HasEnd) { + output.WriteRawTag(16); + output.WriteInt32(End); + } + 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 (HasStart) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); + } + if (HasEnd) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReservedRange other) { + if (other == null) { + return; + } + if (other.HasStart) { + Start = other.Start; + } + if (other.HasEnd) { + End = other.End; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Start = input.ReadInt32(); + break; + } + case 16: { + End = input.ReadInt32(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Start = input.ReadInt32(); + break; + } + case 16: { + End = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ExtensionRangeOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExtensionRangeOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 ExtensionRangeOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExtensionRangeOptions(ExtensionRangeOptions other) : this() { + _hasBits0 = other._hasBits0; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + declaration_ = other.declaration_.Clone(); + features_ = other.features_ != null ? other.features_.Clone() : null; + verification_ = other.verification_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExtensionRangeOptions Clone() { + return new ExtensionRangeOptions(this); + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + /// Field number for the "declaration" field. + public const int DeclarationFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_declaration_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.Declaration.Parser); + private readonly pbc::RepeatedField declaration_ = new pbc::RepeatedField(); + /// + /// For external users: DO NOT USE. We are in the process of open sourcing + /// extension declaration and executing internal cleanups before it can be + /// used externally. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Declaration { + get { return declaration_; } + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 50; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "verification" field. + public const int VerificationFieldNumber = 3; + private readonly static global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState VerificationDefaultValue = global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState.Unverified; + + private global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState verification_; + /// + /// The verification state of the range. + /// TODO: flip the default to DECLARATION once all empty ranges + /// are marked as UNVERIFIED. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState Verification { + get { if ((_hasBits0 & 1) != 0) { return verification_; } else { return VerificationDefaultValue; } } + set { + _hasBits0 |= 1; + verification_ = value; + } + } + /// Gets whether the "verification" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasVerification { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "verification" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearVerification() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExtensionRangeOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExtensionRangeOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if(!declaration_.Equals(other.declaration_)) return false; + if (!object.Equals(Features, other.Features)) return false; + if (Verification != other.Verification) return false; + if (!Equals(_extensions, other._extensions)) { + 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 ^= uninterpretedOption_.GetHashCode(); + hash ^= declaration_.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + if (HasVerification) hash ^= Verification.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 + declaration_.WriteTo(output, _repeated_declaration_codec); + if (HasVerification) { + output.WriteRawTag(24); + output.WriteEnum((int) Verification); + } + if (features_ != null) { + output.WriteRawTag(146, 3); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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) { + declaration_.WriteTo(ref output, _repeated_declaration_codec); + if (HasVerification) { + output.WriteRawTag(24); + output.WriteEnum((int) Verification); + } + if (features_ != null) { + output.WriteRawTag(146, 3); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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; + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + size += declaration_.CalculateSize(_repeated_declaration_codec); + if (features_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + if (HasVerification) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Verification); + } + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExtensionRangeOptions other) { + if (other == null) { + return; + } + uninterpretedOption_.Add(other.uninterpretedOption_); + declaration_.Add(other.declaration_); + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + if (other.HasVerification) { + Verification = other.Verification; + } + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 18: { + declaration_.AddEntriesFrom(input, _repeated_declaration_codec); + break; + } + case 24: { + Verification = (global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState) input.ReadEnum(); + break; + } + case 402: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 18: { + declaration_.AddEntriesFrom(ref input, _repeated_declaration_codec); + break; + } + case 24: { + Verification = (global::Google.Protobuf.Reflection.ExtensionRangeOptions.Types.VerificationState) input.ReadEnum(); + break; + } + case 402: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the ExtensionRangeOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The verification state of the extension range. + /// + public enum VerificationState { + /// + /// All the extensions of the range must be declared. + /// + [pbr::OriginalName("DECLARATION")] Declaration = 0, + [pbr::OriginalName("UNVERIFIED")] Unverified = 1, + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Declaration : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Declaration()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.ExtensionRangeOptions.Descriptor.NestedTypes[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 Declaration() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Declaration(Declaration other) : this() { + _hasBits0 = other._hasBits0; + number_ = other.number_; + fullName_ = other.fullName_; + type_ = other.type_; + reserved_ = other.reserved_; + repeated_ = other.repeated_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Declaration Clone() { + return new Declaration(this); + } + + /// Field number for the "number" field. + public const int NumberFieldNumber = 1; + private readonly static int NumberDefaultValue = 0; + + private int number_; + /// + /// The extension number declared within the extension range. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Number { + get { if ((_hasBits0 & 1) != 0) { return number_; } else { return NumberDefaultValue; } } + set { + _hasBits0 |= 1; + number_ = value; + } + } + /// Gets whether the "number" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNumber { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "number" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNumber() { + _hasBits0 &= ~1; + } + + /// Field number for the "full_name" field. + public const int FullNameFieldNumber = 2; + private readonly static string FullNameDefaultValue = ""; + + private string fullName_; + /// + /// The fully-qualified name of the extension field. There must be a leading + /// dot in front of the full name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_ ?? FullNameDefaultValue; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "full_name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFullName { + get { return fullName_ != null; } + } + /// Clears the value of the "full_name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFullName() { + fullName_ = null; + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 3; + private readonly static string TypeDefaultValue = ""; + + private string type_; + /// + /// The fully-qualified type name of the extension field. Unlike + /// Metadata.type, Declaration.type must have a leading dot for messages + /// and enums. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_ ?? TypeDefaultValue; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return type_ != null; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + type_ = null; + } + + /// Field number for the "reserved" field. + public const int ReservedFieldNumber = 5; + private readonly static bool ReservedDefaultValue = false; + + private bool reserved_; + /// + /// If true, indicates that the number is reserved in the extension range, + /// and any extension field with the number will fail to compile. Set this + /// when a declared extension field is deleted. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Reserved { + get { if ((_hasBits0 & 2) != 0) { return reserved_; } else { return ReservedDefaultValue; } } + set { + _hasBits0 |= 2; + reserved_ = value; + } + } + /// Gets whether the "reserved" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasReserved { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "reserved" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearReserved() { + _hasBits0 &= ~2; + } + + /// Field number for the "repeated" field. + public const int RepeatedFieldNumber = 6; + private readonly static bool RepeatedDefaultValue = false; + + private bool repeated_; + /// + /// If true, indicates that the extension must be defined as repeated. + /// Otherwise the extension must be defined as optional. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Repeated { + get { if ((_hasBits0 & 4) != 0) { return repeated_; } else { return RepeatedDefaultValue; } } + set { + _hasBits0 |= 4; + repeated_ = value; + } + } + /// Gets whether the "repeated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRepeated { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "repeated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRepeated() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Declaration); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Declaration other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Number != other.Number) return false; + if (FullName != other.FullName) return false; + if (Type != other.Type) return false; + if (Reserved != other.Reserved) return false; + if (Repeated != other.Repeated) 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 (HasNumber) hash ^= Number.GetHashCode(); + if (HasFullName) hash ^= FullName.GetHashCode(); + if (HasType) hash ^= Type.GetHashCode(); + if (HasReserved) hash ^= Reserved.GetHashCode(); + if (HasRepeated) hash ^= Repeated.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 (HasNumber) { + output.WriteRawTag(8); + output.WriteInt32(Number); + } + if (HasFullName) { + output.WriteRawTag(18); + output.WriteString(FullName); + } + if (HasType) { + output.WriteRawTag(26); + output.WriteString(Type); + } + if (HasReserved) { + output.WriteRawTag(40); + output.WriteBool(Reserved); + } + if (HasRepeated) { + output.WriteRawTag(48); + output.WriteBool(Repeated); + } + 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 (HasNumber) { + output.WriteRawTag(8); + output.WriteInt32(Number); + } + if (HasFullName) { + output.WriteRawTag(18); + output.WriteString(FullName); + } + if (HasType) { + output.WriteRawTag(26); + output.WriteString(Type); + } + if (HasReserved) { + output.WriteRawTag(40); + output.WriteBool(Reserved); + } + if (HasRepeated) { + output.WriteRawTag(48); + output.WriteBool(Repeated); + } + 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 (HasNumber) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); + } + if (HasFullName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (HasType) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (HasReserved) { + size += 1 + 1; + } + if (HasRepeated) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Declaration other) { + if (other == null) { + return; + } + if (other.HasNumber) { + Number = other.Number; + } + if (other.HasFullName) { + FullName = other.FullName; + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasReserved) { + Reserved = other.Reserved; + } + if (other.HasRepeated) { + Repeated = other.Repeated; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Number = input.ReadInt32(); + break; + } + case 18: { + FullName = input.ReadString(); + break; + } + case 26: { + Type = input.ReadString(); + break; + } + case 40: { + Reserved = input.ReadBool(); + break; + } + case 48: { + Repeated = input.ReadBool(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Number = input.ReadInt32(); + break; + } + case 18: { + FullName = input.ReadString(); + break; + } + case 26: { + Type = input.ReadString(); + break; + } + case 40: { + Reserved = input.ReadBool(); + break; + } + case 48: { + Repeated = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Describes a field within a message. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FieldDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldDescriptorProto()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FieldDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldDescriptorProto(FieldDescriptorProto other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_; + number_ = other.number_; + label_ = other.label_; + type_ = other.type_; + typeName_ = other.typeName_; + extendee_ = other.extendee_; + defaultValue_ = other.defaultValue_; + oneofIndex_ = other.oneofIndex_; + jsonName_ = other.jsonName_; + options_ = other.options_ != null ? other.options_.Clone() : null; + proto3Optional_ = other.proto3Optional_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldDescriptorProto Clone() { + return new FieldDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "number" field. + public const int NumberFieldNumber = 3; + private readonly static int NumberDefaultValue = 0; + + private int number_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Number { + get { if ((_hasBits0 & 1) != 0) { return number_; } else { return NumberDefaultValue; } } + set { + _hasBits0 |= 1; + number_ = value; + } + } + /// Gets whether the "number" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNumber { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "number" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNumber() { + _hasBits0 &= ~1; + } + + /// Field number for the "label" field. + public const int LabelFieldNumber = 4; + private readonly static global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label LabelDefaultValue = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label.Optional; + + private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label label_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label Label { + get { if ((_hasBits0 & 2) != 0) { return label_; } else { return LabelDefaultValue; } } + set { + _hasBits0 |= 2; + label_ = value; + } + } + /// Gets whether the "label" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLabel { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "label" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLabel() { + _hasBits0 &= ~2; + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 5; + private readonly static global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type TypeDefaultValue = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type.Double; + + private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type type_; + /// + /// If type_name is set, this need not be set. If both this and type_name + /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type Type { + get { if ((_hasBits0 & 4) != 0) { return type_; } else { return TypeDefaultValue; } } + set { + _hasBits0 |= 4; + type_ = value; + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + _hasBits0 &= ~4; + } + + /// Field number for the "type_name" field. + public const int TypeNameFieldNumber = 6; + private readonly static string TypeNameDefaultValue = ""; + + private string typeName_; + /// + /// For message and enum types, this is the name of the type. If the name + /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + /// rules are used to find the type (i.e. first the nested types within this + /// message are searched, then within the parent, on up to the root + /// namespace). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TypeName { + get { return typeName_ ?? TypeNameDefaultValue; } + set { + typeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "type_name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTypeName { + get { return typeName_ != null; } + } + /// Clears the value of the "type_name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTypeName() { + typeName_ = null; + } + + /// Field number for the "extendee" field. + public const int ExtendeeFieldNumber = 2; + private readonly static string ExtendeeDefaultValue = ""; + + private string extendee_; + /// + /// For extensions, this is the name of the type being extended. It is + /// resolved in the same manner as type_name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Extendee { + get { return extendee_ ?? ExtendeeDefaultValue; } + set { + extendee_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "extendee" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasExtendee { + get { return extendee_ != null; } + } + /// Clears the value of the "extendee" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearExtendee() { + extendee_ = null; + } + + /// Field number for the "default_value" field. + public const int DefaultValueFieldNumber = 7; + private readonly static string DefaultValueDefaultValue = ""; + + private string defaultValue_; + /// + /// For numeric types, contains the original text representation of the value. + /// For booleans, "true" or "false". + /// For strings, contains the default text contents (not escaped in any way). + /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DefaultValue { + get { return defaultValue_ ?? DefaultValueDefaultValue; } + set { + defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "default_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDefaultValue { + get { return defaultValue_ != null; } + } + /// Clears the value of the "default_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDefaultValue() { + defaultValue_ = null; + } + + /// Field number for the "oneof_index" field. + public const int OneofIndexFieldNumber = 9; + private readonly static int OneofIndexDefaultValue = 0; + + private int oneofIndex_; + /// + /// If set, gives the index of a oneof in the containing type's oneof_decl + /// list. This field is a member of that oneof. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int OneofIndex { + get { if ((_hasBits0 & 8) != 0) { return oneofIndex_; } else { return OneofIndexDefaultValue; } } + set { + _hasBits0 |= 8; + oneofIndex_ = value; + } + } + /// Gets whether the "oneof_index" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasOneofIndex { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "oneof_index" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearOneofIndex() { + _hasBits0 &= ~8; + } + + /// Field number for the "json_name" field. + public const int JsonNameFieldNumber = 10; + private readonly static string JsonNameDefaultValue = ""; + + private string jsonName_; + /// + /// JSON name of this field. The value is set by protocol compiler. If the + /// user has set a "json_name" option on this field, that option's value + /// will be used. Otherwise, it's deduced from the field's name by converting + /// it to camelCase. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JsonName { + get { return jsonName_ ?? JsonNameDefaultValue; } + set { + jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "json_name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJsonName { + get { return jsonName_ != null; } + } + /// Clears the value of the "json_name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJsonName() { + jsonName_ = null; + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 8; + private global::Google.Protobuf.Reflection.FieldOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + /// Field number for the "proto3_optional" field. + public const int Proto3OptionalFieldNumber = 17; + private readonly static bool Proto3OptionalDefaultValue = false; + + private bool proto3Optional_; + /// + /// If true, this is a proto3 "optional". When a proto3 field is optional, it + /// tracks presence regardless of field type. + /// + /// When proto3_optional is true, this field must belong to a oneof to signal + /// to old proto3 clients that presence is tracked for this field. This oneof + /// is known as a "synthetic" oneof, and this field must be its sole member + /// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs + /// exist in the descriptor only, and do not generate any API. Synthetic oneofs + /// must be ordered after all "real" oneofs. + /// + /// For message fields, proto3_optional doesn't create any semantic change, + /// since non-repeated message fields always track presence. However it still + /// indicates the semantic detail of whether the user wrote "optional" or not. + /// This can be useful for round-tripping the .proto file. For consistency we + /// give message fields a synthetic oneof also, even though it is not required + /// to track presence. This is especially important because the parser can't + /// tell if a field is a message or an enum, so it must always create a + /// synthetic oneof. + /// + /// Proto2 optional fields do not set this flag, because they already indicate + /// optional with `LABEL_OPTIONAL`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Proto3Optional { + get { if ((_hasBits0 & 16) != 0) { return proto3Optional_; } else { return Proto3OptionalDefaultValue; } } + set { + _hasBits0 |= 16; + proto3Optional_ = value; + } + } + /// Gets whether the "proto3_optional" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasProto3Optional { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "proto3_optional" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearProto3Optional() { + _hasBits0 &= ~16; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FieldDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FieldDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Number != other.Number) return false; + if (Label != other.Label) return false; + if (Type != other.Type) return false; + if (TypeName != other.TypeName) return false; + if (Extendee != other.Extendee) return false; + if (DefaultValue != other.DefaultValue) return false; + if (OneofIndex != other.OneofIndex) return false; + if (JsonName != other.JsonName) return false; + if (!object.Equals(Options, other.Options)) return false; + if (Proto3Optional != other.Proto3Optional) 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 (HasName) hash ^= Name.GetHashCode(); + if (HasNumber) hash ^= Number.GetHashCode(); + if (HasLabel) hash ^= Label.GetHashCode(); + if (HasType) hash ^= Type.GetHashCode(); + if (HasTypeName) hash ^= TypeName.GetHashCode(); + if (HasExtendee) hash ^= Extendee.GetHashCode(); + if (HasDefaultValue) hash ^= DefaultValue.GetHashCode(); + if (HasOneofIndex) hash ^= OneofIndex.GetHashCode(); + if (HasJsonName) hash ^= JsonName.GetHashCode(); + if (options_ != null) hash ^= Options.GetHashCode(); + if (HasProto3Optional) hash ^= Proto3Optional.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasExtendee) { + output.WriteRawTag(18); + output.WriteString(Extendee); + } + if (HasNumber) { + output.WriteRawTag(24); + output.WriteInt32(Number); + } + if (HasLabel) { + output.WriteRawTag(32); + output.WriteEnum((int) Label); + } + if (HasType) { + output.WriteRawTag(40); + output.WriteEnum((int) Type); + } + if (HasTypeName) { + output.WriteRawTag(50); + output.WriteString(TypeName); + } + if (HasDefaultValue) { + output.WriteRawTag(58); + output.WriteString(DefaultValue); + } + if (options_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Options); + } + if (HasOneofIndex) { + output.WriteRawTag(72); + output.WriteInt32(OneofIndex); + } + if (HasJsonName) { + output.WriteRawTag(82); + output.WriteString(JsonName); + } + if (HasProto3Optional) { + output.WriteRawTag(136, 1); + output.WriteBool(Proto3Optional); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasExtendee) { + output.WriteRawTag(18); + output.WriteString(Extendee); + } + if (HasNumber) { + output.WriteRawTag(24); + output.WriteInt32(Number); + } + if (HasLabel) { + output.WriteRawTag(32); + output.WriteEnum((int) Label); + } + if (HasType) { + output.WriteRawTag(40); + output.WriteEnum((int) Type); + } + if (HasTypeName) { + output.WriteRawTag(50); + output.WriteString(TypeName); + } + if (HasDefaultValue) { + output.WriteRawTag(58); + output.WriteString(DefaultValue); + } + if (options_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Options); + } + if (HasOneofIndex) { + output.WriteRawTag(72); + output.WriteInt32(OneofIndex); + } + if (HasJsonName) { + output.WriteRawTag(82); + output.WriteString(JsonName); + } + if (HasProto3Optional) { + output.WriteRawTag(136, 1); + output.WriteBool(Proto3Optional); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (HasNumber) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); + } + if (HasLabel) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Label); + } + if (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (HasTypeName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeName); + } + if (HasExtendee) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Extendee); + } + if (HasDefaultValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); + } + if (HasOneofIndex) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); + } + if (HasJsonName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); + } + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (HasProto3Optional) { + size += 2 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FieldDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + if (other.HasNumber) { + Number = other.Number; + } + if (other.HasLabel) { + Label = other.Label; + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasTypeName) { + TypeName = other.TypeName; + } + if (other.HasExtendee) { + Extendee = other.Extendee; + } + if (other.HasDefaultValue) { + DefaultValue = other.DefaultValue; + } + if (other.HasOneofIndex) { + OneofIndex = other.OneofIndex; + } + if (other.HasJsonName) { + JsonName = other.JsonName; + } + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.FieldOptions(); + } + Options.MergeFrom(other.Options); + } + if (other.HasProto3Optional) { + Proto3Optional = other.Proto3Optional; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Extendee = input.ReadString(); + break; + } + case 24: { + Number = input.ReadInt32(); + break; + } + case 32: { + Label = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label) input.ReadEnum(); + break; + } + case 40: { + Type = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type) input.ReadEnum(); + break; + } + case 50: { + TypeName = input.ReadString(); + break; + } + case 58: { + DefaultValue = input.ReadString(); + break; + } + case 66: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.FieldOptions(); + } + input.ReadMessage(Options); + break; + } + case 72: { + OneofIndex = input.ReadInt32(); + break; + } + case 82: { + JsonName = input.ReadString(); + break; + } + case 136: { + Proto3Optional = input.ReadBool(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Extendee = input.ReadString(); + break; + } + case 24: { + Number = input.ReadInt32(); + break; + } + case 32: { + Label = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label) input.ReadEnum(); + break; + } + case 40: { + Type = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type) input.ReadEnum(); + break; + } + case 50: { + TypeName = input.ReadString(); + break; + } + case 58: { + DefaultValue = input.ReadString(); + break; + } + case 66: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.FieldOptions(); + } + input.ReadMessage(Options); + break; + } + case 72: { + OneofIndex = input.ReadInt32(); + break; + } + case 82: { + JsonName = input.ReadString(); + break; + } + case 136: { + Proto3Optional = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the FieldDescriptorProto message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum Type { + /// + /// 0 is reserved for errors. + /// Order is weird for historical reasons. + /// + [pbr::OriginalName("TYPE_DOUBLE")] Double = 1, + [pbr::OriginalName("TYPE_FLOAT")] Float = 2, + /// + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + /// negative values are likely. + /// + [pbr::OriginalName("TYPE_INT64")] Int64 = 3, + [pbr::OriginalName("TYPE_UINT64")] Uint64 = 4, + /// + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + /// negative values are likely. + /// + [pbr::OriginalName("TYPE_INT32")] Int32 = 5, + [pbr::OriginalName("TYPE_FIXED64")] Fixed64 = 6, + [pbr::OriginalName("TYPE_FIXED32")] Fixed32 = 7, + [pbr::OriginalName("TYPE_BOOL")] Bool = 8, + [pbr::OriginalName("TYPE_STRING")] String = 9, + /// + /// Tag-delimited aggregate. + /// Group type is deprecated and not supported after google.protobuf. However, Proto3 + /// implementations should still be able to parse the group wire format and + /// treat group fields as unknown fields. In Editions, the group wire format + /// can be enabled via the `message_encoding` feature. + /// + [pbr::OriginalName("TYPE_GROUP")] Group = 10, + /// + /// Length-delimited aggregate. + /// + [pbr::OriginalName("TYPE_MESSAGE")] Message = 11, + /// + /// New in version 2. + /// + [pbr::OriginalName("TYPE_BYTES")] Bytes = 12, + [pbr::OriginalName("TYPE_UINT32")] Uint32 = 13, + [pbr::OriginalName("TYPE_ENUM")] Enum = 14, + [pbr::OriginalName("TYPE_SFIXED32")] Sfixed32 = 15, + [pbr::OriginalName("TYPE_SFIXED64")] Sfixed64 = 16, + /// + /// Uses ZigZag encoding. + /// + [pbr::OriginalName("TYPE_SINT32")] Sint32 = 17, + /// + /// Uses ZigZag encoding. + /// + [pbr::OriginalName("TYPE_SINT64")] Sint64 = 18, + } + + public enum Label { + /// + /// 0 is reserved for errors + /// + [pbr::OriginalName("LABEL_OPTIONAL")] Optional = 1, + [pbr::OriginalName("LABEL_REPEATED")] Repeated = 3, + /// + /// The required label is only allowed in google.protobuf. In proto3 and Editions + /// it's explicitly prohibited. In Editions, the `field_presence` feature + /// can be used to get this behavior. + /// + [pbr::OriginalName("LABEL_REQUIRED")] Required = 2, + } + + } + #endregion + + } + + /// + /// Describes a oneof. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OneofDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneofDescriptorProto()); + 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::Google.Protobuf.Reflection.DescriptorReflection.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 OneofDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OneofDescriptorProto(OneofDescriptorProto other) : this() { + name_ = other.name_; + options_ = other.options_ != null ? other.options_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OneofDescriptorProto Clone() { + return new OneofDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 2; + private global::Google.Protobuf.Reflection.OneofOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.OneofOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as OneofDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OneofDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(Options, other.Options)) 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 (HasName) hash ^= Name.GetHashCode(); + if (options_ != null) hash ^= Options.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (options_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Options); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (options_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Options); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OneofDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.OneofOptions(); + } + Options.MergeFrom(other.Options); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.OneofOptions(); + } + input.ReadMessage(Options); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.OneofOptions(); + } + input.ReadMessage(Options); + break; + } + } + } + } + #endif + + } + + /// + /// Describes an enum type. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumDescriptorProto()); + 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::Google.Protobuf.Reflection.DescriptorReflection.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 EnumDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumDescriptorProto(EnumDescriptorProto other) : this() { + name_ = other.name_; + value_ = other.value_.Clone(); + options_ = other.options_ != null ? other.options_.Clone() : null; + reservedRange_ = other.reservedRange_.Clone(); + reservedName_ = other.reservedName_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumDescriptorProto Clone() { + return new EnumDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_value_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.EnumValueDescriptorProto.Parser); + private readonly pbc::RepeatedField value_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Value { + get { return value_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private global::Google.Protobuf.Reflection.EnumOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.EnumOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + /// Field number for the "reserved_range" field. + public const int ReservedRangeFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_reservedRange_codec + = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumDescriptorProto.Types.EnumReservedRange.Parser); + private readonly pbc::RepeatedField reservedRange_ = new pbc::RepeatedField(); + /// + /// Range of reserved numeric values. Reserved numeric values may not be used + /// by enum values in the same enum declaration. Reserved ranges may not + /// overlap. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReservedRange { + get { return reservedRange_; } + } + + /// Field number for the "reserved_name" field. + public const int ReservedNameFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_reservedName_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField reservedName_ = new pbc::RepeatedField(); + /// + /// Reserved enum value names, which may not be reused. A given name may only + /// be reserved once. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReservedName { + get { return reservedName_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!value_.Equals(other.value_)) return false; + if (!object.Equals(Options, other.Options)) return false; + if(!reservedRange_.Equals(other.reservedRange_)) return false; + if(!reservedName_.Equals(other.reservedName_)) 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 (HasName) hash ^= Name.GetHashCode(); + hash ^= value_.GetHashCode(); + if (options_ != null) hash ^= Options.GetHashCode(); + hash ^= reservedRange_.GetHashCode(); + hash ^= reservedName_.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + value_.WriteTo(output, _repeated_value_codec); + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + reservedRange_.WriteTo(output, _repeated_reservedRange_codec); + reservedName_.WriteTo(output, _repeated_reservedName_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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + value_.WriteTo(ref output, _repeated_value_codec); + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + reservedRange_.WriteTo(ref output, _repeated_reservedRange_codec); + reservedName_.WriteTo(ref output, _repeated_reservedName_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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += value_.CalculateSize(_repeated_value_codec); + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + size += reservedRange_.CalculateSize(_repeated_reservedRange_codec); + size += reservedName_.CalculateSize(_repeated_reservedName_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + value_.Add(other.value_); + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.EnumOptions(); + } + Options.MergeFrom(other.Options); + } + reservedRange_.Add(other.reservedRange_); + reservedName_.Add(other.reservedName_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + value_.AddEntriesFrom(input, _repeated_value_codec); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.EnumOptions(); + } + input.ReadMessage(Options); + break; + } + case 34: { + reservedRange_.AddEntriesFrom(input, _repeated_reservedRange_codec); + break; + } + case 42: { + reservedName_.AddEntriesFrom(input, _repeated_reservedName_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + value_.AddEntriesFrom(ref input, _repeated_value_codec); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.EnumOptions(); + } + input.ReadMessage(Options); + break; + } + case 34: { + reservedRange_.AddEntriesFrom(ref input, _repeated_reservedRange_codec); + break; + } + case 42: { + reservedName_.AddEntriesFrom(ref input, _repeated_reservedName_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the EnumDescriptorProto message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Range of reserved numeric values. Reserved values may not be used by + /// entries in the same enum. Reserved ranges may not overlap. + /// + /// Note that this is distinct from DescriptorProto.ReservedRange in that it + /// is inclusive such that it can appropriately represent the entire int32 + /// domain. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumReservedRange : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumReservedRange()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.EnumDescriptorProto.Descriptor.NestedTypes[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 EnumReservedRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumReservedRange(EnumReservedRange other) : this() { + _hasBits0 = other._hasBits0; + start_ = other.start_; + end_ = other.end_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumReservedRange Clone() { + return new EnumReservedRange(this); + } + + /// Field number for the "start" field. + public const int StartFieldNumber = 1; + private readonly static int StartDefaultValue = 0; + + private int start_; + /// + /// Inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Start { + get { if ((_hasBits0 & 1) != 0) { return start_; } else { return StartDefaultValue; } } + set { + _hasBits0 |= 1; + start_ = value; + } + } + /// Gets whether the "start" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasStart { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "start" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStart() { + _hasBits0 &= ~1; + } + + /// Field number for the "end" field. + public const int EndFieldNumber = 2; + private readonly static int EndDefaultValue = 0; + + private int end_; + /// + /// Inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int End { + get { if ((_hasBits0 & 2) != 0) { return end_; } else { return EndDefaultValue; } } + set { + _hasBits0 |= 2; + end_ = value; + } + } + /// Gets whether the "end" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEnd { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "end" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEnd() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumReservedRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumReservedRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Start != other.Start) return false; + if (End != other.End) 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 (HasStart) hash ^= Start.GetHashCode(); + if (HasEnd) hash ^= End.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 (HasStart) { + output.WriteRawTag(8); + output.WriteInt32(Start); + } + if (HasEnd) { + output.WriteRawTag(16); + output.WriteInt32(End); + } + 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 (HasStart) { + output.WriteRawTag(8); + output.WriteInt32(Start); + } + if (HasEnd) { + output.WriteRawTag(16); + output.WriteInt32(End); + } + 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 (HasStart) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); + } + if (HasEnd) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumReservedRange other) { + if (other == null) { + return; + } + if (other.HasStart) { + Start = other.Start; + } + if (other.HasEnd) { + End = other.End; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Start = input.ReadInt32(); + break; + } + case 16: { + End = input.ReadInt32(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Start = input.ReadInt32(); + break; + } + case 16: { + End = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Describes a value within an enum. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumValueDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValueDescriptorProto()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 EnumValueDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumValueDescriptorProto(EnumValueDescriptorProto other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_; + number_ = other.number_; + options_ = other.options_ != null ? other.options_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumValueDescriptorProto Clone() { + return new EnumValueDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "number" field. + public const int NumberFieldNumber = 2; + private readonly static int NumberDefaultValue = 0; + + private int number_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Number { + get { if ((_hasBits0 & 1) != 0) { return number_; } else { return NumberDefaultValue; } } + set { + _hasBits0 |= 1; + number_ = value; + } + } + /// Gets whether the "number" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNumber { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "number" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNumber() { + _hasBits0 &= ~1; + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private global::Google.Protobuf.Reflection.EnumValueOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.EnumValueOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumValueDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumValueDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Number != other.Number) return false; + if (!object.Equals(Options, other.Options)) 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 (HasName) hash ^= Name.GetHashCode(); + if (HasNumber) hash ^= Number.GetHashCode(); + if (options_ != null) hash ^= Options.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasNumber) { + output.WriteRawTag(16); + output.WriteInt32(Number); + } + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasNumber) { + output.WriteRawTag(16); + output.WriteInt32(Number); + } + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (HasNumber) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); + } + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumValueDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + if (other.HasNumber) { + Number = other.Number; + } + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.EnumValueOptions(); + } + Options.MergeFrom(other.Options); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Number = input.ReadInt32(); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.EnumValueOptions(); + } + input.ReadMessage(Options); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Number = input.ReadInt32(); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.EnumValueOptions(); + } + input.ReadMessage(Options); + break; + } + } + } + } + #endif + + } + + /// + /// Describes a service. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ServiceDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceDescriptorProto()); + 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::Google.Protobuf.Reflection.DescriptorReflection.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 ServiceDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceDescriptorProto(ServiceDescriptorProto other) : this() { + name_ = other.name_; + method_ = other.method_.Clone(); + options_ = other.options_ != null ? other.options_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceDescriptorProto Clone() { + return new ServiceDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "method" field. + public const int MethodFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_method_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.MethodDescriptorProto.Parser); + private readonly pbc::RepeatedField method_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Method { + get { return method_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private global::Google.Protobuf.Reflection.ServiceOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.ServiceOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ServiceDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ServiceDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!method_.Equals(other.method_)) return false; + if (!object.Equals(Options, other.Options)) 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 (HasName) hash ^= Name.GetHashCode(); + hash ^= method_.GetHashCode(); + if (options_ != null) hash ^= Options.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + method_.WriteTo(output, _repeated_method_codec); + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + method_.WriteTo(ref output, _repeated_method_codec); + if (options_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Options); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += method_.CalculateSize(_repeated_method_codec); + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ServiceDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + method_.Add(other.method_); + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.ServiceOptions(); + } + Options.MergeFrom(other.Options); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + method_.AddEntriesFrom(input, _repeated_method_codec); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.ServiceOptions(); + } + input.ReadMessage(Options); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + method_.AddEntriesFrom(ref input, _repeated_method_codec); + break; + } + case 26: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.ServiceOptions(); + } + input.ReadMessage(Options); + break; + } + } + } + } + #endif + + } + + /// + /// Describes a method of a service. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MethodDescriptorProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodDescriptorProto()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 MethodDescriptorProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MethodDescriptorProto(MethodDescriptorProto other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_; + inputType_ = other.inputType_; + outputType_ = other.outputType_; + options_ = other.options_ != null ? other.options_.Clone() : null; + clientStreaming_ = other.clientStreaming_; + serverStreaming_ = other.serverStreaming_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MethodDescriptorProto Clone() { + return new MethodDescriptorProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private readonly static string NameDefaultValue = ""; + + private string name_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_ ?? NameDefaultValue; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasName { + get { return name_ != null; } + } + /// Clears the value of the "name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearName() { + name_ = null; + } + + /// Field number for the "input_type" field. + public const int InputTypeFieldNumber = 2; + private readonly static string InputTypeDefaultValue = ""; + + private string inputType_; + /// + /// Input and output type names. These are resolved in the same way as + /// FieldDescriptorProto.type_name, but must refer to a message type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InputType { + get { return inputType_ ?? InputTypeDefaultValue; } + set { + inputType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "input_type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasInputType { + get { return inputType_ != null; } + } + /// Clears the value of the "input_type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInputType() { + inputType_ = null; + } + + /// Field number for the "output_type" field. + public const int OutputTypeFieldNumber = 3; + private readonly static string OutputTypeDefaultValue = ""; + + private string outputType_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OutputType { + get { return outputType_ ?? OutputTypeDefaultValue; } + set { + outputType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "output_type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasOutputType { + get { return outputType_ != null; } + } + /// Clears the value of the "output_type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearOutputType() { + outputType_ = null; + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 4; + private global::Google.Protobuf.Reflection.MethodOptions options_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.MethodOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + /// Field number for the "client_streaming" field. + public const int ClientStreamingFieldNumber = 5; + private readonly static bool ClientStreamingDefaultValue = false; + + private bool clientStreaming_; + /// + /// Identifies if client streams multiple client messages + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ClientStreaming { + get { if ((_hasBits0 & 1) != 0) { return clientStreaming_; } else { return ClientStreamingDefaultValue; } } + set { + _hasBits0 |= 1; + clientStreaming_ = value; + } + } + /// Gets whether the "client_streaming" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasClientStreaming { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "client_streaming" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearClientStreaming() { + _hasBits0 &= ~1; + } + + /// Field number for the "server_streaming" field. + public const int ServerStreamingFieldNumber = 6; + private readonly static bool ServerStreamingDefaultValue = false; + + private bool serverStreaming_; + /// + /// Identifies if server streams multiple server messages + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ServerStreaming { + get { if ((_hasBits0 & 2) != 0) { return serverStreaming_; } else { return ServerStreamingDefaultValue; } } + set { + _hasBits0 |= 2; + serverStreaming_ = value; + } + } + /// Gets whether the "server_streaming" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasServerStreaming { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "server_streaming" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearServerStreaming() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MethodDescriptorProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MethodDescriptorProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (InputType != other.InputType) return false; + if (OutputType != other.OutputType) return false; + if (!object.Equals(Options, other.Options)) return false; + if (ClientStreaming != other.ClientStreaming) return false; + if (ServerStreaming != other.ServerStreaming) 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 (HasName) hash ^= Name.GetHashCode(); + if (HasInputType) hash ^= InputType.GetHashCode(); + if (HasOutputType) hash ^= OutputType.GetHashCode(); + if (options_ != null) hash ^= Options.GetHashCode(); + if (HasClientStreaming) hash ^= ClientStreaming.GetHashCode(); + if (HasServerStreaming) hash ^= ServerStreaming.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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasInputType) { + output.WriteRawTag(18); + output.WriteString(InputType); + } + if (HasOutputType) { + output.WriteRawTag(26); + output.WriteString(OutputType); + } + if (options_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Options); + } + if (HasClientStreaming) { + output.WriteRawTag(40); + output.WriteBool(ClientStreaming); + } + if (HasServerStreaming) { + output.WriteRawTag(48); + output.WriteBool(ServerStreaming); + } + 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 (HasName) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (HasInputType) { + output.WriteRawTag(18); + output.WriteString(InputType); + } + if (HasOutputType) { + output.WriteRawTag(26); + output.WriteString(OutputType); + } + if (options_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Options); + } + if (HasClientStreaming) { + output.WriteRawTag(40); + output.WriteBool(ClientStreaming); + } + if (HasServerStreaming) { + output.WriteRawTag(48); + output.WriteBool(ServerStreaming); + } + 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 (HasName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (HasInputType) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InputType); + } + if (HasOutputType) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OutputType); + } + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (HasClientStreaming) { + size += 1 + 1; + } + if (HasServerStreaming) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MethodDescriptorProto other) { + if (other == null) { + return; + } + if (other.HasName) { + Name = other.Name; + } + if (other.HasInputType) { + InputType = other.InputType; + } + if (other.HasOutputType) { + OutputType = other.OutputType; + } + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.MethodOptions(); + } + Options.MergeFrom(other.Options); + } + if (other.HasClientStreaming) { + ClientStreaming = other.ClientStreaming; + } + if (other.HasServerStreaming) { + ServerStreaming = other.ServerStreaming; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + InputType = input.ReadString(); + break; + } + case 26: { + OutputType = input.ReadString(); + break; + } + case 34: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.MethodOptions(); + } + input.ReadMessage(Options); + break; + } + case 40: { + ClientStreaming = input.ReadBool(); + break; + } + case 48: { + ServerStreaming = input.ReadBool(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + InputType = input.ReadString(); + break; + } + case 26: { + OutputType = input.ReadString(); + break; + } + case 34: { + if (options_ == null) { + Options = new global::Google.Protobuf.Reflection.MethodOptions(); + } + input.ReadMessage(Options); + break; + } + case 40: { + ClientStreaming = input.ReadBool(); + break; + } + case 48: { + ServerStreaming = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FileOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FileOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileOptions(FileOptions other) : this() { + _hasBits0 = other._hasBits0; + javaPackage_ = other.javaPackage_; + javaOuterClassname_ = other.javaOuterClassname_; + javaMultipleFiles_ = other.javaMultipleFiles_; + javaGenerateEqualsAndHash_ = other.javaGenerateEqualsAndHash_; + javaStringCheckUtf8_ = other.javaStringCheckUtf8_; + optimizeFor_ = other.optimizeFor_; + goPackage_ = other.goPackage_; + ccGenericServices_ = other.ccGenericServices_; + javaGenericServices_ = other.javaGenericServices_; + pyGenericServices_ = other.pyGenericServices_; + deprecated_ = other.deprecated_; + ccEnableArenas_ = other.ccEnableArenas_; + objcClassPrefix_ = other.objcClassPrefix_; + csharpNamespace_ = other.csharpNamespace_; + swiftPrefix_ = other.swiftPrefix_; + phpClassPrefix_ = other.phpClassPrefix_; + phpNamespace_ = other.phpNamespace_; + phpMetadataNamespace_ = other.phpMetadataNamespace_; + rubyPackage_ = other.rubyPackage_; + features_ = other.features_ != null ? other.features_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileOptions Clone() { + return new FileOptions(this); + } + + /// Field number for the "java_package" field. + public const int JavaPackageFieldNumber = 1; + private readonly static string JavaPackageDefaultValue = ""; + + private string javaPackage_; + /// + /// Sets the Java package where classes generated from this .proto will be + /// placed. By default, the proto package is used, but this is often + /// inappropriate because proto packages do not normally start with backwards + /// domain names. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JavaPackage { + get { return javaPackage_ ?? JavaPackageDefaultValue; } + set { + javaPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "java_package" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJavaPackage { + get { return javaPackage_ != null; } + } + /// Clears the value of the "java_package" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJavaPackage() { + javaPackage_ = null; + } + + /// Field number for the "java_outer_classname" field. + public const int JavaOuterClassnameFieldNumber = 8; + private readonly static string JavaOuterClassnameDefaultValue = ""; + + private string javaOuterClassname_; + /// + /// Controls the name of the wrapper Java class generated for the .proto file. + /// That class will always contain the .proto file's getDescriptor() method as + /// well as any top-level extensions defined in the .proto file. + /// If java_multiple_files is disabled, then all the other classes from the + /// .proto file will be nested inside the single wrapper outer class. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JavaOuterClassname { + get { return javaOuterClassname_ ?? JavaOuterClassnameDefaultValue; } + set { + javaOuterClassname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "java_outer_classname" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJavaOuterClassname { + get { return javaOuterClassname_ != null; } + } + /// Clears the value of the "java_outer_classname" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJavaOuterClassname() { + javaOuterClassname_ = null; + } + + /// Field number for the "java_multiple_files" field. + public const int JavaMultipleFilesFieldNumber = 10; + private readonly static bool JavaMultipleFilesDefaultValue = false; + + private bool javaMultipleFiles_; + /// + /// If enabled, then the Java code generator will generate a separate .java + /// file for each top-level message, enum, and service defined in the .proto + /// file. Thus, these types will *not* be nested inside the wrapper class + /// named by java_outer_classname. However, the wrapper class will still be + /// generated to contain the file's getDescriptor() method as well as any + /// top-level extensions defined in the file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool JavaMultipleFiles { + get { if ((_hasBits0 & 2) != 0) { return javaMultipleFiles_; } else { return JavaMultipleFilesDefaultValue; } } + set { + _hasBits0 |= 2; + javaMultipleFiles_ = value; + } + } + /// Gets whether the "java_multiple_files" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJavaMultipleFiles { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "java_multiple_files" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJavaMultipleFiles() { + _hasBits0 &= ~2; + } + + /// Field number for the "java_generate_equals_and_hash" field. + public const int JavaGenerateEqualsAndHashFieldNumber = 20; + private readonly static bool JavaGenerateEqualsAndHashDefaultValue = false; + + private bool javaGenerateEqualsAndHash_; + /// + /// This option does nothing. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool JavaGenerateEqualsAndHash { + get { if ((_hasBits0 & 32) != 0) { return javaGenerateEqualsAndHash_; } else { return JavaGenerateEqualsAndHashDefaultValue; } } + set { + _hasBits0 |= 32; + javaGenerateEqualsAndHash_ = value; + } + } + /// Gets whether the "java_generate_equals_and_hash" field is set + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJavaGenerateEqualsAndHash { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "java_generate_equals_and_hash" field + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJavaGenerateEqualsAndHash() { + _hasBits0 &= ~32; + } + + /// Field number for the "java_string_check_utf8" field. + public const int JavaStringCheckUtf8FieldNumber = 27; + private readonly static bool JavaStringCheckUtf8DefaultValue = false; + + private bool javaStringCheckUtf8_; + /// + /// A proto2 file can set this to true to opt in to UTF-8 checking for Java, + /// which will throw an exception if invalid UTF-8 is parsed from the wire or + /// assigned to a string field. + /// + /// TODO: clarify exactly what kinds of field types this option + /// applies to, and update these docs accordingly. + /// + /// Proto3 files already perform these checks. Setting the option explicitly to + /// false has no effect: it cannot be used to opt proto3 files out of UTF-8 + /// checks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool JavaStringCheckUtf8 { + get { if ((_hasBits0 & 128) != 0) { return javaStringCheckUtf8_; } else { return JavaStringCheckUtf8DefaultValue; } } + set { + _hasBits0 |= 128; + javaStringCheckUtf8_ = value; + } + } + /// Gets whether the "java_string_check_utf8" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJavaStringCheckUtf8 { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "java_string_check_utf8" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJavaStringCheckUtf8() { + _hasBits0 &= ~128; + } + + /// Field number for the "optimize_for" field. + public const int OptimizeForFieldNumber = 9; + private readonly static global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode OptimizeForDefaultValue = global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode.Speed; + + private global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode optimizeFor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode OptimizeFor { + get { if ((_hasBits0 & 1) != 0) { return optimizeFor_; } else { return OptimizeForDefaultValue; } } + set { + _hasBits0 |= 1; + optimizeFor_ = value; + } + } + /// Gets whether the "optimize_for" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasOptimizeFor { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optimize_for" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearOptimizeFor() { + _hasBits0 &= ~1; + } + + /// Field number for the "go_package" field. + public const int GoPackageFieldNumber = 11; + private readonly static string GoPackageDefaultValue = ""; + + private string goPackage_; + /// + /// Sets the Go package where structs generated from this .proto will be + /// placed. If omitted, the Go package will be derived from the following: + /// - The basename of the package import path, if provided. + /// - Otherwise, the package statement in the .proto file, if present. + /// - Otherwise, the basename of the .proto file, without extension. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GoPackage { + get { return goPackage_ ?? GoPackageDefaultValue; } + set { + goPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "go_package" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasGoPackage { + get { return goPackage_ != null; } + } + /// Clears the value of the "go_package" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearGoPackage() { + goPackage_ = null; + } + + /// Field number for the "cc_generic_services" field. + public const int CcGenericServicesFieldNumber = 16; + private readonly static bool CcGenericServicesDefaultValue = false; + + private bool ccGenericServices_; + /// + /// Should generic services be generated in each language? "Generic" services + /// are not specific to any particular RPC system. They are generated by the + /// main code generators in each language (without additional plugins). + /// Generic services were the only kind of service generation supported by + /// early versions of google.protobuf. + /// + /// Generic services are now considered deprecated in favor of using plugins + /// that generate code specific to your particular RPC system. Therefore, + /// these default to false. Old code which depends on generic services should + /// explicitly set them to true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CcGenericServices { + get { if ((_hasBits0 & 4) != 0) { return ccGenericServices_; } else { return CcGenericServicesDefaultValue; } } + set { + _hasBits0 |= 4; + ccGenericServices_ = value; + } + } + /// Gets whether the "cc_generic_services" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCcGenericServices { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "cc_generic_services" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCcGenericServices() { + _hasBits0 &= ~4; + } + + /// Field number for the "java_generic_services" field. + public const int JavaGenericServicesFieldNumber = 17; + private readonly static bool JavaGenericServicesDefaultValue = false; + + private bool javaGenericServices_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool JavaGenericServices { + get { if ((_hasBits0 & 8) != 0) { return javaGenericServices_; } else { return JavaGenericServicesDefaultValue; } } + set { + _hasBits0 |= 8; + javaGenericServices_ = value; + } + } + /// Gets whether the "java_generic_services" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJavaGenericServices { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "java_generic_services" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJavaGenericServices() { + _hasBits0 &= ~8; + } + + /// Field number for the "py_generic_services" field. + public const int PyGenericServicesFieldNumber = 18; + private readonly static bool PyGenericServicesDefaultValue = false; + + private bool pyGenericServices_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool PyGenericServices { + get { if ((_hasBits0 & 16) != 0) { return pyGenericServices_; } else { return PyGenericServicesDefaultValue; } } + set { + _hasBits0 |= 16; + pyGenericServices_ = value; + } + } + /// Gets whether the "py_generic_services" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPyGenericServices { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "py_generic_services" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPyGenericServices() { + _hasBits0 &= ~16; + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 23; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this file deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for everything in the file, or it will be completely ignored; in the very + /// least, this is a formalization for deprecating files. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 64) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 64; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~64; + } + + /// Field number for the "cc_enable_arenas" field. + public const int CcEnableArenasFieldNumber = 31; + private readonly static bool CcEnableArenasDefaultValue = true; + + private bool ccEnableArenas_; + /// + /// Enables the use of arenas for the proto messages in this file. This applies + /// only to generated classes for C++. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CcEnableArenas { + get { if ((_hasBits0 & 256) != 0) { return ccEnableArenas_; } else { return CcEnableArenasDefaultValue; } } + set { + _hasBits0 |= 256; + ccEnableArenas_ = value; + } + } + /// Gets whether the "cc_enable_arenas" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCcEnableArenas { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "cc_enable_arenas" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCcEnableArenas() { + _hasBits0 &= ~256; + } + + /// Field number for the "objc_class_prefix" field. + public const int ObjcClassPrefixFieldNumber = 36; + private readonly static string ObjcClassPrefixDefaultValue = ""; + + private string objcClassPrefix_; + /// + /// Sets the objective c class prefix which is prepended to all objective c + /// generated classes from this .proto. There is no default. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ObjcClassPrefix { + get { return objcClassPrefix_ ?? ObjcClassPrefixDefaultValue; } + set { + objcClassPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "objc_class_prefix" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasObjcClassPrefix { + get { return objcClassPrefix_ != null; } + } + /// Clears the value of the "objc_class_prefix" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearObjcClassPrefix() { + objcClassPrefix_ = null; + } + + /// Field number for the "csharp_namespace" field. + public const int CsharpNamespaceFieldNumber = 37; + private readonly static string CsharpNamespaceDefaultValue = ""; + + private string csharpNamespace_; + /// + /// Namespace for generated classes; defaults to the package. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CsharpNamespace { + get { return csharpNamespace_ ?? CsharpNamespaceDefaultValue; } + set { + csharpNamespace_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "csharp_namespace" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCsharpNamespace { + get { return csharpNamespace_ != null; } + } + /// Clears the value of the "csharp_namespace" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCsharpNamespace() { + csharpNamespace_ = null; + } + + /// Field number for the "swift_prefix" field. + public const int SwiftPrefixFieldNumber = 39; + private readonly static string SwiftPrefixDefaultValue = ""; + + private string swiftPrefix_; + /// + /// By default Swift generators will take the proto package and CamelCase it + /// replacing '.' with underscore and use that to prefix the types/symbols + /// defined. When this options is provided, they will use this value instead + /// to prefix the types/symbols defined. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SwiftPrefix { + get { return swiftPrefix_ ?? SwiftPrefixDefaultValue; } + set { + swiftPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "swift_prefix" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSwiftPrefix { + get { return swiftPrefix_ != null; } + } + /// Clears the value of the "swift_prefix" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSwiftPrefix() { + swiftPrefix_ = null; + } + + /// Field number for the "php_class_prefix" field. + public const int PhpClassPrefixFieldNumber = 40; + private readonly static string PhpClassPrefixDefaultValue = ""; + + private string phpClassPrefix_; + /// + /// Sets the php class prefix which is prepended to all php generated classes + /// from this .proto. Default is empty. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PhpClassPrefix { + get { return phpClassPrefix_ ?? PhpClassPrefixDefaultValue; } + set { + phpClassPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "php_class_prefix" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPhpClassPrefix { + get { return phpClassPrefix_ != null; } + } + /// Clears the value of the "php_class_prefix" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPhpClassPrefix() { + phpClassPrefix_ = null; + } + + /// Field number for the "php_namespace" field. + public const int PhpNamespaceFieldNumber = 41; + private readonly static string PhpNamespaceDefaultValue = ""; + + private string phpNamespace_; + /// + /// Use this option to change the namespace of php generated classes. Default + /// is empty. When this option is empty, the package name will be used for + /// determining the namespace. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PhpNamespace { + get { return phpNamespace_ ?? PhpNamespaceDefaultValue; } + set { + phpNamespace_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "php_namespace" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPhpNamespace { + get { return phpNamespace_ != null; } + } + /// Clears the value of the "php_namespace" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPhpNamespace() { + phpNamespace_ = null; + } + + /// Field number for the "php_metadata_namespace" field. + public const int PhpMetadataNamespaceFieldNumber = 44; + private readonly static string PhpMetadataNamespaceDefaultValue = ""; + + private string phpMetadataNamespace_; + /// + /// Use this option to change the namespace of php generated metadata classes. + /// Default is empty. When this option is empty, the proto file name will be + /// used for determining the namespace. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PhpMetadataNamespace { + get { return phpMetadataNamespace_ ?? PhpMetadataNamespaceDefaultValue; } + set { + phpMetadataNamespace_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "php_metadata_namespace" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPhpMetadataNamespace { + get { return phpMetadataNamespace_ != null; } + } + /// Clears the value of the "php_metadata_namespace" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPhpMetadataNamespace() { + phpMetadataNamespace_ = null; + } + + /// Field number for the "ruby_package" field. + public const int RubyPackageFieldNumber = 45; + private readonly static string RubyPackageDefaultValue = ""; + + private string rubyPackage_; + /// + /// Use this option to change the package of ruby generated classes. Default + /// is empty. When this option is not set, the package name will be used for + /// determining the ruby package. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RubyPackage { + get { return rubyPackage_ ?? RubyPackageDefaultValue; } + set { + rubyPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "ruby_package" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRubyPackage { + get { return rubyPackage_ != null; } + } + /// Clears the value of the "ruby_package" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRubyPackage() { + rubyPackage_ = null; + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 50; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. + /// See the documentation for the "Options" section above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FileOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FileOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (JavaPackage != other.JavaPackage) return false; + if (JavaOuterClassname != other.JavaOuterClassname) return false; + if (JavaMultipleFiles != other.JavaMultipleFiles) return false; + if (JavaGenerateEqualsAndHash != other.JavaGenerateEqualsAndHash) return false; + if (JavaStringCheckUtf8 != other.JavaStringCheckUtf8) return false; + if (OptimizeFor != other.OptimizeFor) return false; + if (GoPackage != other.GoPackage) return false; + if (CcGenericServices != other.CcGenericServices) return false; + if (JavaGenericServices != other.JavaGenericServices) return false; + if (PyGenericServices != other.PyGenericServices) return false; + if (Deprecated != other.Deprecated) return false; + if (CcEnableArenas != other.CcEnableArenas) return false; + if (ObjcClassPrefix != other.ObjcClassPrefix) return false; + if (CsharpNamespace != other.CsharpNamespace) return false; + if (SwiftPrefix != other.SwiftPrefix) return false; + if (PhpClassPrefix != other.PhpClassPrefix) return false; + if (PhpNamespace != other.PhpNamespace) return false; + if (PhpMetadataNamespace != other.PhpMetadataNamespace) return false; + if (RubyPackage != other.RubyPackage) return false; + if (!object.Equals(Features, other.Features)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasJavaPackage) hash ^= JavaPackage.GetHashCode(); + if (HasJavaOuterClassname) hash ^= JavaOuterClassname.GetHashCode(); + if (HasJavaMultipleFiles) hash ^= JavaMultipleFiles.GetHashCode(); + if (HasJavaGenerateEqualsAndHash) hash ^= JavaGenerateEqualsAndHash.GetHashCode(); + if (HasJavaStringCheckUtf8) hash ^= JavaStringCheckUtf8.GetHashCode(); + if (HasOptimizeFor) hash ^= OptimizeFor.GetHashCode(); + if (HasGoPackage) hash ^= GoPackage.GetHashCode(); + if (HasCcGenericServices) hash ^= CcGenericServices.GetHashCode(); + if (HasJavaGenericServices) hash ^= JavaGenericServices.GetHashCode(); + if (HasPyGenericServices) hash ^= PyGenericServices.GetHashCode(); + if (HasDeprecated) hash ^= Deprecated.GetHashCode(); + if (HasCcEnableArenas) hash ^= CcEnableArenas.GetHashCode(); + if (HasObjcClassPrefix) hash ^= ObjcClassPrefix.GetHashCode(); + if (HasCsharpNamespace) hash ^= CsharpNamespace.GetHashCode(); + if (HasSwiftPrefix) hash ^= SwiftPrefix.GetHashCode(); + if (HasPhpClassPrefix) hash ^= PhpClassPrefix.GetHashCode(); + if (HasPhpNamespace) hash ^= PhpNamespace.GetHashCode(); + if (HasPhpMetadataNamespace) hash ^= PhpMetadataNamespace.GetHashCode(); + if (HasRubyPackage) hash ^= RubyPackage.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasJavaPackage) { + output.WriteRawTag(10); + output.WriteString(JavaPackage); + } + if (HasJavaOuterClassname) { + output.WriteRawTag(66); + output.WriteString(JavaOuterClassname); + } + if (HasOptimizeFor) { + output.WriteRawTag(72); + output.WriteEnum((int) OptimizeFor); + } + if (HasJavaMultipleFiles) { + output.WriteRawTag(80); + output.WriteBool(JavaMultipleFiles); + } + if (HasGoPackage) { + output.WriteRawTag(90); + output.WriteString(GoPackage); + } + if (HasCcGenericServices) { + output.WriteRawTag(128, 1); + output.WriteBool(CcGenericServices); + } + if (HasJavaGenericServices) { + output.WriteRawTag(136, 1); + output.WriteBool(JavaGenericServices); + } + if (HasPyGenericServices) { + output.WriteRawTag(144, 1); + output.WriteBool(PyGenericServices); + } + if (HasJavaGenerateEqualsAndHash) { + output.WriteRawTag(160, 1); + output.WriteBool(JavaGenerateEqualsAndHash); + } + if (HasDeprecated) { + output.WriteRawTag(184, 1); + output.WriteBool(Deprecated); + } + if (HasJavaStringCheckUtf8) { + output.WriteRawTag(216, 1); + output.WriteBool(JavaStringCheckUtf8); + } + if (HasCcEnableArenas) { + output.WriteRawTag(248, 1); + output.WriteBool(CcEnableArenas); + } + if (HasObjcClassPrefix) { + output.WriteRawTag(162, 2); + output.WriteString(ObjcClassPrefix); + } + if (HasCsharpNamespace) { + output.WriteRawTag(170, 2); + output.WriteString(CsharpNamespace); + } + if (HasSwiftPrefix) { + output.WriteRawTag(186, 2); + output.WriteString(SwiftPrefix); + } + if (HasPhpClassPrefix) { + output.WriteRawTag(194, 2); + output.WriteString(PhpClassPrefix); + } + if (HasPhpNamespace) { + output.WriteRawTag(202, 2); + output.WriteString(PhpNamespace); + } + if (HasPhpMetadataNamespace) { + output.WriteRawTag(226, 2); + output.WriteString(PhpMetadataNamespace); + } + if (HasRubyPackage) { + output.WriteRawTag(234, 2); + output.WriteString(RubyPackage); + } + if (features_ != null) { + output.WriteRawTag(146, 3); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasJavaPackage) { + output.WriteRawTag(10); + output.WriteString(JavaPackage); + } + if (HasJavaOuterClassname) { + output.WriteRawTag(66); + output.WriteString(JavaOuterClassname); + } + if (HasOptimizeFor) { + output.WriteRawTag(72); + output.WriteEnum((int) OptimizeFor); + } + if (HasJavaMultipleFiles) { + output.WriteRawTag(80); + output.WriteBool(JavaMultipleFiles); + } + if (HasGoPackage) { + output.WriteRawTag(90); + output.WriteString(GoPackage); + } + if (HasCcGenericServices) { + output.WriteRawTag(128, 1); + output.WriteBool(CcGenericServices); + } + if (HasJavaGenericServices) { + output.WriteRawTag(136, 1); + output.WriteBool(JavaGenericServices); + } + if (HasPyGenericServices) { + output.WriteRawTag(144, 1); + output.WriteBool(PyGenericServices); + } + if (HasJavaGenerateEqualsAndHash) { + output.WriteRawTag(160, 1); + output.WriteBool(JavaGenerateEqualsAndHash); + } + if (HasDeprecated) { + output.WriteRawTag(184, 1); + output.WriteBool(Deprecated); + } + if (HasJavaStringCheckUtf8) { + output.WriteRawTag(216, 1); + output.WriteBool(JavaStringCheckUtf8); + } + if (HasCcEnableArenas) { + output.WriteRawTag(248, 1); + output.WriteBool(CcEnableArenas); + } + if (HasObjcClassPrefix) { + output.WriteRawTag(162, 2); + output.WriteString(ObjcClassPrefix); + } + if (HasCsharpNamespace) { + output.WriteRawTag(170, 2); + output.WriteString(CsharpNamespace); + } + if (HasSwiftPrefix) { + output.WriteRawTag(186, 2); + output.WriteString(SwiftPrefix); + } + if (HasPhpClassPrefix) { + output.WriteRawTag(194, 2); + output.WriteString(PhpClassPrefix); + } + if (HasPhpNamespace) { + output.WriteRawTag(202, 2); + output.WriteString(PhpNamespace); + } + if (HasPhpMetadataNamespace) { + output.WriteRawTag(226, 2); + output.WriteString(PhpMetadataNamespace); + } + if (HasRubyPackage) { + output.WriteRawTag(234, 2); + output.WriteString(RubyPackage); + } + if (features_ != null) { + output.WriteRawTag(146, 3); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasJavaPackage) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JavaPackage); + } + if (HasJavaOuterClassname) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JavaOuterClassname); + } + if (HasJavaMultipleFiles) { + size += 1 + 1; + } + if (HasJavaGenerateEqualsAndHash) { + size += 2 + 1; + } + if (HasJavaStringCheckUtf8) { + size += 2 + 1; + } + if (HasOptimizeFor) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptimizeFor); + } + if (HasGoPackage) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GoPackage); + } + if (HasCcGenericServices) { + size += 2 + 1; + } + if (HasJavaGenericServices) { + size += 2 + 1; + } + if (HasPyGenericServices) { + size += 2 + 1; + } + if (HasDeprecated) { + size += 2 + 1; + } + if (HasCcEnableArenas) { + size += 2 + 1; + } + if (HasObjcClassPrefix) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(ObjcClassPrefix); + } + if (HasCsharpNamespace) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(CsharpNamespace); + } + if (HasSwiftPrefix) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(SwiftPrefix); + } + if (HasPhpClassPrefix) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(PhpClassPrefix); + } + if (HasPhpNamespace) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(PhpNamespace); + } + if (HasPhpMetadataNamespace) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(PhpMetadataNamespace); + } + if (HasRubyPackage) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(RubyPackage); + } + if (features_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FileOptions other) { + if (other == null) { + return; + } + if (other.HasJavaPackage) { + JavaPackage = other.JavaPackage; + } + if (other.HasJavaOuterClassname) { + JavaOuterClassname = other.JavaOuterClassname; + } + if (other.HasJavaMultipleFiles) { + JavaMultipleFiles = other.JavaMultipleFiles; + } + if (other.HasJavaGenerateEqualsAndHash) { + JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash; + } + if (other.HasJavaStringCheckUtf8) { + JavaStringCheckUtf8 = other.JavaStringCheckUtf8; + } + if (other.HasOptimizeFor) { + OptimizeFor = other.OptimizeFor; + } + if (other.HasGoPackage) { + GoPackage = other.GoPackage; + } + if (other.HasCcGenericServices) { + CcGenericServices = other.CcGenericServices; + } + if (other.HasJavaGenericServices) { + JavaGenericServices = other.JavaGenericServices; + } + if (other.HasPyGenericServices) { + PyGenericServices = other.PyGenericServices; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + if (other.HasCcEnableArenas) { + CcEnableArenas = other.CcEnableArenas; + } + if (other.HasObjcClassPrefix) { + ObjcClassPrefix = other.ObjcClassPrefix; + } + if (other.HasCsharpNamespace) { + CsharpNamespace = other.CsharpNamespace; + } + if (other.HasSwiftPrefix) { + SwiftPrefix = other.SwiftPrefix; + } + if (other.HasPhpClassPrefix) { + PhpClassPrefix = other.PhpClassPrefix; + } + if (other.HasPhpNamespace) { + PhpNamespace = other.PhpNamespace; + } + if (other.HasPhpMetadataNamespace) { + PhpMetadataNamespace = other.PhpMetadataNamespace; + } + if (other.HasRubyPackage) { + RubyPackage = other.RubyPackage; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 10: { + JavaPackage = input.ReadString(); + break; + } + case 66: { + JavaOuterClassname = input.ReadString(); + break; + } + case 72: { + OptimizeFor = (global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode) input.ReadEnum(); + break; + } + case 80: { + JavaMultipleFiles = input.ReadBool(); + break; + } + case 90: { + GoPackage = input.ReadString(); + break; + } + case 128: { + CcGenericServices = input.ReadBool(); + break; + } + case 136: { + JavaGenericServices = input.ReadBool(); + break; + } + case 144: { + PyGenericServices = input.ReadBool(); + break; + } + case 160: { + JavaGenerateEqualsAndHash = input.ReadBool(); + break; + } + case 184: { + Deprecated = input.ReadBool(); + break; + } + case 216: { + JavaStringCheckUtf8 = input.ReadBool(); + break; + } + case 248: { + CcEnableArenas = input.ReadBool(); + break; + } + case 290: { + ObjcClassPrefix = input.ReadString(); + break; + } + case 298: { + CsharpNamespace = input.ReadString(); + break; + } + case 314: { + SwiftPrefix = input.ReadString(); + break; + } + case 322: { + PhpClassPrefix = input.ReadString(); + break; + } + case 330: { + PhpNamespace = input.ReadString(); + break; + } + case 354: { + PhpMetadataNamespace = input.ReadString(); + break; + } + case 362: { + RubyPackage = input.ReadString(); + break; + } + case 402: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 10: { + JavaPackage = input.ReadString(); + break; + } + case 66: { + JavaOuterClassname = input.ReadString(); + break; + } + case 72: { + OptimizeFor = (global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode) input.ReadEnum(); + break; + } + case 80: { + JavaMultipleFiles = input.ReadBool(); + break; + } + case 90: { + GoPackage = input.ReadString(); + break; + } + case 128: { + CcGenericServices = input.ReadBool(); + break; + } + case 136: { + JavaGenericServices = input.ReadBool(); + break; + } + case 144: { + PyGenericServices = input.ReadBool(); + break; + } + case 160: { + JavaGenerateEqualsAndHash = input.ReadBool(); + break; + } + case 184: { + Deprecated = input.ReadBool(); + break; + } + case 216: { + JavaStringCheckUtf8 = input.ReadBool(); + break; + } + case 248: { + CcEnableArenas = input.ReadBool(); + break; + } + case 290: { + ObjcClassPrefix = input.ReadString(); + break; + } + case 298: { + CsharpNamespace = input.ReadString(); + break; + } + case 314: { + SwiftPrefix = input.ReadString(); + break; + } + case 322: { + PhpClassPrefix = input.ReadString(); + break; + } + case 330: { + PhpNamespace = input.ReadString(); + break; + } + case 354: { + PhpMetadataNamespace = input.ReadString(); + break; + } + case 362: { + RubyPackage = input.ReadString(); + break; + } + case 402: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the FileOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Generated classes can be optimized for speed or code size. + /// + public enum OptimizeMode { + /// + /// Generate complete code for parsing, serialization, + /// + [pbr::OriginalName("SPEED")] Speed = 1, + /// + /// etc. + /// + [pbr::OriginalName("CODE_SIZE")] CodeSize = 2, + /// + /// Generate code using MessageLite and the lite runtime. + /// + [pbr::OriginalName("LITE_RUNTIME")] LiteRuntime = 3, + } + + } + #endregion + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MessageOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 MessageOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageOptions(MessageOptions other) : this() { + _hasBits0 = other._hasBits0; + messageSetWireFormat_ = other.messageSetWireFormat_; + noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_; + deprecated_ = other.deprecated_; + mapEntry_ = other.mapEntry_; + deprecatedLegacyJsonFieldConflicts_ = other.deprecatedLegacyJsonFieldConflicts_; + features_ = other.features_ != null ? other.features_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageOptions Clone() { + return new MessageOptions(this); + } + + /// Field number for the "message_set_wire_format" field. + public const int MessageSetWireFormatFieldNumber = 1; + private readonly static bool MessageSetWireFormatDefaultValue = false; + + private bool messageSetWireFormat_; + /// + /// Set true to use the old proto1 MessageSet wire format for extensions. + /// This is provided for backwards-compatibility with the MessageSet wire + /// format. You should not use this for any other reason: It's less + /// efficient, has fewer features, and is more complicated. + /// + /// The message must be defined exactly as follows: + /// message Foo { + /// option message_set_wire_format = true; + /// extensions 4 to max; + /// } + /// Note that the message cannot have any defined fields; MessageSets only + /// have extensions. + /// + /// All extensions of your type must be singular messages; e.g. they cannot + /// be int32s, enums, or repeated messages. + /// + /// Because this is an option, the above two restrictions are not enforced by + /// the protocol compiler. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool MessageSetWireFormat { + get { if ((_hasBits0 & 1) != 0) { return messageSetWireFormat_; } else { return MessageSetWireFormatDefaultValue; } } + set { + _hasBits0 |= 1; + messageSetWireFormat_ = value; + } + } + /// Gets whether the "message_set_wire_format" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMessageSetWireFormat { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "message_set_wire_format" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMessageSetWireFormat() { + _hasBits0 &= ~1; + } + + /// Field number for the "no_standard_descriptor_accessor" field. + public const int NoStandardDescriptorAccessorFieldNumber = 2; + private readonly static bool NoStandardDescriptorAccessorDefaultValue = false; + + private bool noStandardDescriptorAccessor_; + /// + /// Disables the generation of the standard "descriptor()" accessor, which can + /// conflict with a field of the same name. This is meant to make migration + /// from proto1 easier; new code should avoid fields named "descriptor". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool NoStandardDescriptorAccessor { + get { if ((_hasBits0 & 2) != 0) { return noStandardDescriptorAccessor_; } else { return NoStandardDescriptorAccessorDefaultValue; } } + set { + _hasBits0 |= 2; + noStandardDescriptorAccessor_ = value; + } + } + /// Gets whether the "no_standard_descriptor_accessor" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNoStandardDescriptorAccessor { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "no_standard_descriptor_accessor" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNoStandardDescriptorAccessor() { + _hasBits0 &= ~2; + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 3; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this message deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the message, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating messages. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 4) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 4; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~4; + } + + /// Field number for the "map_entry" field. + public const int MapEntryFieldNumber = 7; + private readonly static bool MapEntryDefaultValue = false; + + private bool mapEntry_; + /// + /// Whether the message is an automatically generated map entry type for the + /// maps field. + /// + /// For maps fields: + /// map<KeyType, ValueType> map_field = 1; + /// The parsed descriptor looks like: + /// message MapFieldEntry { + /// option map_entry = true; + /// optional KeyType key = 1; + /// optional ValueType value = 2; + /// } + /// repeated MapFieldEntry map_field = 1; + /// + /// Implementations may choose not to generate the map_entry=true message, but + /// use a native map in the target language to hold the keys and values. + /// The reflection APIs in such implementations still need to work as + /// if the field is a repeated message field. + /// + /// NOTE: Do not set the option in .proto files. Always use the maps syntax + /// instead. The option should only be implicitly set by the proto compiler + /// parser. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool MapEntry { + get { if ((_hasBits0 & 8) != 0) { return mapEntry_; } else { return MapEntryDefaultValue; } } + set { + _hasBits0 |= 8; + mapEntry_ = value; + } + } + /// Gets whether the "map_entry" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMapEntry { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "map_entry" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMapEntry() { + _hasBits0 &= ~8; + } + + /// Field number for the "deprecated_legacy_json_field_conflicts" field. + public const int DeprecatedLegacyJsonFieldConflictsFieldNumber = 11; + private readonly static bool DeprecatedLegacyJsonFieldConflictsDefaultValue = false; + + private bool deprecatedLegacyJsonFieldConflicts_; + /// + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// and strips underscored from the fields before comparison in proto3 only. + /// The new behavior takes `json_name` into account and applies to proto2 as + /// well. + /// + /// This should only be used as a temporary measure against broken builds due + /// to the change in behavior for JSON field name conflicts. + /// + /// TODO This is legacy behavior we plan to remove once downstream + /// teams have had time to migrate. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DeprecatedLegacyJsonFieldConflicts { + get { if ((_hasBits0 & 16) != 0) { return deprecatedLegacyJsonFieldConflicts_; } else { return DeprecatedLegacyJsonFieldConflictsDefaultValue; } } + set { + _hasBits0 |= 16; + deprecatedLegacyJsonFieldConflicts_ = value; + } + } + /// Gets whether the "deprecated_legacy_json_field_conflicts" field is set + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecatedLegacyJsonFieldConflicts { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "deprecated_legacy_json_field_conflicts" field + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecatedLegacyJsonFieldConflicts() { + _hasBits0 &= ~16; + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 12; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MessageOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MessageOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MessageSetWireFormat != other.MessageSetWireFormat) return false; + if (NoStandardDescriptorAccessor != other.NoStandardDescriptorAccessor) return false; + if (Deprecated != other.Deprecated) return false; + if (MapEntry != other.MapEntry) return false; + if (DeprecatedLegacyJsonFieldConflicts != other.DeprecatedLegacyJsonFieldConflicts) return false; + if (!object.Equals(Features, other.Features)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasMessageSetWireFormat) hash ^= MessageSetWireFormat.GetHashCode(); + if (HasNoStandardDescriptorAccessor) hash ^= NoStandardDescriptorAccessor.GetHashCode(); + if (HasDeprecated) hash ^= Deprecated.GetHashCode(); + if (HasMapEntry) hash ^= MapEntry.GetHashCode(); + if (HasDeprecatedLegacyJsonFieldConflicts) hash ^= DeprecatedLegacyJsonFieldConflicts.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasMessageSetWireFormat) { + output.WriteRawTag(8); + output.WriteBool(MessageSetWireFormat); + } + if (HasNoStandardDescriptorAccessor) { + output.WriteRawTag(16); + output.WriteBool(NoStandardDescriptorAccessor); + } + if (HasDeprecated) { + output.WriteRawTag(24); + output.WriteBool(Deprecated); + } + if (HasMapEntry) { + output.WriteRawTag(56); + output.WriteBool(MapEntry); + } + if (HasDeprecatedLegacyJsonFieldConflicts) { + output.WriteRawTag(88); + output.WriteBool(DeprecatedLegacyJsonFieldConflicts); + } + if (features_ != null) { + output.WriteRawTag(98); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasMessageSetWireFormat) { + output.WriteRawTag(8); + output.WriteBool(MessageSetWireFormat); + } + if (HasNoStandardDescriptorAccessor) { + output.WriteRawTag(16); + output.WriteBool(NoStandardDescriptorAccessor); + } + if (HasDeprecated) { + output.WriteRawTag(24); + output.WriteBool(Deprecated); + } + if (HasMapEntry) { + output.WriteRawTag(56); + output.WriteBool(MapEntry); + } + if (HasDeprecatedLegacyJsonFieldConflicts) { + output.WriteRawTag(88); + output.WriteBool(DeprecatedLegacyJsonFieldConflicts); + } + if (features_ != null) { + output.WriteRawTag(98); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasMessageSetWireFormat) { + size += 1 + 1; + } + if (HasNoStandardDescriptorAccessor) { + size += 1 + 1; + } + if (HasDeprecated) { + size += 1 + 1; + } + if (HasMapEntry) { + size += 1 + 1; + } + if (HasDeprecatedLegacyJsonFieldConflicts) { + size += 1 + 1; + } + if (features_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MessageOptions other) { + if (other == null) { + return; + } + if (other.HasMessageSetWireFormat) { + MessageSetWireFormat = other.MessageSetWireFormat; + } + if (other.HasNoStandardDescriptorAccessor) { + NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + if (other.HasMapEntry) { + MapEntry = other.MapEntry; + } + if (other.HasDeprecatedLegacyJsonFieldConflicts) { + DeprecatedLegacyJsonFieldConflicts = other.DeprecatedLegacyJsonFieldConflicts; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 8: { + MessageSetWireFormat = input.ReadBool(); + break; + } + case 16: { + NoStandardDescriptorAccessor = input.ReadBool(); + break; + } + case 24: { + Deprecated = input.ReadBool(); + break; + } + case 56: { + MapEntry = input.ReadBool(); + break; + } + case 88: { + DeprecatedLegacyJsonFieldConflicts = input.ReadBool(); + break; + } + case 98: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 8: { + MessageSetWireFormat = input.ReadBool(); + break; + } + case 16: { + NoStandardDescriptorAccessor = input.ReadBool(); + break; + } + case 24: { + Deprecated = input.ReadBool(); + break; + } + case 56: { + MapEntry = input.ReadBool(); + break; + } + case 88: { + DeprecatedLegacyJsonFieldConflicts = input.ReadBool(); + break; + } + case 98: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FieldOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FieldOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldOptions(FieldOptions other) : this() { + _hasBits0 = other._hasBits0; + ctype_ = other.ctype_; + packed_ = other.packed_; + jstype_ = other.jstype_; + lazy_ = other.lazy_; + unverifiedLazy_ = other.unverifiedLazy_; + deprecated_ = other.deprecated_; + weak_ = other.weak_; + debugRedact_ = other.debugRedact_; + retention_ = other.retention_; + targets_ = other.targets_.Clone(); + editionDefaults_ = other.editionDefaults_.Clone(); + features_ = other.features_ != null ? other.features_.Clone() : null; + featureSupport_ = other.featureSupport_ != null ? other.featureSupport_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldOptions Clone() { + return new FieldOptions(this); + } + + /// Field number for the "ctype" field. + public const int CtypeFieldNumber = 1; + private readonly static global::Google.Protobuf.Reflection.FieldOptions.Types.CType CtypeDefaultValue = global::Google.Protobuf.Reflection.FieldOptions.Types.CType.String; + + private global::Google.Protobuf.Reflection.FieldOptions.Types.CType ctype_; + /// + /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. + /// The ctype option instructs the C++ code generator to use a different + /// representation of the field than it normally would. See the specific + /// options below. This option is only implemented to support use of + /// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + /// type "bytes" in the open source release. + /// TODO: make ctype actually deprecated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldOptions.Types.CType Ctype { + get { if ((_hasBits0 & 1) != 0) { return ctype_; } else { return CtypeDefaultValue; } } + set { + _hasBits0 |= 1; + ctype_ = value; + } + } + /// Gets whether the "ctype" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCtype { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "ctype" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCtype() { + _hasBits0 &= ~1; + } + + /// Field number for the "packed" field. + public const int PackedFieldNumber = 2; + private readonly static bool PackedDefaultValue = false; + + private bool packed_; + /// + /// The packed option can be enabled for repeated primitive fields to enable + /// a more efficient representation on the wire. Rather than repeatedly + /// writing the tag and type for each element, the entire array is encoded as + /// a single length-delimited blob. In proto3, only explicit setting it to + /// false will avoid using packed encoding. This option is prohibited in + /// Editions, but the `repeated_field_encoding` feature can be used to control + /// the behavior. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Packed { + get { if ((_hasBits0 & 2) != 0) { return packed_; } else { return PackedDefaultValue; } } + set { + _hasBits0 |= 2; + packed_ = value; + } + } + /// Gets whether the "packed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPacked { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "packed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPacked() { + _hasBits0 &= ~2; + } + + /// Field number for the "jstype" field. + public const int JstypeFieldNumber = 6; + private readonly static global::Google.Protobuf.Reflection.FieldOptions.Types.JSType JstypeDefaultValue = global::Google.Protobuf.Reflection.FieldOptions.Types.JSType.JsNormal; + + private global::Google.Protobuf.Reflection.FieldOptions.Types.JSType jstype_; + /// + /// The jstype option determines the JavaScript type used for values of the + /// field. The option is permitted only for 64 bit integral and fixed types + /// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + /// is represented as JavaScript string, which avoids loss of precision that + /// can happen when a large value is converted to a floating point JavaScript. + /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + /// use the JavaScript "number" type. The behavior of the default option + /// JS_NORMAL is implementation dependent. + /// + /// This option is an enum to permit additional types to be added, e.g. + /// goog.math.Integer. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldOptions.Types.JSType Jstype { + get { if ((_hasBits0 & 16) != 0) { return jstype_; } else { return JstypeDefaultValue; } } + set { + _hasBits0 |= 16; + jstype_ = value; + } + } + /// Gets whether the "jstype" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJstype { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "jstype" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJstype() { + _hasBits0 &= ~16; + } + + /// Field number for the "lazy" field. + public const int LazyFieldNumber = 5; + private readonly static bool LazyDefaultValue = false; + + private bool lazy_; + /// + /// Should this field be parsed lazily? Lazy applies only to message-type + /// fields. It means that when the outer message is initially parsed, the + /// inner message's contents will not be parsed but instead stored in encoded + /// form. The inner message will actually be parsed when it is first accessed. + /// + /// This is only a hint. Implementations are free to choose whether to use + /// eager or lazy parsing regardless of the value of this option. However, + /// setting this option true suggests that the protocol author believes that + /// using lazy parsing on this field is worth the additional bookkeeping + /// overhead typically needed to implement it. + /// + /// This option does not affect the public interface of any generated code; + /// all method signatures remain the same. Furthermore, thread-safety of the + /// interface is not affected by this option; const methods remain safe to + /// call from multiple threads concurrently, while non-const methods continue + /// to require exclusive access. + /// + /// Note that lazy message fields are still eagerly verified to check + /// ill-formed wireformat or missing required fields. Calling IsInitialized() + /// on the outer message would fail if the inner message has missing required + /// fields. Failed verification would result in parsing failure (except when + /// uninitialized messages are acceptable). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Lazy { + get { if ((_hasBits0 & 8) != 0) { return lazy_; } else { return LazyDefaultValue; } } + set { + _hasBits0 |= 8; + lazy_ = value; + } + } + /// Gets whether the "lazy" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLazy { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "lazy" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLazy() { + _hasBits0 &= ~8; + } + + /// Field number for the "unverified_lazy" field. + public const int UnverifiedLazyFieldNumber = 15; + private readonly static bool UnverifiedLazyDefaultValue = false; + + private bool unverifiedLazy_; + /// + /// unverified_lazy does no correctness checks on the byte stream. This should + /// only be used where lazy with verification is prohibitive for performance + /// reasons. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UnverifiedLazy { + get { if ((_hasBits0 & 64) != 0) { return unverifiedLazy_; } else { return UnverifiedLazyDefaultValue; } } + set { + _hasBits0 |= 64; + unverifiedLazy_ = value; + } + } + /// Gets whether the "unverified_lazy" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasUnverifiedLazy { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "unverified_lazy" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearUnverifiedLazy() { + _hasBits0 &= ~64; + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 3; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this field deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for accessors, or it will be completely ignored; in the very least, this + /// is a formalization for deprecating fields. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 4) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 4; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~4; + } + + /// Field number for the "weak" field. + public const int WeakFieldNumber = 10; + private readonly static bool WeakDefaultValue = false; + + private bool weak_; + /// + /// For Google-internal migration only. Do not use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Weak { + get { if ((_hasBits0 & 32) != 0) { return weak_; } else { return WeakDefaultValue; } } + set { + _hasBits0 |= 32; + weak_ = value; + } + } + /// Gets whether the "weak" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWeak { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "weak" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWeak() { + _hasBits0 &= ~32; + } + + /// Field number for the "debug_redact" field. + public const int DebugRedactFieldNumber = 16; + private readonly static bool DebugRedactDefaultValue = false; + + private bool debugRedact_; + /// + /// Indicate that the field value should not be printed out when using debug + /// formats, e.g. when the field contains sensitive credentials. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DebugRedact { + get { if ((_hasBits0 & 128) != 0) { return debugRedact_; } else { return DebugRedactDefaultValue; } } + set { + _hasBits0 |= 128; + debugRedact_ = value; + } + } + /// Gets whether the "debug_redact" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDebugRedact { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "debug_redact" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDebugRedact() { + _hasBits0 &= ~128; + } + + /// Field number for the "retention" field. + public const int RetentionFieldNumber = 17; + private readonly static global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention RetentionDefaultValue = global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention.RetentionUnknown; + + private global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention retention_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention Retention { + get { if ((_hasBits0 & 256) != 0) { return retention_; } else { return RetentionDefaultValue; } } + set { + _hasBits0 |= 256; + retention_ = value; + } + } + /// Gets whether the "retention" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRetention { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "retention" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRetention() { + _hasBits0 &= ~256; + } + + /// Field number for the "targets" field. + public const int TargetsFieldNumber = 19; + private static readonly pb::FieldCodec _repeated_targets_codec + = pb::FieldCodec.ForEnum(152, x => (int) x, x => (global::Google.Protobuf.Reflection.FieldOptions.Types.OptionTargetType) x); + private readonly pbc::RepeatedField targets_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Targets { + get { return targets_; } + } + + /// Field number for the "edition_defaults" field. + public const int EditionDefaultsFieldNumber = 20; + private static readonly pb::FieldCodec _repeated_editionDefaults_codec + = pb::FieldCodec.ForMessage(162, global::Google.Protobuf.Reflection.FieldOptions.Types.EditionDefault.Parser); + private readonly pbc::RepeatedField editionDefaults_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EditionDefaults { + get { return editionDefaults_; } + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 21; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "feature_support" field. + public const int FeatureSupportFieldNumber = 22; + private global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport featureSupport_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport FeatureSupport { + get { return featureSupport_; } + set { + featureSupport_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FieldOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FieldOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Ctype != other.Ctype) return false; + if (Packed != other.Packed) return false; + if (Jstype != other.Jstype) return false; + if (Lazy != other.Lazy) return false; + if (UnverifiedLazy != other.UnverifiedLazy) return false; + if (Deprecated != other.Deprecated) return false; + if (Weak != other.Weak) return false; + if (DebugRedact != other.DebugRedact) return false; + if (Retention != other.Retention) return false; + if(!targets_.Equals(other.targets_)) return false; + if(!editionDefaults_.Equals(other.editionDefaults_)) return false; + if (!object.Equals(Features, other.Features)) return false; + if (!object.Equals(FeatureSupport, other.FeatureSupport)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasCtype) hash ^= Ctype.GetHashCode(); + if (HasPacked) hash ^= Packed.GetHashCode(); + if (HasJstype) hash ^= Jstype.GetHashCode(); + if (HasLazy) hash ^= Lazy.GetHashCode(); + if (HasUnverifiedLazy) hash ^= UnverifiedLazy.GetHashCode(); + if (HasDeprecated) hash ^= Deprecated.GetHashCode(); + if (HasWeak) hash ^= Weak.GetHashCode(); + if (HasDebugRedact) hash ^= DebugRedact.GetHashCode(); + if (HasRetention) hash ^= Retention.GetHashCode(); + hash ^= targets_.GetHashCode(); + hash ^= editionDefaults_.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + if (featureSupport_ != null) hash ^= FeatureSupport.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasCtype) { + output.WriteRawTag(8); + output.WriteEnum((int) Ctype); + } + if (HasPacked) { + output.WriteRawTag(16); + output.WriteBool(Packed); + } + if (HasDeprecated) { + output.WriteRawTag(24); + output.WriteBool(Deprecated); + } + if (HasLazy) { + output.WriteRawTag(40); + output.WriteBool(Lazy); + } + if (HasJstype) { + output.WriteRawTag(48); + output.WriteEnum((int) Jstype); + } + if (HasWeak) { + output.WriteRawTag(80); + output.WriteBool(Weak); + } + if (HasUnverifiedLazy) { + output.WriteRawTag(120); + output.WriteBool(UnverifiedLazy); + } + if (HasDebugRedact) { + output.WriteRawTag(128, 1); + output.WriteBool(DebugRedact); + } + if (HasRetention) { + output.WriteRawTag(136, 1); + output.WriteEnum((int) Retention); + } + targets_.WriteTo(output, _repeated_targets_codec); + editionDefaults_.WriteTo(output, _repeated_editionDefaults_codec); + if (features_ != null) { + output.WriteRawTag(170, 1); + output.WriteMessage(Features); + } + if (featureSupport_ != null) { + output.WriteRawTag(178, 1); + output.WriteMessage(FeatureSupport); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasCtype) { + output.WriteRawTag(8); + output.WriteEnum((int) Ctype); + } + if (HasPacked) { + output.WriteRawTag(16); + output.WriteBool(Packed); + } + if (HasDeprecated) { + output.WriteRawTag(24); + output.WriteBool(Deprecated); + } + if (HasLazy) { + output.WriteRawTag(40); + output.WriteBool(Lazy); + } + if (HasJstype) { + output.WriteRawTag(48); + output.WriteEnum((int) Jstype); + } + if (HasWeak) { + output.WriteRawTag(80); + output.WriteBool(Weak); + } + if (HasUnverifiedLazy) { + output.WriteRawTag(120); + output.WriteBool(UnverifiedLazy); + } + if (HasDebugRedact) { + output.WriteRawTag(128, 1); + output.WriteBool(DebugRedact); + } + if (HasRetention) { + output.WriteRawTag(136, 1); + output.WriteEnum((int) Retention); + } + targets_.WriteTo(ref output, _repeated_targets_codec); + editionDefaults_.WriteTo(ref output, _repeated_editionDefaults_codec); + if (features_ != null) { + output.WriteRawTag(170, 1); + output.WriteMessage(Features); + } + if (featureSupport_ != null) { + output.WriteRawTag(178, 1); + output.WriteMessage(FeatureSupport); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasCtype) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Ctype); + } + if (HasPacked) { + size += 1 + 1; + } + if (HasJstype) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Jstype); + } + if (HasLazy) { + size += 1 + 1; + } + if (HasUnverifiedLazy) { + size += 1 + 1; + } + if (HasDeprecated) { + size += 1 + 1; + } + if (HasWeak) { + size += 1 + 1; + } + if (HasDebugRedact) { + size += 2 + 1; + } + if (HasRetention) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) Retention); + } + size += targets_.CalculateSize(_repeated_targets_codec); + size += editionDefaults_.CalculateSize(_repeated_editionDefaults_codec); + if (features_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + if (featureSupport_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(FeatureSupport); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FieldOptions other) { + if (other == null) { + return; + } + if (other.HasCtype) { + Ctype = other.Ctype; + } + if (other.HasPacked) { + Packed = other.Packed; + } + if (other.HasJstype) { + Jstype = other.Jstype; + } + if (other.HasLazy) { + Lazy = other.Lazy; + } + if (other.HasUnverifiedLazy) { + UnverifiedLazy = other.UnverifiedLazy; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + if (other.HasWeak) { + Weak = other.Weak; + } + if (other.HasDebugRedact) { + DebugRedact = other.DebugRedact; + } + if (other.HasRetention) { + Retention = other.Retention; + } + targets_.Add(other.targets_); + editionDefaults_.Add(other.editionDefaults_); + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + if (other.featureSupport_ != null) { + if (featureSupport_ == null) { + FeatureSupport = new global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport(); + } + FeatureSupport.MergeFrom(other.FeatureSupport); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 8: { + Ctype = (global::Google.Protobuf.Reflection.FieldOptions.Types.CType) input.ReadEnum(); + break; + } + case 16: { + Packed = input.ReadBool(); + break; + } + case 24: { + Deprecated = input.ReadBool(); + break; + } + case 40: { + Lazy = input.ReadBool(); + break; + } + case 48: { + Jstype = (global::Google.Protobuf.Reflection.FieldOptions.Types.JSType) input.ReadEnum(); + break; + } + case 80: { + Weak = input.ReadBool(); + break; + } + case 120: { + UnverifiedLazy = input.ReadBool(); + break; + } + case 128: { + DebugRedact = input.ReadBool(); + break; + } + case 136: { + Retention = (global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention) input.ReadEnum(); + break; + } + case 154: + case 152: { + targets_.AddEntriesFrom(input, _repeated_targets_codec); + break; + } + case 162: { + editionDefaults_.AddEntriesFrom(input, _repeated_editionDefaults_codec); + break; + } + case 170: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 178: { + if (featureSupport_ == null) { + FeatureSupport = new global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport(); + } + input.ReadMessage(FeatureSupport); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 8: { + Ctype = (global::Google.Protobuf.Reflection.FieldOptions.Types.CType) input.ReadEnum(); + break; + } + case 16: { + Packed = input.ReadBool(); + break; + } + case 24: { + Deprecated = input.ReadBool(); + break; + } + case 40: { + Lazy = input.ReadBool(); + break; + } + case 48: { + Jstype = (global::Google.Protobuf.Reflection.FieldOptions.Types.JSType) input.ReadEnum(); + break; + } + case 80: { + Weak = input.ReadBool(); + break; + } + case 120: { + UnverifiedLazy = input.ReadBool(); + break; + } + case 128: { + DebugRedact = input.ReadBool(); + break; + } + case 136: { + Retention = (global::Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention) input.ReadEnum(); + break; + } + case 154: + case 152: { + targets_.AddEntriesFrom(ref input, _repeated_targets_codec); + break; + } + case 162: { + editionDefaults_.AddEntriesFrom(ref input, _repeated_editionDefaults_codec); + break; + } + case 170: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 178: { + if (featureSupport_ == null) { + FeatureSupport = new global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport(); + } + input.ReadMessage(FeatureSupport); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the FieldOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum CType { + /// + /// Default mode. + /// + [pbr::OriginalName("STRING")] String = 0, + /// + /// The option [ctype=CORD] may be applied to a non-repeated field of type + /// "bytes". It indicates that in C++, the data should be stored in a Cord + /// instead of a string. For very large strings, this may reduce memory + /// fragmentation. It may also allow better performance when parsing from a + /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then + /// alias the original buffer. + /// + [pbr::OriginalName("CORD")] Cord = 1, + [pbr::OriginalName("STRING_PIECE")] StringPiece = 2, + } + + public enum JSType { + /// + /// Use the default type. + /// + [pbr::OriginalName("JS_NORMAL")] JsNormal = 0, + /// + /// Use JavaScript strings. + /// + [pbr::OriginalName("JS_STRING")] JsString = 1, + /// + /// Use JavaScript numbers. + /// + [pbr::OriginalName("JS_NUMBER")] JsNumber = 2, + } + + /// + /// If set to RETENTION_SOURCE, the option will be omitted from the binary. + /// + public enum OptionRetention { + [pbr::OriginalName("RETENTION_UNKNOWN")] RetentionUnknown = 0, + [pbr::OriginalName("RETENTION_RUNTIME")] RetentionRuntime = 1, + [pbr::OriginalName("RETENTION_SOURCE")] RetentionSource = 2, + } + + /// + /// This indicates the types of entities that the field may apply to when used + /// as an option. If it is unset, then the field may be freely used as an + /// option on any kind of entity. + /// + public enum OptionTargetType { + [pbr::OriginalName("TARGET_TYPE_UNKNOWN")] TargetTypeUnknown = 0, + [pbr::OriginalName("TARGET_TYPE_FILE")] TargetTypeFile = 1, + [pbr::OriginalName("TARGET_TYPE_EXTENSION_RANGE")] TargetTypeExtensionRange = 2, + [pbr::OriginalName("TARGET_TYPE_MESSAGE")] TargetTypeMessage = 3, + [pbr::OriginalName("TARGET_TYPE_FIELD")] TargetTypeField = 4, + [pbr::OriginalName("TARGET_TYPE_ONEOF")] TargetTypeOneof = 5, + [pbr::OriginalName("TARGET_TYPE_ENUM")] TargetTypeEnum = 6, + [pbr::OriginalName("TARGET_TYPE_ENUM_ENTRY")] TargetTypeEnumEntry = 7, + [pbr::OriginalName("TARGET_TYPE_SERVICE")] TargetTypeService = 8, + [pbr::OriginalName("TARGET_TYPE_METHOD")] TargetTypeMethod = 9, + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EditionDefault : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EditionDefault()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.FieldOptions.Descriptor.NestedTypes[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 EditionDefault() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EditionDefault(EditionDefault other) : this() { + _hasBits0 = other._hasBits0; + edition_ = other.edition_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EditionDefault Clone() { + return new EditionDefault(this); + } + + /// Field number for the "edition" field. + public const int EditionFieldNumber = 3; + private readonly static global::Google.Protobuf.Reflection.Edition EditionDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition edition_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition Edition { + get { if ((_hasBits0 & 1) != 0) { return edition_; } else { return EditionDefaultValue; } } + set { + _hasBits0 |= 1; + edition_ = value; + } + } + /// Gets whether the "edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEdition { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEdition() { + _hasBits0 &= ~1; + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private readonly static string ValueDefaultValue = ""; + + private string value_; + /// + /// Textproto value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_ ?? ValueDefaultValue; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasValue { + get { return value_ != null; } + } + /// Clears the value of the "value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearValue() { + value_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EditionDefault); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EditionDefault other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Edition != other.Edition) return false; + if (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 (HasEdition) hash ^= Edition.GetHashCode(); + if (HasValue) 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 (HasValue) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (HasEdition) { + output.WriteRawTag(24); + output.WriteEnum((int) Edition); + } + 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 (HasValue) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (HasEdition) { + output.WriteRawTag(24); + output.WriteEnum((int) Edition); + } + 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 (HasEdition) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Edition); + } + if (HasValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EditionDefault other) { + if (other == null) { + return; + } + if (other.HasEdition) { + Edition = other.Edition; + } + if (other.HasValue) { + Value = 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: { + Value = input.ReadString(); + break; + } + case 24: { + Edition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + Value = input.ReadString(); + break; + } + case 24: { + Edition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Information about the support window of a feature. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FeatureSupport : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FeatureSupport()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.FieldOptions.Descriptor.NestedTypes[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 FeatureSupport() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSupport(FeatureSupport other) : this() { + _hasBits0 = other._hasBits0; + editionIntroduced_ = other.editionIntroduced_; + editionDeprecated_ = other.editionDeprecated_; + deprecationWarning_ = other.deprecationWarning_; + editionRemoved_ = other.editionRemoved_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSupport Clone() { + return new FeatureSupport(this); + } + + /// Field number for the "edition_introduced" field. + public const int EditionIntroducedFieldNumber = 1; + private readonly static global::Google.Protobuf.Reflection.Edition EditionIntroducedDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition editionIntroduced_; + /// + /// The edition that this feature was first available in. In editions + /// earlier than this one, the default assigned to EDITION_LEGACY will be + /// used, and proto files will not be able to override it. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition EditionIntroduced { + get { if ((_hasBits0 & 1) != 0) { return editionIntroduced_; } else { return EditionIntroducedDefaultValue; } } + set { + _hasBits0 |= 1; + editionIntroduced_ = value; + } + } + /// Gets whether the "edition_introduced" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEditionIntroduced { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "edition_introduced" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEditionIntroduced() { + _hasBits0 &= ~1; + } + + /// Field number for the "edition_deprecated" field. + public const int EditionDeprecatedFieldNumber = 2; + private readonly static global::Google.Protobuf.Reflection.Edition EditionDeprecatedDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition editionDeprecated_; + /// + /// The edition this feature becomes deprecated in. Using this after this + /// edition may trigger warnings. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition EditionDeprecated { + get { if ((_hasBits0 & 2) != 0) { return editionDeprecated_; } else { return EditionDeprecatedDefaultValue; } } + set { + _hasBits0 |= 2; + editionDeprecated_ = value; + } + } + /// Gets whether the "edition_deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEditionDeprecated { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "edition_deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEditionDeprecated() { + _hasBits0 &= ~2; + } + + /// Field number for the "deprecation_warning" field. + public const int DeprecationWarningFieldNumber = 3; + private readonly static string DeprecationWarningDefaultValue = ""; + + private string deprecationWarning_; + /// + /// The deprecation warning text if this feature is used after the edition it + /// was marked deprecated in. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeprecationWarning { + get { return deprecationWarning_ ?? DeprecationWarningDefaultValue; } + set { + deprecationWarning_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "deprecation_warning" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecationWarning { + get { return deprecationWarning_ != null; } + } + /// Clears the value of the "deprecation_warning" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecationWarning() { + deprecationWarning_ = null; + } + + /// Field number for the "edition_removed" field. + public const int EditionRemovedFieldNumber = 4; + private readonly static global::Google.Protobuf.Reflection.Edition EditionRemovedDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition editionRemoved_; + /// + /// The edition this feature is no longer available in. In editions after + /// this one, the last default assigned will be used, and proto files will + /// not be able to override it. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition EditionRemoved { + get { if ((_hasBits0 & 4) != 0) { return editionRemoved_; } else { return EditionRemovedDefaultValue; } } + set { + _hasBits0 |= 4; + editionRemoved_ = value; + } + } + /// Gets whether the "edition_removed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEditionRemoved { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "edition_removed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEditionRemoved() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FeatureSupport); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FeatureSupport other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EditionIntroduced != other.EditionIntroduced) return false; + if (EditionDeprecated != other.EditionDeprecated) return false; + if (DeprecationWarning != other.DeprecationWarning) return false; + if (EditionRemoved != other.EditionRemoved) 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 (HasEditionIntroduced) hash ^= EditionIntroduced.GetHashCode(); + if (HasEditionDeprecated) hash ^= EditionDeprecated.GetHashCode(); + if (HasDeprecationWarning) hash ^= DeprecationWarning.GetHashCode(); + if (HasEditionRemoved) hash ^= EditionRemoved.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 (HasEditionIntroduced) { + output.WriteRawTag(8); + output.WriteEnum((int) EditionIntroduced); + } + if (HasEditionDeprecated) { + output.WriteRawTag(16); + output.WriteEnum((int) EditionDeprecated); + } + if (HasDeprecationWarning) { + output.WriteRawTag(26); + output.WriteString(DeprecationWarning); + } + if (HasEditionRemoved) { + output.WriteRawTag(32); + output.WriteEnum((int) EditionRemoved); + } + 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 (HasEditionIntroduced) { + output.WriteRawTag(8); + output.WriteEnum((int) EditionIntroduced); + } + if (HasEditionDeprecated) { + output.WriteRawTag(16); + output.WriteEnum((int) EditionDeprecated); + } + if (HasDeprecationWarning) { + output.WriteRawTag(26); + output.WriteString(DeprecationWarning); + } + if (HasEditionRemoved) { + output.WriteRawTag(32); + output.WriteEnum((int) EditionRemoved); + } + 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 (HasEditionIntroduced) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EditionIntroduced); + } + if (HasEditionDeprecated) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EditionDeprecated); + } + if (HasDeprecationWarning) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeprecationWarning); + } + if (HasEditionRemoved) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EditionRemoved); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FeatureSupport other) { + if (other == null) { + return; + } + if (other.HasEditionIntroduced) { + EditionIntroduced = other.EditionIntroduced; + } + if (other.HasEditionDeprecated) { + EditionDeprecated = other.EditionDeprecated; + } + if (other.HasDeprecationWarning) { + DeprecationWarning = other.DeprecationWarning; + } + if (other.HasEditionRemoved) { + EditionRemoved = other.EditionRemoved; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EditionIntroduced = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 16: { + EditionDeprecated = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 26: { + DeprecationWarning = input.ReadString(); + break; + } + case 32: { + EditionRemoved = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EditionIntroduced = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 16: { + EditionDeprecated = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 26: { + DeprecationWarning = input.ReadString(); + break; + } + case 32: { + EditionRemoved = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OneofOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneofOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + [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::Google.Protobuf.Reflection.DescriptorReflection.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 OneofOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OneofOptions(OneofOptions other) : this() { + features_ = other.features_ != null ? other.features_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OneofOptions Clone() { + return new OneofOptions(this); + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 1; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as OneofOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OneofOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Features, other.Features)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (features_ != null) hash ^= Features.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (features_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (features_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (features_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OneofOptions other) { + if (other == null) { + return; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 10: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 10: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 EnumOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumOptions(EnumOptions other) : this() { + _hasBits0 = other._hasBits0; + allowAlias_ = other.allowAlias_; + deprecated_ = other.deprecated_; + deprecatedLegacyJsonFieldConflicts_ = other.deprecatedLegacyJsonFieldConflicts_; + features_ = other.features_ != null ? other.features_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumOptions Clone() { + return new EnumOptions(this); + } + + /// Field number for the "allow_alias" field. + public const int AllowAliasFieldNumber = 2; + private readonly static bool AllowAliasDefaultValue = false; + + private bool allowAlias_; + /// + /// Set this option to true to allow mapping different tag names to the same + /// value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AllowAlias { + get { if ((_hasBits0 & 1) != 0) { return allowAlias_; } else { return AllowAliasDefaultValue; } } + set { + _hasBits0 |= 1; + allowAlias_ = value; + } + } + /// Gets whether the "allow_alias" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasAllowAlias { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "allow_alias" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearAllowAlias() { + _hasBits0 &= ~1; + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 3; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this enum deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the enum, or it will be completely ignored; in the very least, this + /// is a formalization for deprecating enums. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 2) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 2; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~2; + } + + /// Field number for the "deprecated_legacy_json_field_conflicts" field. + public const int DeprecatedLegacyJsonFieldConflictsFieldNumber = 6; + private readonly static bool DeprecatedLegacyJsonFieldConflictsDefaultValue = false; + + private bool deprecatedLegacyJsonFieldConflicts_; + /// + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// and strips underscored from the fields before comparison in proto3 only. + /// The new behavior takes `json_name` into account and applies to proto2 as + /// well. + /// TODO Remove this legacy behavior once downstream teams have + /// had time to migrate. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DeprecatedLegacyJsonFieldConflicts { + get { if ((_hasBits0 & 4) != 0) { return deprecatedLegacyJsonFieldConflicts_; } else { return DeprecatedLegacyJsonFieldConflictsDefaultValue; } } + set { + _hasBits0 |= 4; + deprecatedLegacyJsonFieldConflicts_ = value; + } + } + /// Gets whether the "deprecated_legacy_json_field_conflicts" field is set + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecatedLegacyJsonFieldConflicts { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "deprecated_legacy_json_field_conflicts" field + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecatedLegacyJsonFieldConflicts() { + _hasBits0 &= ~4; + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 7; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AllowAlias != other.AllowAlias) return false; + if (Deprecated != other.Deprecated) return false; + if (DeprecatedLegacyJsonFieldConflicts != other.DeprecatedLegacyJsonFieldConflicts) return false; + if (!object.Equals(Features, other.Features)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasAllowAlias) hash ^= AllowAlias.GetHashCode(); + if (HasDeprecated) hash ^= Deprecated.GetHashCode(); + if (HasDeprecatedLegacyJsonFieldConflicts) hash ^= DeprecatedLegacyJsonFieldConflicts.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasAllowAlias) { + output.WriteRawTag(16); + output.WriteBool(AllowAlias); + } + if (HasDeprecated) { + output.WriteRawTag(24); + output.WriteBool(Deprecated); + } + if (HasDeprecatedLegacyJsonFieldConflicts) { + output.WriteRawTag(48); + output.WriteBool(DeprecatedLegacyJsonFieldConflicts); + } + if (features_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasAllowAlias) { + output.WriteRawTag(16); + output.WriteBool(AllowAlias); + } + if (HasDeprecated) { + output.WriteRawTag(24); + output.WriteBool(Deprecated); + } + if (HasDeprecatedLegacyJsonFieldConflicts) { + output.WriteRawTag(48); + output.WriteBool(DeprecatedLegacyJsonFieldConflicts); + } + if (features_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasAllowAlias) { + size += 1 + 1; + } + if (HasDeprecated) { + size += 1 + 1; + } + if (HasDeprecatedLegacyJsonFieldConflicts) { + size += 1 + 1; + } + if (features_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumOptions other) { + if (other == null) { + return; + } + if (other.HasAllowAlias) { + AllowAlias = other.AllowAlias; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + if (other.HasDeprecatedLegacyJsonFieldConflicts) { + DeprecatedLegacyJsonFieldConflicts = other.DeprecatedLegacyJsonFieldConflicts; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 16: { + AllowAlias = input.ReadBool(); + break; + } + case 24: { + Deprecated = input.ReadBool(); + break; + } + case 48: { + DeprecatedLegacyJsonFieldConflicts = input.ReadBool(); + break; + } + case 58: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 16: { + AllowAlias = input.ReadBool(); + break; + } + case 24: { + Deprecated = input.ReadBool(); + break; + } + case 48: { + DeprecatedLegacyJsonFieldConflicts = input.ReadBool(); + break; + } + case 58: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumValueOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValueOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 EnumValueOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumValueOptions(EnumValueOptions other) : this() { + _hasBits0 = other._hasBits0; + deprecated_ = other.deprecated_; + features_ = other.features_ != null ? other.features_.Clone() : null; + debugRedact_ = other.debugRedact_; + featureSupport_ = other.featureSupport_ != null ? other.featureSupport_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumValueOptions Clone() { + return new EnumValueOptions(this); + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 1; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this enum value deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the enum value, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating enum values. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 1) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 1; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~1; + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 2; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "debug_redact" field. + public const int DebugRedactFieldNumber = 3; + private readonly static bool DebugRedactDefaultValue = false; + + private bool debugRedact_; + /// + /// Indicate that fields annotated with this enum value should not be printed + /// out when using debug formats, e.g. when the field contains sensitive + /// credentials. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DebugRedact { + get { if ((_hasBits0 & 2) != 0) { return debugRedact_; } else { return DebugRedactDefaultValue; } } + set { + _hasBits0 |= 2; + debugRedact_ = value; + } + } + /// Gets whether the "debug_redact" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDebugRedact { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "debug_redact" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDebugRedact() { + _hasBits0 &= ~2; + } + + /// Field number for the "feature_support" field. + public const int FeatureSupportFieldNumber = 4; + private global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport featureSupport_; + /// + /// Information about the support window of a feature value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport FeatureSupport { + get { return featureSupport_; } + set { + featureSupport_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumValueOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumValueOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Deprecated != other.Deprecated) return false; + if (!object.Equals(Features, other.Features)) return false; + if (DebugRedact != other.DebugRedact) return false; + if (!object.Equals(FeatureSupport, other.FeatureSupport)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasDeprecated) hash ^= Deprecated.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + if (HasDebugRedact) hash ^= DebugRedact.GetHashCode(); + if (featureSupport_ != null) hash ^= FeatureSupport.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasDeprecated) { + output.WriteRawTag(8); + output.WriteBool(Deprecated); + } + if (features_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Features); + } + if (HasDebugRedact) { + output.WriteRawTag(24); + output.WriteBool(DebugRedact); + } + if (featureSupport_ != null) { + output.WriteRawTag(34); + output.WriteMessage(FeatureSupport); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasDeprecated) { + output.WriteRawTag(8); + output.WriteBool(Deprecated); + } + if (features_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Features); + } + if (HasDebugRedact) { + output.WriteRawTag(24); + output.WriteBool(DebugRedact); + } + if (featureSupport_ != null) { + output.WriteRawTag(34); + output.WriteMessage(FeatureSupport); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasDeprecated) { + size += 1 + 1; + } + if (features_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + if (HasDebugRedact) { + size += 1 + 1; + } + if (featureSupport_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FeatureSupport); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumValueOptions other) { + if (other == null) { + return; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + if (other.HasDebugRedact) { + DebugRedact = other.DebugRedact; + } + if (other.featureSupport_ != null) { + if (featureSupport_ == null) { + FeatureSupport = new global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport(); + } + FeatureSupport.MergeFrom(other.FeatureSupport); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 8: { + Deprecated = input.ReadBool(); + break; + } + case 18: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 24: { + DebugRedact = input.ReadBool(); + break; + } + case 34: { + if (featureSupport_ == null) { + FeatureSupport = new global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport(); + } + input.ReadMessage(FeatureSupport); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 8: { + Deprecated = input.ReadBool(); + break; + } + case 18: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 24: { + DebugRedact = input.ReadBool(); + break; + } + case 34: { + if (featureSupport_ == null) { + FeatureSupport = new global::Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport(); + } + input.ReadMessage(FeatureSupport); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ServiceOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 ServiceOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceOptions(ServiceOptions other) : this() { + _hasBits0 = other._hasBits0; + features_ = other.features_ != null ? other.features_.Clone() : null; + deprecated_ = other.deprecated_; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServiceOptions Clone() { + return new ServiceOptions(this); + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 34; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 33; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this service deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the service, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating services. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 1) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 1; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~1; + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ServiceOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ServiceOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Features, other.Features)) return false; + if (Deprecated != other.Deprecated) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (features_ != null) hash ^= Features.GetHashCode(); + if (HasDeprecated) hash ^= Deprecated.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasDeprecated) { + output.WriteRawTag(136, 2); + output.WriteBool(Deprecated); + } + if (features_ != null) { + output.WriteRawTag(146, 2); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasDeprecated) { + output.WriteRawTag(136, 2); + output.WriteBool(Deprecated); + } + if (features_ != null) { + output.WriteRawTag(146, 2); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (features_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + if (HasDeprecated) { + size += 2 + 1; + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ServiceOptions other) { + if (other == null) { + return; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 264: { + Deprecated = input.ReadBool(); + break; + } + case 274: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 264: { + Deprecated = input.ReadBool(); + break; + } + case 274: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MethodOptions : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodOptions()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 MethodOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MethodOptions(MethodOptions other) : this() { + _hasBits0 = other._hasBits0; + deprecated_ = other.deprecated_; + idempotencyLevel_ = other.idempotencyLevel_; + features_ = other.features_ != null ? other.features_.Clone() : null; + uninterpretedOption_ = other.uninterpretedOption_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MethodOptions Clone() { + return new MethodOptions(this); + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 33; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + /// + /// Is this method deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the method, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating methods. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 1) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 1; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~1; + } + + /// Field number for the "idempotency_level" field. + public const int IdempotencyLevelFieldNumber = 34; + private readonly static global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel IdempotencyLevelDefaultValue = global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel.IdempotencyUnknown; + + private global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel idempotencyLevel_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel IdempotencyLevel { + get { if ((_hasBits0 & 2) != 0) { return idempotencyLevel_; } else { return IdempotencyLevelDefaultValue; } } + set { + _hasBits0 |= 2; + idempotencyLevel_ = value; + } + } + /// Gets whether the "idempotency_level" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIdempotencyLevel { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "idempotency_level" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIdempotencyLevel() { + _hasBits0 &= ~2; + } + + /// Field number for the "features" field. + public const int FeaturesFieldNumber = 35; + private global::Google.Protobuf.Reflection.FeatureSet features_; + /// + /// Any features defined in the specific edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet Features { + get { return features_; } + set { + features_ = value; + } + } + + /// Field number for the "uninterpreted_option" field. + public const int UninterpretedOptionFieldNumber = 999; + private static readonly pb::FieldCodec _repeated_uninterpretedOption_codec + = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.UninterpretedOption.Parser); + private readonly pbc::RepeatedField uninterpretedOption_ = new pbc::RepeatedField(); + /// + /// The parser stores options it doesn't recognize here. See above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UninterpretedOption { + get { return uninterpretedOption_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MethodOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MethodOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Deprecated != other.Deprecated) return false; + if (IdempotencyLevel != other.IdempotencyLevel) return false; + if (!object.Equals(Features, other.Features)) return false; + if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasDeprecated) hash ^= Deprecated.GetHashCode(); + if (HasIdempotencyLevel) hash ^= IdempotencyLevel.GetHashCode(); + if (features_ != null) hash ^= Features.GetHashCode(); + hash ^= uninterpretedOption_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasDeprecated) { + output.WriteRawTag(136, 2); + output.WriteBool(Deprecated); + } + if (HasIdempotencyLevel) { + output.WriteRawTag(144, 2); + output.WriteEnum((int) IdempotencyLevel); + } + if (features_ != null) { + output.WriteRawTag(154, 2); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasDeprecated) { + output.WriteRawTag(136, 2); + output.WriteBool(Deprecated); + } + if (HasIdempotencyLevel) { + output.WriteRawTag(144, 2); + output.WriteEnum((int) IdempotencyLevel); + } + if (features_ != null) { + output.WriteRawTag(154, 2); + output.WriteMessage(Features); + } + uninterpretedOption_.WriteTo(ref output, _repeated_uninterpretedOption_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasDeprecated) { + size += 2 + 1; + } + if (HasIdempotencyLevel) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) IdempotencyLevel); + } + if (features_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Features); + } + size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MethodOptions other) { + if (other == null) { + return; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + if (other.HasIdempotencyLevel) { + IdempotencyLevel = other.IdempotencyLevel; + } + if (other.features_ != null) { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + Features.MergeFrom(other.Features); + } + uninterpretedOption_.Add(other.uninterpretedOption_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 264: { + Deprecated = input.ReadBool(); + break; + } + case 272: { + IdempotencyLevel = (global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) input.ReadEnum(); + break; + } + case 282: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOption_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 264: { + Deprecated = input.ReadBool(); + break; + } + case 272: { + IdempotencyLevel = (global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) input.ReadEnum(); + break; + } + case 282: { + if (features_ == null) { + Features = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(Features); + break; + } + case 7994: { + uninterpretedOption_.AddEntriesFrom(ref input, _repeated_uninterpretedOption_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the MethodOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + /// or neither? HTTP based RPC implementation may choose GET verb for safe + /// methods, and PUT verb for idempotent methods instead of the default POST. + /// + public enum IdempotencyLevel { + [pbr::OriginalName("IDEMPOTENCY_UNKNOWN")] IdempotencyUnknown = 0, + /// + /// implies idempotent + /// + [pbr::OriginalName("NO_SIDE_EFFECTS")] NoSideEffects = 1, + /// + /// idempotent, but may have side effects + /// + [pbr::OriginalName("IDEMPOTENT")] Idempotent = 2, + } + + } + #endregion + + } + + /// + /// A message representing a option the parser does not recognize. This only + /// appears in options protos created by the compiler::Parser class. + /// DescriptorPool resolves these when building Descriptor objects. Therefore, + /// options protos in descriptor objects (e.g. returned by Descriptor::options(), + /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + /// in them. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UninterpretedOption : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UninterpretedOption()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 UninterpretedOption() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UninterpretedOption(UninterpretedOption other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_.Clone(); + identifierValue_ = other.identifierValue_; + positiveIntValue_ = other.positiveIntValue_; + negativeIntValue_ = other.negativeIntValue_; + doubleValue_ = other.doubleValue_; + stringValue_ = other.stringValue_; + aggregateValue_ = other.aggregateValue_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UninterpretedOption Clone() { + return new UninterpretedOption(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_name_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart.Parser); + private readonly pbc::RepeatedField name_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Name { + get { return name_; } + } + + /// Field number for the "identifier_value" field. + public const int IdentifierValueFieldNumber = 3; + private readonly static string IdentifierValueDefaultValue = ""; + + private string identifierValue_; + /// + /// The value of the uninterpreted option, in whatever type the tokenizer + /// identified it as during parsing. Exactly one of these should be set. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IdentifierValue { + get { return identifierValue_ ?? IdentifierValueDefaultValue; } + set { + identifierValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "identifier_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIdentifierValue { + get { return identifierValue_ != null; } + } + /// Clears the value of the "identifier_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIdentifierValue() { + identifierValue_ = null; + } + + /// Field number for the "positive_int_value" field. + public const int PositiveIntValueFieldNumber = 4; + private readonly static ulong PositiveIntValueDefaultValue = 0UL; + + private ulong positiveIntValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong PositiveIntValue { + get { if ((_hasBits0 & 1) != 0) { return positiveIntValue_; } else { return PositiveIntValueDefaultValue; } } + set { + _hasBits0 |= 1; + positiveIntValue_ = value; + } + } + /// Gets whether the "positive_int_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPositiveIntValue { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "positive_int_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPositiveIntValue() { + _hasBits0 &= ~1; + } + + /// Field number for the "negative_int_value" field. + public const int NegativeIntValueFieldNumber = 5; + private readonly static long NegativeIntValueDefaultValue = 0L; + + private long negativeIntValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NegativeIntValue { + get { if ((_hasBits0 & 2) != 0) { return negativeIntValue_; } else { return NegativeIntValueDefaultValue; } } + set { + _hasBits0 |= 2; + negativeIntValue_ = value; + } + } + /// Gets whether the "negative_int_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNegativeIntValue { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "negative_int_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNegativeIntValue() { + _hasBits0 &= ~2; + } + + /// Field number for the "double_value" field. + public const int DoubleValueFieldNumber = 6; + private readonly static double DoubleValueDefaultValue = 0D; + + private double doubleValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double DoubleValue { + get { if ((_hasBits0 & 4) != 0) { return doubleValue_; } else { return DoubleValueDefaultValue; } } + set { + _hasBits0 |= 4; + doubleValue_ = value; + } + } + /// Gets whether the "double_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDoubleValue { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "double_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDoubleValue() { + _hasBits0 &= ~4; + } + + /// Field number for the "string_value" field. + public const int StringValueFieldNumber = 7; + private readonly static pb::ByteString StringValueDefaultValue = pb::ByteString.Empty; + + private pb::ByteString stringValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString StringValue { + get { return stringValue_ ?? StringValueDefaultValue; } + set { + stringValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "string_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasStringValue { + get { return stringValue_ != null; } + } + /// Clears the value of the "string_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStringValue() { + stringValue_ = null; + } + + /// Field number for the "aggregate_value" field. + public const int AggregateValueFieldNumber = 8; + private readonly static string AggregateValueDefaultValue = ""; + + private string aggregateValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AggregateValue { + get { return aggregateValue_ ?? AggregateValueDefaultValue; } + set { + aggregateValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "aggregate_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasAggregateValue { + get { return aggregateValue_ != null; } + } + /// Clears the value of the "aggregate_value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearAggregateValue() { + aggregateValue_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UninterpretedOption); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UninterpretedOption other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!name_.Equals(other.name_)) return false; + if (IdentifierValue != other.IdentifierValue) return false; + if (PositiveIntValue != other.PositiveIntValue) return false; + if (NegativeIntValue != other.NegativeIntValue) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(DoubleValue, other.DoubleValue)) return false; + if (StringValue != other.StringValue) return false; + if (AggregateValue != other.AggregateValue) 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 ^= name_.GetHashCode(); + if (HasIdentifierValue) hash ^= IdentifierValue.GetHashCode(); + if (HasPositiveIntValue) hash ^= PositiveIntValue.GetHashCode(); + if (HasNegativeIntValue) hash ^= NegativeIntValue.GetHashCode(); + if (HasDoubleValue) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue); + if (HasStringValue) hash ^= StringValue.GetHashCode(); + if (HasAggregateValue) hash ^= AggregateValue.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 + name_.WriteTo(output, _repeated_name_codec); + if (HasIdentifierValue) { + output.WriteRawTag(26); + output.WriteString(IdentifierValue); + } + if (HasPositiveIntValue) { + output.WriteRawTag(32); + output.WriteUInt64(PositiveIntValue); + } + if (HasNegativeIntValue) { + output.WriteRawTag(40); + output.WriteInt64(NegativeIntValue); + } + if (HasDoubleValue) { + output.WriteRawTag(49); + output.WriteDouble(DoubleValue); + } + if (HasStringValue) { + output.WriteRawTag(58); + output.WriteBytes(StringValue); + } + if (HasAggregateValue) { + output.WriteRawTag(66); + output.WriteString(AggregateValue); + } + 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) { + name_.WriteTo(ref output, _repeated_name_codec); + if (HasIdentifierValue) { + output.WriteRawTag(26); + output.WriteString(IdentifierValue); + } + if (HasPositiveIntValue) { + output.WriteRawTag(32); + output.WriteUInt64(PositiveIntValue); + } + if (HasNegativeIntValue) { + output.WriteRawTag(40); + output.WriteInt64(NegativeIntValue); + } + if (HasDoubleValue) { + output.WriteRawTag(49); + output.WriteDouble(DoubleValue); + } + if (HasStringValue) { + output.WriteRawTag(58); + output.WriteBytes(StringValue); + } + if (HasAggregateValue) { + output.WriteRawTag(66); + output.WriteString(AggregateValue); + } + 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 += name_.CalculateSize(_repeated_name_codec); + if (HasIdentifierValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IdentifierValue); + } + if (HasPositiveIntValue) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(PositiveIntValue); + } + if (HasNegativeIntValue) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NegativeIntValue); + } + if (HasDoubleValue) { + size += 1 + 8; + } + if (HasStringValue) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(StringValue); + } + if (HasAggregateValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AggregateValue); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UninterpretedOption other) { + if (other == null) { + return; + } + name_.Add(other.name_); + if (other.HasIdentifierValue) { + IdentifierValue = other.IdentifierValue; + } + if (other.HasPositiveIntValue) { + PositiveIntValue = other.PositiveIntValue; + } + if (other.HasNegativeIntValue) { + NegativeIntValue = other.NegativeIntValue; + } + if (other.HasDoubleValue) { + DoubleValue = other.DoubleValue; + } + if (other.HasStringValue) { + StringValue = other.StringValue; + } + if (other.HasAggregateValue) { + AggregateValue = other.AggregateValue; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: { + name_.AddEntriesFrom(input, _repeated_name_codec); + break; + } + case 26: { + IdentifierValue = input.ReadString(); + break; + } + case 32: { + PositiveIntValue = input.ReadUInt64(); + break; + } + case 40: { + NegativeIntValue = input.ReadInt64(); + break; + } + case 49: { + DoubleValue = input.ReadDouble(); + break; + } + case 58: { + StringValue = input.ReadBytes(); + break; + } + case 66: { + AggregateValue = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + name_.AddEntriesFrom(ref input, _repeated_name_codec); + break; + } + case 26: { + IdentifierValue = input.ReadString(); + break; + } + case 32: { + PositiveIntValue = input.ReadUInt64(); + break; + } + case 40: { + NegativeIntValue = input.ReadInt64(); + break; + } + case 49: { + DoubleValue = input.ReadDouble(); + break; + } + case 58: { + StringValue = input.ReadBytes(); + break; + } + case 66: { + AggregateValue = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the UninterpretedOption message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The name of the uninterpreted option. Each string represents a segment in + /// a dot-separated name. is_extension is true iff a segment represents an + /// extension (denoted with parentheses in options specs in .proto files). + /// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + /// "foo.(bar.baz).moo". + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NamePart : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NamePart()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.UninterpretedOption.Descriptor.NestedTypes[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 NamePart() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NamePart(NamePart other) : this() { + _hasBits0 = other._hasBits0; + namePart_ = other.namePart_; + isExtension_ = other.isExtension_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NamePart Clone() { + return new NamePart(this); + } + + /// Field number for the "name_part" field. + public const int NamePart_FieldNumber = 1; + private readonly static string NamePart_DefaultValue = ""; + + private string namePart_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NamePart_ { + get { return namePart_ ?? NamePart_DefaultValue; } + set { + namePart_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "name_part" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNamePart_ { + get { return namePart_ != null; } + } + /// Clears the value of the "name_part" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNamePart_() { + namePart_ = null; + } + + /// Field number for the "is_extension" field. + public const int IsExtensionFieldNumber = 2; + private readonly static bool IsExtensionDefaultValue = false; + + private bool isExtension_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsExtension { + get { if ((_hasBits0 & 1) != 0) { return isExtension_; } else { return IsExtensionDefaultValue; } } + set { + _hasBits0 |= 1; + isExtension_ = value; + } + } + /// Gets whether the "is_extension" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIsExtension { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "is_extension" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIsExtension() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NamePart); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NamePart other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NamePart_ != other.NamePart_) return false; + if (IsExtension != other.IsExtension) 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 (HasNamePart_) hash ^= NamePart_.GetHashCode(); + if (HasIsExtension) hash ^= IsExtension.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 (HasNamePart_) { + output.WriteRawTag(10); + output.WriteString(NamePart_); + } + if (HasIsExtension) { + output.WriteRawTag(16); + output.WriteBool(IsExtension); + } + 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 (HasNamePart_) { + output.WriteRawTag(10); + output.WriteString(NamePart_); + } + if (HasIsExtension) { + output.WriteRawTag(16); + output.WriteBool(IsExtension); + } + 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 (HasNamePart_) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NamePart_); + } + if (HasIsExtension) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NamePart other) { + if (other == null) { + return; + } + if (other.HasNamePart_) { + NamePart_ = other.NamePart_; + } + if (other.HasIsExtension) { + IsExtension = other.IsExtension; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + NamePart_ = input.ReadString(); + break; + } + case 16: { + IsExtension = input.ReadBool(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + NamePart_ = input.ReadString(); + break; + } + case 16: { + IsExtension = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// TODO Enums in C++ gencode (and potentially other languages) are + /// not well scoped. This means that each of the feature enums below can clash + /// with each other. The short names we've chosen maximize call-site + /// readability, but leave us very open to this scenario. A future feature will + /// be designed and implemented to handle this, hopefully before we ever hit a + /// conflict here. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FeatureSet : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FeatureSet()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FeatureSet() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSet(FeatureSet other) : this() { + _hasBits0 = other._hasBits0; + fieldPresence_ = other.fieldPresence_; + enumType_ = other.enumType_; + repeatedFieldEncoding_ = other.repeatedFieldEncoding_; + utf8Validation_ = other.utf8Validation_; + messageEncoding_ = other.messageEncoding_; + jsonFormat_ = other.jsonFormat_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSet Clone() { + return new FeatureSet(this); + } + + /// Field number for the "field_presence" field. + public const int FieldPresenceFieldNumber = 1; + private readonly static global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence FieldPresenceDefaultValue = global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence.Unknown; + + private global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence fieldPresence_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence FieldPresence { + get { if ((_hasBits0 & 1) != 0) { return fieldPresence_; } else { return FieldPresenceDefaultValue; } } + set { + _hasBits0 |= 1; + fieldPresence_ = value; + } + } + /// Gets whether the "field_presence" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFieldPresence { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "field_presence" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFieldPresence() { + _hasBits0 &= ~1; + } + + /// Field number for the "enum_type" field. + public const int EnumTypeFieldNumber = 2; + private readonly static global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType EnumTypeDefaultValue = global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType.Unknown; + + private global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType enumType_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType EnumType { + get { if ((_hasBits0 & 2) != 0) { return enumType_; } else { return EnumTypeDefaultValue; } } + set { + _hasBits0 |= 2; + enumType_ = value; + } + } + /// Gets whether the "enum_type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEnumType { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "enum_type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEnumType() { + _hasBits0 &= ~2; + } + + /// Field number for the "repeated_field_encoding" field. + public const int RepeatedFieldEncodingFieldNumber = 3; + private readonly static global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding RepeatedFieldEncodingDefaultValue = global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding.Unknown; + + private global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding repeatedFieldEncoding_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding RepeatedFieldEncoding { + get { if ((_hasBits0 & 4) != 0) { return repeatedFieldEncoding_; } else { return RepeatedFieldEncodingDefaultValue; } } + set { + _hasBits0 |= 4; + repeatedFieldEncoding_ = value; + } + } + /// Gets whether the "repeated_field_encoding" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRepeatedFieldEncoding { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "repeated_field_encoding" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRepeatedFieldEncoding() { + _hasBits0 &= ~4; + } + + /// Field number for the "utf8_validation" field. + public const int Utf8ValidationFieldNumber = 4; + private readonly static global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation Utf8ValidationDefaultValue = global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation.Unknown; + + private global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation utf8Validation_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation Utf8Validation { + get { if ((_hasBits0 & 8) != 0) { return utf8Validation_; } else { return Utf8ValidationDefaultValue; } } + set { + _hasBits0 |= 8; + utf8Validation_ = value; + } + } + /// Gets whether the "utf8_validation" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasUtf8Validation { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "utf8_validation" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearUtf8Validation() { + _hasBits0 &= ~8; + } + + /// Field number for the "message_encoding" field. + public const int MessageEncodingFieldNumber = 5; + private readonly static global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding MessageEncodingDefaultValue = global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding.Unknown; + + private global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding messageEncoding_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding MessageEncoding { + get { if ((_hasBits0 & 16) != 0) { return messageEncoding_; } else { return MessageEncodingDefaultValue; } } + set { + _hasBits0 |= 16; + messageEncoding_ = value; + } + } + /// Gets whether the "message_encoding" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMessageEncoding { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "message_encoding" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMessageEncoding() { + _hasBits0 &= ~16; + } + + /// Field number for the "json_format" field. + public const int JsonFormatFieldNumber = 6; + private readonly static global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat JsonFormatDefaultValue = global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat.Unknown; + + private global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat jsonFormat_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat JsonFormat { + get { if ((_hasBits0 & 32) != 0) { return jsonFormat_; } else { return JsonFormatDefaultValue; } } + set { + _hasBits0 |= 32; + jsonFormat_ = value; + } + } + /// Gets whether the "json_format" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasJsonFormat { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "json_format" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearJsonFormat() { + _hasBits0 &= ~32; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FeatureSet); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FeatureSet other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FieldPresence != other.FieldPresence) return false; + if (EnumType != other.EnumType) return false; + if (RepeatedFieldEncoding != other.RepeatedFieldEncoding) return false; + if (Utf8Validation != other.Utf8Validation) return false; + if (MessageEncoding != other.MessageEncoding) return false; + if (JsonFormat != other.JsonFormat) return false; + if (!Equals(_extensions, other._extensions)) { + 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 (HasFieldPresence) hash ^= FieldPresence.GetHashCode(); + if (HasEnumType) hash ^= EnumType.GetHashCode(); + if (HasRepeatedFieldEncoding) hash ^= RepeatedFieldEncoding.GetHashCode(); + if (HasUtf8Validation) hash ^= Utf8Validation.GetHashCode(); + if (HasMessageEncoding) hash ^= MessageEncoding.GetHashCode(); + if (HasJsonFormat) hash ^= JsonFormat.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 (HasFieldPresence) { + output.WriteRawTag(8); + output.WriteEnum((int) FieldPresence); + } + if (HasEnumType) { + output.WriteRawTag(16); + output.WriteEnum((int) EnumType); + } + if (HasRepeatedFieldEncoding) { + output.WriteRawTag(24); + output.WriteEnum((int) RepeatedFieldEncoding); + } + if (HasUtf8Validation) { + output.WriteRawTag(32); + output.WriteEnum((int) Utf8Validation); + } + if (HasMessageEncoding) { + output.WriteRawTag(40); + output.WriteEnum((int) MessageEncoding); + } + if (HasJsonFormat) { + output.WriteRawTag(48); + output.WriteEnum((int) JsonFormat); + } + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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 (HasFieldPresence) { + output.WriteRawTag(8); + output.WriteEnum((int) FieldPresence); + } + if (HasEnumType) { + output.WriteRawTag(16); + output.WriteEnum((int) EnumType); + } + if (HasRepeatedFieldEncoding) { + output.WriteRawTag(24); + output.WriteEnum((int) RepeatedFieldEncoding); + } + if (HasUtf8Validation) { + output.WriteRawTag(32); + output.WriteEnum((int) Utf8Validation); + } + if (HasMessageEncoding) { + output.WriteRawTag(40); + output.WriteEnum((int) MessageEncoding); + } + if (HasJsonFormat) { + output.WriteRawTag(48); + output.WriteEnum((int) JsonFormat); + } + if (_extensions != null) { + _extensions.WriteTo(ref 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 (HasFieldPresence) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FieldPresence); + } + if (HasEnumType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumType); + } + if (HasRepeatedFieldEncoding) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RepeatedFieldEncoding); + } + if (HasUtf8Validation) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Utf8Validation); + } + if (HasMessageEncoding) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MessageEncoding); + } + if (HasJsonFormat) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) JsonFormat); + } + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FeatureSet other) { + if (other == null) { + return; + } + if (other.HasFieldPresence) { + FieldPresence = other.FieldPresence; + } + if (other.HasEnumType) { + EnumType = other.EnumType; + } + if (other.HasRepeatedFieldEncoding) { + RepeatedFieldEncoding = other.RepeatedFieldEncoding; + } + if (other.HasUtf8Validation) { + Utf8Validation = other.Utf8Validation; + } + if (other.HasMessageEncoding) { + MessageEncoding = other.MessageEncoding; + } + if (other.HasJsonFormat) { + JsonFormat = other.JsonFormat; + } + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 8: { + FieldPresence = (global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence) input.ReadEnum(); + break; + } + case 16: { + EnumType = (global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType) input.ReadEnum(); + break; + } + case 24: { + RepeatedFieldEncoding = (global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding) input.ReadEnum(); + break; + } + case 32: { + Utf8Validation = (global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation) input.ReadEnum(); + break; + } + case 40: { + MessageEncoding = (global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding) input.ReadEnum(); + break; + } + case 48: { + JsonFormat = (global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 8: { + FieldPresence = (global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence) input.ReadEnum(); + break; + } + case 16: { + EnumType = (global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType) input.ReadEnum(); + break; + } + case 24: { + RepeatedFieldEncoding = (global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding) input.ReadEnum(); + break; + } + case 32: { + Utf8Validation = (global::Google.Protobuf.Reflection.FeatureSet.Types.Utf8Validation) input.ReadEnum(); + break; + } + case 40: { + MessageEncoding = (global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding) input.ReadEnum(); + break; + } + case 48: { + JsonFormat = (global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) input.ReadEnum(); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the FeatureSet message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum FieldPresence { + [pbr::OriginalName("FIELD_PRESENCE_UNKNOWN")] Unknown = 0, + [pbr::OriginalName("EXPLICIT")] Explicit = 1, + [pbr::OriginalName("IMPLICIT")] Implicit = 2, + [pbr::OriginalName("LEGACY_REQUIRED")] LegacyRequired = 3, + } + + public enum EnumType { + [pbr::OriginalName("ENUM_TYPE_UNKNOWN")] Unknown = 0, + [pbr::OriginalName("OPEN")] Open = 1, + [pbr::OriginalName("CLOSED")] Closed = 2, + } + + public enum RepeatedFieldEncoding { + [pbr::OriginalName("REPEATED_FIELD_ENCODING_UNKNOWN")] Unknown = 0, + [pbr::OriginalName("PACKED")] Packed = 1, + [pbr::OriginalName("EXPANDED")] Expanded = 2, + } + + public enum Utf8Validation { + [pbr::OriginalName("UTF8_VALIDATION_UNKNOWN")] Unknown = 0, + [pbr::OriginalName("VERIFY")] Verify = 2, + [pbr::OriginalName("NONE")] None = 3, + } + + public enum MessageEncoding { + [pbr::OriginalName("MESSAGE_ENCODING_UNKNOWN")] Unknown = 0, + [pbr::OriginalName("LENGTH_PREFIXED")] LengthPrefixed = 1, + [pbr::OriginalName("DELIMITED")] Delimited = 2, + } + + public enum JsonFormat { + [pbr::OriginalName("JSON_FORMAT_UNKNOWN")] Unknown = 0, + [pbr::OriginalName("ALLOW")] Allow = 1, + [pbr::OriginalName("LEGACY_BEST_EFFORT")] LegacyBestEffort = 2, + } + + } + #endregion + + } + + /// + /// A compiled specification for the defaults of a set of features. These + /// messages are generated from FeatureSet extensions and can be used to seed + /// feature resolution. The resolution with this object becomes a simple search + /// for the closest matching edition, followed by proto merges. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FeatureSetDefaults : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FeatureSetDefaults()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.DescriptorReflection.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 FeatureSetDefaults() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSetDefaults(FeatureSetDefaults other) : this() { + _hasBits0 = other._hasBits0; + defaults_ = other.defaults_.Clone(); + minimumEdition_ = other.minimumEdition_; + maximumEdition_ = other.maximumEdition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSetDefaults Clone() { + return new FeatureSetDefaults(this); + } + + /// Field number for the "defaults" field. + public const int DefaultsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_defaults_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FeatureSetDefaults.Types.FeatureSetEditionDefault.Parser); + private readonly pbc::RepeatedField defaults_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Defaults { + get { return defaults_; } + } + + /// Field number for the "minimum_edition" field. + public const int MinimumEditionFieldNumber = 4; + private readonly static global::Google.Protobuf.Reflection.Edition MinimumEditionDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition minimumEdition_; + /// + /// The minimum supported edition (inclusive) when this was constructed. + /// Editions before this will not have defaults. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition MinimumEdition { + get { if ((_hasBits0 & 1) != 0) { return minimumEdition_; } else { return MinimumEditionDefaultValue; } } + set { + _hasBits0 |= 1; + minimumEdition_ = value; + } + } + /// Gets whether the "minimum_edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMinimumEdition { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "minimum_edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMinimumEdition() { + _hasBits0 &= ~1; + } + + /// Field number for the "maximum_edition" field. + public const int MaximumEditionFieldNumber = 5; + private readonly static global::Google.Protobuf.Reflection.Edition MaximumEditionDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition maximumEdition_; + /// + /// The maximum known edition (inclusive) when this was constructed. Editions + /// after this will not have reliable defaults. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition MaximumEdition { + get { if ((_hasBits0 & 2) != 0) { return maximumEdition_; } else { return MaximumEditionDefaultValue; } } + set { + _hasBits0 |= 2; + maximumEdition_ = value; + } + } + /// Gets whether the "maximum_edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMaximumEdition { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "maximum_edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMaximumEdition() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FeatureSetDefaults); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FeatureSetDefaults other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!defaults_.Equals(other.defaults_)) return false; + if (MinimumEdition != other.MinimumEdition) return false; + if (MaximumEdition != other.MaximumEdition) 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 ^= defaults_.GetHashCode(); + if (HasMinimumEdition) hash ^= MinimumEdition.GetHashCode(); + if (HasMaximumEdition) hash ^= MaximumEdition.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 + defaults_.WriteTo(output, _repeated_defaults_codec); + if (HasMinimumEdition) { + output.WriteRawTag(32); + output.WriteEnum((int) MinimumEdition); + } + if (HasMaximumEdition) { + output.WriteRawTag(40); + output.WriteEnum((int) MaximumEdition); + } + 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) { + defaults_.WriteTo(ref output, _repeated_defaults_codec); + if (HasMinimumEdition) { + output.WriteRawTag(32); + output.WriteEnum((int) MinimumEdition); + } + if (HasMaximumEdition) { + output.WriteRawTag(40); + output.WriteEnum((int) MaximumEdition); + } + 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 += defaults_.CalculateSize(_repeated_defaults_codec); + if (HasMinimumEdition) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MinimumEdition); + } + if (HasMaximumEdition) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MaximumEdition); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FeatureSetDefaults other) { + if (other == null) { + return; + } + defaults_.Add(other.defaults_); + if (other.HasMinimumEdition) { + MinimumEdition = other.MinimumEdition; + } + if (other.HasMaximumEdition) { + MaximumEdition = other.MaximumEdition; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + defaults_.AddEntriesFrom(input, _repeated_defaults_codec); + break; + } + case 32: { + MinimumEdition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 40: { + MaximumEdition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + defaults_.AddEntriesFrom(ref input, _repeated_defaults_codec); + break; + } + case 32: { + MinimumEdition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 40: { + MaximumEdition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the FeatureSetDefaults message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A map from every known edition with a unique set of defaults to its + /// defaults. Not all editions may be contained here. For a given edition, + /// the defaults at the closest matching edition ordered at or before it should + /// be used. This field must be in strict ascending order by edition. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FeatureSetEditionDefault : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FeatureSetEditionDefault()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.FeatureSetDefaults.Descriptor.NestedTypes[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 FeatureSetEditionDefault() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSetEditionDefault(FeatureSetEditionDefault other) : this() { + _hasBits0 = other._hasBits0; + edition_ = other.edition_; + overridableFeatures_ = other.overridableFeatures_ != null ? other.overridableFeatures_.Clone() : null; + fixedFeatures_ = other.fixedFeatures_ != null ? other.fixedFeatures_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FeatureSetEditionDefault Clone() { + return new FeatureSetEditionDefault(this); + } + + /// Field number for the "edition" field. + public const int EditionFieldNumber = 3; + private readonly static global::Google.Protobuf.Reflection.Edition EditionDefaultValue = global::Google.Protobuf.Reflection.Edition.Unknown; + + private global::Google.Protobuf.Reflection.Edition edition_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.Edition Edition { + get { if ((_hasBits0 & 1) != 0) { return edition_; } else { return EditionDefaultValue; } } + set { + _hasBits0 |= 1; + edition_ = value; + } + } + /// Gets whether the "edition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEdition { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "edition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEdition() { + _hasBits0 &= ~1; + } + + /// Field number for the "overridable_features" field. + public const int OverridableFeaturesFieldNumber = 4; + private global::Google.Protobuf.Reflection.FeatureSet overridableFeatures_; + /// + /// Defaults of features that can be overridden in this edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet OverridableFeatures { + get { return overridableFeatures_; } + set { + overridableFeatures_ = value; + } + } + + /// Field number for the "fixed_features" field. + public const int FixedFeaturesFieldNumber = 5; + private global::Google.Protobuf.Reflection.FeatureSet fixedFeatures_; + /// + /// Defaults of features that can't be overridden in this edition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet FixedFeatures { + get { return fixedFeatures_; } + set { + fixedFeatures_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FeatureSetEditionDefault); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FeatureSetEditionDefault other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Edition != other.Edition) return false; + if (!object.Equals(OverridableFeatures, other.OverridableFeatures)) return false; + if (!object.Equals(FixedFeatures, other.FixedFeatures)) 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 (HasEdition) hash ^= Edition.GetHashCode(); + if (overridableFeatures_ != null) hash ^= OverridableFeatures.GetHashCode(); + if (fixedFeatures_ != null) hash ^= FixedFeatures.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 (HasEdition) { + output.WriteRawTag(24); + output.WriteEnum((int) Edition); + } + if (overridableFeatures_ != null) { + output.WriteRawTag(34); + output.WriteMessage(OverridableFeatures); + } + if (fixedFeatures_ != null) { + output.WriteRawTag(42); + output.WriteMessage(FixedFeatures); + } + 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 (HasEdition) { + output.WriteRawTag(24); + output.WriteEnum((int) Edition); + } + if (overridableFeatures_ != null) { + output.WriteRawTag(34); + output.WriteMessage(OverridableFeatures); + } + if (fixedFeatures_ != null) { + output.WriteRawTag(42); + output.WriteMessage(FixedFeatures); + } + 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 (HasEdition) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Edition); + } + if (overridableFeatures_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(OverridableFeatures); + } + if (fixedFeatures_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FixedFeatures); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FeatureSetEditionDefault other) { + if (other == null) { + return; + } + if (other.HasEdition) { + Edition = other.Edition; + } + if (other.overridableFeatures_ != null) { + if (overridableFeatures_ == null) { + OverridableFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + OverridableFeatures.MergeFrom(other.OverridableFeatures); + } + if (other.fixedFeatures_ != null) { + if (fixedFeatures_ == null) { + FixedFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + FixedFeatures.MergeFrom(other.FixedFeatures); + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 24: { + Edition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 34: { + if (overridableFeatures_ == null) { + OverridableFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(OverridableFeatures); + break; + } + case 42: { + if (fixedFeatures_ == null) { + FixedFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(FixedFeatures); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 24: { + Edition = (global::Google.Protobuf.Reflection.Edition) input.ReadEnum(); + break; + } + case 34: { + if (overridableFeatures_ == null) { + OverridableFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(OverridableFeatures); + break; + } + case 42: { + if (fixedFeatures_ == null) { + FixedFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(FixedFeatures); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Encapsulates information about the original source file from which a + /// FileDescriptorProto was generated. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SourceCodeInfo : pb::IExtendableMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SourceCodeInfo()); + private pb::UnknownFieldSet _unknownFields; + internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions { get { return _extensions; } } + [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::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[21]; } + } + + [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 SourceCodeInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SourceCodeInfo(SourceCodeInfo other) : this() { + location_ = other.location_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SourceCodeInfo Clone() { + return new SourceCodeInfo(this); + } + + /// Field number for the "location" field. + public const int LocationFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_location_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser); + private readonly pbc::RepeatedField location_ = new pbc::RepeatedField(); + /// + /// A Location identifies a piece of source code in a .proto file which + /// corresponds to a particular definition. This information is intended + /// to be useful to IDEs, code indexers, documentation generators, and similar + /// tools. + /// + /// For example, say we have a file like: + /// message Foo { + /// optional string foo = 1; + /// } + /// Let's look at just the field definition: + /// optional string foo = 1; + /// ^ ^^ ^^ ^ ^^^ + /// a bc de f ghi + /// We have the following locations: + /// span path represents + /// [a,i) [ 4, 0, 2, 0 ] The whole field definition. + /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + /// + /// Notes: + /// - A location may refer to a repeated field itself (i.e. not to any + /// particular index within it). This is used whenever a set of elements are + /// logically enclosed in a single code segment. For example, an entire + /// extend block (possibly containing multiple extension definitions) will + /// have an outer location whose path refers to the "extensions" repeated + /// field without an index. + /// - Multiple locations may have the same path. This happens when a single + /// logical declaration is spread out across multiple places. The most + /// obvious example is the "extend" block again -- there may be multiple + /// extend blocks in the same scope, each of which will have the same path. + /// - A location's span is not always a subset of its parent's span. For + /// example, the "extendee" of an extension declaration appears at the + /// beginning of the "extend" block and is shared by all extensions within + /// the block. + /// - Just because a location's span is a subset of some other location's span + /// does not mean that it is a descendant. For example, a "group" defines + /// both a type and a field in a single declaration. Thus, the locations + /// corresponding to the type and field and their components will overlap. + /// - Code which tries to interpret locations should probably be designed to + /// ignore those that it doesn't understand, as more types of locations could + /// be recorded in the future. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Location { + get { return location_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SourceCodeInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SourceCodeInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!location_.Equals(other.location_)) return false; + if (!Equals(_extensions, other._extensions)) { + 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 ^= location_.GetHashCode(); + if (_extensions != null) { + hash ^= _extensions.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 + location_.WriteTo(output, _repeated_location_codec); + if (_extensions != null) { + _extensions.WriteTo(output); + } + 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) { + location_.WriteTo(ref output, _repeated_location_codec); + if (_extensions != null) { + _extensions.WriteTo(ref 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; + size += location_.CalculateSize(_repeated_location_codec); + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SourceCodeInfo other) { + if (other == null) { + return; + } + location_.Add(other.location_); + pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + } + break; + case 10: { + location_.AddEntriesFrom(input, _repeated_location_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + } + break; + case 10: { + location_.AddEntriesFrom(ref input, _repeated_location_codec); + break; + } + } + } + } + #endif + + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the SourceCodeInfo message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Location : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Location()); + 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::Google.Protobuf.Reflection.SourceCodeInfo.Descriptor.NestedTypes[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 Location() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Location(Location other) : this() { + path_ = other.path_.Clone(); + span_ = other.span_.Clone(); + leadingComments_ = other.leadingComments_; + trailingComments_ = other.trailingComments_; + leadingDetachedComments_ = other.leadingDetachedComments_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Location Clone() { + return new Location(this); + } + + /// Field number for the "path" field. + public const int PathFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_path_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField path_ = new pbc::RepeatedField(); + /// + /// Identifies which part of the FileDescriptorProto was defined at this + /// location. + /// + /// Each element is a field number or an index. They form a path from + /// the root FileDescriptorProto to the place where the definition appears. + /// For example, this path: + /// [ 4, 3, 2, 7, 1 ] + /// refers to: + /// file.message_type(3) // 4, 3 + /// .field(7) // 2, 7 + /// .name() // 1 + /// This is because FileDescriptorProto.message_type has field number 4: + /// repeated DescriptorProto message_type = 4; + /// and DescriptorProto.field has field number 2: + /// repeated FieldDescriptorProto field = 2; + /// and FieldDescriptorProto.name has field number 1: + /// optional string name = 1; + /// + /// Thus, the above path gives the location of a field name. If we removed + /// the last element: + /// [ 4, 3, 2, 7 ] + /// this path refers to the whole field declaration (from the beginning + /// of the label to the terminating semicolon). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Path { + get { return path_; } + } + + /// Field number for the "span" field. + public const int SpanFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_span_codec + = pb::FieldCodec.ForInt32(18); + private readonly pbc::RepeatedField span_ = new pbc::RepeatedField(); + /// + /// Always has exactly three or four elements: start line, start column, + /// end line (optional, otherwise assumed same as start line), end column. + /// These are packed into a single field for efficiency. Note that line + /// and column numbers are zero-based -- typically you will want to add + /// 1 to each before displaying to a user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Span { + get { return span_; } + } + + /// Field number for the "leading_comments" field. + public const int LeadingCommentsFieldNumber = 3; + private readonly static string LeadingCommentsDefaultValue = ""; + + private string leadingComments_; + /// + /// If this SourceCodeInfo represents a complete declaration, these are any + /// comments appearing before and after the declaration which appear to be + /// attached to the declaration. + /// + /// A series of line comments appearing on consecutive lines, with no other + /// tokens appearing on those lines, will be treated as a single comment. + /// + /// leading_detached_comments will keep paragraphs of comments that appear + /// before (but not connected to) the current element. Each paragraph, + /// separated by empty lines, will be one comment element in the repeated + /// field. + /// + /// Only the comment content is provided; comment markers (e.g. //) are + /// stripped out. For block comments, leading whitespace and an asterisk + /// will be stripped from the beginning of each line other than the first. + /// Newlines are included in the output. + /// + /// Examples: + /// + /// optional int32 foo = 1; // Comment attached to foo. + /// // Comment attached to bar. + /// optional int32 bar = 2; + /// + /// optional string baz = 3; + /// // Comment attached to baz. + /// // Another line attached to baz. + /// + /// // Comment attached to moo. + /// // + /// // Another line attached to moo. + /// optional double moo = 4; + /// + /// // Detached comment for corge. This is not leading or trailing comments + /// // to moo or corge because there are blank lines separating it from + /// // both. + /// + /// // Detached comment for corge paragraph 2. + /// + /// optional string corge = 5; + /// /* Block comment attached + /// * to corge. Leading asterisks + /// * will be removed. */ + /// /* Block comment attached to + /// * grault. */ + /// optional int32 grault = 6; + /// + /// // ignored detached comments. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LeadingComments { + get { return leadingComments_ ?? LeadingCommentsDefaultValue; } + set { + leadingComments_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "leading_comments" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLeadingComments { + get { return leadingComments_ != null; } + } + /// Clears the value of the "leading_comments" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLeadingComments() { + leadingComments_ = null; + } + + /// Field number for the "trailing_comments" field. + public const int TrailingCommentsFieldNumber = 4; + private readonly static string TrailingCommentsDefaultValue = ""; + + private string trailingComments_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TrailingComments { + get { return trailingComments_ ?? TrailingCommentsDefaultValue; } + set { + trailingComments_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "trailing_comments" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTrailingComments { + get { return trailingComments_ != null; } + } + /// Clears the value of the "trailing_comments" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTrailingComments() { + trailingComments_ = null; + } + + /// Field number for the "leading_detached_comments" field. + public const int LeadingDetachedCommentsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_leadingDetachedComments_codec + = pb::FieldCodec.ForString(50); + private readonly pbc::RepeatedField leadingDetachedComments_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LeadingDetachedComments { + get { return leadingDetachedComments_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Location); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Location other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!path_.Equals(other.path_)) return false; + if(!span_.Equals(other.span_)) return false; + if (LeadingComments != other.LeadingComments) return false; + if (TrailingComments != other.TrailingComments) return false; + if(!leadingDetachedComments_.Equals(other.leadingDetachedComments_)) 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 ^= path_.GetHashCode(); + hash ^= span_.GetHashCode(); + if (HasLeadingComments) hash ^= LeadingComments.GetHashCode(); + if (HasTrailingComments) hash ^= TrailingComments.GetHashCode(); + hash ^= leadingDetachedComments_.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 + path_.WriteTo(output, _repeated_path_codec); + span_.WriteTo(output, _repeated_span_codec); + if (HasLeadingComments) { + output.WriteRawTag(26); + output.WriteString(LeadingComments); + } + if (HasTrailingComments) { + output.WriteRawTag(34); + output.WriteString(TrailingComments); + } + leadingDetachedComments_.WriteTo(output, _repeated_leadingDetachedComments_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) { + path_.WriteTo(ref output, _repeated_path_codec); + span_.WriteTo(ref output, _repeated_span_codec); + if (HasLeadingComments) { + output.WriteRawTag(26); + output.WriteString(LeadingComments); + } + if (HasTrailingComments) { + output.WriteRawTag(34); + output.WriteString(TrailingComments); + } + leadingDetachedComments_.WriteTo(ref output, _repeated_leadingDetachedComments_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 += path_.CalculateSize(_repeated_path_codec); + size += span_.CalculateSize(_repeated_span_codec); + if (HasLeadingComments) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LeadingComments); + } + if (HasTrailingComments) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TrailingComments); + } + size += leadingDetachedComments_.CalculateSize(_repeated_leadingDetachedComments_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Location other) { + if (other == null) { + return; + } + path_.Add(other.path_); + span_.Add(other.span_); + if (other.HasLeadingComments) { + LeadingComments = other.LeadingComments; + } + if (other.HasTrailingComments) { + TrailingComments = other.TrailingComments; + } + leadingDetachedComments_.Add(other.leadingDetachedComments_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + path_.AddEntriesFrom(input, _repeated_path_codec); + break; + } + case 18: + case 16: { + span_.AddEntriesFrom(input, _repeated_span_codec); + break; + } + case 26: { + LeadingComments = input.ReadString(); + break; + } + case 34: { + TrailingComments = input.ReadString(); + break; + } + case 50: { + leadingDetachedComments_.AddEntriesFrom(input, _repeated_leadingDetachedComments_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + path_.AddEntriesFrom(ref input, _repeated_path_codec); + break; + } + case 18: + case 16: { + span_.AddEntriesFrom(ref input, _repeated_span_codec); + break; + } + case 26: { + LeadingComments = input.ReadString(); + break; + } + case 34: { + TrailingComments = input.ReadString(); + break; + } + case 50: { + leadingDetachedComments_.AddEntriesFrom(ref input, _repeated_leadingDetachedComments_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Describes the relationship between generated code and its original source + /// file. A GeneratedCodeInfo message is associated with only one generated + /// source file, but may contain references to different source .proto files. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GeneratedCodeInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GeneratedCodeInfo()); + 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::Google.Protobuf.Reflection.DescriptorReflection.Descriptor.MessageTypes[22]; } + } + + [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 GeneratedCodeInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GeneratedCodeInfo(GeneratedCodeInfo other) : this() { + annotation_ = other.annotation_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GeneratedCodeInfo Clone() { + return new GeneratedCodeInfo(this); + } + + /// Field number for the "annotation" field. + public const int AnnotationFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_annotation_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Parser); + private readonly pbc::RepeatedField annotation_ = new pbc::RepeatedField(); + /// + /// An Annotation connects some span of text in generated code to an element + /// of its generating .proto file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Annotation { + get { return annotation_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GeneratedCodeInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GeneratedCodeInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!annotation_.Equals(other.annotation_)) 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 ^= annotation_.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 + annotation_.WriteTo(output, _repeated_annotation_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) { + annotation_.WriteTo(ref output, _repeated_annotation_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 += annotation_.CalculateSize(_repeated_annotation_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GeneratedCodeInfo other) { + if (other == null) { + return; + } + annotation_.Add(other.annotation_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + annotation_.AddEntriesFrom(input, _repeated_annotation_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + annotation_.AddEntriesFrom(ref input, _repeated_annotation_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the GeneratedCodeInfo message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Annotation : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Annotation()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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::Google.Protobuf.Reflection.GeneratedCodeInfo.Descriptor.NestedTypes[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 Annotation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Annotation(Annotation other) : this() { + _hasBits0 = other._hasBits0; + path_ = other.path_.Clone(); + sourceFile_ = other.sourceFile_; + begin_ = other.begin_; + end_ = other.end_; + semantic_ = other.semantic_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Annotation Clone() { + return new Annotation(this); + } + + /// Field number for the "path" field. + public const int PathFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_path_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField path_ = new pbc::RepeatedField(); + /// + /// Identifies the element in the original source .proto file. This field + /// is formatted the same as SourceCodeInfo.Location.path. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Path { + get { return path_; } + } + + /// Field number for the "source_file" field. + public const int SourceFileFieldNumber = 2; + private readonly static string SourceFileDefaultValue = ""; + + private string sourceFile_; + /// + /// Identifies the filesystem path to the original source .proto. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SourceFile { + get { return sourceFile_ ?? SourceFileDefaultValue; } + set { + sourceFile_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "source_file" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSourceFile { + get { return sourceFile_ != null; } + } + /// Clears the value of the "source_file" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSourceFile() { + sourceFile_ = null; + } + + /// Field number for the "begin" field. + public const int BeginFieldNumber = 3; + private readonly static int BeginDefaultValue = 0; + + private int begin_; + /// + /// Identifies the starting offset in bytes in the generated code + /// that relates to the identified object. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Begin { + get { if ((_hasBits0 & 1) != 0) { return begin_; } else { return BeginDefaultValue; } } + set { + _hasBits0 |= 1; + begin_ = value; + } + } + /// Gets whether the "begin" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasBegin { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "begin" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearBegin() { + _hasBits0 &= ~1; + } + + /// Field number for the "end" field. + public const int EndFieldNumber = 4; + private readonly static int EndDefaultValue = 0; + + private int end_; + /// + /// Identifies the ending offset in bytes in the generated code that + /// relates to the identified object. The end offset should be one past + /// the last relevant byte (so the length of the text = end - begin). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int End { + get { if ((_hasBits0 & 2) != 0) { return end_; } else { return EndDefaultValue; } } + set { + _hasBits0 |= 2; + end_ = value; + } + } + /// Gets whether the "end" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEnd { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "end" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEnd() { + _hasBits0 &= ~2; + } + + /// Field number for the "semantic" field. + public const int SemanticFieldNumber = 5; + private readonly static global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic SemanticDefaultValue = global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic.None; + + private global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic semantic_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic Semantic { + get { if ((_hasBits0 & 4) != 0) { return semantic_; } else { return SemanticDefaultValue; } } + set { + _hasBits0 |= 4; + semantic_ = value; + } + } + /// Gets whether the "semantic" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSemantic { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "semantic" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSemantic() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Annotation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Annotation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!path_.Equals(other.path_)) return false; + if (SourceFile != other.SourceFile) return false; + if (Begin != other.Begin) return false; + if (End != other.End) return false; + if (Semantic != other.Semantic) 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 ^= path_.GetHashCode(); + if (HasSourceFile) hash ^= SourceFile.GetHashCode(); + if (HasBegin) hash ^= Begin.GetHashCode(); + if (HasEnd) hash ^= End.GetHashCode(); + if (HasSemantic) hash ^= Semantic.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 + path_.WriteTo(output, _repeated_path_codec); + if (HasSourceFile) { + output.WriteRawTag(18); + output.WriteString(SourceFile); + } + if (HasBegin) { + output.WriteRawTag(24); + output.WriteInt32(Begin); + } + if (HasEnd) { + output.WriteRawTag(32); + output.WriteInt32(End); + } + if (HasSemantic) { + output.WriteRawTag(40); + output.WriteEnum((int) Semantic); + } + 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) { + path_.WriteTo(ref output, _repeated_path_codec); + if (HasSourceFile) { + output.WriteRawTag(18); + output.WriteString(SourceFile); + } + if (HasBegin) { + output.WriteRawTag(24); + output.WriteInt32(Begin); + } + if (HasEnd) { + output.WriteRawTag(32); + output.WriteInt32(End); + } + if (HasSemantic) { + output.WriteRawTag(40); + output.WriteEnum((int) Semantic); + } + 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 += path_.CalculateSize(_repeated_path_codec); + if (HasSourceFile) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SourceFile); + } + if (HasBegin) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Begin); + } + if (HasEnd) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); + } + if (HasSemantic) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Semantic); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Annotation other) { + if (other == null) { + return; + } + path_.Add(other.path_); + if (other.HasSourceFile) { + SourceFile = other.SourceFile; + } + if (other.HasBegin) { + Begin = other.Begin; + } + if (other.HasEnd) { + End = other.End; + } + if (other.HasSemantic) { + Semantic = other.Semantic; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + path_.AddEntriesFrom(input, _repeated_path_codec); + break; + } + case 18: { + SourceFile = input.ReadString(); + break; + } + case 24: { + Begin = input.ReadInt32(); + break; + } + case 32: { + End = input.ReadInt32(); + break; + } + case 40: { + Semantic = (global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + path_.AddEntriesFrom(ref input, _repeated_path_codec); + break; + } + case 18: { + SourceFile = input.ReadString(); + break; + } + case 24: { + Begin = input.ReadInt32(); + break; + } + case 32: { + End = input.ReadInt32(); + break; + } + case 40: { + Semantic = (global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Annotation message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Represents the identified object's effect on the element in the original + /// .proto file. + /// + public enum Semantic { + /// + /// There is no effect or the effect is indescribable. + /// + [pbr::OriginalName("NONE")] None = 0, + /// + /// The element is set or otherwise mutated. + /// + [pbr::OriginalName("SET")] Set = 1, + /// + /// An alias to the element is returned. + /// + [pbr::OriginalName("ALIAS")] Alias = 2, + } + + } + #endregion + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs.meta new file mode 100644 index 00000000..b54a9a45 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/Descriptor.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a232581791b5f340ae30cea93a4a70b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs new file mode 100644 index 00000000..f55740ab --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs @@ -0,0 +1,83 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; +using System.Diagnostics; + +namespace Google.Protobuf.Reflection +{ + // Implementation note: The descriptors which don't derive from this class are FileDescriptor + // and FeatureSetDescriptor - the latter of which isn't a descriptor in exactly the same way + // that the others are anyway. + + /// + /// Base class for nearly all descriptors, providing common functionality. + /// + [DebuggerDisplay("Type = {GetType().Name,nq}, FullName = {FullName}")] + public abstract class DescriptorBase : IDescriptor + { + internal DescriptorBase(FileDescriptor file, string fullName, int index, FeatureSetDescriptor features) + { + File = file; + FullName = fullName; + Index = index; + Features = features; + } + + /// + /// The feature set for this descriptor, including inherited features. + /// This is internal as external users should use the properties on individual + /// descriptor types (e.g. FieldDescriptor.IsPacked) rather than querying features directly. + /// + internal FeatureSetDescriptor Features { get; } + + /// + /// The index of this descriptor within its parent descriptor. + /// + /// + /// This returns the index of this descriptor within its parent, for + /// this descriptor's type. (There can be duplicate values for different + /// types, e.g. one enum type with index 0 and one message type with index 0.) + /// + public int Index { get; } + + /// + /// Returns the name of the entity (field, message etc) being described. + /// + public abstract string Name { get; } + + /// + /// The fully qualified name of the descriptor's target. + /// + public string FullName { get; } + + /// + /// The file this descriptor was declared in. + /// + public FileDescriptor File { get; } + + /// + /// The declaration information about the descriptor, or null if no declaration information + /// is available for this descriptor. + /// + /// + /// This information is typically only available for dynamically loaded descriptors, + /// for example within a protoc plugin where the full descriptors, including source info, + /// are passed to the code by protoc. + /// + public DescriptorDeclaration Declaration => File.GetDeclaration(this); + + /// + /// Retrieves the list of nested descriptors corresponding to the given field number, if any. + /// If the field is unknown or not a nested descriptor list, return null to terminate the search. + /// The default implementation returns null. + /// + internal virtual IReadOnlyList GetNestedDescriptorListForField(int fieldNumber) => null; + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs.meta new file mode 100644 index 00000000..7c73a9cd --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ed14df99945a48489f68e7d770a4e7e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs new file mode 100644 index 00000000..eab8095f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs @@ -0,0 +1,87 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2018 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using static Google.Protobuf.Reflection.SourceCodeInfo.Types; + +namespace Google.Protobuf.Reflection +{ + /// + /// Provides additional information about the declaration of a descriptor, + /// such as source location and comments. + /// + public sealed class DescriptorDeclaration + { + /// + /// The descriptor this declaration relates to. + /// + public IDescriptor Descriptor { get; } + + /// + /// The start line of the declaration within the source file. This value is 1-based. + /// + public int StartLine { get; } + /// + /// The start column of the declaration within the source file. This value is 1-based. + /// + public int StartColumn { get; } + + /// + /// // The end line of the declaration within the source file. This value is 1-based. + /// + public int EndLine { get; } + /// + /// The end column of the declaration within the source file. This value is 1-based, and + /// exclusive. (The final character of the declaration is on the column before this value.) + /// + public int EndColumn { get; } + + /// + /// Comments appearing before the declaration. Never null, but may be empty. Multi-line comments + /// are represented as a newline-separated string. Leading whitespace and the comment marker ("//") + /// are removed from each line. + /// + public string LeadingComments { get; } + + /// + /// Comments appearing after the declaration. Never null, but may be empty. Multi-line comments + /// are represented as a newline-separated string. Leading whitespace and the comment marker ("//") + /// are removed from each line. + /// + public string TrailingComments { get; } + + /// + /// Comments appearing before the declaration, but separated from it by blank + /// lines. Each string represents a newline-separated paragraph of comments. + /// Leading whitespace and the comment marker ("//") are removed from each line. + /// The list is never null, but may be empty. Likewise each element is never null, but may be empty. + /// + public IReadOnlyList LeadingDetachedComments { get; } + + private DescriptorDeclaration(IDescriptor descriptor, Location location) + { + // TODO: Validation + Descriptor = descriptor; + bool hasEndLine = location.Span.Count == 4; + // Lines and columns are 0-based in the proto. + StartLine = location.Span[0] + 1; + StartColumn = location.Span[1] + 1; + EndLine = hasEndLine ? location.Span[2] + 1 : StartLine; + EndColumn = location.Span[hasEndLine ? 3 : 2] + 1; + LeadingComments = location.LeadingComments; + TrailingComments = location.TrailingComments; + LeadingDetachedComments = new ReadOnlyCollection(location.LeadingDetachedComments.ToList()); + } + + internal static DescriptorDeclaration FromProto(IDescriptor descriptor, Location location) => + new DescriptorDeclaration(descriptor, location); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs.meta new file mode 100644 index 00000000..e6171f44 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorDeclaration.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 04a566dc512cc5047b006950c4b4ebcc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs new file mode 100644 index 00000000..7289e44a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs @@ -0,0 +1,358 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Google.Protobuf.Reflection +{ + /// + /// Contains lookup tables containing all the descriptors defined in a particular file. + /// + internal sealed class DescriptorPool + { + private readonly IDictionary descriptorsByName = + new Dictionary(); + + private readonly IDictionary, FieldDescriptor> fieldsByNumber = + new Dictionary, FieldDescriptor>(); + + private readonly IDictionary, EnumValueDescriptor> enumValuesByNumber = + new Dictionary, EnumValueDescriptor>(); + + private readonly IDictionary enumValuesByName = + new Dictionary(); + + private readonly HashSet dependencies = new HashSet(); + + internal DescriptorPool(IEnumerable dependencyFiles) + { + foreach (FileDescriptor dependencyFile in dependencyFiles) + { + dependencies.Add(dependencyFile); + ImportPublicDependencies(dependencyFile); + } + + foreach (FileDescriptor dependency in dependencyFiles) + { + AddPackage(dependency.Package, dependency); + } + } + + private void ImportPublicDependencies(FileDescriptor file) + { + foreach (FileDescriptor dependency in file.PublicDependencies) + { + if (dependencies.Add(dependency)) + { + ImportPublicDependencies(dependency); + } + } + } + + /// + /// Finds a symbol of the given name within the pool. + /// + /// The type of symbol to look for + /// Fully-qualified name to look up + /// The symbol with the given name and type, + /// or null if the symbol doesn't exist or has the wrong type + internal T FindSymbol(string fullName) where T : class + { + descriptorsByName.TryGetValue(fullName, out IDescriptor result); + if (result is T descriptor) + { + return descriptor; + } + + // dependencies contains direct dependencies and any *public* dependencies + // of those dependencies (transitively)... so we don't need to recurse here. + foreach (FileDescriptor dependency in dependencies) + { + dependency.DescriptorPool.descriptorsByName.TryGetValue(fullName, out result); + descriptor = result as T; + if (descriptor != null) + { + return descriptor; + } + } + + return null; + } + + /// + /// Adds a package to the symbol tables. If a package by the same name + /// already exists, that is fine, but if some other kind of symbol + /// exists under the same name, an exception is thrown. If the package + /// has multiple components, this also adds the parent package(s). + /// + internal void AddPackage(string fullName, FileDescriptor file) + { + int dotpos = fullName.LastIndexOf('.'); + String name; + if (dotpos != -1) + { + AddPackage(fullName.Substring(0, dotpos), file); + name = fullName.Substring(dotpos + 1); + } + else + { + name = fullName; + } + + if (descriptorsByName.TryGetValue(fullName, out IDescriptor old)) + { + if (old is not PackageDescriptor) + { + throw new DescriptorValidationException(file, + "\"" + name + + "\" is already defined (as something other than a " + + "package) in file \"" + old.File.Name + "\"."); + } + } + descriptorsByName[fullName] = new PackageDescriptor(name, fullName, file); + } + + /// + /// Adds a symbol to the symbol table. + /// + /// The symbol already existed + /// in the symbol table. + internal void AddSymbol(IDescriptor descriptor) + { + ValidateSymbolName(descriptor); + string fullName = descriptor.FullName; + + if (descriptorsByName.TryGetValue(fullName, out IDescriptor old)) + { + throw new DescriptorValidationException(descriptor, + GetDescriptorAlreadyAddedExceptionMessage(descriptor, fullName, old)); + } + descriptorsByName[fullName] = descriptor; + } + + private static string GetDescriptorAlreadyAddedExceptionMessage(IDescriptor descriptor, string fullName, IDescriptor old) + { + int dotPos = fullName.LastIndexOf('.'); + return descriptor.File != old.File ? $"\"{fullName}\" is already defined in file \"{old.File.Name}\"." + : dotPos == -1 ? $"{fullName} is already defined." + : $"\"{fullName.Substring(dotPos + 1)}\" is already defined in \"{fullName.Substring(0, dotPos)}\"."; + } + + /// + /// Verifies that the descriptor's name is valid (i.e. it contains + /// only letters, digits and underscores, and does not start with a digit). + /// + /// + private static void ValidateSymbolName(IDescriptor descriptor) + { + if (descriptor.Name.Length == 0) + { + throw new DescriptorValidationException(descriptor, "Missing name."); + } + + // Symbol name must start with a letter or underscore, and it can contain letters, + // numbers and underscores. + string name = descriptor.Name; + if (!IsAsciiLetter(name[0]) && name[0] != '_') + { + ThrowInvalidSymbolNameException(descriptor); + } + for (int i = 1; i < name.Length; i++) + { + if (!IsAsciiLetter(name[i]) && !IsAsciiDigit(name[i]) && name[i] != '_') + { + ThrowInvalidSymbolNameException(descriptor); + } + } + + static bool IsAsciiLetter(char c) => (uint)((c | 0x20) - 'a') <= 'z' - 'a'; + static bool IsAsciiDigit(char c) => (uint)(c - '0') <= '9' - '0'; + static void ThrowInvalidSymbolNameException(IDescriptor descriptor) => + throw new DescriptorValidationException( + descriptor, "\"" + descriptor.Name + "\" is not a valid identifier."); + } + + /// + /// Returns the field with the given number in the given descriptor, + /// or null if it can't be found. + /// + internal FieldDescriptor FindFieldByNumber(MessageDescriptor messageDescriptor, int number) + { + fieldsByNumber.TryGetValue(new ObjectIntPair(messageDescriptor, number), out FieldDescriptor ret); + return ret; + } + + internal EnumValueDescriptor FindEnumValueByNumber(EnumDescriptor enumDescriptor, int number) + { + enumValuesByNumber.TryGetValue(new ObjectIntPair(enumDescriptor, number), out EnumValueDescriptor ret); + return ret; + } + + internal EnumValueDescriptor FindEnumValueByName(EnumDescriptor enumDescriptor, string name) + { + enumValuesByName.TryGetValue(new EnumValueByNameDescriptorKey(enumDescriptor, name), out EnumValueDescriptor ret); + return ret; + } + + /// + /// Adds a field to the fieldsByNumber table. + /// + /// A field with the same + /// containing type and number already exists. + internal void AddFieldByNumber(FieldDescriptor field) + { + // for extensions, we use the extended type, otherwise we use the containing type + ObjectIntPair key = new ObjectIntPair(field.Proto.HasExtendee ? field.ExtendeeType : field.ContainingType, field.FieldNumber); + if (fieldsByNumber.TryGetValue(key, out FieldDescriptor old)) + { + throw new DescriptorValidationException(field, "Field number " + field.FieldNumber + + "has already been used in \"" + + field.ContainingType.FullName + + "\" by field \"" + old.Name + "\"."); + } + fieldsByNumber[key] = field; + } + + /// + /// Adds an enum value to the enumValuesByNumber and enumValuesByName tables. If an enum value + /// with the same type and number already exists, this method does nothing to enumValuesByNumber. + /// (This is allowed; the first value defined with the number takes precedence.) If an enum + /// value with the same name already exists, this method throws DescriptorValidationException. + /// (It is expected that this method is called after AddSymbol, which would already have thrown + /// an exception in this failure case.) + /// + internal void AddEnumValue(EnumValueDescriptor enumValue) + { + ObjectIntPair numberKey = new ObjectIntPair(enumValue.EnumDescriptor, enumValue.Number); + if (!enumValuesByNumber.ContainsKey(numberKey)) + { + enumValuesByNumber[numberKey] = enumValue; + } + + EnumValueByNameDescriptorKey nameKey = new EnumValueByNameDescriptorKey(enumValue.EnumDescriptor, enumValue.Name); + if (enumValuesByName.TryGetValue(nameKey, out EnumValueDescriptor old)) + { + throw new DescriptorValidationException(enumValue, + GetDescriptorAlreadyAddedExceptionMessage(enumValue, enumValue.FullName, old)); + } + enumValuesByName[nameKey] = enumValue; + } + + /// + /// Looks up a descriptor by name, relative to some other descriptor. + /// The name may be fully-qualified (with a leading '.'), partially-qualified, + /// or unqualified. C++-like name lookup semantics are used to search for the + /// matching descriptor. + /// + /// + /// This isn't heavily optimized, but it's only used during cross linking anyway. + /// If it starts being used more widely, we should look at performance more carefully. + /// + internal IDescriptor LookupSymbol(string name, IDescriptor relativeTo) + { + IDescriptor result; + if (name.StartsWith(".")) + { + // Fully-qualified name. + result = FindSymbol(name.Substring(1)); + } + else + { + // If "name" is a compound identifier, we want to search for the + // first component of it, then search within it for the rest. + int firstPartLength = name.IndexOf('.'); + string firstPart = firstPartLength == -1 ? name : name.Substring(0, firstPartLength); + + // We will search each parent scope of "relativeTo" looking for the + // symbol. + StringBuilder scopeToTry = new StringBuilder(relativeTo.FullName); + + while (true) + { + // Chop off the last component of the scope. + + int dotpos = scopeToTry.ToString().LastIndexOf("."); + if (dotpos == -1) + { + result = FindSymbol(name); + break; + } + else + { + scopeToTry.Length = dotpos + 1; + + // Append firstPart and try to find. + scopeToTry.Append(firstPart); + result = FindSymbol(scopeToTry.ToString()); + + if (result != null) + { + if (firstPartLength != -1) + { + // We only found the first part of the symbol. Now look for + // the whole thing. If this fails, we *don't* want to keep + // searching parent scopes. + scopeToTry.Length = dotpos + 1; + scopeToTry.Append(name); + result = FindSymbol(scopeToTry.ToString()); + } + break; + } + + // Not found. Remove the name so we can try again. + scopeToTry.Length = dotpos; + } + } + } + + if (result == null) + { + throw new DescriptorValidationException(relativeTo, "\"" + name + "\" is not defined."); + } + else + { + return result; + } + } + + /// + /// Struct used to hold the keys for the enumValuesByName table. + /// + private struct EnumValueByNameDescriptorKey : IEquatable + { + private readonly string name; + private readonly IDescriptor descriptor; + + internal EnumValueByNameDescriptorKey(EnumDescriptor descriptor, string valueName) + { + this.descriptor = descriptor; + this.name = valueName; + } + + public bool Equals(EnumValueByNameDescriptorKey other) => + descriptor == other.descriptor + && name == other.name; + + public override bool Equals(object obj) => + obj is EnumValueByNameDescriptorKey pair && Equals(pair); + + public override int GetHashCode() + { + unchecked + { + var hashCode = descriptor.GetHashCode(); + hashCode = (hashCode * 397) ^ (name != null ? name.GetHashCode() : 0); + return hashCode; + } + } + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs.meta new file mode 100644 index 00000000..aea447e5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorPool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 42e62735de3776243b80ce6594ec5271 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs new file mode 100644 index 00000000..4ba9c5c9 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs @@ -0,0 +1,41 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Google.Protobuf.Reflection +{ + /// + /// Internal class containing utility methods when working with descriptors. + /// + internal static class DescriptorUtil + { + /// + /// Equivalent to Func[TInput, int, TOutput] but usable in .NET 2.0. Only used to convert + /// arrays. + /// + internal delegate TOutput IndexedConverter(TInput element, int index); + + /// + /// Converts the given array into a read-only list, applying the specified conversion to + /// each input element. + /// + internal static IList ConvertAndMakeReadOnly + (IList input, IndexedConverter converter) + { + TOutput[] array = new TOutput[input.Count]; + for (int i = 0; i < array.Length; i++) + { + array[i] = converter(input[i], i); + } + return new ReadOnlyCollection(array); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs.meta new file mode 100644 index 00000000..577a2f0c --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorUtil.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 55bea9c017a611749bdf23cbc078a419 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs new file mode 100644 index 00000000..e55c3b88 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs @@ -0,0 +1,48 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf.Reflection +{ + /// + /// Thrown when building descriptors fails because the source DescriptorProtos + /// are not valid. + /// + public sealed class DescriptorValidationException : Exception + { + /// + /// The full name of the descriptor where the error occurred. + /// + public string ProblemSymbolName { get; } + + /// + /// A human-readable description of the error. (The Message property + /// is made up of the descriptor's name and this description.) + /// + public string Description { get; } + + internal DescriptorValidationException(IDescriptor problemDescriptor, string description) : + base(problemDescriptor.FullName + ": " + description) + { + // Note that problemDescriptor may be partially uninitialized, so we + // don't want to expose it directly to the user. So, we only provide + // the name and the original proto. + ProblemSymbolName = problemDescriptor.FullName; + Description = description; + } + + internal DescriptorValidationException(IDescriptor problemDescriptor, string description, Exception cause) : + base(problemDescriptor.FullName + ": " + description, cause) + { + ProblemSymbolName = problemDescriptor.FullName; + Description = description; + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs.meta new file mode 100644 index 00000000..88ac93d4 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/DescriptorValidationException.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1e53420b1baff8a45a6f5d882d3c5590 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs new file mode 100644 index 00000000..f90352d4 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs @@ -0,0 +1,140 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; +using System.Collections.Generic; + +namespace Google.Protobuf.Reflection +{ + /// + /// Descriptor for an enum type in a .proto file. + /// + public sealed class EnumDescriptor : DescriptorBase + { + internal EnumDescriptor(EnumDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, Type clrType) + : base(file, file.ComputeFullName(parent, proto.Name), index, (parent?.Features ?? file.Features).MergedWith(proto.Options?.Features)) + { + Proto = proto; + ClrType = clrType; + ContainingType = parent; + + if (proto.Value.Count == 0) + { + // We cannot allow enums with no values because this would mean there + // would be no valid default value for fields of this type. + throw new DescriptorValidationException(this, "Enums must contain at least one value."); + } + + Values = DescriptorUtil.ConvertAndMakeReadOnly(proto.Value, + (value, i) => new EnumValueDescriptor(value, file, this, i)); + + File.DescriptorPool.AddSymbol(this); + } + + internal EnumDescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this enum. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this enum descriptor. + public EnumDescriptorProto ToProto() => Proto.Clone(); + + /// + /// The brief name of the descriptor's target. + /// + public override string Name => Proto.Name; + + internal override IReadOnlyList GetNestedDescriptorListForField(int fieldNumber) => + fieldNumber switch + { + EnumDescriptorProto.ValueFieldNumber => (IReadOnlyList)Values, + _ => null, + }; + + /// + /// The CLR type for this enum. For generated code, this will be a CLR enum type. + /// + public Type ClrType { get; } + + /// + /// If this is a nested type, get the outer descriptor, otherwise null. + /// + public MessageDescriptor ContainingType { get; } + + /// + /// An unmodifiable list of defined value descriptors for this enum. + /// + public IList Values { get; } + + /// + /// Finds an enum value by number. If multiple enum values have the + /// same number, this returns the first defined value with that number. + /// If there is no value for the given number, this returns null. + /// + public EnumValueDescriptor FindValueByNumber(int number) + { + return File.DescriptorPool.FindEnumValueByNumber(this, number); + } + + /// + /// Finds an enum value by name. + /// + /// The unqualified name of the value (e.g. "FOO"). + /// The value's descriptor, or null if not found. + public EnumValueDescriptor FindValueByName(string name) => + File.DescriptorPool.FindEnumValueByName(this, name); + + /// + /// The (possibly empty) set of custom options for this enum. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The EnumOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public EnumOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value enum option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value enum option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs.meta new file mode 100644 index 00000000..34cbe39d --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d8dd2747e1e91644aa4f98dbb35ef7a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs new file mode 100644 index 00000000..5f535f41 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs @@ -0,0 +1,99 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; + +namespace Google.Protobuf.Reflection +{ + /// + /// Descriptor for a single enum value within an enum in a .proto file. + /// + public sealed class EnumValueDescriptor : DescriptorBase + { + internal EnumValueDescriptor(EnumValueDescriptorProto proto, FileDescriptor file, + EnumDescriptor parent, int index) + : base(file, parent.FullName + "." + proto.Name, index, parent.Features.MergedWith(proto.Options?.Features)) + { + Proto = proto; + EnumDescriptor = parent; + file.DescriptorPool.AddSymbol(this); + file.DescriptorPool.AddEnumValue(this); + } + + internal EnumValueDescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this enum value. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this enum value descriptor. + public EnumValueDescriptorProto ToProto() => Proto.Clone(); + + /// + /// Returns the name of the enum value described by this object. + /// + public override string Name => Proto.Name; + + /// + /// Returns the number associated with this enum value. + /// + public int Number => Proto.Number; + + /// + /// Returns the enum descriptor that this value is part of. + /// + public EnumDescriptor EnumDescriptor { get; } + + /// + /// The (possibly empty) set of custom options for this enum value. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The EnumValueOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public EnumValueOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value enum value option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value enum value option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs.meta new file mode 100644 index 00000000..1a3e0af0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/EnumValueDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8909be20f3b9d454787a44ee885803df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs new file mode 100644 index 00000000..72c36d5e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs @@ -0,0 +1,46 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf.Reflection +{ + internal sealed class ExtensionAccessor : IFieldAccessor + { + private readonly Extension extension; + private readonly ReflectionUtil.IExtensionReflectionHelper helper; + + internal ExtensionAccessor(FieldDescriptor descriptor) + { + Descriptor = descriptor; + extension = descriptor.Extension; + helper = ReflectionUtil.CreateExtensionHelper(extension); + } + + public FieldDescriptor Descriptor { get; } + + public void Clear(IMessage message) + { + helper.ClearExtension(message); + } + + public bool HasValue(IMessage message) + { + return helper.HasExtension(message); + } + + public object GetValue(IMessage message) + { + return helper.GetExtension(message); + } + + public void SetValue(IMessage message, object value) + { + helper.SetExtension(message, value); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs.meta new file mode 100644 index 00000000..0834b6b6 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionAccessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c69cc8965e80af4a89f4e3c2bf662c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs new file mode 100644 index 00000000..5ce2cfe5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs @@ -0,0 +1,118 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Linq; + +namespace Google.Protobuf.Reflection +{ + /// + /// A collection to simplify retrieving the descriptors of extensions in a descriptor for a message + /// + [DebuggerDisplay("Count = {UnorderedExtensions.Count}")] + [DebuggerTypeProxy(typeof(ExtensionCollectionDebugView))] + public sealed class ExtensionCollection + { + private IDictionary> extensionsByTypeInDeclarationOrder; + private IDictionary> extensionsByTypeInNumberOrder; + + internal ExtensionCollection(FileDescriptor file, Extension[] extensions) + { + UnorderedExtensions = DescriptorUtil.ConvertAndMakeReadOnly( + file.Proto.Extension, + (extension, i) => { + if (extensions?.Length != 0) + { + return new FieldDescriptor(extension, file, null, i, null, extensions?[i]); + } + else + { + return new FieldDescriptor(extension, file, null, i, null, null); // return null if there's no extensions in this array for old code-gen + } + }); + } + + internal ExtensionCollection(MessageDescriptor message, Extension[] extensions) + { + UnorderedExtensions = DescriptorUtil.ConvertAndMakeReadOnly( + message.Proto.Extension, + (extension, i) => { + if (extensions?.Length != 0) + { + return new FieldDescriptor(extension, message.File, message, i, null, extensions?[i]); + } + else + { + return new FieldDescriptor(extension, message.File, message, i, null, null); + } + }); + } + + /// + /// Returns a readonly list of all the extensions defined in this type in + /// the order they were defined in the source .proto file + /// + public IList UnorderedExtensions { get; } + + /// + /// Returns a readonly list of all the extensions define in this type that extend + /// the provided descriptor type in the order they were defined in the source .proto file + /// + public IList GetExtensionsInDeclarationOrder(MessageDescriptor descriptor) + { + return extensionsByTypeInDeclarationOrder[descriptor]; + } + + /// + /// Returns a readonly list of all the extensions define in this type that extend + /// the provided descriptor type in ascending field order + /// + public IList GetExtensionsInNumberOrder(MessageDescriptor descriptor) + { + return extensionsByTypeInNumberOrder[descriptor]; + } + + internal void CrossLink() + { + Dictionary> declarationOrder = new Dictionary>(); + foreach (FieldDescriptor descriptor in UnorderedExtensions) + { + descriptor.CrossLink(); + + if (!declarationOrder.TryGetValue(descriptor.ExtendeeType, out IList list)) + { + list = new List(); + declarationOrder.Add(descriptor.ExtendeeType, list); + } + + list.Add(descriptor); + } + + extensionsByTypeInDeclarationOrder = declarationOrder + .ToDictionary(kvp => kvp.Key, kvp => (IList)new ReadOnlyCollection(kvp.Value)); + extensionsByTypeInNumberOrder = declarationOrder + .ToDictionary(kvp => kvp.Key, kvp => (IList)new ReadOnlyCollection(kvp.Value.OrderBy(field => field.FieldNumber).ToArray())); + } + + private sealed class ExtensionCollectionDebugView + { + private readonly ExtensionCollection list; + + public ExtensionCollectionDebugView(ExtensionCollection list) + { + this.list = list; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public FieldDescriptor[] Items => list.UnorderedExtensions.ToArray(); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs.meta new file mode 100644 index 00000000..6ddeac93 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ExtensionCollection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 26de3d08dfa9f324f901d216edda253d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs new file mode 100644 index 00000000..8e4b76aa --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs @@ -0,0 +1,119 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Concurrent; +using static Google.Protobuf.Reflection.FeatureSet.Types; + +namespace Google.Protobuf.Reflection +{ + /// + /// A resolved set of features for a file, message etc. + /// + /// + /// Only features supported by the C# runtime are exposed; currently + /// all enums in C# are open, and we never perform UTF-8 validation. + /// If either of those features are ever implemented in this runtime, + /// the feature settings will be exposed as properties in this class. + /// + internal sealed class FeatureSetDescriptor + { + private static readonly ConcurrentDictionary cache = new(); + + // Note: this approach is deliberately chosen to circumvent bootstrapping issues. + // This can still be tested using the binary representation. + // TODO: Generate this code (as a partial class) from the binary representation. + private static readonly FeatureSetDescriptor edition2023Defaults = new FeatureSetDescriptor( + new FeatureSet + { + EnumType = EnumType.Open, + FieldPresence = FieldPresence.Explicit, + JsonFormat = JsonFormat.Allow, + MessageEncoding = MessageEncoding.LengthPrefixed, + RepeatedFieldEncoding = RepeatedFieldEncoding.Packed, + Utf8Validation = Utf8Validation.Verify, + }); + private static readonly FeatureSetDescriptor proto2Defaults = new FeatureSetDescriptor( + new FeatureSet + { + EnumType = EnumType.Closed, + FieldPresence = FieldPresence.Explicit, + JsonFormat = JsonFormat.LegacyBestEffort, + MessageEncoding = MessageEncoding.LengthPrefixed, + RepeatedFieldEncoding = RepeatedFieldEncoding.Expanded, + Utf8Validation = Utf8Validation.None, + }); + private static readonly FeatureSetDescriptor proto3Defaults = new FeatureSetDescriptor( + new FeatureSet + { + EnumType = EnumType.Open, + FieldPresence = FieldPresence.Implicit, + JsonFormat = JsonFormat.Allow, + MessageEncoding = MessageEncoding.LengthPrefixed, + RepeatedFieldEncoding = RepeatedFieldEncoding.Packed, + Utf8Validation = Utf8Validation.Verify, + }); + + internal static FeatureSetDescriptor GetEditionDefaults(Edition edition) => + edition switch + { + Edition.Proto2 => proto2Defaults, + Edition.Proto3 => proto3Defaults, + Edition._2023 => edition2023Defaults, + _ => throw new ArgumentOutOfRangeException($"Unsupported edition: {edition}") + }; + + // Visible for testing. The underlying feature set proto, usually derived during + // feature resolution. + internal FeatureSet Proto { get; } + + /// + /// Only relevant to fields. Indicates if a field has explicit presence. + /// + internal FieldPresence FieldPresence => Proto.FieldPresence; + + /// + /// Only relevant to fields. Indicates how a repeated field should be encoded. + /// + internal RepeatedFieldEncoding RepeatedFieldEncoding => Proto.RepeatedFieldEncoding; + + /// + /// Only relevant to fields. Indicates how a message-valued field should be encoded. + /// + internal MessageEncoding MessageEncoding => Proto.MessageEncoding; + + private FeatureSetDescriptor(FeatureSet proto) + { + Proto = proto; + } + + /// + /// Returns a new descriptor based on this one, with the specified overrides. + /// Multiple calls to this method that produce equivalent feature sets will return + /// the same instance. + /// + /// The proto representation of the "child" feature set to merge with this + /// one. May be null, in which case this descriptor is returned. + /// A descriptor based on the current one, with the given set of overrides. + public FeatureSetDescriptor MergedWith(FeatureSet overrides) + { + if (overrides is null) + { + return this; + } + + // Note: It would be nice if we could avoid cloning unless + // there are actual changes, but this won't happen that often; + // it'll be temporary garbage. + var clone = Proto.Clone(); + clone.MergeFrom(overrides); + return cache.GetOrAdd(clone, clone => new FeatureSetDescriptor(clone)); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs.meta new file mode 100644 index 00000000..4063605d --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FeatureSetDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f24ad8a5f9b01174694577232332b565 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs new file mode 100644 index 00000000..456a8ad5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs @@ -0,0 +1,40 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Reflection; +using Google.Protobuf.Compatibility; + +namespace Google.Protobuf.Reflection +{ + /// + /// Base class for field accessors. + /// + internal abstract class FieldAccessorBase : IFieldAccessor + { + private readonly Func getValueDelegate; + + internal FieldAccessorBase(PropertyInfo property, FieldDescriptor descriptor) + { + Descriptor = descriptor; + getValueDelegate = ReflectionUtil.CreateFuncIMessageObject(property.GetGetMethod()); + } + + public FieldDescriptor Descriptor { get; } + + public object GetValue(IMessage message) + { + return getValueDelegate(message); + } + + public abstract bool HasValue(IMessage message); + public abstract void Clear(IMessage message); + public abstract void SetValue(IMessage message, object value); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs.meta new file mode 100644 index 00000000..1e26ce72 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldAccessorBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8826ad10e1b2e27489de574a0ca8d755 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs new file mode 100644 index 00000000..0654a25f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -0,0 +1,488 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using Google.Protobuf.Compatibility; +using System; + +namespace Google.Protobuf.Reflection +{ + /// + /// Descriptor for a field or extension within a message in a .proto file. + /// + public sealed class FieldDescriptor : DescriptorBase, IComparable + { + private EnumDescriptor enumType; + private MessageDescriptor extendeeType; + private MessageDescriptor messageType; + private IFieldAccessor accessor; + + /// + /// Get the field's containing message type, or null if it is a field defined at the top level of a file as an extension. + /// + public MessageDescriptor ContainingType { get; } + + /// + /// Returns the oneof containing this field, or null if it is not part of a oneof. + /// + public OneofDescriptor ContainingOneof { get; } + + /// + /// Returns the oneof containing this field if it's a "real" oneof, or null if either this + /// field is not part of a oneof, or the oneof is synthetic. + /// + public OneofDescriptor RealContainingOneof => ContainingOneof?.IsSynthetic == false ? ContainingOneof : null; + + /// + /// The effective JSON name for this field. This is usually the lower-camel-cased form of the field name, + /// but can be overridden using the json_name option in the .proto file. + /// + public string JsonName { get; } + + /// + /// The name of the property in the ContainingType.ClrType class. + /// + public string PropertyName { get; } + + /// + /// Indicates whether this field supports presence, either implicitly (e.g. due to it being a message + /// type field) or explicitly via Has/Clear members. If this returns true, it is safe to call + /// and + /// on this field's accessor with a suitable message. + /// + public bool HasPresence => + Extension != null ? !Extension.IsRepeated + : IsRepeated ? false + : IsMap ? false + : FieldType == FieldType.Message ? true + : FieldType == FieldType.Group ? true + // This covers "real oneof members" and "proto3 optional fields" + : ContainingOneof != null ? true + : Features.FieldPresence != FeatureSet.Types.FieldPresence.Implicit; + + internal FieldDescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this field. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this field descriptor. + public FieldDescriptorProto ToProto() => Proto.Clone(); + + /// + /// An extension identifier for this field, or null if this field isn't an extension. + /// + public Extension Extension { get; } + + internal FieldDescriptor(FieldDescriptorProto proto, FileDescriptor file, + MessageDescriptor parent, int index, string propertyName, Extension extension) + : base(file, file.ComputeFullName(parent, proto.Name), index, + GetDirectParentFeatures(proto, file, parent).MergedWith(InferFeatures(file, proto)).MergedWith(proto.Options?.Features)) + { + Proto = proto; + if (proto.HasType) + { + FieldType = GetFieldTypeFromProtoType(proto.Type); + if (FieldType == FieldType.Message && + Features.MessageEncoding == FeatureSet.Types.MessageEncoding.Delimited) + { + FieldType = FieldType.Group; + } + } + + if (FieldNumber <= 0) + { + throw new DescriptorValidationException(this, "Field numbers must be positive integers."); + } + ContainingType = parent; + if (proto.HasOneofIndex) + { + if (proto.OneofIndex < 0 || proto.OneofIndex >= parent.Proto.OneofDecl.Count) + { + throw new DescriptorValidationException(this, + $"FieldDescriptorProto.oneof_index is out of range for type {parent.Name}"); + } + ContainingOneof = parent.Oneofs[proto.OneofIndex]; + } + + file.DescriptorPool.AddSymbol(this); + // We can't create the accessor until we've cross-linked, unfortunately, as we + // may not know whether the type of the field is a map or not. Remember the property name + // for later. + // We could trust the generated code and check whether the type of the property is + // a MapField, but that feels a tad nasty. + PropertyName = propertyName; + Extension = extension; + JsonName = Proto.JsonName == "" ? JsonFormatter.ToJsonName(Proto.Name) : Proto.JsonName; + } + + /// + /// Returns the features from the direct parent: + /// - The file for top-level extensions + /// - The oneof for one-of fields + /// - Otherwise the message + /// + private static FeatureSetDescriptor GetDirectParentFeatures(FieldDescriptorProto proto, FileDescriptor file, MessageDescriptor parent) => + parent is null ? file.Features + // Ignore invalid oneof indexes here; they'll be validated later anyway. + : proto.OneofIndex >= 0 && proto.OneofIndex < parent.Proto.OneofDecl.Count ? parent.Oneofs[proto.OneofIndex].Features + : parent.Features; + + /// + /// Returns a feature set with inferred features for the given field, or null if no features + /// need to be inferred. + /// + private static FeatureSet InferFeatures(FileDescriptor file, FieldDescriptorProto proto) + { + if ((int) file.Edition >= (int) Edition._2023) + { + return null; + } + // This is lazily initialized, as most fields won't need it. + FeatureSet features = null; + if (proto.Label == FieldDescriptorProto.Types.Label.Required) + { + features ??= new FeatureSet(); + features.FieldPresence = FeatureSet.Types.FieldPresence.LegacyRequired; + } + if (proto.Type == FieldDescriptorProto.Types.Type.Group) + { + features ??= new FeatureSet(); + features.MessageEncoding = FeatureSet.Types.MessageEncoding.Delimited; + } + if (file.Edition == Edition.Proto2 && (proto.Options?.Packed ?? false)) + { + features ??= new FeatureSet(); + features.RepeatedFieldEncoding = FeatureSet.Types.RepeatedFieldEncoding.Packed; + } + if (file.Edition == Edition.Proto3 && !(proto.Options?.Packed ?? true)) + { + features ??= new FeatureSet(); + features.RepeatedFieldEncoding = FeatureSet.Types.RepeatedFieldEncoding.Expanded; + } + return features; + } + + /// + /// The brief name of the descriptor's target. + /// + public override string Name => Proto.Name; + + /// + /// Returns the accessor for this field. + /// + /// + /// + /// While a describes the field, it does not provide + /// any way of obtaining or changing the value of the field within a specific message; + /// that is the responsibility of the accessor. + /// + /// + /// In descriptors for generated code, the value returned by this property will be non-null for all + /// regular fields. However, if a message containing a map field is introspected, the list of nested messages will include + /// an auto-generated nested key/value pair message for the field. This is not represented in any + /// generated type, and the value of the map field itself is represented by a dictionary in the + /// reflection API. There are never instances of those "hidden" messages, so no accessor is provided + /// and this property will return null. + /// + /// + /// In dynamically loaded descriptors, the value returned by this property will current be null; + /// if and when dynamic messages are supported, it will return a suitable accessor to work with + /// them. + /// + /// + public IFieldAccessor Accessor => accessor; + + /// + /// Maps a field type as included in the .proto file to a FieldType. + /// + private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Type type) + { + return type switch + { + FieldDescriptorProto.Types.Type.Double => FieldType.Double, + FieldDescriptorProto.Types.Type.Float => FieldType.Float, + FieldDescriptorProto.Types.Type.Int64 => FieldType.Int64, + FieldDescriptorProto.Types.Type.Uint64 => FieldType.UInt64, + FieldDescriptorProto.Types.Type.Int32 => FieldType.Int32, + FieldDescriptorProto.Types.Type.Fixed64 => FieldType.Fixed64, + FieldDescriptorProto.Types.Type.Fixed32 => FieldType.Fixed32, + FieldDescriptorProto.Types.Type.Bool => FieldType.Bool, + FieldDescriptorProto.Types.Type.String => FieldType.String, + FieldDescriptorProto.Types.Type.Group => FieldType.Group, + FieldDescriptorProto.Types.Type.Message => FieldType.Message, + FieldDescriptorProto.Types.Type.Bytes => FieldType.Bytes, + FieldDescriptorProto.Types.Type.Uint32 => FieldType.UInt32, + FieldDescriptorProto.Types.Type.Enum => FieldType.Enum, + FieldDescriptorProto.Types.Type.Sfixed32 => FieldType.SFixed32, + FieldDescriptorProto.Types.Type.Sfixed64 => FieldType.SFixed64, + FieldDescriptorProto.Types.Type.Sint32 => FieldType.SInt32, + FieldDescriptorProto.Types.Type.Sint64 => FieldType.SInt64, + _ => throw new ArgumentException("Invalid type specified"), + }; + } + + /// + /// Returns true if this field is a repeated field; false otherwise. + /// + public bool IsRepeated => Proto.Label == FieldDescriptorProto.Types.Label.Repeated; + + /// + /// Returns true if this field is a required field; false otherwise. + /// + public bool IsRequired => Features.FieldPresence == FeatureSet.Types.FieldPresence.LegacyRequired; + + /// + /// Returns true if this field is a map field; false otherwise. + /// + public bool IsMap => FieldType == FieldType.Message && messageType.IsMapEntry; + + /// + /// Returns true if this field is a packed, repeated field; false otherwise. + /// + public bool IsPacked => Features.RepeatedFieldEncoding == FeatureSet.Types.RepeatedFieldEncoding.Packed; + + /// + /// Returns true if this field extends another message type; false otherwise. + /// + public bool IsExtension => Proto.HasExtendee; + + /// + /// Returns the type of the field. + /// + public FieldType FieldType { get; private set; } + + /// + /// Returns the field number declared in the proto file. + /// + public int FieldNumber => Proto.Number; + + /// + /// Compares this descriptor with another one, ordering in "canonical" order + /// which simply means ascending order by field number. + /// must be a field of the same type, i.e. the of + /// both fields must be the same. + /// + public int CompareTo(FieldDescriptor other) + { + if (other.ContainingType != ContainingType) + { + throw new ArgumentException("FieldDescriptors can only be compared to other FieldDescriptors " + + "for fields of the same message type."); + } + return FieldNumber - other.FieldNumber; + } + + /// + /// For enum fields, returns the field's type. + /// + public EnumDescriptor EnumType + { + get + { + if (FieldType != FieldType.Enum) + { + throw new InvalidOperationException("EnumType is only valid for enum fields."); + } + return enumType; + } + } + + /// + /// For embedded message and group fields, returns the field's type. + /// + public MessageDescriptor MessageType + { + get + { + if (FieldType != FieldType.Message && FieldType != FieldType.Group) + { + throw new InvalidOperationException("MessageType is only valid for message or group fields."); + } + return messageType; + } + } + + /// + /// For extension fields, returns the extended type + /// + public MessageDescriptor ExtendeeType + { + get + { + if (!Proto.HasExtendee) + { + throw new InvalidOperationException("ExtendeeType is only valid for extension fields."); + } + return extendeeType; + } + } + + /// + /// The (possibly empty) set of custom options for this field. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The FieldOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public FieldOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value field option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value field option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + + /// + /// Look up and cross-link all field types etc. + /// + internal void CrossLink() + { + if (Proto.HasTypeName) + { + IDescriptor typeDescriptor = + File.DescriptorPool.LookupSymbol(Proto.TypeName, this); + + // In most cases, the type will be specified in the descriptor proto. This may be + // guaranteed in descriptor.proto in the future (with respect to spring 2024), but + // we may still see older descriptors created by old versions of protoc, and there + // may be some code creating descriptor protos directly. This code effectively + // maintains backward compatibility, but we don't expect it to be a path taken + // often at all. + if (!Proto.HasType) + { + // Choose field type based on symbol. + if (typeDescriptor is MessageDescriptor) + { + FieldType = + Features.MessageEncoding == FeatureSet.Types.MessageEncoding.Delimited + ? FieldType.Group + : FieldType.Message; + } + else if (typeDescriptor is EnumDescriptor) + { + FieldType = FieldType.Enum; + } + else + { + throw new DescriptorValidationException(this, $"\"{Proto.TypeName}\" is not a type."); + } + } + + if (FieldType == FieldType.Message || FieldType == FieldType.Group) + { + if (typeDescriptor is not MessageDescriptor m) + { + throw new DescriptorValidationException(this, $"\"{Proto.TypeName}\" is not a message type."); + } + messageType = m; + if (m.Proto.Options?.MapEntry == true || ContainingType?.Proto.Options?.MapEntry == true) + { + // Maps can't inherit delimited encoding. + FieldType = FieldType.Message; + } + + if (Proto.HasDefaultValue) + { + throw new DescriptorValidationException(this, "Messages can't have default values."); + } + } + else if (FieldType == FieldType.Enum) + { + if (typeDescriptor is not EnumDescriptor e) + { + throw new DescriptorValidationException(this, $"\"{Proto.TypeName}\" is not an enum type."); + } + enumType = e; + } + else + { + throw new DescriptorValidationException(this, "Field with primitive type has type_name."); + } + } + else + { + if (FieldType == FieldType.Message || FieldType == FieldType.Enum) + { + throw new DescriptorValidationException(this, "Field with message or enum type missing type_name."); + } + } + + if (Proto.HasExtendee) + { + extendeeType = File.DescriptorPool.LookupSymbol(Proto.Extendee, this) as MessageDescriptor; + } + + // Note: no attempt to perform any default value parsing + + File.DescriptorPool.AddFieldByNumber(this); + + if (ContainingType != null && ContainingType.Proto.Options != null && ContainingType.Proto.Options.MessageSetWireFormat) + { + throw new DescriptorValidationException(this, "MessageSet format is not supported."); + } + accessor = CreateAccessor(); + } + + private IFieldAccessor CreateAccessor() + { + if (Extension != null) + { + return new ExtensionAccessor(this); + } + + // If we're given no property name, that's because we really don't want an accessor. + // This could be because it's a map message, or it could be that we're loading a FileDescriptor dynamically. + // TODO: Support dynamic messages. + if (PropertyName == null) + { + return null; + } + + var property = ContainingType.ClrType.GetProperty(PropertyName); + if (property == null) + { + throw new DescriptorValidationException(this, $"Property {PropertyName} not found in {ContainingType.ClrType}"); + } + return IsMap ? new MapFieldAccessor(property, this) + : IsRepeated ? new RepeatedFieldAccessor(property, this) + : (IFieldAccessor) new SingleFieldAccessor(ContainingType.ClrType, property, this); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs.meta new file mode 100644 index 00000000..40fae77a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0f2007b20c145b04ca1de5f548afe7ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs new file mode 100644 index 00000000..623f21e6 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs @@ -0,0 +1,90 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf.Reflection +{ + /// + /// Enumeration of all the possible field types. + /// + public enum FieldType + { + /// + /// The double field type. + /// + Double, + /// + /// The float field type. + /// + Float, + /// + /// The int64 field type. + /// + Int64, + /// + /// The uint64 field type. + /// + UInt64, + /// + /// The int32 field type. + /// + Int32, + /// + /// The fixed64 field type. + /// + Fixed64, + /// + /// The fixed32 field type. + /// + Fixed32, + /// + /// The bool field type. + /// + Bool, + /// + /// The string field type. + /// + String, + /// + /// The field type used for groups. + /// + Group, + /// + /// The field type used for message fields. + /// + Message, + /// + /// The bytes field type. + /// + Bytes, + /// + /// The uint32 field type. + /// + UInt32, + /// + /// The sfixed32 field type. + /// + SFixed32, + /// + /// The sfixed64 field type. + /// + SFixed64, + /// + /// The sint32 field type. + /// + SInt32, + /// + /// The sint64 field type. + /// + SInt64, + /// + /// The field type used for enum fields. + /// + Enum + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs.meta new file mode 100644 index 00000000..dd793d1f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FieldType.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2b24273c27044554bafbe4a123b6a241 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs new file mode 100644 index 00000000..c7b307b1 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs @@ -0,0 +1,614 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using Google.Protobuf.WellKnownTypes; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Threading; +using static Google.Protobuf.Reflection.SourceCodeInfo.Types; + +namespace Google.Protobuf.Reflection +{ + /// + /// The syntax of a .proto file + /// + [Obsolete("Use features instead")] + public enum Syntax + { + /// + /// Proto2 syntax + /// + Proto2, + /// + /// Proto3 syntax + /// + Proto3, + /// + /// Editions syntax + /// + Editions, + /// + /// An unknown declared syntax + /// + Unknown + } + + /// + /// Describes a .proto file, including everything defined within. + /// IDescriptor is implemented such that the File property returns this descriptor, + /// and the FullName is the same as the Name. + /// + public sealed class FileDescriptor : IDescriptor + { + // Prevent linker failures when using IL2CPP with the well-known types. + static FileDescriptor() + { +#pragma warning disable CS0618 // Type or member is obsolete + ForceReflectionInitialization(); +#pragma warning restore CS0618 // Type or member is obsolete + ForceReflectionInitialization(); + ForceReflectionInitialization(); + ForceReflectionInitialization(); + ForceReflectionInitialization(); + } + + private readonly Lazy> declarations; + + private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, IEnumerable dependencies, DescriptorPool pool, bool allowUnknownDependencies, GeneratedClrTypeInfo generatedCodeInfo) + { + SerializedData = descriptorData; + DescriptorPool = pool; + Proto = proto; + // Note: the Edition property relies on the proto being set first, so this line + // has to come after Proto = proto. + Features = FeatureSetDescriptor.GetEditionDefaults(Edition).MergedWith(proto.Options?.Features); + Dependencies = new ReadOnlyCollection(dependencies.ToList()); + + PublicDependencies = DeterminePublicDependencies(this, proto, dependencies, allowUnknownDependencies); + + pool.AddPackage(Package, this); + + MessageTypes = DescriptorUtil.ConvertAndMakeReadOnly(proto.MessageType, + (message, index) => + new MessageDescriptor(message, this, null, index, generatedCodeInfo?.NestedTypes[index])); + + EnumTypes = DescriptorUtil.ConvertAndMakeReadOnly(proto.EnumType, + (enumType, index) => + new EnumDescriptor(enumType, this, null, index, generatedCodeInfo?.NestedEnums[index])); + + Services = DescriptorUtil.ConvertAndMakeReadOnly(proto.Service, + (service, index) => + new ServiceDescriptor(service, this, index)); + + Extensions = new ExtensionCollection(this, generatedCodeInfo?.Extensions); + + declarations = new Lazy>(CreateDeclarationMap, LazyThreadSafetyMode.ExecutionAndPublication); + } + + private Dictionary CreateDeclarationMap() + { + var dictionary = new Dictionary(); + foreach (var location in Proto.SourceCodeInfo?.Location ?? Enumerable.Empty()) + { + var descriptor = FindDescriptorForPath(location.Path); + if (descriptor != null) + { + dictionary[descriptor] = DescriptorDeclaration.FromProto(descriptor, location); + } + } + return dictionary; + } + + private IDescriptor FindDescriptorForPath(IList path) + { + // All complete declarations have an even, non-empty path length + // (There can be an empty path for a descriptor declaration, but that can't have any comments, + // so we currently ignore it.) + if (path.Count == 0 || (path.Count & 1) != 0) + { + return null; + } + IReadOnlyList topLevelList = GetNestedDescriptorListForField(path[0]); + DescriptorBase current = GetDescriptorFromList(topLevelList, path[1]); + + for (int i = 2; current != null && i < path.Count; i += 2) + { + var list = current.GetNestedDescriptorListForField(path[i]); + current = GetDescriptorFromList(list, path[i + 1]); + } + return current; + } + + private DescriptorBase GetDescriptorFromList(IReadOnlyList list, int index) + { + // This is fine: it may be a newer version of protobuf than we understand, with a new descriptor + // field. + if (list == null) + { + return null; + } + // We *could* return null to silently continue, but this is basically data corruption. + if (index < 0 || index >= list.Count) + { + // We don't have much extra information to give at this point unfortunately. If this becomes a problem, + // we can pass in the complete path and report that and the file name. + throw new InvalidProtocolBufferException($"Invalid descriptor location path: index out of range"); + } + return list[index]; + } + + private IReadOnlyList GetNestedDescriptorListForField(int fieldNumber) => + fieldNumber switch + { + FileDescriptorProto.ServiceFieldNumber => (IReadOnlyList)Services, + FileDescriptorProto.MessageTypeFieldNumber => (IReadOnlyList)MessageTypes, + FileDescriptorProto.EnumTypeFieldNumber => (IReadOnlyList)EnumTypes, + _ => null, + }; + + internal DescriptorDeclaration GetDeclaration(IDescriptor descriptor) + { + declarations.Value.TryGetValue(descriptor, out DescriptorDeclaration declaration); + return declaration; + } + + /// + /// Computes the full name of a descriptor within this file, with an optional parent message. + /// + internal string ComputeFullName(MessageDescriptor parent, string name) + { + if (parent != null) + { + return parent.FullName + "." + name; + } + if (Package.Length > 0) + { + return Package + "." + name; + } + return name; + } + + /// + /// Extracts public dependencies from direct dependencies. This is a static method despite its + /// first parameter, as the value we're in the middle of constructing is only used for exceptions. + /// + private static IList DeterminePublicDependencies(FileDescriptor @this, FileDescriptorProto proto, IEnumerable dependencies, bool allowUnknownDependencies) + { + var nameToFileMap = dependencies.ToDictionary(file => file.Name); + var publicDependencies = new List(); + for (int i = 0; i < proto.PublicDependency.Count; i++) + { + int index = proto.PublicDependency[i]; + if (index < 0 || index >= proto.Dependency.Count) + { + throw new DescriptorValidationException(@this, "Invalid public dependency index."); + } + string name = proto.Dependency[index]; + if (!nameToFileMap.TryGetValue(name, out FileDescriptor file)) + { + if (!allowUnknownDependencies) + { + throw new DescriptorValidationException(@this, "Invalid public dependency: " + name); + } + // Ignore unknown dependencies. + } + else + { + publicDependencies.Add(file); + } + } + return new ReadOnlyCollection(publicDependencies); + } + + /// + /// The descriptor in its protocol message representation. + /// + internal FileDescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this file. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this file descriptor. + public FileDescriptorProto ToProto() => Proto.Clone(); + + /// + /// The feature set for this file, including inherited features. + /// + internal FeatureSetDescriptor Features { get; } + + /// + /// Returns the edition of the file descriptor. + /// + internal Edition Edition => Proto.Syntax switch + { + "editions" => Proto.Edition, + "proto3" => Edition.Proto3, + _ => Edition.Proto2 + }; + + /// + /// The syntax of the file. + /// + [Obsolete("Use features instead of proto syntax.")] + public Syntax Syntax => Proto.HasEdition ? Syntax.Editions + : Proto.Syntax switch + { + "proto3" => Syntax.Proto3, + "proto2" => Syntax.Proto2, + "" => Syntax.Proto2, + _ => throw new InvalidOperationException("No edition or known syntax present") + }; + + /// + /// The file name. + /// + public string Name => Proto.Name; + + /// + /// The package as declared in the .proto file. This may or may not + /// be equivalent to the .NET namespace of the generated classes. + /// + public string Package => Proto.Package; + + /// + /// Unmodifiable list of top-level message types declared in this file. + /// + public IList MessageTypes { get; } + + /// + /// Unmodifiable list of top-level enum types declared in this file. + /// + public IList EnumTypes { get; } + + /// + /// Unmodifiable list of top-level services declared in this file. + /// + public IList Services { get; } + + /// + /// Unmodifiable list of top-level extensions declared in this file. + /// Note that some extensions may be incomplete (FieldDescriptor.Extension may be null) + /// if this descriptor was generated using a version of protoc that did not fully + /// support extensions in C#. + /// + public ExtensionCollection Extensions { get; } + + /// + /// Unmodifiable list of this file's dependencies (imports). + /// + public IList Dependencies { get; } + + /// + /// Unmodifiable list of this file's public dependencies (public imports). + /// + public IList PublicDependencies { get; } + + /// + /// The original serialized binary form of this descriptor. + /// + public ByteString SerializedData { get; } + + /// + /// Implementation of IDescriptor.FullName - just returns the same as Name. + /// + string IDescriptor.FullName => Name; + + /// + /// Implementation of IDescriptor.File - just returns this descriptor. + /// + FileDescriptor IDescriptor.File => this; + + /// + /// Pool containing symbol descriptors. + /// + internal DescriptorPool DescriptorPool { get; } + + /// + /// Finds a type (message, enum, service or extension) in the file by name. Does not find nested types. + /// + /// The unqualified type name to look for. + /// The type of descriptor to look for + /// The type's descriptor, or null if not found. + public T FindTypeByName(string name) + where T : class, IDescriptor + { + // Don't allow looking up nested types. This will make optimization + // easier later. + if (name.IndexOf('.') != -1) + { + return null; + } + if (Package.Length > 0) + { + name = Package + "." + name; + } + T result = DescriptorPool.FindSymbol(name); + if (result != null && result.File == this) + { + return result; + } + return null; + } + + /// + /// Builds a FileDescriptor from its protocol buffer representation. + /// + /// The original serialized descriptor data. + /// We have only limited proto2 support, so serializing FileDescriptorProto + /// would not necessarily give us this. + /// The protocol message form of the FileDescriptor. + /// FileDescriptors corresponding to all of the + /// file's dependencies, in the exact order listed in the .proto file. May be null, + /// in which case it is treated as an empty array. + /// Whether unknown dependencies are ignored (true) or cause an exception to be thrown (false). + /// Details about generated code, for the purposes of reflection. + /// If is not + /// a valid descriptor. This can occur for a number of reasons, such as a field + /// having an undefined type or because two messages were defined with the same name. + private static FileDescriptor BuildFrom(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies, GeneratedClrTypeInfo generatedCodeInfo) + { + // Building descriptors involves two steps: translating and linking. + // In the translation step (implemented by FileDescriptor's + // constructor), we build an object tree mirroring the + // FileDescriptorProto's tree and put all of the descriptors into the + // DescriptorPool's lookup tables. In the linking step, we look up all + // type references in the DescriptorPool, so that, for example, a + // FieldDescriptor for an embedded message contains a pointer directly + // to the Descriptor for that message's type. We also detect undefined + // types in the linking step. + if (dependencies == null) + { + dependencies = new FileDescriptor[0]; + } + + DescriptorPool pool = new DescriptorPool(dependencies); + FileDescriptor result = new FileDescriptor(descriptorData, proto, dependencies, pool, allowUnknownDependencies, generatedCodeInfo); + + // Validate that the dependencies we've been passed (as FileDescriptors) are actually the ones we + // need. + if (dependencies.Length != proto.Dependency.Count) + { + throw new DescriptorValidationException( + result, + "Dependencies passed to FileDescriptor.BuildFrom() don't match " + + "those listed in the FileDescriptorProto."); + } + + result.CrossLink(); + return result; + } + + private void CrossLink() + { + foreach (MessageDescriptor message in MessageTypes) + { + message.CrossLink(); + } + + foreach (ServiceDescriptor service in Services) + { + service.CrossLink(); + } + + Extensions.CrossLink(); + } + + /// + /// Creates a descriptor for generated code. + /// + /// + /// This method is only designed to be used by the results of generating code with protoc, + /// which creates the appropriate dependencies etc. It has to be public because the generated + /// code is "external", but should not be called directly by end users. + /// + public static FileDescriptor FromGeneratedCode( + byte[] descriptorData, + FileDescriptor[] dependencies, + GeneratedClrTypeInfo generatedCodeInfo) + { + ExtensionRegistry registry = new ExtensionRegistry(); + registry.AddRange(GetAllExtensions(dependencies, generatedCodeInfo)); + + FileDescriptorProto proto; + try + { + proto = FileDescriptorProto.Parser.WithExtensionRegistry(registry).ParseFrom(descriptorData); + } + catch (InvalidProtocolBufferException e) + { + throw new ArgumentException("Failed to parse protocol buffer descriptor for generated code.", e); + } + + try + { + // When building descriptors for generated code, we allow unknown + // dependencies by default. + return BuildFrom(ByteString.CopyFrom(descriptorData), proto, dependencies, true, generatedCodeInfo); + } + catch (DescriptorValidationException e) + { + throw new ArgumentException($"Invalid embedded descriptor for \"{proto.Name}\".", e); + } + } + + private static IEnumerable GetAllExtensions(FileDescriptor[] dependencies, GeneratedClrTypeInfo generatedInfo) + { + return dependencies.SelectMany(GetAllDependedExtensions).Distinct(ExtensionRegistry.ExtensionComparer.Instance).Concat(GetAllGeneratedExtensions(generatedInfo)); + } + + private static IEnumerable GetAllGeneratedExtensions(GeneratedClrTypeInfo generated) + { + return generated.Extensions.Concat(generated.NestedTypes.Where(t => t != null).SelectMany(GetAllGeneratedExtensions)); + } + + private static IEnumerable GetAllDependedExtensions(FileDescriptor descriptor) + { + return descriptor.Extensions.UnorderedExtensions + .Select(s => s.Extension) + .Where(e => e != null) + .Concat(descriptor.Dependencies.Concat(descriptor.PublicDependencies).SelectMany(GetAllDependedExtensions)) + .Concat(descriptor.MessageTypes.SelectMany(GetAllDependedExtensionsFromMessage)); + } + + private static IEnumerable GetAllDependedExtensionsFromMessage(MessageDescriptor descriptor) + { + return descriptor.Extensions.UnorderedExtensions + .Select(s => s.Extension) + .Where(e => e != null) + .Concat(descriptor.NestedTypes.SelectMany(GetAllDependedExtensionsFromMessage)); + } + + /// + /// Converts the given descriptor binary data into FileDescriptor objects. + /// Note: reflection using the returned FileDescriptors is not currently supported. + /// + /// The binary file descriptor proto data. Must not be null, and any + /// dependencies must come before the descriptor which depends on them. (If A depends on B, and B + /// depends on C, then the descriptors must be presented in the order C, B, A.) This is compatible + /// with the order in which protoc provides descriptors to plugins. + /// The extension registry to use when parsing, or null if no extensions are required. + /// The file descriptors corresponding to . + public static IReadOnlyList BuildFromByteStrings(IEnumerable descriptorData, ExtensionRegistry registry) + { + ProtoPreconditions.CheckNotNull(descriptorData, nameof(descriptorData)); + + var parser = FileDescriptorProto.Parser.WithExtensionRegistry(registry); + + // TODO: See if we can build a single DescriptorPool instead of building lots of them. + // This will all behave correctly, but it's less efficient than we'd like. + var descriptors = new List(); + var descriptorsByName = new Dictionary(); + foreach (var data in descriptorData) + { + var proto = parser.ParseFrom(data); + var dependencies = new List(); + foreach (var dependencyName in proto.Dependency) + { + if (!descriptorsByName.TryGetValue(dependencyName, out FileDescriptor dependency)) + { + throw new ArgumentException($"Dependency missing: {dependencyName}"); + } + dependencies.Add(dependency); + } + var pool = new DescriptorPool(dependencies); + FileDescriptor descriptor = new FileDescriptor( + data, proto, dependencies, pool, + allowUnknownDependencies: false, generatedCodeInfo: null); + descriptor.CrossLink(); + descriptors.Add(descriptor); + if (descriptorsByName.ContainsKey(descriptor.Name)) + { + throw new ArgumentException($"Duplicate descriptor name: {descriptor.Name}"); + } + descriptorsByName.Add(descriptor.Name, descriptor); + } + return new ReadOnlyCollection(descriptors); + } + + /// + /// Converts the given descriptor binary data into FileDescriptor objects. + /// Note: reflection using the returned FileDescriptors is not currently supported. + /// + /// The binary file descriptor proto data. Must not be null, and any + /// dependencies must come before the descriptor which depends on them. (If A depends on B, and B + /// depends on C, then the descriptors must be presented in the order C, B, A.) This is compatible + /// with the order in which protoc provides descriptors to plugins. + /// The file descriptors corresponding to . + public static IReadOnlyList BuildFromByteStrings(IEnumerable descriptorData) => + BuildFromByteStrings(descriptorData, null); + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return $"FileDescriptor for {Name}"; + } + + /// + /// Returns the file descriptor for descriptor.proto. + /// + /// + /// This is used for protos which take a direct dependency on descriptor.proto, typically for + /// annotations. While descriptor.proto is a proto2 file, it is built into the Google.Protobuf + /// runtime for reflection purposes. The messages are internal to the runtime as they would require + /// proto2 semantics for full support, but the file descriptor is available via this property. The + /// C# codegen in protoc automatically uses this property when it detects a dependency on descriptor.proto. + /// + /// + /// The file descriptor for descriptor.proto. + /// + public static FileDescriptor DescriptorProtoFileDescriptor => DescriptorReflection.Descriptor; + + /// + /// The (possibly empty) set of custom options for this file. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The FileOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public FileOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value file option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value file option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + + /// + /// Performs initialization for the given generic type argument. + /// + /// + /// This method is present for the sake of AOT compilers. It allows code (whether handwritten or generated) + /// to make calls into the reflection machinery of this library to express an intention to use that type + /// reflectively (e.g. for JSON parsing and formatting). The call itself does almost nothing, but AOT compilers + /// attempting to determine which generic type arguments need to be handled will spot the code path and act + /// accordingly. + /// + /// The type to force initialization for. + public static void ForceReflectionInitialization() => ReflectionUtil.ForceInitialize(); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs.meta new file mode 100644 index 00000000..ce12c75f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/FileDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 652ba59f0d638064ea28b86a4a00ff18 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs new file mode 100644 index 00000000..a4748c53 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs @@ -0,0 +1,126 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; + +namespace Google.Protobuf.Reflection +{ + /// + /// Extra information provided by generated code when initializing a message or file descriptor. + /// These are constructed as required, and are not long-lived. Hand-written code should + /// never need to use this type. + /// + [DebuggerDisplay("ClrType = {ClrType}")] + public sealed class GeneratedClrTypeInfo + { + private static readonly string[] EmptyNames = new string[0]; + private static readonly GeneratedClrTypeInfo[] EmptyCodeInfo = new GeneratedClrTypeInfo[0]; + private static readonly Extension[] EmptyExtensions = new Extension[0]; + internal const DynamicallyAccessedMemberTypes MessageAccessibility = + // Creating types + DynamicallyAccessedMemberTypes.PublicConstructors | + // Getting and setting properties + DynamicallyAccessedMemberTypes.PublicProperties | + DynamicallyAccessedMemberTypes.NonPublicProperties | + // Calling presence methods + DynamicallyAccessedMemberTypes.PublicMethods; + + /// + /// Irrelevant for file descriptors; the CLR type for the message for message descriptors. + /// + [DynamicallyAccessedMembers(MessageAccessibility)] + public Type ClrType { get; } + + /// + /// Irrelevant for file descriptors; the parser for message descriptors. + /// + public MessageParser Parser { get; } + + /// + /// Irrelevant for file descriptors; the CLR property names (in message descriptor field order) + /// for fields in the message for message descriptors. + /// + public string[] PropertyNames { get; } + + /// + /// The extensions defined within this file/message descriptor + /// + public Extension[] Extensions { get; } + + /// + /// Irrelevant for file descriptors; the CLR property "base" names (in message descriptor oneof order) + /// for oneofs in the message for message descriptors. It is expected that for a oneof name of "Foo", + /// there will be a "FooCase" property and a "ClearFoo" method. + /// + public string[] OneofNames { get; } + + /// + /// The reflection information for types within this file/message descriptor. Elements may be null + /// if there is no corresponding generated type, e.g. for map entry types. + /// + public GeneratedClrTypeInfo[] NestedTypes { get; } + + /// + /// The CLR types for enums within this file/message descriptor. + /// + public Type[] NestedEnums { get; } + + /// + /// Creates a GeneratedClrTypeInfo for a message descriptor, with nested types, nested enums, the CLR type, property names and oneof names. + /// Each array parameter may be null, to indicate a lack of values. + /// The parameter order is designed to make it feasible to format the generated code readably. + /// + public GeneratedClrTypeInfo( + // Preserve all public members on message types when trimming is enabled. + // This ensures that members used by reflection, e.g. JSON serialization, are preserved. + [DynamicallyAccessedMembers(MessageAccessibility)] + Type clrType, MessageParser parser, string[] propertyNames, string[] oneofNames, Type[] nestedEnums, Extension[] extensions, GeneratedClrTypeInfo[] nestedTypes) + { + NestedTypes = nestedTypes ?? EmptyCodeInfo; + NestedEnums = nestedEnums ?? ReflectionUtil.EmptyTypes; + ClrType = clrType; + Extensions = extensions ?? EmptyExtensions; + Parser = parser; + PropertyNames = propertyNames ?? EmptyNames; + OneofNames = oneofNames ?? EmptyNames; + } + + /// + /// Creates a GeneratedClrTypeInfo for a message descriptor, with nested types, nested enums, the CLR type, property names and oneof names. + /// Each array parameter may be null, to indicate a lack of values. + /// The parameter order is designed to make it feasible to format the generated code readably. + /// + public GeneratedClrTypeInfo( + // Preserve all public members on message types when trimming is enabled. + // This ensures that members used by reflection, e.g. JSON serialization, are preserved. + [DynamicallyAccessedMembers(MessageAccessibility)] + Type clrType, MessageParser parser, string[] propertyNames, string[] oneofNames, Type[] nestedEnums, GeneratedClrTypeInfo[] nestedTypes) + : this(clrType, parser, propertyNames, oneofNames, nestedEnums, null, nestedTypes) + { + } + + /// + /// Creates a GeneratedClrTypeInfo for a file descriptor, with only types, enums, and extensions. + /// + public GeneratedClrTypeInfo(Type[] nestedEnums, Extension[] extensions, GeneratedClrTypeInfo[] nestedTypes) + : this(null, null, null, null, nestedEnums, extensions, nestedTypes) + { + } + + /// + /// Creates a GeneratedClrTypeInfo for a file descriptor, with only types and enums. + /// + public GeneratedClrTypeInfo(Type[] nestedEnums, GeneratedClrTypeInfo[] nestedTypes) + : this(null, null, null, null, nestedEnums, nestedTypes) + { + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs.meta new file mode 100644 index 00000000..a364ef4a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/GeneratedClrTypeInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 422e527822f68ad4883d8bde5430a31d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs new file mode 100644 index 00000000..f9d95655 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs @@ -0,0 +1,32 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf.Reflection +{ + /// + /// Interface implemented by all descriptor types. + /// + public interface IDescriptor + { + /// + /// Returns the name of the entity (message, field etc) being described. + /// + string Name { get; } + + /// + /// Returns the fully-qualified name of the entity being described. + /// + string FullName { get; } + + /// + /// Returns the descriptor for the .proto file that this entity is part of. + /// + FileDescriptor File { get; } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs.meta new file mode 100644 index 00000000..edaa9a98 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 97e15047fe201424b93f3d7fdba0e7b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs new file mode 100644 index 00000000..b971148e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs @@ -0,0 +1,54 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; + +namespace Google.Protobuf.Reflection +{ + /// + /// Allows fields to be reflectively accessed. + /// + public interface IFieldAccessor + { + /// + /// Returns the descriptor associated with this field. + /// + FieldDescriptor Descriptor { get; } + + /// + /// Clears the field in the specified message. (For repeated fields, + /// this clears the list.) + /// + void Clear(IMessage message); + + /// + /// Fetches the field value. For repeated values, this will be an + /// implementation. For map values, this will be an + /// implementation. + /// + object GetValue(IMessage message); + + /// + /// Indicates whether the field in the specified message is set. + /// For proto3 fields that aren't explicitly optional, this throws an + /// + bool HasValue(IMessage message); + + /// + /// Mutator for single "simple" fields only. + /// + /// + /// Repeated fields are mutated by fetching the value and manipulating it as a list. + /// Map fields are mutated by fetching the value and manipulating it as a dictionary. + /// + /// The field is not a "simple" field. + void SetValue(IMessage message, object value); + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs.meta new file mode 100644 index 00000000..65c10968 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/IFieldAccessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5147229c28829274db330c4b8cf3e057 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs new file mode 100644 index 00000000..88275e28 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs @@ -0,0 +1,41 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Reflection; + +namespace Google.Protobuf.Reflection +{ + /// + /// Accessor for map fields. + /// + internal sealed class MapFieldAccessor : FieldAccessorBase + { + internal MapFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) : base(property, descriptor) + { + } + + public override void Clear(IMessage message) + { + IDictionary list = (IDictionary) GetValue(message); + list.Clear(); + } + + public override bool HasValue(IMessage message) + { + throw new InvalidOperationException("HasValue is not implemented for map fields"); + } + + public override void SetValue(IMessage message, object value) + { + throw new InvalidOperationException("SetValue is not implemented for map fields"); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs.meta new file mode 100644 index 00000000..062eb225 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MapFieldAccessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f5920f885baed4469ea3dcb4507ab9a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs new file mode 100644 index 00000000..b4b69ad6 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs @@ -0,0 +1,436 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Linq; + +namespace Google.Protobuf.Reflection +{ + /// + /// Describes a message type. + /// + public sealed class MessageDescriptor : DescriptorBase + { + private static readonly HashSet WellKnownTypeNames = new HashSet + { + "google/protobuf/any.proto", + "google/protobuf/api.proto", + "google/protobuf/duration.proto", + "google/protobuf/empty.proto", + "google/protobuf/wrappers.proto", + "google/protobuf/timestamp.proto", + "google/protobuf/field_mask.proto", + "google/protobuf/source_context.proto", + "google/protobuf/struct.proto", + "google/protobuf/type.proto", + }; + + private readonly IList fieldsInDeclarationOrder; + private readonly IList fieldsInNumberOrder; + private readonly IDictionary jsonFieldMap; + private Func extensionSetIsInitialized; + + internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedClrTypeInfo generatedCodeInfo) + : base(file, file.ComputeFullName(parent, proto.Name), typeIndex, (parent?.Features ?? file.Features).MergedWith(proto.Options?.Features)) + { + Proto = proto; + Parser = generatedCodeInfo?.Parser; + ClrType = generatedCodeInfo?.ClrType; + ContainingType = parent; + + // If generatedCodeInfo is null, we just won't generate an accessor for any fields. + Oneofs = DescriptorUtil.ConvertAndMakeReadOnly( + proto.OneofDecl, + (oneof, index) => + new OneofDescriptor(oneof, file, this, index, generatedCodeInfo?.OneofNames[index])); + + int syntheticOneofCount = 0; + foreach (var oneof in Oneofs) + { + if (oneof.IsSynthetic) + { + syntheticOneofCount++; + } + else if (syntheticOneofCount != 0) + { + throw new ArgumentException("All synthetic oneofs should come after real oneofs"); + } + } + RealOneofCount = Oneofs.Count - syntheticOneofCount; + + NestedTypes = DescriptorUtil.ConvertAndMakeReadOnly( + proto.NestedType, + (type, index) => + new MessageDescriptor(type, file, this, index, generatedCodeInfo?.NestedTypes[index])); + + EnumTypes = DescriptorUtil.ConvertAndMakeReadOnly( + proto.EnumType, + (type, index) => + new EnumDescriptor(type, file, this, index, generatedCodeInfo?.NestedEnums[index])); + + Extensions = new ExtensionCollection(this, generatedCodeInfo?.Extensions); + + fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly( + proto.Field, + (field, index) => + new FieldDescriptor(field, file, this, index, generatedCodeInfo?.PropertyNames[index], null)); + fieldsInNumberOrder = new ReadOnlyCollection(fieldsInDeclarationOrder.OrderBy(field => field.FieldNumber).ToArray()); + // TODO: Use field => field.Proto.JsonName when we're confident it's appropriate. (And then use it in the formatter, too.) + jsonFieldMap = CreateJsonFieldMap(fieldsInNumberOrder); + file.DescriptorPool.AddSymbol(this); + Fields = new FieldCollection(this); + } + + private static ReadOnlyDictionary CreateJsonFieldMap(IList fields) + { + var map = new Dictionary(); + // The ordering is important here: JsonName takes priority over Name, + // which means we need to put JsonName values in the map after *all* + // Name keys have been added. See https://github.com/protocolbuffers/protobuf/issues/11987 + foreach (var field in fields) + { + map[field.Name] = field; + } + foreach (var field in fields) + { + map[field.JsonName] = field; + } + return new ReadOnlyDictionary(map); + } + + /// + /// The brief name of the descriptor's target. + /// + public override string Name => Proto.Name; + + internal override IReadOnlyList GetNestedDescriptorListForField(int fieldNumber) => + fieldNumber switch + { + DescriptorProto.FieldFieldNumber => (IReadOnlyList)fieldsInDeclarationOrder, + DescriptorProto.NestedTypeFieldNumber => (IReadOnlyList)NestedTypes, + DescriptorProto.EnumTypeFieldNumber => (IReadOnlyList)EnumTypes, + DescriptorProto.OneofDeclFieldNumber => (IReadOnlyList)Oneofs, + _ => null, + }; + + internal DescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this message. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this message descriptor. + public DescriptorProto ToProto() => Proto.Clone(); + + internal bool IsExtensionsInitialized(IMessage message) + { + if (Proto.ExtensionRange.Count == 0) + { + return true; + } + + if (extensionSetIsInitialized == null) + { + extensionSetIsInitialized = ReflectionUtil.CreateIsInitializedCaller(ClrType); + } + + return extensionSetIsInitialized(message); + } + + /// + /// The CLR type used to represent message instances from this descriptor. + /// + /// + /// + /// The value returned by this property will be non-null for all regular fields. However, + /// if a message containing a map field is introspected, the list of nested messages will include + /// an auto-generated nested key/value pair message for the field. This is not represented in any + /// generated type, so this property will return null in such cases. + /// + /// + /// For wrapper types ( and the like), the type returned here + /// will be the generated message type, not the native type used by reflection for fields of those types. Code + /// using reflection should call to determine whether a message descriptor represents + /// a wrapper type, and handle the result appropriately. + /// + /// + [DynamicallyAccessedMembers(GeneratedClrTypeInfo.MessageAccessibility)] + public Type ClrType { get; } + + /// + /// A parser for this message type. + /// + /// + /// + /// As is not generic, this cannot be statically + /// typed to the relevant type, but it should produce objects of a type compatible with . + /// + /// + /// The value returned by this property will be non-null for all regular fields. However, + /// if a message containing a map field is introspected, the list of nested messages will include + /// an auto-generated nested key/value pair message for the field. No message parser object is created for + /// such messages, so this property will return null in such cases. + /// + /// + /// For wrapper types ( and the like), the parser returned here + /// will be the generated message type, not the native type used by reflection for fields of those types. Code + /// using reflection should call to determine whether a message descriptor represents + /// a wrapper type, and handle the result appropriately. + /// + /// + public MessageParser Parser { get; } + + /// + /// Returns whether this message is one of the "well known types" which may have runtime/protoc support. + /// + internal bool IsWellKnownType => File.Package == "google.protobuf" && WellKnownTypeNames.Contains(File.Name); + + /// + /// Returns whether this message is one of the "wrapper types" used for fields which represent primitive values + /// with the addition of presence. + /// + internal bool IsWrapperType => File.Package == "google.protobuf" && File.Name == "google/protobuf/wrappers.proto"; + + /// + /// Returns whether this message was synthetically-created to store key/value pairs in a + /// map field. + /// + public bool IsMapEntry => Proto.Options?.MapEntry == true; + + /// + /// If this is a nested type, get the outer descriptor, otherwise null. + /// + public MessageDescriptor ContainingType { get; } + + /// + /// A collection of fields, which can be retrieved by name or field number. + /// + public FieldCollection Fields { get; } + + /// + /// An unmodifiable list of extensions defined in this message's scope. + /// Note that some extensions may be incomplete (FieldDescriptor.Extension may be null) + /// if they are declared in a file generated using a version of protoc that did not fully + /// support extensions in C#. + /// + public ExtensionCollection Extensions { get; } + + /// + /// An unmodifiable list of this message type's nested types. + /// + public IList NestedTypes { get; } + + /// + /// An unmodifiable list of this message type's enum types. + /// + public IList EnumTypes { get; } + + /// + /// An unmodifiable list of the "oneof" field collections in this message type. + /// All "real" oneofs (where returns false) + /// come before synthetic ones. + /// + public IList Oneofs { get; } + + /// + /// The number of real "oneof" descriptors in this message type. Every element in + /// with an index less than this will have a property value + /// of false; every element with an index greater than or equal to this will have a + /// property value of true. + /// + public int RealOneofCount { get; } + + /// + /// Finds a field by field name. + /// + /// The unqualified name of the field (e.g. "foo"). + /// The field's descriptor, or null if not found. + public FieldDescriptor FindFieldByName(string name) => File.DescriptorPool.FindSymbol(FullName + "." + name); + + /// + /// Finds a field by field number. + /// + /// The field number within this message type. + /// The field's descriptor, or null if not found. + public FieldDescriptor FindFieldByNumber(int number) => File.DescriptorPool.FindFieldByNumber(this, number); + + /// + /// Finds a nested descriptor by name. The is valid for fields, nested + /// message types, oneofs and enums. + /// + /// The unqualified name of the descriptor, e.g. "Foo" + /// The descriptor, or null if not found. + public T FindDescriptor(string name) where T : class, IDescriptor => + File.DescriptorPool.FindSymbol(FullName + "." + name); + + /// + /// The (possibly empty) set of custom options for this message. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The MessageOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public MessageOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value message option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value message option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public Collections.RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + + /// + /// Looks up and cross-links all fields and nested types. + /// + internal void CrossLink() + { + foreach (MessageDescriptor message in NestedTypes) + { + message.CrossLink(); + } + + foreach (FieldDescriptor field in fieldsInDeclarationOrder) + { + field.CrossLink(); + } + + foreach (OneofDescriptor oneof in Oneofs) + { + oneof.CrossLink(); + } + + Extensions.CrossLink(); + } + + /// + /// A collection to simplify retrieving the field accessor for a particular field. + /// + [DebuggerDisplay("Count = {InFieldNumberOrder().Count}")] + [DebuggerTypeProxy(typeof(FieldCollectionDebugView))] + public sealed class FieldCollection + { + private readonly MessageDescriptor messageDescriptor; + + internal FieldCollection(MessageDescriptor messageDescriptor) + { + this.messageDescriptor = messageDescriptor; + } + + /// + /// Returns the fields in the message as an immutable list, in the order in which they + /// are declared in the source .proto file. + /// + public IList InDeclarationOrder() => messageDescriptor.fieldsInDeclarationOrder; + + /// + /// Returns the fields in the message as an immutable list, in ascending field number + /// order. Field numbers need not be contiguous, so there is no direct mapping from the + /// index in the list to the field number; to retrieve a field by field number, it is better + /// to use the indexer. + /// + public IList InFieldNumberOrder() => messageDescriptor.fieldsInNumberOrder; + + // TODO: consider making this public in the future. (Being conservative for now...) + + /// + /// Returns a read-only dictionary mapping the field names in this message as they're available + /// in the JSON representation to the field descriptors. For example, a field foo_bar + /// in the message would result two entries, one with a key fooBar and one with a key + /// foo_bar, both referring to the same field. + /// + internal IDictionary ByJsonName() => messageDescriptor.jsonFieldMap; + + /// + /// Retrieves the descriptor for the field with the given number. + /// + /// Number of the field to retrieve the descriptor for + /// The accessor for the given field + /// The message descriptor does not contain a field + /// with the given number + public FieldDescriptor this[int number] + { + get + { + var fieldDescriptor = messageDescriptor.FindFieldByNumber(number); + if (fieldDescriptor == null) + { + throw new KeyNotFoundException("No such field number"); + } + return fieldDescriptor; + } + } + + /// + /// Retrieves the descriptor for the field with the given name. + /// + /// Name of the field to retrieve the descriptor for + /// The descriptor for the given field + /// The message descriptor does not contain a field + /// with the given name + public FieldDescriptor this[string name] + { + get + { + var fieldDescriptor = messageDescriptor.FindFieldByName(name); + if (fieldDescriptor == null) + { + throw new KeyNotFoundException("No such field name"); + } + return fieldDescriptor; + } + } + + private sealed class FieldCollectionDebugView + { + private readonly FieldCollection collection; + + public FieldCollectionDebugView(FieldCollection collection) + { + this.collection = collection; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public FieldDescriptor[] Items => collection.InFieldNumberOrder().ToArray(); + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs.meta new file mode 100644 index 00000000..23b57219 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MessageDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82efa812e58493f48adc89c2d2884d6c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs new file mode 100644 index 00000000..a18293a0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs @@ -0,0 +1,130 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; + +namespace Google.Protobuf.Reflection +{ + /// + /// Describes a single method in a service. + /// + public sealed class MethodDescriptor : DescriptorBase + { + /// + /// The service this method belongs to. + /// + public ServiceDescriptor Service { get; } + + /// + /// The method's input type. + /// + public MessageDescriptor InputType { get; private set; } + + /// + /// The method's input type. + /// + public MessageDescriptor OutputType { get; private set; } + + /// + /// Indicates if client streams multiple requests. + /// + public bool IsClientStreaming => Proto.ClientStreaming; + + /// + /// Indicates if server streams multiple responses. + /// + public bool IsServerStreaming => Proto.ServerStreaming; + + /// + /// The (possibly empty) set of custom options for this method. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The MethodOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public MethodOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value method option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable c ? c.Clone() : value; + } + + /// + /// Gets a repeated value method option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + + internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file, + ServiceDescriptor parent, int index) + : base(file, parent.FullName + "." + proto.Name, index, parent.Features.MergedWith(proto.Options?.Features)) + { + Proto = proto; + Service = parent; + file.DescriptorPool.AddSymbol(this); + } + + internal MethodDescriptorProto Proto { get; private set; } + + /// + /// Returns a clone of the underlying describing this method. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this method descriptor. + public MethodDescriptorProto ToProto() => Proto.Clone(); + + /// + /// The brief name of the descriptor's target. + /// + public override string Name => Proto.Name; + + internal void CrossLink() + { + IDescriptor lookup = File.DescriptorPool.LookupSymbol(Proto.InputType, this); + if (lookup is not MessageDescriptor inputType) + { + throw new DescriptorValidationException(this, "\"" + Proto.InputType + "\" is not a message type."); + } + InputType = inputType; + + lookup = File.DescriptorPool.LookupSymbol(Proto.OutputType, this); + if (lookup is not MessageDescriptor outputType) + { + throw new DescriptorValidationException(this, "\"" + Proto.OutputType + "\" is not a message type."); + } + OutputType = outputType; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs.meta new file mode 100644 index 00000000..4ea03576 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/MethodDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f8f02f131cba944cac3c3e0cdcdff97 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs new file mode 100644 index 00000000..8545d6ab --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs @@ -0,0 +1,74 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Reflection; +using Google.Protobuf.Compatibility; + +namespace Google.Protobuf.Reflection +{ + /// + /// Reflection access for a oneof, allowing clear and "get case" actions. + /// + public sealed class OneofAccessor + { + private readonly Func caseDelegate; + private readonly Action clearDelegate; + + private OneofAccessor(OneofDescriptor descriptor, Func caseDelegate, Action clearDelegate) + { + Descriptor = descriptor; + this.caseDelegate = caseDelegate; + this.clearDelegate = clearDelegate; + } + + internal static OneofAccessor ForRegularOneof( + OneofDescriptor descriptor, + PropertyInfo caseProperty, + MethodInfo clearMethod) => + new OneofAccessor( + descriptor, + ReflectionUtil.CreateFuncIMessageInt32(caseProperty.GetGetMethod()), + ReflectionUtil.CreateActionIMessage(clearMethod)); + + internal static OneofAccessor ForSyntheticOneof(OneofDescriptor descriptor) + { + // Note: descriptor.Fields will be null when this method is called, because we haven't + // cross-linked yet. But by the time the delegates are called by user code, all will be + // well. (That's why we capture the descriptor itself rather than a field.) + return new OneofAccessor(descriptor, + message => descriptor.Fields[0].Accessor.HasValue(message) ? descriptor.Fields[0].FieldNumber : 0, + message => descriptor.Fields[0].Accessor.Clear(message)); + } + + /// + /// Gets the descriptor for this oneof. + /// + /// + /// The descriptor of the oneof. + /// + public OneofDescriptor Descriptor { get; } + + /// + /// Clears the oneof in the specified message. + /// + public void Clear(IMessage message) => clearDelegate(message); + + /// + /// Indicates which field in the oneof is set for specified message + /// + public FieldDescriptor GetCaseFieldDescriptor(IMessage message) + { + int fieldNumber = caseDelegate(message); + return fieldNumber > 0 + ? Descriptor.ContainingType.FindFieldByNumber(fieldNumber) + : null; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs.meta new file mode 100644 index 00000000..f3e33cf0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofAccessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 106d4dfdf50b52142b5d77378b02f102 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs new file mode 100644 index 00000000..33b3c943 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs @@ -0,0 +1,193 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Google.Protobuf.Collections; +using Google.Protobuf.Compatibility; + +namespace Google.Protobuf.Reflection +{ + /// + /// Describes a "oneof" field collection in a message type: a set of + /// fields of which at most one can be set in any particular message. + /// + public sealed class OneofDescriptor : DescriptorBase + { + private MessageDescriptor containingType; + private IList fields; + private readonly OneofAccessor accessor; + + internal OneofDescriptor(OneofDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string clrName) + : base(file, file.ComputeFullName(parent, proto.Name), index, parent.Features.MergedWith(proto.Options?.Features)) + { + this.Proto = proto; + containingType = parent; + file.DescriptorPool.AddSymbol(this); + + // It's useful to determine whether or not this is a synthetic oneof before cross-linking. That means + // diving into the proto directly rather than using FieldDescriptor, but that's okay. + var firstFieldInOneof = parent.Proto.Field.FirstOrDefault(fieldProto => fieldProto.HasOneofIndex && fieldProto.OneofIndex == index); + IsSynthetic = firstFieldInOneof?.Proto3Optional ?? false; + + accessor = CreateAccessor(clrName); + } + + /// + /// The brief name of the descriptor's target. + /// + public override string Name => Proto.Name; + + // Visible for testing + internal OneofDescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this oneof. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this oneof descriptor. + public OneofDescriptorProto ToProto() => Proto.Clone(); + + /// + /// Gets the message type containing this oneof. + /// + /// + /// The message type containing this oneof. + /// + public MessageDescriptor ContainingType + { + get { return containingType; } + } + + /// + /// Gets the fields within this oneof, in declaration order. + /// + /// + /// The fields within this oneof, in declaration order. + /// + public IList Fields { get { return fields; } } + + /// + /// Returns true if this oneof is a synthetic oneof containing a proto3 optional field; + /// false otherwise. + /// + public bool IsSynthetic { get; } + + /// + /// Gets an accessor for reflective access to the values associated with the oneof + /// in a particular message. + /// + /// + /// + /// In descriptors for generated code, the value returned by this property will always be non-null. + /// + /// + /// In dynamically loaded descriptors, the value returned by this property will current be null; + /// if and when dynamic messages are supported, it will return a suitable accessor to work with + /// them. + /// + /// + /// + /// The accessor used for reflective access. + /// + public OneofAccessor Accessor { get { return accessor; } } + + /// + /// The (possibly empty) set of custom options for this oneof. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The OneofOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public OneofOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value oneof option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value oneof option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + + internal void CrossLink() + { + List fieldCollection = new List(); + foreach (var field in ContainingType.Fields.InDeclarationOrder()) + { + if (field.ContainingOneof == this) + { + fieldCollection.Add(field); + } + } + fields = new ReadOnlyCollection(fieldCollection); + } + + private OneofAccessor CreateAccessor(string clrName) + { + // We won't have a CLR name if this is from a dynamically-loaded FileDescriptor. + // TODO: Support dynamic messages. + if (clrName == null) + { + return null; + } + if (IsSynthetic) + { + return OneofAccessor.ForSyntheticOneof(this); + } + else + { + var caseProperty = containingType.ClrType.GetProperty(clrName + "Case"); + if (caseProperty == null) + { + throw new DescriptorValidationException(this, $"Property {clrName}Case not found in {containingType.ClrType}"); + } + if (!caseProperty.CanRead) + { + throw new ArgumentException($"Cannot read from property {clrName}Case in {containingType.ClrType}"); + } + var clearMethod = containingType.ClrType.GetMethod("Clear" + clrName); + if (clearMethod == null) + { + throw new DescriptorValidationException(this, $"Method Clear{clrName} not found in {containingType.ClrType}"); + } + return OneofAccessor.ForRegularOneof(this, caseProperty, clearMethod); + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs.meta new file mode 100644 index 00000000..84bd1f92 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OneofDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 699b5959d27e2fc4d914e9ba64e782fc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs new file mode 100644 index 00000000..33fb7a48 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs @@ -0,0 +1,41 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf.Reflection +{ + /// + /// Specifies the original name (in the .proto file) of a named element, + /// such as an enum value. + /// + [AttributeUsage(AttributeTargets.Field)] + public class OriginalNameAttribute : Attribute + { + /// + /// The name of the element in the .proto file. + /// + public string Name { get; set; } + + /// + /// If the name is preferred in the .proto file. + /// + public bool PreferredAlias { get; set; } + + /// + /// Constructs a new attribute instance for the given name. + /// + /// The name of the element in the .proto file. + public OriginalNameAttribute(string name) + { + Name = ProtoPreconditions.CheckNotNull(name, nameof(name)); + PreferredAlias = true; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs.meta new file mode 100644 index 00000000..dbc6d766 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/OriginalNameAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 549526dba7c1b0d4bbf88ed4366d8bee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs new file mode 100644 index 00000000..a68e9a7a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs @@ -0,0 +1,30 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +namespace Google.Protobuf.Reflection +{ + /// + /// Represents a package in the symbol table. We use PackageDescriptors + /// just as placeholders so that someone cannot define, say, a message type + /// that has the same name as an existing package. + /// + internal sealed class PackageDescriptor : IDescriptor + { + internal PackageDescriptor(string name, string fullName, FileDescriptor file) + { + File = file; + FullName = fullName; + Name = name; + } + + public string Name { get; } + public string FullName { get; } + public FileDescriptor File { get; } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs.meta new file mode 100644 index 00000000..b670ce94 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/PackageDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bf8293e65948e9b4d93c7729a3d1cdc4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs new file mode 100644 index 00000000..0815d5f1 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -0,0 +1,375 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.CompilerServices; +using Google.Protobuf.Compatibility; + +namespace Google.Protobuf.Reflection { + /// + /// The methods in this class are somewhat evil, and should not be tampered with lightly. + /// Basically they allow the creation of relatively weakly typed delegates from MethodInfos + /// which are more strongly typed. They do this by creating an appropriate strongly typed + /// delegate from the MethodInfo, and then calling that within an anonymous method. + /// Mind-bending stuff (at least to your humble narrator) but the resulting delegates are + /// very fast compared with calling Invoke later on. + /// + internal static class ReflectionUtil { + static ReflectionUtil() { + ForceInitialize(); // Handles all reference types + ForceInitialize(); + ForceInitialize(); + ForceInitialize(); + ForceInitialize(); + ForceInitialize(); + ForceInitialize(); + ForceInitialize(); + ForceInitialize < int ? > (); + ForceInitialize < long ? > (); + ForceInitialize < uint ? > (); + ForceInitialize < ulong ? > (); + ForceInitialize < float ? > (); + ForceInitialize < double ? > (); + ForceInitialize < bool ? > (); + ForceInitialize(); + SampleEnumMethod(); + } + + internal static void ForceInitialize() => new ReflectionHelper(); + + /// + /// Empty Type[] used when calling GetProperty to force property instead of indexer fetching. + /// + internal static readonly Type[] EmptyTypes = new Type[0]; + + /// + /// Creates a delegate which will cast the argument to the type that declares the method, + /// call the method on it, then convert the result to object. + /// + /// The method to create a delegate for, which must be declared in an + /// IMessage implementation. + internal static Func CreateFuncIMessageObject(MethodInfo method) => + GetReflectionHelper(method.DeclaringType, method.ReturnType) + .CreateFuncIMessageObject(method); + + /// + /// Creates a delegate which will cast the argument to the type that declares the method, + /// call the method on it, then convert the result to the specified type. The method is expected + /// to actually return an enum (because of where we're calling it - for oneof cases). Sometimes + /// that means we need some extra work to perform conversions. + /// + /// The method to create a delegate for, which must be declared in an + /// IMessage implementation. + internal static Func CreateFuncIMessageInt32(MethodInfo method) => + GetReflectionHelper(method.DeclaringType, method.ReturnType) + .CreateFuncIMessageInt32(method); + + /// + /// Creates a delegate which will execute the given method after casting the first argument to + /// the type that declares the method, and the second argument to the first parameter type of + /// the method. + /// + /// The method to create a delegate for, which must be declared in an + /// IMessage implementation. + internal static Action CreateActionIMessageObject(MethodInfo method) => + GetReflectionHelper(method.DeclaringType, method.GetParameters()[0].ParameterType) + .CreateActionIMessageObject(method); + + /// + /// Creates a delegate which will execute the given method after casting the first argument to + /// type that declares the method. + /// + /// The method to create a delegate for, which must be declared in an + /// IMessage implementation. + internal static Action CreateActionIMessage(MethodInfo method) => + GetReflectionHelper(method.DeclaringType, typeof(object)).CreateActionIMessage(method); + + internal static Func CreateFuncIMessageBool(MethodInfo method) => + GetReflectionHelper(method.DeclaringType, method.ReturnType).CreateFuncIMessageBool(method); + + [UnconditionalSuppressMessage( + "Trimming", "IL2026", + Justification = + "Type parameter members are preserved with DynamicallyAccessedMembers on GeneratedClrTypeInfo.ctor clrType parameter.")] + [UnconditionalSuppressMessage( + "AotAnalysis", "IL3050:RequiresDynamicCode", + Justification = + "Type definition is explicitly specified and type argument is always a message type.")] + internal static Func CreateIsInitializedCaller([ + DynamicallyAccessedMembers(GeneratedClrTypeInfo.MessageAccessibility) + ] Type msg) => ((IExtensionSetReflector)Activator + .CreateInstance(typeof(ExtensionSetReflector<>).MakeGenericType(msg))) + .CreateIsInitializedCaller(); + + /// + /// Creates a delegate which will execute the given method after casting the first argument to + /// the type that declares the method, and the second argument to the first parameter type of + /// the method. + /// + [UnconditionalSuppressMessage( + "Trimming", "IL2026", + Justification = + "Type parameter members are preserved with DynamicallyAccessedMembers on GeneratedClrTypeInfo.ctor clrType parameter.")] + [UnconditionalSuppressMessage("AOT", "IL3050", + Justification = "Dynamic code won't call Type.MakeGenericType.")] + internal static IExtensionReflectionHelper CreateExtensionHelper(Extension extension) { +#if NET5_0_OR_GREATER + if (!RuntimeFeature.IsDynamicCodeSupported) { + // Using extensions with reflection is not supported with AOT. + // This helper is created when descriptors are populated. Delay throwing error until an app + // uses IFieldAccessor with an extension field. + return new AotExtensionReflectionHelper(); + } +#endif + + var t1 = extension.TargetType; + var t3 = extension.GetType().GenericTypeArguments[1]; + return (IExtensionReflectionHelper)Activator.CreateInstance( + typeof(ExtensionReflectionHelper<, >).MakeGenericType(t1, t3), extension); + } + + /// + /// Creates a reflection helper for the given type arguments. Currently these are created on + /// demand rather than cached; this will be "busy" when initially loading a message's + /// descriptor, but after that they can be garbage collected. We could cache them by type if + /// that proves to be important, but creating an object is pretty cheap. + /// + [UnconditionalSuppressMessage( + "Trimming", "IL2026", + Justification = + "Type parameter members are preserved with DynamicallyAccessedMembers on GeneratedClrTypeInfo.ctor clrType parameter.")] + [UnconditionalSuppressMessage("AOT", "IL3050", + Justification = "Dynamic code won't call Type.MakeGenericType.")] + private static IReflectionHelper GetReflectionHelper(Type t1, Type t2) { +#if NET5_0_OR_GREATER + if (!RuntimeFeature.IsDynamicCodeSupported) { + return new AotReflectionHelper(); + } +#endif + + return (IReflectionHelper)Activator.CreateInstance( + typeof(ReflectionHelper<, >).MakeGenericType(t1, t2)); + } + + // Non-generic interface allowing us to use an instance of ReflectionHelper without + // statically knowing the types involved. + private interface IReflectionHelper { + Func CreateFuncIMessageInt32(MethodInfo method); + Action CreateActionIMessage(MethodInfo method); + Func CreateFuncIMessageObject(MethodInfo method); + Action CreateActionIMessageObject(MethodInfo method); + Func CreateFuncIMessageBool(MethodInfo method); + } + + internal interface IExtensionReflectionHelper { + object GetExtension(IMessage message); + void SetExtension(IMessage message, object value); + bool HasExtension(IMessage message); + void ClearExtension(IMessage message); + } + + private interface IExtensionSetReflector { + Func CreateIsInitializedCaller(); + } + + private sealed class ReflectionHelper : IReflectionHelper { + public Func CreateFuncIMessageInt32(MethodInfo method) { + // On pleasant runtimes, we can create a Func from a method returning + // an enum based on an int. That's the fast path. + if (CanConvertEnumFuncToInt32Func) { + var del = (Func)method.CreateDelegate(typeof(Func)); + return message => del((T1)message); + } else { + // On some runtimes (e.g. old Mono) the return type has to be exactly correct, + // so we go via boxing. Reflection is already fairly inefficient, and this is + // only used for one-of case checking, fortunately. + var del = (Func)method.CreateDelegate(typeof(Func)); + return message => (int)(object)del((T1)message); + } + } + + public Action CreateActionIMessage(MethodInfo method) { + var del = (Action)method.CreateDelegate(typeof(Action)); + return message => del((T1)message); + } + + public Func CreateFuncIMessageObject(MethodInfo method) { + var del = (Func)method.CreateDelegate(typeof(Func)); + return message => del((T1)message); + } + + public Action CreateActionIMessageObject(MethodInfo method) { + var del = (Action)method.CreateDelegate(typeof(Action)); + return (message, arg) => del((T1)message, (T2)arg); + } + + public Func CreateFuncIMessageBool(MethodInfo method) { + var del = (Func)method.CreateDelegate(typeof(Func)); + return message => del((T1)message); + } + } + + private sealed class ExtensionReflectionHelper : IExtensionReflectionHelper + where T1 : IExtendableMessage { + private readonly Extension extension; + + public ExtensionReflectionHelper(Extension extension) { + this.extension = extension; + } + + public object GetExtension(IMessage message) { + if (message is not T1 extensionMessage) { + throw new InvalidCastException( + "Cannot access extension on message that isn't IExtensionMessage"); + } + + if (extension is Extension ext13) { + return extensionMessage.GetExtension(ext13); + } else if (extension is RepeatedExtension repeatedExt13) { + return extensionMessage.GetOrInitializeExtension(repeatedExt13); + } else { + throw new InvalidCastException( + "The provided extension is not a valid extension identifier type"); + } + } + + public bool HasExtension(IMessage message) { + if (message is not T1 extensionMessage) { + throw new InvalidCastException( + "Cannot access extension on message that isn't IExtensionMessage"); + } + + if (extension is Extension ext13) { + return extensionMessage.HasExtension(ext13); + } else if (extension is RepeatedExtension) { + throw new InvalidOperationException( + "HasValue is not implemented for repeated extensions"); + } else { + throw new InvalidCastException( + "The provided extension is not a valid extension identifier type"); + } + } + + public void SetExtension(IMessage message, object value) { + if (message is not T1 extensionMessage) { + throw new InvalidCastException( + "Cannot access extension on message that isn't IExtensionMessage"); + } + + if (extension is Extension ext13) { + extensionMessage.SetExtension(ext13, (T3)value); + } else if (extension is RepeatedExtension) { + throw new InvalidOperationException( + "SetValue is not implemented for repeated extensions"); + } else { + throw new InvalidCastException( + "The provided extension is not a valid extension identifier type"); + } + } + + public void ClearExtension(IMessage message) { + if (message is not T1 extensionMessage) { + throw new InvalidCastException( + "Cannot access extension on message that isn't IExtensionMessage"); + } + + if (extension is Extension ext13) { + extensionMessage.ClearExtension(ext13); + } else if (extension is RepeatedExtension repeatedExt13) { + extensionMessage.GetExtension(repeatedExt13).Clear(); + } else { + throw new InvalidCastException( + "The provided extension is not a valid extension identifier type"); + } + } + } + +#if NET5_0_OR_GREATER + /// + /// This helper is compatible with .NET Native AOT. + /// MakeGenericType doesn't work when a type argument is a value type in AOT. + /// MethodInfo.Invoke is used instead of compiled expressions because it's faster in AOT. + /// + private sealed class AotReflectionHelper : IReflectionHelper { + private static readonly object[] EmptyObjectArray = new object[0]; + public Action CreateActionIMessage(MethodInfo method) => message => + method.Invoke(message, EmptyObjectArray); + public Action CreateActionIMessageObject(MethodInfo method) => + (message, arg) => method.Invoke(message, new object[] { arg }); + public Func CreateFuncIMessageBool(MethodInfo method) => message => + (bool)method.Invoke(message, EmptyObjectArray); + public Func CreateFuncIMessageInt32(MethodInfo method) => message => + (int)method.Invoke(message, EmptyObjectArray); + public Func CreateFuncIMessageObject(MethodInfo method) => message => + method.Invoke(message, EmptyObjectArray); + } + + /// + /// Reflection with extensions isn't supported because IExtendableMessage members are used to + /// get values. Can't use reflection to invoke those methods because they have a generic + /// argument. MakeGenericMethod can't be used because it will break whenever the extension type + /// is a value type. This could be made to work if there were non-generic methods available for + /// getting and setting extension values. + /// + private sealed class AotExtensionReflectionHelper : IExtensionReflectionHelper { + private const string Message = "Extensions reflection is not supported with AOT."; + public object GetExtension(IMessage message) => throw new NotSupportedException(Message); + public bool HasExtension(IMessage message) => throw new NotSupportedException(Message); + public void SetExtension(IMessage message, + object value) => throw new NotSupportedException(Message); + public void ClearExtension(IMessage message) => throw new NotSupportedException(Message); + } +#endif + + private sealed class ExtensionSetReflector<[DynamicallyAccessedMembers( + DynamicallyAccessedMemberTypes.PublicProperties | + DynamicallyAccessedMemberTypes.NonPublicProperties)] T1> : IExtensionSetReflector + where T1 : IExtendableMessage { + public Func CreateIsInitializedCaller() { + var prop = typeof(T1).GetTypeInfo().GetDeclaredProperty("_Extensions"); + var getFunc = (Func>)prop.GetMethod.CreateDelegate( + typeof(Func>)); + var initializedFunc = (Func, bool>)typeof(ExtensionSet) + .GetTypeInfo() + .GetDeclaredMethod("IsInitialized") + .CreateDelegate(typeof(Func, bool>)); + return (m) => { + var set = getFunc((T1)m); + return set == null || initializedFunc(set); + }; + } + } + + // Runtime compatibility checking code - see ReflectionHelper.CreateFuncIMessageInt32 + // for details about why we're doing this. + + // Deliberately not inside the generic type. We only want to check this once. + private static bool CanConvertEnumFuncToInt32Func { get; } = + CheckCanConvertEnumFuncToInt32Func(); + + private static bool CheckCanConvertEnumFuncToInt32Func() { + try { + // Try to do the conversion using reflection, so we can see whether it's supported. + MethodInfo method = typeof(ReflectionUtil).GetMethod(nameof(SampleEnumMethod)); + // If this passes, we're in a reasonable runtime. + method.CreateDelegate(typeof(Func)); + return true; + } catch (ArgumentException) { + return false; + } + } + + public enum SampleEnum { X } + + // Public to make the reflection simpler. + public static SampleEnum SampleEnumMethod() => SampleEnum.X; + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs.meta new file mode 100644 index 00000000..8dd9c856 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ReflectionUtil.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 61d7a227f89acc9499d8dda827fa2dca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs new file mode 100644 index 00000000..3f279c64 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs @@ -0,0 +1,41 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Reflection; + +namespace Google.Protobuf.Reflection +{ + /// + /// Accessor for repeated fields. + /// + internal sealed class RepeatedFieldAccessor : FieldAccessorBase + { + internal RepeatedFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) : base(property, descriptor) + { + } + + public override void Clear(IMessage message) + { + IList list = (IList) GetValue(message); + list.Clear(); + } + + public override bool HasValue(IMessage message) + { + throw new InvalidOperationException("HasValue is not implemented for repeated fields"); + } + + public override void SetValue(IMessage message, object value) + { + throw new InvalidOperationException("SetValue is not implemented for repeated fields"); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs.meta new file mode 100644 index 00000000..4e2a1a77 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8540831a80552654db1db7b9af16eb13 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs new file mode 100644 index 00000000..77cc394e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs @@ -0,0 +1,118 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Collections; +using System; +using System.Collections.Generic; + +namespace Google.Protobuf.Reflection +{ + /// + /// Describes a service type. + /// + public sealed class ServiceDescriptor : DescriptorBase + { + internal ServiceDescriptor(ServiceDescriptorProto proto, FileDescriptor file, int index) + : base(file, file.ComputeFullName(null, proto.Name), index, file.Features.MergedWith(proto.Options?.Features)) + { + Proto = proto; + Methods = DescriptorUtil.ConvertAndMakeReadOnly(proto.Method, + (method, i) => new MethodDescriptor(method, file, this, i)); + + file.DescriptorPool.AddSymbol(this); + } + + /// + /// The brief name of the descriptor's target. + /// + public override string Name => Proto.Name; + + internal override IReadOnlyList GetNestedDescriptorListForField(int fieldNumber) => + fieldNumber switch + { + ServiceDescriptorProto.MethodFieldNumber => (IReadOnlyList)Methods, + _ => null, + }; + + internal ServiceDescriptorProto Proto { get; } + + /// + /// Returns a clone of the underlying describing this service. + /// Note that a copy is taken every time this method is called, so clients using it frequently + /// (and not modifying it) may want to cache the returned value. + /// + /// A protobuf representation of this service descriptor. + public ServiceDescriptorProto ToProto() => Proto.Clone(); + + /// + /// An unmodifiable list of methods in this service. + /// + public IList Methods { get; } + + /// + /// Finds a method by name. + /// + /// The unqualified name of the method (e.g. "Foo"). + /// The method's descriptor, or null if not found. + public MethodDescriptor FindMethodByName(string name) => + File.DescriptorPool.FindSymbol(FullName + "." + name); + + /// + /// The (possibly empty) set of custom options for this service. + /// + [Obsolete("CustomOptions are obsolete. Use the GetOptions() method.")] + public CustomOptions CustomOptions => new CustomOptions(Proto.Options?._extensions?.ValuesByNumber); + + /// + /// The ServiceOptions, defined in descriptor.proto. + /// If the options message is not present (i.e. there are no options), null is returned. + /// Custom options can be retrieved as extensions of the returned message. + /// NOTE: A defensive copy is created each time this property is retrieved. + /// + public ServiceOptions GetOptions() + { + var clone = Proto.Options?.Clone(); + if (clone is null) + { + return null; + } + // Clients should be using feature accessor methods, not accessing features on the + // options proto. + clone.Features = null; + return clone; + } + + /// + /// Gets a single value service option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public T GetOption(Extension extension) + { + var value = Proto.Options.GetExtension(extension); + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; + } + + /// + /// Gets a repeated value service option for this descriptor + /// + [Obsolete("GetOption is obsolete. Use the GetOptions() method.")] + public RepeatedField GetOption(RepeatedExtension extension) + { + return Proto.Options.GetExtension(extension).Clone(); + } + + internal void CrossLink() + { + foreach (MethodDescriptor method in Methods) + { + method.CrossLink(); + } + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs.meta new file mode 100644 index 00000000..e5487c17 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/ServiceDescriptor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 64bd2653022fcaa46b4fe08dbb9f74db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs new file mode 100644 index 00000000..8d6854c8 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs @@ -0,0 +1,115 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using Google.Protobuf.Compatibility; + +namespace Google.Protobuf.Reflection +{ + /// + /// Accessor for single fields. + /// + internal sealed class SingleFieldAccessor : FieldAccessorBase + { + // All the work here is actually done in the constructor - it creates the appropriate delegates. + // There are various cases to consider, based on the property type (message, string/bytes, or "genuine" primitive) + // and proto2 vs proto3 for non-message types, as proto3 doesn't support "full" presence detection or default + // values. + + private readonly Action setValueDelegate; + private readonly Action clearDelegate; + private readonly Func hasDelegate; + + internal SingleFieldAccessor( + [DynamicallyAccessedMembers(GeneratedClrTypeInfo.MessageAccessibility)] + Type messageType, PropertyInfo property, FieldDescriptor descriptor) : base(property, descriptor) + { + if (!property.CanWrite) + { + throw new ArgumentException("Not all required properties/methods available"); + } + setValueDelegate = ReflectionUtil.CreateActionIMessageObject(property.GetSetMethod()); + + // Note: this looks worrying in that we access the containing oneof, which isn't valid until cross-linking + // is complete... but field accessors aren't created until after cross-linking. + // The oneof itself won't be cross-linked yet, but that's okay: the oneof accessor is created + // earlier. + + // Message fields always support presence, via null checks. + if (descriptor.FieldType == FieldType.Message) + { + hasDelegate = message => GetValue(message) != null; + clearDelegate = message => SetValue(message, null); + } + // Oneof fields always support presence, via case checks. + // Note that clearing the field is a no-op unless that specific field is the current "case". + else if (descriptor.RealContainingOneof != null) + { + var oneofAccessor = descriptor.RealContainingOneof.Accessor; + hasDelegate = message => oneofAccessor.GetCaseFieldDescriptor(message) == descriptor; + clearDelegate = message => + { + // Clear on a field only affects the oneof itself if the current case is the field we're accessing. + if (oneofAccessor.GetCaseFieldDescriptor(message) == descriptor) + { + oneofAccessor.Clear(message); + } + }; + } + // Anything else that supports presence should have a "HasXyz" property and a "ClearXyz" + // method. + else if (descriptor.HasPresence) + { + MethodInfo hasMethod = messageType.GetRuntimeProperty("Has" + property.Name).GetMethod; + if (hasMethod == null) + { + throw new ArgumentException("Not all required properties/methods are available"); + } + hasDelegate = ReflectionUtil.CreateFuncIMessageBool(hasMethod); + MethodInfo clearMethod = messageType.GetRuntimeMethod("Clear" + property.Name, ReflectionUtil.EmptyTypes); + if (clearMethod == null) + { + throw new ArgumentException("Not all required properties/methods are available"); + } + clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); + } + // Otherwise, we don't support presence. + else + { + hasDelegate = message => throw new InvalidOperationException("Presence is not implemented for this field"); + + // While presence isn't supported, clearing still is; it's just setting to a default value. + object defaultValue = GetDefaultValue(descriptor); + clearDelegate = message => SetValue(message, defaultValue); + } + } + + private static object GetDefaultValue(FieldDescriptor descriptor) => + descriptor.FieldType switch + { + FieldType.Bool => false, + FieldType.Bytes => ByteString.Empty, + FieldType.String => "", + FieldType.Double => 0.0, + FieldType.SInt32 or FieldType.Int32 or FieldType.SFixed32 or FieldType.Enum => 0, + FieldType.Fixed32 or FieldType.UInt32 => (uint)0, + FieldType.Fixed64 or FieldType.UInt64 => 0UL, + FieldType.SFixed64 or FieldType.Int64 or FieldType.SInt64 => 0L, + FieldType.Float => 0f, + FieldType.Message or FieldType.Group => null, + _ => throw new ArgumentException("Invalid field type"), + }; + + public override void Clear(IMessage message) => clearDelegate(message); + public override bool HasValue(IMessage message) => hasDelegate(message); + public override void SetValue(IMessage message, object value) => setValueDelegate(message, value); + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs.meta new file mode 100644 index 00000000..d839688b --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/SingleFieldAccessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cd5167a350f4d964ca2a11d1e96cab4e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs new file mode 100644 index 00000000..f0ab81cb --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs @@ -0,0 +1,176 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Google.Protobuf.Reflection +{ + /// + /// An immutable registry of types which can be looked up by their full name. + /// + [DebuggerDisplay("Count = {fullNameToMessageMap.Count}")] + [DebuggerTypeProxy(typeof(TypeRegistryDebugView))] + public sealed class TypeRegistry + { + /// + /// An empty type registry, containing no types. + /// + public static TypeRegistry Empty { get; } = new TypeRegistry(new Dictionary()); + + private readonly Dictionary fullNameToMessageMap; + + private TypeRegistry(Dictionary fullNameToMessageMap) + { + this.fullNameToMessageMap = fullNameToMessageMap; + } + + /// + /// Attempts to find a message descriptor by its full name. + /// + /// The full name of the message, which is the dot-separated + /// combination of package, containing messages and message name + /// The message descriptor corresponding to or null + /// if there is no such message descriptor. + public MessageDescriptor Find(string fullName) + { + // Ignore the return value as ret will end up with the right value either way. + fullNameToMessageMap.TryGetValue(fullName, out MessageDescriptor ret); + return ret; + } + + /// + /// Creates a type registry from the specified set of file descriptors. + /// + /// + /// This is a convenience overload for + /// to allow calls such as TypeRegistry.FromFiles(descriptor1, descriptor2). + /// + /// The set of files to include in the registry. Must not contain null values. + /// A type registry for the given files. + public static TypeRegistry FromFiles(params FileDescriptor[] fileDescriptors) + { + return FromFiles((IEnumerable) fileDescriptors); + } + + /// + /// Creates a type registry from the specified set of file descriptors. + /// + /// + /// All message types within all the specified files are added to the registry, and + /// the dependencies of the specified files are also added, recursively. + /// + /// The set of files to include in the registry. Must not contain null values. + /// A type registry for the given files. + public static TypeRegistry FromFiles(IEnumerable fileDescriptors) + { + ProtoPreconditions.CheckNotNull(fileDescriptors, nameof(fileDescriptors)); + var builder = new Builder(); + foreach (var file in fileDescriptors) + { + builder.AddFile(file); + } + return builder.Build(); + } + + /// + /// Creates a type registry from the file descriptor parents of the specified set of message descriptors. + /// + /// + /// This is a convenience overload for + /// to allow calls such as TypeRegistry.FromFiles(descriptor1, descriptor2). + /// + /// The set of message descriptors to use to identify file descriptors to include in the registry. + /// Must not contain null values. + /// A type registry for the given files. + public static TypeRegistry FromMessages(params MessageDescriptor[] messageDescriptors) + { + return FromMessages((IEnumerable) messageDescriptors); + } + + /// + /// Creates a type registry from the file descriptor parents of the specified set of message descriptors. + /// + /// + /// The specified message descriptors are only used to identify their file descriptors; the returned registry + /// contains all the types within the file descriptors which contain the specified message descriptors (and + /// the dependencies of those files), not just the specified messages. + /// + /// The set of message descriptors to use to identify file descriptors to include in the registry. + /// Must not contain null values. + /// A type registry for the given files. + public static TypeRegistry FromMessages(IEnumerable messageDescriptors) + { + ProtoPreconditions.CheckNotNull(messageDescriptors, nameof(messageDescriptors)); + return FromFiles(messageDescriptors.Select(md => md.File)); + } + + /// + /// Builder class which isn't exposed, but acts as a convenient alternative to passing round two dictionaries in recursive calls. + /// + private class Builder + { + private readonly Dictionary types; + private readonly HashSet fileDescriptorNames; + + internal Builder() + { + types = new Dictionary(); + fileDescriptorNames = new HashSet(); + } + + internal void AddFile(FileDescriptor fileDescriptor) + { + if (!fileDescriptorNames.Add(fileDescriptor.Name)) + { + return; + } + foreach (var dependency in fileDescriptor.Dependencies) + { + AddFile(dependency); + } + foreach (var message in fileDescriptor.MessageTypes) + { + AddMessage(message); + } + } + + private void AddMessage(MessageDescriptor messageDescriptor) + { + foreach (var nestedType in messageDescriptor.NestedTypes) + { + AddMessage(nestedType); + } + // This will overwrite any previous entry. Given that each file should + // only be added once, this could be a problem such as package A.B with type C, + // and package A with type B.C... it's unclear what we should do in that case. + types[messageDescriptor.FullName] = messageDescriptor; + } + + internal TypeRegistry Build() + { + return new TypeRegistry(types); + } + } + + private sealed class TypeRegistryDebugView + { + private readonly TypeRegistry list; + + public TypeRegistryDebugView(TypeRegistry list) + { + this.list = list; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public KeyValuePair[] Items => list.fullNameToMessageMap.ToArray(); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs.meta new file mode 100644 index 00000000..d461739f --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/Reflection/TypeRegistry.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8250b91ed448c244c9b2f6d663e3110d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs new file mode 100644 index 00000000..6ec42238 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs @@ -0,0 +1,273 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Buffers; +using System.IO; +using System.Runtime.CompilerServices; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Abstraction for reading from a stream / read only sequence. + /// Parsing from the buffer is a loop of reading from current buffer / refreshing the buffer once done. + /// + [SecuritySafeCritical] + internal struct SegmentedBufferHelper + { + private int? totalLength; + private ReadOnlySequence.Enumerator readOnlySequenceEnumerator; + private CodedInputStream codedInputStream; + + /// + /// Initialize an instance with a coded input stream. + /// This approach is faster than using a constructor because the instance to initialize is passed by reference + /// and we can write directly into it without copying. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Initialize(CodedInputStream codedInputStream, out SegmentedBufferHelper instance) + { + instance.totalLength = codedInputStream.InternalInputStream == null ? (int?)codedInputStream.InternalBuffer.Length : null; + instance.readOnlySequenceEnumerator = default; + instance.codedInputStream = codedInputStream; + } + + /// + /// Initialize an instance with a read only sequence. + /// This approach is faster than using a constructor because the instance to initialize is passed by reference + /// and we can write directly into it without copying. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Initialize(ReadOnlySequence sequence, out SegmentedBufferHelper instance, out ReadOnlySpan firstSpan) + { + instance.codedInputStream = null; + if (sequence.IsSingleSegment) + { + firstSpan = sequence.First.Span; + instance.totalLength = firstSpan.Length; + instance.readOnlySequenceEnumerator = default; + } + else + { + instance.readOnlySequenceEnumerator = sequence.GetEnumerator(); + instance.totalLength = (int) sequence.Length; + + // set firstSpan to the first segment + instance.readOnlySequenceEnumerator.MoveNext(); + firstSpan = instance.readOnlySequenceEnumerator.Current.Span; + } + } + + public bool RefillBuffer(ref ReadOnlySpan buffer, ref ParserInternalState state, bool mustSucceed) + { + if (codedInputStream != null) + { + return RefillFromCodedInputStream(ref buffer, ref state, mustSucceed); + } + else + { + return RefillFromReadOnlySequence(ref buffer, ref state, mustSucceed); + } + } + + public int? TotalLength => totalLength; + + public CodedInputStream CodedInputStream => codedInputStream; + + /// + /// Sets currentLimit to (current position) + byteLimit. This is called + /// when descending into a length-delimited embedded message. The previous + /// limit is returned. + /// + /// The old limit. + public static int PushLimit(ref ParserInternalState state, int byteLimit) + { + if (byteLimit < 0) + { + throw InvalidProtocolBufferException.NegativeSize(); + } + byteLimit += state.totalBytesRetired + state.bufferPos; + int oldLimit = state.currentLimit; + if (byteLimit > oldLimit) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + state.currentLimit = byteLimit; + + RecomputeBufferSizeAfterLimit(ref state); + + return oldLimit; + } + + /// + /// Discards the current limit, returning the previous limit. + /// + public static void PopLimit(ref ParserInternalState state, int oldLimit) + { + state.currentLimit = oldLimit; + RecomputeBufferSizeAfterLimit(ref state); + } + + /// + /// Returns whether or not all the data before the limit has been read. + /// + /// + public static bool IsReachedLimit(ref ParserInternalState state) + { + if (state.currentLimit == int.MaxValue) + { + return false; + } + int currentAbsolutePosition = state.totalBytesRetired + state.bufferPos; + return currentAbsolutePosition >= state.currentLimit; + } + + /// + /// Returns true if the stream has reached the end of the input. This is the + /// case if either the end of the underlying input source has been reached or + /// the stream has reached a limit created using PushLimit. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsAtEnd(ref ReadOnlySpan buffer, ref ParserInternalState state) + { + return state.bufferPos == state.bufferSize && !state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, false); + } + + private bool RefillFromReadOnlySequence(ref ReadOnlySpan buffer, ref ParserInternalState state, bool mustSucceed) + { + CheckCurrentBufferIsEmpty(ref state); + + if (state.totalBytesRetired + state.bufferSize == state.currentLimit) + { + // Oops, we hit a limit. + if (mustSucceed) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + else + { + return false; + } + } + + state.totalBytesRetired += state.bufferSize; + + state.bufferPos = 0; + state.bufferSize = 0; + while (readOnlySequenceEnumerator.MoveNext()) + { + buffer = readOnlySequenceEnumerator.Current.Span; + state.bufferSize = buffer.Length; + if (buffer.Length != 0) + { + break; + } + } + + if (state.bufferSize == 0) + { + if (mustSucceed) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + else + { + return false; + } + } + else + { + RecomputeBufferSizeAfterLimit(ref state); + int totalBytesRead = + state.totalBytesRetired + state.bufferSize + state.bufferSizeAfterLimit; + if (totalBytesRead < 0 || totalBytesRead > state.sizeLimit) + { + throw InvalidProtocolBufferException.SizeLimitExceeded(); + } + return true; + } + } + + private bool RefillFromCodedInputStream(ref ReadOnlySpan buffer, ref ParserInternalState state, bool mustSucceed) + { + CheckCurrentBufferIsEmpty(ref state); + + if (state.totalBytesRetired + state.bufferSize == state.currentLimit) + { + // Oops, we hit a limit. + if (mustSucceed) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + else + { + return false; + } + } + + Stream input = codedInputStream.InternalInputStream; + + state.totalBytesRetired += state.bufferSize; + + state.bufferPos = 0; + state.bufferSize = (input == null) ? 0 : input.Read(codedInputStream.InternalBuffer, 0, buffer.Length); + if (state.bufferSize < 0) + { + throw new InvalidOperationException("Stream.Read returned a negative count"); + } + if (state.bufferSize == 0) + { + if (mustSucceed) + { + throw InvalidProtocolBufferException.TruncatedMessage(); + } + else + { + return false; + } + } + else + { + RecomputeBufferSizeAfterLimit(ref state); + int totalBytesRead = + state.totalBytesRetired + state.bufferSize + state.bufferSizeAfterLimit; + if (totalBytesRead < 0 || totalBytesRead > state.sizeLimit) + { + throw InvalidProtocolBufferException.SizeLimitExceeded(); + } + return true; + } + } + + private static void RecomputeBufferSizeAfterLimit(ref ParserInternalState state) + { + state.bufferSize += state.bufferSizeAfterLimit; + int bufferEnd = state.totalBytesRetired + state.bufferSize; + if (bufferEnd > state.currentLimit) + { + // Limit is in current buffer. + state.bufferSizeAfterLimit = bufferEnd - state.currentLimit; + state.bufferSize -= state.bufferSizeAfterLimit; + } + else + { + state.bufferSizeAfterLimit = 0; + } + } + + private static void CheckCurrentBufferIsEmpty(ref ParserInternalState state) + { + if (state.bufferPos < state.bufferSize) + { + throw new InvalidOperationException("RefillBuffer() called when buffer wasn't empty."); + } + } + } +} \ No newline at end of file diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs.meta new file mode 100644 index 00000000..a4e3c2f9 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/SegmentedBufferHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 242cb3080bb67a54dab942b013d9a675 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs new file mode 100644 index 00000000..4def7bb0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs @@ -0,0 +1,264 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2017 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System.Collections.Generic; +using Google.Protobuf.Collections; + +namespace Google.Protobuf +{ + /// + /// Represents a single field in an UnknownFieldSet. + /// + /// An UnknownField consists of four lists of values. The lists correspond + /// to the four "wire types" used in the protocol buffer binary format. + /// Normally, only one of the four lists will contain any values, since it + /// is impossible to define a valid message type that declares two different + /// types for the same field number. However, the code is designed to allow + /// for the case where the same unknown field number is encountered using + /// multiple different wire types. + /// + /// + internal sealed class UnknownField + { + private List varintList; + private List fixed32List; + private List fixed64List; + private List lengthDelimitedList; + private List groupList; + + /// + /// Creates a new UnknownField. + /// + public UnknownField() + { + } + + /// + /// Checks if two unknown field are equal. + /// + public override bool Equals(object other) + { + if (ReferenceEquals(this, other)) + { + return true; + } + return other is UnknownField otherField + && Lists.Equals(varintList, otherField.varintList) + && Lists.Equals(fixed32List, otherField.fixed32List) + && Lists.Equals(fixed64List, otherField.fixed64List) + && Lists.Equals(lengthDelimitedList, otherField.lengthDelimitedList) + && Lists.Equals(groupList, otherField.groupList); + } + + /// + /// Get the hash code of the unknown field. + /// + public override int GetHashCode() + { + int hash = 43; + hash = hash * 47 + Lists.GetHashCode(varintList); + hash = hash * 47 + Lists.GetHashCode(fixed32List); + hash = hash * 47 + Lists.GetHashCode(fixed64List); + hash = hash * 47 + Lists.GetHashCode(lengthDelimitedList); + hash = hash * 47 + Lists.GetHashCode(groupList); + return hash; + } + + /// + /// Serializes the field, including the field number, and writes it to + /// + /// + /// The unknown field number. + /// The write context to write to. + internal void WriteTo(int fieldNumber, ref WriteContext output) + { + if (varintList != null) + { + foreach (ulong value in varintList) + { + output.WriteTag(fieldNumber, WireFormat.WireType.Varint); + output.WriteUInt64(value); + } + } + if (fixed32List != null) + { + foreach (uint value in fixed32List) + { + output.WriteTag(fieldNumber, WireFormat.WireType.Fixed32); + output.WriteFixed32(value); + } + } + if (fixed64List != null) + { + foreach (ulong value in fixed64List) + { + output.WriteTag(fieldNumber, WireFormat.WireType.Fixed64); + output.WriteFixed64(value); + } + } + if (lengthDelimitedList != null) + { + foreach (ByteString value in lengthDelimitedList) + { + output.WriteTag(fieldNumber, WireFormat.WireType.LengthDelimited); + output.WriteBytes(value); + } + } + if (groupList != null) + { + foreach (UnknownFieldSet value in groupList) + { + output.WriteTag(fieldNumber, WireFormat.WireType.StartGroup); + value.WriteTo(ref output); + output.WriteTag(fieldNumber, WireFormat.WireType.EndGroup); + } + } + } + + /// + /// Computes the number of bytes required to encode this field, including field + /// number. + /// + internal int GetSerializedSize(int fieldNumber) + { + int result = 0; + if (varintList != null) + { + result += CodedOutputStream.ComputeTagSize(fieldNumber) * varintList.Count; + foreach (ulong value in varintList) + { + result += CodedOutputStream.ComputeUInt64Size(value); + } + } + if (fixed32List != null) + { + result += CodedOutputStream.ComputeTagSize(fieldNumber) * fixed32List.Count; + result += CodedOutputStream.ComputeFixed32Size(1) * fixed32List.Count; + } + if (fixed64List != null) + { + result += CodedOutputStream.ComputeTagSize(fieldNumber) * fixed64List.Count; + result += CodedOutputStream.ComputeFixed64Size(1) * fixed64List.Count; + } + if (lengthDelimitedList != null) + { + result += CodedOutputStream.ComputeTagSize(fieldNumber) * lengthDelimitedList.Count; + foreach (ByteString value in lengthDelimitedList) + { + result += CodedOutputStream.ComputeBytesSize(value); + } + } + if (groupList != null) + { + result += CodedOutputStream.ComputeTagSize(fieldNumber) * 2 * groupList.Count; + foreach (UnknownFieldSet value in groupList) + { + result += value.CalculateSize(); + } + } + return result; + } + + /// + /// Merge the values in into this field. For each list + /// of values, 's values are append to the ones in this + /// field. + /// + internal UnknownField MergeFrom(UnknownField other) + { + varintList = AddAll(varintList, other.varintList); + fixed32List = AddAll(fixed32List, other.fixed32List); + fixed64List = AddAll(fixed64List, other.fixed64List); + lengthDelimitedList = AddAll(lengthDelimitedList, other.lengthDelimitedList); + groupList = AddAll(groupList, other.groupList); + return this; + } + + /// + /// Returns a new list containing all of the given specified values from + /// both the and lists. + /// If is null and is null or empty, + /// null is returned. Otherwise, either a new list is created (if + /// is null) or the elements of are added to . + /// + private static List AddAll(List current, IList extras) + { + if (extras == null || extras.Count == 0) + { + return current; + } + if (current == null) + { + current = new List(extras); + } + else + { + current.AddRange(extras); + } + return current; + } + + /// + /// Adds a varint value. + /// + internal UnknownField AddVarint(ulong value) + { + varintList = Add(varintList, value); + return this; + } + + /// + /// Adds a fixed32 value. + /// + internal UnknownField AddFixed32(uint value) + { + fixed32List = Add(fixed32List, value); + return this; + } + + /// + /// Adds a fixed64 value. + /// + internal UnknownField AddFixed64(ulong value) + { + fixed64List = Add(fixed64List, value); + return this; + } + + /// + /// Adds a length-delimited value. + /// + internal UnknownField AddLengthDelimited(ByteString value) + { + lengthDelimitedList = Add(lengthDelimitedList, value); + return this; + } + + internal UnknownField AddGroup(UnknownFieldSet value) + { + groupList = Add(groupList, value); + return this; + } + + /// + /// Adds to the , creating + /// a new list if is null. The list is returned - either + /// the original reference or the new list. + /// + private static List Add(List list, T value) + { + if (list == null) + { + list = new List(); + } + list.Add(value); + return list; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs.meta new file mode 100644 index 00000000..02a07442 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f68e51a9809ff4c4aa07b41090389400 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs new file mode 100644 index 00000000..d0963d25 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs @@ -0,0 +1,382 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Used to keep track of fields which were seen when parsing a protocol message + /// but whose field numbers or types are unrecognized. This most frequently + /// occurs when new fields are added to a message type and then messages containing + /// those fields are read by old software that was built before the new types were + /// added. + /// + /// Most users will never need to use this class directly. + /// + [DebuggerDisplay("Count = {fields.Count}")] + [DebuggerTypeProxy(typeof(UnknownFieldSetDebugView))] + public sealed partial class UnknownFieldSet + { + private readonly IDictionary fields = new Dictionary(); + + /// + /// Creates a new UnknownFieldSet. + /// + internal UnknownFieldSet() + { + } + + /// + /// Checks whether or not the given field number is present in the set. + /// + internal bool HasField(int field) + { + return fields.ContainsKey(field); + } + + /// + /// Serializes the set and writes it to . + /// + public void WriteTo(CodedOutputStream output) + { + WriteContext.Initialize(output, out WriteContext ctx); + try + { + WriteTo(ref ctx); + } + finally + { + ctx.CopyStateTo(output); + } + } + + /// + /// Serializes the set and writes it to . + /// + [SecuritySafeCritical] + public void WriteTo(ref WriteContext ctx) + { + foreach (KeyValuePair entry in fields) + { + entry.Value.WriteTo(entry.Key, ref ctx); + } + } + + /// + /// Gets the number of bytes required to encode this set. + /// + public int CalculateSize() + { + int result = 0; + foreach (KeyValuePair entry in fields) + { + result += entry.Value.GetSerializedSize(entry.Key); + } + return result; + } + + /// + /// Checks if two unknown field sets are equal. + /// + public override bool Equals(object other) + { + if (ReferenceEquals(this, other)) + { + return true; + } + UnknownFieldSet otherSet = other as UnknownFieldSet; + IDictionary otherFields = otherSet.fields; + if (fields.Count != otherFields.Count) + { + return false; + } + foreach (KeyValuePair leftEntry in fields) + { + if (!otherFields.TryGetValue(leftEntry.Key, out UnknownField rightValue)) + { + return false; + } + if (!leftEntry.Value.Equals(rightValue)) + { + return false; + } + } + return true; + } + + /// + /// Gets the unknown field set's hash code. + /// + public override int GetHashCode() + { + int ret = 1; + foreach (KeyValuePair field in fields) + { + // Use ^ here to make the field order irrelevant. + int hash = field.Key.GetHashCode() ^ field.Value.GetHashCode(); + ret ^= hash; + } + return ret; + } + + // Optimization: We keep around the last field that was + // modified so that we can efficiently add to it multiple times in a + // row (important when parsing an unknown repeated field). + private int lastFieldNumber; + private UnknownField lastField; + + private UnknownField GetOrAddField(int number) + { + if (lastField != null && number == lastFieldNumber) + { + return lastField; + } + if (number == 0) + { + return null; + } + + if (fields.TryGetValue(number, out UnknownField existing)) + { + return existing; + } + lastField = new UnknownField(); + AddOrReplaceField(number, lastField); + lastFieldNumber = number; + return lastField; + } + + /// + /// Adds a field to the set. If a field with the same number already exists, it + /// is replaced. + /// + internal UnknownFieldSet AddOrReplaceField(int number, UnknownField field) + { + if (number == 0) + { + throw new ArgumentOutOfRangeException("number", "Zero is not a valid field number."); + } + fields[number] = field; + return this; + } + + /// + /// Parse a single field from and merge it + /// into this set. + /// + /// The parse context from which to read the field + /// false if the tag is an "end group" tag, true otherwise + private bool MergeFieldFrom(ref ParseContext ctx) + { + uint tag = ctx.LastTag; + int number = WireFormat.GetTagFieldNumber(tag); + switch (WireFormat.GetTagWireType(tag)) + { + case WireFormat.WireType.Varint: + { + ulong uint64 = ctx.ReadUInt64(); + GetOrAddField(number).AddVarint(uint64); + return true; + } + case WireFormat.WireType.Fixed32: + { + uint uint32 = ctx.ReadFixed32(); + GetOrAddField(number).AddFixed32(uint32); + return true; + } + case WireFormat.WireType.Fixed64: + { + ulong uint64 = ctx.ReadFixed64(); + GetOrAddField(number).AddFixed64(uint64); + return true; + } + case WireFormat.WireType.LengthDelimited: + { + ByteString bytes = ctx.ReadBytes(); + GetOrAddField(number).AddLengthDelimited(bytes); + return true; + } + case WireFormat.WireType.StartGroup: + { + UnknownFieldSet set = new UnknownFieldSet(); + ParsingPrimitivesMessages.ReadGroup(ref ctx, number, set); + GetOrAddField(number).AddGroup(set); + return true; + } + case WireFormat.WireType.EndGroup: + { + return false; + } + default: + throw InvalidProtocolBufferException.InvalidWireType(); + } + } + + internal void MergeGroupFrom(ref ParseContext ctx) + { + while (true) + { + uint tag = ctx.ReadTag(); + if (tag == 0) + { + break; + } + if (!MergeFieldFrom(ref ctx)) + { + break; + } + } + } + + /// + /// Create a new UnknownFieldSet if unknownFields is null. + /// Parse a single field from and merge it + /// into unknownFields. If is configured to discard unknown fields, + /// will be returned as-is and the field will be skipped. + /// + /// The UnknownFieldSet which need to be merged + /// The coded input stream containing the field + /// The merged UnknownFieldSet + public static UnknownFieldSet MergeFieldFrom(UnknownFieldSet unknownFields, + CodedInputStream input) + { + ParseContext.Initialize(input, out ParseContext ctx); + try + { + return MergeFieldFrom(unknownFields, ref ctx); + } + finally + { + ctx.CopyStateTo(input); + } + } + + /// + /// Create a new UnknownFieldSet if unknownFields is null. + /// Parse a single field from and merge it + /// into unknownFields. If is configured to discard unknown fields, + /// will be returned as-is and the field will be skipped. + /// + /// The UnknownFieldSet which need to be merged + /// The parse context from which to read the field + /// The merged UnknownFieldSet + [SecuritySafeCritical] + public static UnknownFieldSet MergeFieldFrom(UnknownFieldSet unknownFields, + ref ParseContext ctx) + { + if (ctx.DiscardUnknownFields) + { + ParsingPrimitivesMessages.SkipLastField(ref ctx.buffer, ref ctx.state); + return unknownFields; + } + if (unknownFields == null) + { + unknownFields = new UnknownFieldSet(); + } + if (!unknownFields.MergeFieldFrom(ref ctx)) + { + throw new InvalidProtocolBufferException("Merge an unknown field of end-group tag, indicating that the corresponding start-group was missing."); // match the old code-gen + } + return unknownFields; + } + + /// + /// Merges the fields from into this set. + /// If a field number exists in both sets, the values in + /// will be appended to the values in this set. + /// + private UnknownFieldSet MergeFrom(UnknownFieldSet other) + { + if (other != null) + { + foreach (KeyValuePair entry in other.fields) + { + MergeField(entry.Key, entry.Value); + } + } + return this; + } + + /// + /// Created a new UnknownFieldSet to if + /// needed and merges the fields from into the first set. + /// If a field number exists in both sets, the values in + /// will be appended to the values in this set. + /// + public static UnknownFieldSet MergeFrom(UnknownFieldSet unknownFields, + UnknownFieldSet other) + { + if (other == null) + { + return unknownFields; + } + if (unknownFields == null) + { + unknownFields = new UnknownFieldSet(); + } + unknownFields.MergeFrom(other); + return unknownFields; + } + + + /// + /// Adds a field to the unknown field set. If a field with the same + /// number already exists, the two are merged. + /// + private UnknownFieldSet MergeField(int number, UnknownField field) + { + if (number == 0) + { + throw new ArgumentOutOfRangeException("number", "Zero is not a valid field number."); + } + if (HasField(number)) + { + GetOrAddField(number).MergeFrom(field); + } + else + { + AddOrReplaceField(number, field); + } + return this; + } + + /// + /// Clone an unknown field set from . + /// + public static UnknownFieldSet Clone(UnknownFieldSet other) + { + if (other == null) + { + return null; + } + UnknownFieldSet unknownFields = new UnknownFieldSet(); + unknownFields.MergeFrom(other); + return unknownFields; + } + + private sealed class UnknownFieldSetDebugView + { + private readonly UnknownFieldSet set; + + public UnknownFieldSetDebugView(UnknownFieldSet set) + { + this.set = set; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public KeyValuePair[] Items => set.fields.ToArray(); + } + } +} + diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs.meta new file mode 100644 index 00000000..353e25ac --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnknownFieldSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 59147afd9fc38304da4dfc92f04acc8b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs new file mode 100644 index 00000000..188b5782 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs @@ -0,0 +1,58 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Security; + +namespace Google.Protobuf +{ + /// + /// Provides a number of unsafe byte operations to be used by advanced applications with high performance + /// requirements. These methods are referred to as "unsafe" due to the fact that they potentially expose + /// the backing buffer of a to the application. + /// + /// + /// + /// The methods in this class should only be called if it is guaranteed that the buffer backing the + /// will never change! Mutation of a can lead to unexpected + /// and undesirable consequences in your application, and will likely be difficult to debug. Proceed with caution! + /// + /// + /// This can have a number of significant side affects that have spooky-action-at-a-distance-like behavior. In + /// particular, if the bytes value changes out from under a Protocol Buffer: + /// + /// + /// + /// serialization may throw + /// + /// + /// serialization may succeed but the wrong bytes may be written out + /// + /// + /// objects that are normally immutable (such as ByteString) are no longer immutable + /// + /// + /// hashCode may be incorrect + /// + /// + /// + [SecuritySafeCritical] + public static class UnsafeByteOperations + { + /// + /// Constructs a new from the given bytes. The bytes are not copied, + /// and must not be modified while the is in use. + /// This API is experimental and subject to change. + /// + public static ByteString UnsafeWrap(ReadOnlyMemory bytes) + { + return ByteString.AttachBytes(bytes); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs.meta new file mode 100644 index 00000000..5254e9d7 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/UnsafeByteOperations.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 81bf904f46bd7744ba7dee1b06462f0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes.meta new file mode 100644 index 00000000..e0c0910a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: db0ab015c2829d6478192ccd95975c98 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs new file mode 100644 index 00000000..39a68e21 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs @@ -0,0 +1,401 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/any.proto + public static partial class AnyReflection { + + #region Descriptor + /// File descriptor for google/protobuf/any.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static AnyReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYi", + "JgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQnYKE2Nv", + "bS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAFaLGdvb2dsZS5nb2xhbmcu", + "b3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2FueXBiogIDR1BCqgIeR29vZ2xl", + "LlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Any), global::Google.Protobuf.WellKnownTypes.Any.Parser, new[]{ "TypeUrl", "Value" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// `Any` contains an arbitrary serialized protocol buffer message along with a + /// URL that describes the type of the serialized message. + /// + /// Protobuf library provides support to pack/unpack Any values in the form + /// of utility functions or additional generated methods of the Any type. + /// + /// Example 1: Pack and unpack a message in C++. + /// + /// Foo foo = ...; + /// Any any; + /// any.PackFrom(foo); + /// ... + /// if (any.UnpackTo(&foo)) { + /// ... + /// } + /// + /// Example 2: Pack and unpack a message in Java. + /// + /// Foo foo = ...; + /// Any any = Any.pack(foo); + /// ... + /// if (any.is(Foo.class)) { + /// foo = any.unpack(Foo.class); + /// } + /// // or ... + /// if (any.isSameTypeAs(Foo.getDefaultInstance())) { + /// foo = any.unpack(Foo.getDefaultInstance()); + /// } + /// + /// Example 3: Pack and unpack a message in Python. + /// + /// foo = Foo(...) + /// any = Any() + /// any.Pack(foo) + /// ... + /// if any.Is(Foo.DESCRIPTOR): + /// any.Unpack(foo) + /// ... + /// + /// Example 4: Pack and unpack a message in Go + /// + /// foo := &pb.Foo{...} + /// any, err := anypb.New(foo) + /// if err != nil { + /// ... + /// } + /// ... + /// foo := &pb.Foo{} + /// if err := any.UnmarshalTo(foo); err != nil { + /// ... + /// } + /// + /// The pack methods provided by protobuf library will by default use + /// 'type.googleapis.com/full.type.name' as the type URL and the unpack + /// methods only use the fully qualified type name after the last '/' + /// in the type URL, for example "foo.bar.com/x/y.z" will yield type + /// name "y.z". + /// + /// JSON + /// ==== + /// The JSON representation of an `Any` value uses the regular + /// representation of the deserialized, embedded message, with an + /// additional field `@type` which contains the type URL. Example: + /// + /// package google.profile; + /// message Person { + /// string first_name = 1; + /// string last_name = 2; + /// } + /// + /// { + /// "@type": "type.googleapis.com/google.profile.Person", + /// "firstName": <string>, + /// "lastName": <string> + /// } + /// + /// If the embedded message type is well-known and has a custom JSON + /// representation, that representation will be embedded adding a field + /// `value` which holds the custom JSON in addition to the `@type` + /// field. Example (for message [google.protobuf.Duration][]): + /// + /// { + /// "@type": "type.googleapis.com/google.protobuf.Duration", + /// "value": "1.212s" + /// } + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Any : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Any()); + 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::Google.Protobuf.WellKnownTypes.AnyReflection.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 Any() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Any(Any other) : this() { + typeUrl_ = other.typeUrl_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Any Clone() { + return new Any(this); + } + + /// Field number for the "type_url" field. + public const int TypeUrlFieldNumber = 1; + private string typeUrl_ = ""; + /// + /// A URL/resource name that uniquely identifies the type of the serialized + /// protocol buffer message. This string must contain at least + /// one "/" character. The last segment of the URL's path must represent + /// the fully qualified name of the type (as in + /// `path/google.protobuf.Duration`). The name should be in a canonical form + /// (e.g., leading "." is not accepted). + /// + /// In practice, teams usually precompile into the binary all types that they + /// expect it to use in the context of Any. However, for URLs which use the + /// scheme `http`, `https`, or no scheme, one can optionally set up a type + /// server that maps type URLs to message definitions as follows: + /// + /// * If no scheme is provided, `https` is assumed. + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) + /// + /// Note: this functionality is not currently available in the official + /// protobuf release, and it is not used for type URLs beginning with + /// type.googleapis.com. As of May 2023, there are no widely used type server + /// implementations and no plans to implement one. + /// + /// Schemes other than `http`, `https` (or the empty scheme) might be + /// used with implementation specific semantics. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TypeUrl { + get { return typeUrl_; } + set { + typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private pb::ByteString value_ = pb::ByteString.Empty; + /// + /// Must be a valid serialized protocol buffer of the above specified type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Value { + get { return value_; } + set { + value_ = 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 Any); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Any other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TypeUrl != other.TypeUrl) return false; + if (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 (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); + if (Value.Length != 0) 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 (TypeUrl.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TypeUrl); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(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 (TypeUrl.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TypeUrl); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(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 (TypeUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Any other) { + if (other == null) { + return; + } + if (other.TypeUrl.Length != 0) { + TypeUrl = other.TypeUrl; + } + if (other.Value.Length != 0) { + Value = 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TypeUrl = input.ReadString(); + break; + } + case 18: { + Value = 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TypeUrl = input.ReadString(); + break; + } + case 18: { + Value = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs.meta new file mode 100644 index 00000000..987a6272 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Any.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a418487bb5b2a8e4c99302ef36bd6958 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs new file mode 100644 index 00000000..677f76c4 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs @@ -0,0 +1,144 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using Google.Protobuf.Reflection; + +namespace Google.Protobuf.WellKnownTypes +{ + public partial class Any + { + private const string DefaultPrefix = "type.googleapis.com"; + + // This could be moved to MessageDescriptor if we wanted to, but keeping it here means + // all the Any-specific code is in the same place. + private static string GetTypeUrl(MessageDescriptor descriptor, string prefix) => + prefix.EndsWith("/") ? prefix + descriptor.FullName : prefix + "/" + descriptor.FullName; + + /// + /// Retrieves the type name for a type URL, matching the + /// of the packed message type. + /// + /// + /// + /// This is always just the last part of the URL, after the final slash. No validation of + /// anything before the trailing slash is performed. If the type URL does not include a slash, + /// an empty string is returned rather than an exception being thrown; this won't match any types, + /// and the calling code is probably in a better position to give a meaningful error. + /// + /// + /// There is no handling of fragments or queries at the moment. + /// + /// + /// The URL to extract the type name from + /// The type name + public static string GetTypeName(string typeUrl) + { + ProtoPreconditions.CheckNotNull(typeUrl, nameof(typeUrl)); + int lastSlash = typeUrl.LastIndexOf('/'); + return lastSlash == -1 ? "" : typeUrl.Substring(lastSlash + 1); + } + + /// + /// Returns a bool indictating whether this Any message is of the target message type + /// + /// The descriptor of the message type + /// true if the type name matches the descriptor's full name or false otherwise + public bool Is(MessageDescriptor descriptor) + { + ProtoPreconditions.CheckNotNull(descriptor, nameof(descriptor)); + return GetTypeName(TypeUrl) == descriptor.FullName; + } + + /// + /// Unpacks the content of this Any message into the target message type, + /// which must match the type URL within this Any message. + /// + /// The type of message to unpack the content into. + /// The unpacked message. + /// The target message type doesn't match the type URL in this message + public T Unpack() where T : IMessage, new() + { + // Note: this doesn't perform as well is it might. We could take a MessageParser in an alternative overload, + // which would be expected to perform slightly better... although the difference is likely to be negligible. + T target = new T(); + if (GetTypeName(TypeUrl) != target.Descriptor.FullName) + { + throw new InvalidProtocolBufferException( + $"Full type name for {target.Descriptor.Name} is {target.Descriptor.FullName}; Any message's type url is {TypeUrl}"); + } + target.MergeFrom(Value); + return target; + } + + /// + /// Attempts to unpack the content of this Any message into the target message type, + /// if it matches the type URL within this Any message. + /// + /// The type of message to attempt to unpack the content into. + /// true if the message was successfully unpacked; false if the type name didn't match + public bool TryUnpack(out T result) where T : IMessage, new() + { + // Note: deliberately avoid writing anything to result until the end, in case it's being + // monitored by other threads. (That would be a bug in the calling code, but let's not make it worse.) + T target = new T(); + if (GetTypeName(TypeUrl) != target.Descriptor.FullName) + { + result = default; // Can't use null as there's no class constraint, but this always *will* be null in real usage. + return false; + } + target.MergeFrom(Value); + result = target; + return true; + } + + /// + /// Attempts to unpack the content of this Any message into one of the message types + /// in the given type registry, based on the type URL. + /// + /// The type registry to consult for messages. + /// The unpacked message, or null if no matching message was found. + public IMessage Unpack(TypeRegistry registry) + { + string typeName = GetTypeName(TypeUrl); + MessageDescriptor descriptor = registry.Find(typeName); + if (descriptor == null) + { + return null; + } + + var message = descriptor.Parser.CreateTemplate(); + message.MergeFrom(Value); + return message; + } + + /// + /// Packs the specified message into an Any message using a type URL prefix of "type.googleapis.com". + /// + /// The message to pack. + /// An Any message with the content and type URL of . + public static Any Pack(IMessage message) => Pack(message, DefaultPrefix); + + /// + /// Packs the specified message into an Any message using the specified type URL prefix. + /// + /// The message to pack. + /// The prefix for the type URL. + /// An Any message with the content and type URL of . + public static Any Pack(IMessage message, string typeUrlPrefix) + { + ProtoPreconditions.CheckNotNull(message, nameof(message)); + ProtoPreconditions.CheckNotNull(typeUrlPrefix, nameof(typeUrlPrefix)); + return new Any + { + TypeUrl = GetTypeUrl(message.Descriptor, typeUrlPrefix), + Value = message.ToByteString() + }; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs.meta new file mode 100644 index 00000000..25c58f31 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/AnyPartial.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a16e27de45ea054289c3ba5476a1e76 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs new file mode 100644 index 00000000..c8f779a5 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs @@ -0,0 +1,1263 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/api.proto + public static partial class ApiReflection { + + #region Descriptor + /// File descriptor for google/protobuf/api.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ApiReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa", + "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl", + "L3Byb3RvYnVmL3R5cGUucHJvdG8igQIKA0FwaRIMCgRuYW1lGAEgASgJEigK", + "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w", + "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp", + "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv", + "dG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUu", + "cHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3Rv", + "YnVmLlN5bnRheCLVAQoGTWV0aG9kEgwKBG5hbWUYASABKAkSGAoQcmVxdWVz", + "dF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCBIZ", + "ChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25zZV9zdHJlYW1p", + "bmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5P", + "cHRpb24SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRh", + "eCIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCdgoTY29t", + "Lmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAVosZ29vZ2xlLmdvbGFuZy5v", + "cmcvcHJvdG9idWYvdHlwZXMva25vd24vYXBpcGKiAgNHUEKqAh5Hb29nbGUu", + "UHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Api), global::Google.Protobuf.WellKnownTypes.Api.Parser, new[]{ "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Method), global::Google.Protobuf.WellKnownTypes.Method.Parser, new[]{ "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Mixin), global::Google.Protobuf.WellKnownTypes.Mixin.Parser, new[]{ "Name", "Root" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Api is a light-weight descriptor for an API Interface. + /// + /// Interfaces are also described as "protocol buffer services" in some contexts, + /// such as by the "service" keyword in a .proto file, but they are different + /// from API Services, which represent a concrete implementation of an interface + /// as opposed to simply a description of methods and bindings. They are also + /// sometimes simply referred to as "APIs" in other contexts, such as the name of + /// this message itself. See https://cloud.google.com/apis/design/glossary for + /// detailed terminology. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Api : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Api()); + 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::Google.Protobuf.WellKnownTypes.ApiReflection.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 Api() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Api(Api other) : this() { + name_ = other.name_; + methods_ = other.methods_.Clone(); + options_ = other.options_.Clone(); + version_ = other.version_; + sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; + mixins_ = other.mixins_.Clone(); + syntax_ = other.syntax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Api Clone() { + return new Api(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// The fully qualified name of this interface, including package name + /// followed by the interface's simple name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "methods" field. + public const int MethodsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_methods_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser); + private readonly pbc::RepeatedField methods_ = new pbc::RepeatedField(); + /// + /// The methods of this interface, in unspecified order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Methods { + get { return methods_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_options_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); + private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Any metadata attached to the interface. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Options { + get { return options_; } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 4; + private string version_ = ""; + /// + /// A version string for this interface. If specified, must have the form + /// `major-version.minor-version`, as in `1.10`. If the minor version is + /// omitted, it defaults to zero. If the entire version field is empty, the + /// major version is derived from the package name, as outlined below. If the + /// field is not empty, the version in the package name will be verified to be + /// consistent with what is provided here. + /// + /// The versioning schema uses [semantic + /// versioning](http://semver.org) where the major version number + /// indicates a breaking change and the minor version an additive, + /// non-breaking change. Both version numbers are signals to users + /// what to expect from different versions, and should be carefully + /// chosen based on the product plan. + /// + /// The major version is also reflected in the package name of the + /// interface, which must end in `v<major-version>`, as in + /// `google.feature.v1`. For major versions 0 and 1, the suffix can + /// be omitted. Zero major versions must only be used for + /// experimental, non-GA interfaces. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Version { + get { return version_; } + set { + version_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "source_context" field. + public const int SourceContextFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// + /// Source context for the protocol buffer service represented by this + /// message. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { + get { return sourceContext_; } + set { + sourceContext_ = value; + } + } + + /// Field number for the "mixins" field. + public const int MixinsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_mixins_codec + = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser); + private readonly pbc::RepeatedField mixins_ = new pbc::RepeatedField(); + /// + /// Included interfaces. See [Mixin][]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Mixins { + get { return mixins_; } + } + + /// Field number for the "syntax" field. + public const int SyntaxFieldNumber = 7; + private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; + /// + /// The source syntax of the service. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { + get { return syntax_; } + set { + syntax_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Api); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Api other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!methods_.Equals(other.methods_)) return false; + if(!options_.Equals(other.options_)) return false; + if (Version != other.Version) return false; + if (!object.Equals(SourceContext, other.SourceContext)) return false; + if(!mixins_.Equals(other.mixins_)) return false; + if (Syntax != other.Syntax) 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 (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= methods_.GetHashCode(); + hash ^= options_.GetHashCode(); + if (Version.Length != 0) hash ^= Version.GetHashCode(); + if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); + hash ^= mixins_.GetHashCode(); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + methods_.WriteTo(output, _repeated_methods_codec); + options_.WriteTo(output, _repeated_options_codec); + if (Version.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Version); + } + if (sourceContext_ != null) { + output.WriteRawTag(42); + output.WriteMessage(SourceContext); + } + mixins_.WriteTo(output, _repeated_mixins_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(56); + output.WriteEnum((int) Syntax); + } + 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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + methods_.WriteTo(ref output, _repeated_methods_codec); + options_.WriteTo(ref output, _repeated_options_codec); + if (Version.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Version); + } + if (sourceContext_ != null) { + output.WriteRawTag(42); + output.WriteMessage(SourceContext); + } + mixins_.WriteTo(ref output, _repeated_mixins_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(56); + output.WriteEnum((int) Syntax); + } + 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 (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += methods_.CalculateSize(_repeated_methods_codec); + size += options_.CalculateSize(_repeated_options_codec); + if (Version.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Version); + } + if (sourceContext_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); + } + size += mixins_.CalculateSize(_repeated_mixins_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Api other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + methods_.Add(other.methods_); + options_.Add(other.options_); + if (other.Version.Length != 0) { + Version = other.Version; + } + if (other.sourceContext_ != null) { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + SourceContext.MergeFrom(other.SourceContext); + } + mixins_.Add(other.mixins_); + if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + Syntax = other.Syntax; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + methods_.AddEntriesFrom(input, _repeated_methods_codec); + break; + } + case 26: { + options_.AddEntriesFrom(input, _repeated_options_codec); + break; + } + case 34: { + Version = input.ReadString(); + break; + } + case 42: { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + input.ReadMessage(SourceContext); + break; + } + case 50: { + mixins_.AddEntriesFrom(input, _repeated_mixins_codec); + break; + } + case 56: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + methods_.AddEntriesFrom(ref input, _repeated_methods_codec); + break; + } + case 26: { + options_.AddEntriesFrom(ref input, _repeated_options_codec); + break; + } + case 34: { + Version = input.ReadString(); + break; + } + case 42: { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + input.ReadMessage(SourceContext); + break; + } + case 50: { + mixins_.AddEntriesFrom(ref input, _repeated_mixins_codec); + break; + } + case 56: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Method represents a method of an API interface. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Method : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Method()); + 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::Google.Protobuf.WellKnownTypes.ApiReflection.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 Method() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Method(Method other) : this() { + name_ = other.name_; + requestTypeUrl_ = other.requestTypeUrl_; + requestStreaming_ = other.requestStreaming_; + responseTypeUrl_ = other.responseTypeUrl_; + responseStreaming_ = other.responseStreaming_; + options_ = other.options_.Clone(); + syntax_ = other.syntax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Method Clone() { + return new Method(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// The simple name of this method. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_type_url" field. + public const int RequestTypeUrlFieldNumber = 2; + private string requestTypeUrl_ = ""; + /// + /// A URL of the input message type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestTypeUrl { + get { return requestTypeUrl_; } + set { + requestTypeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_streaming" field. + public const int RequestStreamingFieldNumber = 3; + private bool requestStreaming_; + /// + /// If true, the request is streamed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RequestStreaming { + get { return requestStreaming_; } + set { + requestStreaming_ = value; + } + } + + /// Field number for the "response_type_url" field. + public const int ResponseTypeUrlFieldNumber = 4; + private string responseTypeUrl_ = ""; + /// + /// The URL of the output message type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ResponseTypeUrl { + get { return responseTypeUrl_; } + set { + responseTypeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "response_streaming" field. + public const int ResponseStreamingFieldNumber = 5; + private bool responseStreaming_; + /// + /// If true, the response is streamed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ResponseStreaming { + get { return responseStreaming_; } + set { + responseStreaming_ = value; + } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_options_codec + = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser); + private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Any metadata attached to the method. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Options { + get { return options_; } + } + + /// Field number for the "syntax" field. + public const int SyntaxFieldNumber = 7; + private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; + /// + /// The source syntax of this method. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { + get { return syntax_; } + set { + syntax_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Method); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Method other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (RequestTypeUrl != other.RequestTypeUrl) return false; + if (RequestStreaming != other.RequestStreaming) return false; + if (ResponseTypeUrl != other.ResponseTypeUrl) return false; + if (ResponseStreaming != other.ResponseStreaming) return false; + if(!options_.Equals(other.options_)) return false; + if (Syntax != other.Syntax) 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 (Name.Length != 0) hash ^= Name.GetHashCode(); + if (RequestTypeUrl.Length != 0) hash ^= RequestTypeUrl.GetHashCode(); + if (RequestStreaming != false) hash ^= RequestStreaming.GetHashCode(); + if (ResponseTypeUrl.Length != 0) hash ^= ResponseTypeUrl.GetHashCode(); + if (ResponseStreaming != false) hash ^= ResponseStreaming.GetHashCode(); + hash ^= options_.GetHashCode(); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (RequestTypeUrl.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestTypeUrl); + } + if (RequestStreaming != false) { + output.WriteRawTag(24); + output.WriteBool(RequestStreaming); + } + if (ResponseTypeUrl.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ResponseTypeUrl); + } + if (ResponseStreaming != false) { + output.WriteRawTag(40); + output.WriteBool(ResponseStreaming); + } + options_.WriteTo(output, _repeated_options_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(56); + output.WriteEnum((int) Syntax); + } + 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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (RequestTypeUrl.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestTypeUrl); + } + if (RequestStreaming != false) { + output.WriteRawTag(24); + output.WriteBool(RequestStreaming); + } + if (ResponseTypeUrl.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ResponseTypeUrl); + } + if (ResponseStreaming != false) { + output.WriteRawTag(40); + output.WriteBool(ResponseStreaming); + } + options_.WriteTo(ref output, _repeated_options_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(56); + output.WriteEnum((int) Syntax); + } + 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 (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (RequestTypeUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestTypeUrl); + } + if (RequestStreaming != false) { + size += 1 + 1; + } + if (ResponseTypeUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ResponseTypeUrl); + } + if (ResponseStreaming != false) { + size += 1 + 1; + } + size += options_.CalculateSize(_repeated_options_codec); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Method other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.RequestTypeUrl.Length != 0) { + RequestTypeUrl = other.RequestTypeUrl; + } + if (other.RequestStreaming != false) { + RequestStreaming = other.RequestStreaming; + } + if (other.ResponseTypeUrl.Length != 0) { + ResponseTypeUrl = other.ResponseTypeUrl; + } + if (other.ResponseStreaming != false) { + ResponseStreaming = other.ResponseStreaming; + } + options_.Add(other.options_); + if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + Syntax = other.Syntax; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + RequestTypeUrl = input.ReadString(); + break; + } + case 24: { + RequestStreaming = input.ReadBool(); + break; + } + case 34: { + ResponseTypeUrl = input.ReadString(); + break; + } + case 40: { + ResponseStreaming = input.ReadBool(); + break; + } + case 50: { + options_.AddEntriesFrom(input, _repeated_options_codec); + break; + } + case 56: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + RequestTypeUrl = input.ReadString(); + break; + } + case 24: { + RequestStreaming = input.ReadBool(); + break; + } + case 34: { + ResponseTypeUrl = input.ReadString(); + break; + } + case 40: { + ResponseStreaming = input.ReadBool(); + break; + } + case 50: { + options_.AddEntriesFrom(ref input, _repeated_options_codec); + break; + } + case 56: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Declares an API Interface to be included in this interface. The including + /// interface must redeclare all the methods from the included interface, but + /// documentation and options are inherited as follows: + /// + /// - If after comment and whitespace stripping, the documentation + /// string of the redeclared method is empty, it will be inherited + /// from the original method. + /// + /// - Each annotation belonging to the service config (http, + /// visibility) which is not set in the redeclared method will be + /// inherited. + /// + /// - If an http annotation is inherited, the path pattern will be + /// modified as follows. Any version prefix will be replaced by the + /// version of the including interface plus the [root][] path if + /// specified. + /// + /// Example of a simple mixin: + /// + /// package google.acl.v1; + /// service AccessControl { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v1/{resource=**}:getAcl"; + /// } + /// } + /// + /// package google.storage.v2; + /// service Storage { + /// rpc GetAcl(GetAclRequest) returns (Acl); + /// + /// // Get a data record. + /// rpc GetData(GetDataRequest) returns (Data) { + /// option (google.api.http).get = "/v2/{resource=**}"; + /// } + /// } + /// + /// Example of a mixin configuration: + /// + /// apis: + /// - name: google.storage.v2.Storage + /// mixins: + /// - name: google.acl.v1.AccessControl + /// + /// The mixin construct implies that all methods in `AccessControl` are + /// also declared with same name and request/response types in + /// `Storage`. A documentation generator or annotation processor will + /// see the effective `Storage.GetAcl` method after inheriting + /// documentation and annotations as follows: + /// + /// service Storage { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v2/{resource=**}:getAcl"; + /// } + /// ... + /// } + /// + /// Note how the version in the path pattern changed from `v1` to `v2`. + /// + /// If the `root` field in the mixin is specified, it should be a + /// relative path under which inherited HTTP paths are placed. Example: + /// + /// apis: + /// - name: google.storage.v2.Storage + /// mixins: + /// - name: google.acl.v1.AccessControl + /// root: acls + /// + /// This implies the following inherited HTTP annotation: + /// + /// service Storage { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + /// } + /// ... + /// } + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Mixin : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Mixin()); + 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::Google.Protobuf.WellKnownTypes.ApiReflection.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 Mixin() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Mixin(Mixin other) : this() { + name_ = other.name_; + root_ = other.root_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Mixin Clone() { + return new Mixin(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// The fully qualified name of the interface which is included. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "root" field. + public const int RootFieldNumber = 2; + private string root_ = ""; + /// + /// If non-empty specifies a path under which inherited HTTP paths + /// are rooted. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Root { + get { return root_; } + set { + root_ = 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 Mixin); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Mixin other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Root != other.Root) 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 (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Root.Length != 0) hash ^= Root.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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Root.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Root); + } + 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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Root.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Root); + } + 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 (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Root.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Root); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Mixin other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Root.Length != 0) { + Root = other.Root; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Root = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + Root = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs.meta new file mode 100644 index 00000000..13a8580d --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Api.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7e5e6ec0f2504a54ab5cb4e97a6a2d99 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs new file mode 100644 index 00000000..9b36c449 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs @@ -0,0 +1,355 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/duration.proto + public static partial class DurationReflection { + + #region Descriptor + /// File descriptor for google/protobuf/duration.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static DurationReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90", + "b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIg", + "ASgFQoMBChNjb20uZ29vZ2xlLnByb3RvYnVmQg1EdXJhdGlvblByb3RvUAFa", + "MWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2R1cmF0", + "aW9ucGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlw", + "ZXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Duration), global::Google.Protobuf.WellKnownTypes.Duration.Parser, new[]{ "Seconds", "Nanos" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// A Duration represents a signed, fixed-length span of time represented + /// as a count of seconds and fractions of seconds at nanosecond + /// resolution. It is independent of any calendar and concepts like "day" + /// or "month". It is related to Timestamp in that the difference between + /// two Timestamp values is a Duration and it can be added or subtracted + /// from a Timestamp. Range is approximately +-10,000 years. + /// + /// # Examples + /// + /// Example 1: Compute Duration from two Timestamps in pseudo code. + /// + /// Timestamp start = ...; + /// Timestamp end = ...; + /// Duration duration = ...; + /// + /// duration.seconds = end.seconds - start.seconds; + /// duration.nanos = end.nanos - start.nanos; + /// + /// if (duration.seconds < 0 && duration.nanos > 0) { + /// duration.seconds += 1; + /// duration.nanos -= 1000000000; + /// } else if (duration.seconds > 0 && duration.nanos < 0) { + /// duration.seconds -= 1; + /// duration.nanos += 1000000000; + /// } + /// + /// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + /// + /// Timestamp start = ...; + /// Duration duration = ...; + /// Timestamp end = ...; + /// + /// end.seconds = start.seconds + duration.seconds; + /// end.nanos = start.nanos + duration.nanos; + /// + /// if (end.nanos < 0) { + /// end.seconds -= 1; + /// end.nanos += 1000000000; + /// } else if (end.nanos >= 1000000000) { + /// end.seconds += 1; + /// end.nanos -= 1000000000; + /// } + /// + /// Example 3: Compute Duration from datetime.timedelta in Python. + /// + /// td = datetime.timedelta(days=3, minutes=10) + /// duration = Duration() + /// duration.FromTimedelta(td) + /// + /// # JSON Mapping + /// + /// In JSON format, the Duration type is encoded as a string rather than an + /// object, where the string ends in the suffix "s" (indicating seconds) and + /// is preceded by the number of seconds, with nanoseconds expressed as + /// fractional seconds. For example, 3 seconds with 0 nanoseconds should be + /// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + /// microsecond should be expressed in JSON format as "3.000001s". + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Duration : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Duration()); + 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::Google.Protobuf.WellKnownTypes.DurationReflection.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 Duration() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Duration(Duration other) : this() { + seconds_ = other.seconds_; + nanos_ = other.nanos_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Duration Clone() { + return new Duration(this); + } + + /// Field number for the "seconds" field. + public const int SecondsFieldNumber = 1; + private long seconds_; + /// + /// Signed seconds of the span of time. Must be from -315,576,000,000 + /// to +315,576,000,000 inclusive. Note: these bounds are computed from: + /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Seconds { + get { return seconds_; } + set { + seconds_ = value; + } + } + + /// Field number for the "nanos" field. + public const int NanosFieldNumber = 2; + private int nanos_; + /// + /// Signed fractions of a second at nanosecond resolution of the span + /// of time. Durations less than one second are represented with a 0 + /// `seconds` field and a positive or negative `nanos` field. For durations + /// of one second or more, a non-zero value for the `nanos` field must be + /// of the same sign as the `seconds` field. Must be from -999,999,999 + /// to +999,999,999 inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Nanos { + get { return nanos_; } + set { + nanos_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Duration); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Duration other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Seconds != other.Seconds) return false; + if (Nanos != other.Nanos) 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 (Seconds != 0L) hash ^= Seconds.GetHashCode(); + if (Nanos != 0) hash ^= Nanos.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 (Seconds != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Seconds); + } + if (Nanos != 0) { + output.WriteRawTag(16); + output.WriteInt32(Nanos); + } + 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 (Seconds != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Seconds); + } + if (Nanos != 0) { + output.WriteRawTag(16); + output.WriteInt32(Nanos); + } + 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 (Seconds != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds); + } + if (Nanos != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Duration other) { + if (other == null) { + return; + } + if (other.Seconds != 0L) { + Seconds = other.Seconds; + } + if (other.Nanos != 0) { + Nanos = other.Nanos; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Seconds = input.ReadInt64(); + break; + } + case 16: { + Nanos = input.ReadInt32(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Seconds = input.ReadInt64(); + break; + } + case 16: { + Nanos = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs.meta new file mode 100644 index 00000000..c69e58e6 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Duration.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dadaa28857a9d7748a79cd1ddf4b2839 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs new file mode 100644 index 00000000..e1e408aa --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs @@ -0,0 +1,268 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Globalization; +using System.Text; + +namespace Google.Protobuf.WellKnownTypes +{ + // Manually-written partial class for the Duration well-known type, + // providing a conversion to TimeSpan and convenience operators. + public partial class Duration : ICustomDiagnosticMessage, IComparable + { + /// + /// The number of nanoseconds in a second. + /// + public const int NanosecondsPerSecond = 1000000000; + /// + /// The number of nanoseconds in a BCL tick (as used by and ). + /// + public const int NanosecondsPerTick = 100; + + /// + /// The maximum permitted number of seconds. + /// + public const long MaxSeconds = 315576000000L; + + /// + /// The minimum permitted number of seconds. + /// + public const long MinSeconds = -315576000000L; + + internal const int MaxNanoseconds = NanosecondsPerSecond - 1; + internal const int MinNanoseconds = -NanosecondsPerSecond + 1; + + internal static bool IsNormalized(long seconds, int nanoseconds) + { + // Simple boundaries + if (seconds < MinSeconds || seconds > MaxSeconds || + nanoseconds < MinNanoseconds || nanoseconds > MaxNanoseconds) + { + return false; + } + // We only have a problem is one is strictly negative and the other is + // strictly positive. + return Math.Sign(seconds) * Math.Sign(nanoseconds) != -1; + } + + /// + /// Converts this to a . + /// + /// If the duration is not a precise number of ticks, it is truncated towards 0. + /// The value of this duration, as a TimeSpan. + /// This value isn't a valid normalized duration, as + /// described in the documentation. + public TimeSpan ToTimeSpan() + { + checked + { + if (!IsNormalized(Seconds, Nanos)) + { + throw new InvalidOperationException("Duration was not a valid normalized duration"); + } + long ticks = Seconds * TimeSpan.TicksPerSecond + Nanos / NanosecondsPerTick; + return TimeSpan.FromTicks(ticks); + } + } + + /// + /// Converts the given to a . + /// + /// The TimeSpan to convert. + /// The value of the given TimeSpan, as a Duration. + public static Duration FromTimeSpan(TimeSpan timeSpan) + { + checked + { + long ticks = timeSpan.Ticks; + long seconds = ticks / TimeSpan.TicksPerSecond; + int nanos = (int) (ticks % TimeSpan.TicksPerSecond) * NanosecondsPerTick; + return new Duration { Seconds = seconds, Nanos = nanos }; + } + } + + /// + /// Returns the result of negating the duration. For example, the negation of 5 minutes is -5 minutes. + /// + /// The duration to negate. Must not be null. + /// The negated value of this duration. + public static Duration operator -(Duration value) + { + ProtoPreconditions.CheckNotNull(value, "value"); + checked + { + return Normalize(-value.Seconds, -value.Nanos); + } + } + + /// + /// Adds the two specified values together. + /// + /// The first value to add. Must not be null. + /// The second value to add. Must not be null. + /// + public static Duration operator +(Duration lhs, Duration rhs) + { + ProtoPreconditions.CheckNotNull(lhs, "lhs"); + ProtoPreconditions.CheckNotNull(rhs, "rhs"); + checked + { + return Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos); + } + } + + /// + /// Subtracts one from another. + /// + /// The duration to subtract from. Must not be null. + /// The duration to subtract. Must not be null. + /// The difference between the two specified durations. + public static Duration operator -(Duration lhs, Duration rhs) + { + ProtoPreconditions.CheckNotNull(lhs, "lhs"); + ProtoPreconditions.CheckNotNull(rhs, "rhs"); + checked + { + return Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos); + } + } + + /// + /// Creates a duration with the normalized values from the given number of seconds and + /// nanoseconds, conforming with the description in the proto file. + /// + internal static Duration Normalize(long seconds, int nanoseconds) + { + // Ensure that nanoseconds is in the range (-1,000,000,000, +1,000,000,000) + int extraSeconds = nanoseconds / NanosecondsPerSecond; + seconds += extraSeconds; + nanoseconds -= extraSeconds * NanosecondsPerSecond; + + // Now make sure that Sign(seconds) == Sign(nanoseconds) if Sign(seconds) != 0. + if (seconds < 0 && nanoseconds > 0) + { + seconds += 1; + nanoseconds -= NanosecondsPerSecond; + } + else if (seconds > 0 && nanoseconds < 0) + { + seconds -= 1; + nanoseconds += NanosecondsPerSecond; + } + return new Duration { Seconds = seconds, Nanos = nanoseconds }; + } + + /// + /// Converts a duration specified in seconds/nanoseconds to a string. + /// + /// + /// If the value is a normalized duration in the range described in duration.proto, + /// is ignored. Otherwise, if the parameter is true, + /// a JSON object with a warning is returned; if it is false, an is thrown. + /// + /// Seconds portion of the duration. + /// Nanoseconds portion of the duration. + /// Determines the handling of non-normalized values + /// The represented duration is invalid, and is false. + internal static string ToJson(long seconds, int nanoseconds, bool diagnosticOnly) + { + if (IsNormalized(seconds, nanoseconds)) + { + var builder = new StringBuilder(); + builder.Append('"'); + // The seconds part will normally provide the minus sign if we need it, but not if it's 0... + if (seconds == 0 && nanoseconds < 0) + { + builder.Append('-'); + } + + builder.Append(seconds.ToString("d", CultureInfo.InvariantCulture)); + AppendNanoseconds(builder, Math.Abs(nanoseconds)); + builder.Append("s\""); + return builder.ToString(); + } + if (diagnosticOnly) + { + // Note: the double braces here are escaping for braces in format strings. + return string.Format(CultureInfo.InvariantCulture, + "{{ \"@warning\": \"Invalid Duration\", \"seconds\": \"{0}\", \"nanos\": {1} }}", + seconds, + nanoseconds); + } + else + { + throw new InvalidOperationException("Non-normalized duration value"); + } + } + + /// + /// Returns a string representation of this for diagnostic purposes. + /// + /// + /// Normally the returned value will be a JSON string value (including leading and trailing quotes) but + /// when the value is non-normalized or out of range, a JSON object representation will be returned + /// instead, including a warning. This is to avoid exceptions being thrown when trying to + /// diagnose problems - the regular JSON formatter will still throw an exception for non-normalized + /// values. + /// + /// A string representation of this value. + public string ToDiagnosticString() + { + return ToJson(Seconds, Nanos, true); + } + + /// + /// Appends a number of nanoseconds to a StringBuilder. Either 0 digits are added (in which + /// case no "." is appended), or 3 6 or 9 digits. This is internal for use in Timestamp as well + /// as Duration. + /// + internal static void AppendNanoseconds(StringBuilder builder, int nanos) + { + if (nanos != 0) + { + builder.Append('.'); + // Output to 3, 6 or 9 digits. + if (nanos % 1000000 == 0) + { + builder.Append((nanos / 1000000).ToString("d3", CultureInfo.InvariantCulture)); + } + else if (nanos % 1000 == 0) + { + builder.Append((nanos / 1000).ToString("d6", CultureInfo.InvariantCulture)); + } + else + { + builder.Append(nanos.ToString("d9", CultureInfo.InvariantCulture)); + } + } + } + + + /// + /// Given another duration, returns 0 if the durations are equivalent, -1 if this duration is shorter than the other, and 1 otherwise. + /// + /// + /// This method expects that both durations are normalized; that is, that the values of + /// and are within the documented bounds. + /// If either value is not normalized, the results of this method are unspecified. + /// + /// The duration to compare with this object. + /// An integer indicating whether this duration is shorter or longer than . + public int CompareTo(Duration other) + { + return other == null ? 1 + : Seconds < other.Seconds ? -1 + : Seconds > other.Seconds ? 1 + : Nanos < other.Nanos ? -1 + : Nanos > other.Nanos ? 1 + : 0; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs.meta new file mode 100644 index 00000000..f38ce686 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/DurationPartial.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dab3d5972cbd97c48bfe3f59b2f3035e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs new file mode 100644 index 00000000..7ef348ce --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs @@ -0,0 +1,216 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/empty.proto + public static partial class EmptyReflection { + + #region Descriptor + /// File descriptor for google/protobuf/empty.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static EmptyReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1", + "ZiIHCgVFbXB0eUJ9ChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3Rv", + "UAFaLmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2Vt", + "cHR5cGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlw", + "ZXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Empty), global::Google.Protobuf.WellKnownTypes.Empty.Parser, null, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// A generic empty message that you can re-use to avoid defining duplicated + /// empty messages in your APIs. A typical example is to use it as the request + /// or the response type of an API method. For instance: + /// + /// service Foo { + /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + /// } + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Empty : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Empty()); + 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::Google.Protobuf.WellKnownTypes.EmptyReflection.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 Empty() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Empty(Empty other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Empty Clone() { + return new Empty(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Empty); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Empty 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(Empty 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs.meta new file mode 100644 index 00000000..9351b101 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Empty.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 68e2108ce2948e245a660012d27d521e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs new file mode 100644 index 00000000..7657eb26 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs @@ -0,0 +1,436 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/field_mask.proto + public static partial class FieldMaskReflection { + + #region Descriptor + /// File descriptor for google/protobuf/field_mask.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FieldMaskReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnBy", + "b3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUKFAQoTY29tLmdv", + "b2dsZS5wcm90b2J1ZkIORmllbGRNYXNrUHJvdG9QAVoyZ29vZ2xlLmdvbGFu", + "Zy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vZmllbGRtYXNrcGL4AQGiAgNH", + "UEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.FieldMask), global::Google.Protobuf.WellKnownTypes.FieldMask.Parser, new[]{ "Paths" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// `FieldMask` represents a set of symbolic field paths, for example: + /// + /// paths: "f.a" + /// paths: "f.b.d" + /// + /// Here `f` represents a field in some root message, `a` and `b` + /// fields in the message found in `f`, and `d` a field found in the + /// message in `f.b`. + /// + /// Field masks are used to specify a subset of fields that should be + /// returned by a get operation or modified by an update operation. + /// Field masks also have a custom JSON encoding (see below). + /// + /// # Field Masks in Projections + /// + /// When used in the context of a projection, a response message or + /// sub-message is filtered by the API to only contain those fields as + /// specified in the mask. For example, if the mask in the previous + /// example is applied to a response message as follows: + /// + /// f { + /// a : 22 + /// b { + /// d : 1 + /// x : 2 + /// } + /// y : 13 + /// } + /// z: 8 + /// + /// The result will not contain specific values for fields x,y and z + /// (their value will be set to the default, and omitted in proto text + /// output): + /// + /// f { + /// a : 22 + /// b { + /// d : 1 + /// } + /// } + /// + /// A repeated field is not allowed except at the last position of a + /// paths string. + /// + /// If a FieldMask object is not present in a get operation, the + /// operation applies to all fields (as if a FieldMask of all fields + /// had been specified). + /// + /// Note that a field mask does not necessarily apply to the + /// top-level response message. In case of a REST get operation, the + /// field mask applies directly to the response, but in case of a REST + /// list operation, the mask instead applies to each individual message + /// in the returned resource list. In case of a REST custom method, + /// other definitions may be used. Where the mask applies will be + /// clearly documented together with its declaration in the API. In + /// any case, the effect on the returned resource/resources is required + /// behavior for APIs. + /// + /// # Field Masks in Update Operations + /// + /// A field mask in update operations specifies which fields of the + /// targeted resource are going to be updated. The API is required + /// to only change the values of the fields as specified in the mask + /// and leave the others untouched. If a resource is passed in to + /// describe the updated values, the API ignores the values of all + /// fields not covered by the mask. + /// + /// If a repeated field is specified for an update operation, new values will + /// be appended to the existing repeated field in the target resource. Note that + /// a repeated field is only allowed in the last position of a `paths` string. + /// + /// If a sub-message is specified in the last position of the field mask for an + /// update operation, then new value will be merged into the existing sub-message + /// in the target resource. + /// + /// For example, given the target message: + /// + /// f { + /// b { + /// d: 1 + /// x: 2 + /// } + /// c: [1] + /// } + /// + /// And an update message: + /// + /// f { + /// b { + /// d: 10 + /// } + /// c: [2] + /// } + /// + /// then if the field mask is: + /// + /// paths: ["f.b", "f.c"] + /// + /// then the result will be: + /// + /// f { + /// b { + /// d: 10 + /// x: 2 + /// } + /// c: [1, 2] + /// } + /// + /// An implementation may provide options to override this default behavior for + /// repeated and message fields. + /// + /// In order to reset a field's value to the default, the field must + /// be in the mask and set to the default value in the provided resource. + /// Hence, in order to reset all fields of a resource, provide a default + /// instance of the resource and set all fields in the mask, or do + /// not provide a mask as described below. + /// + /// If a field mask is not present on update, the operation applies to + /// all fields (as if a field mask of all fields has been specified). + /// Note that in the presence of schema evolution, this may mean that + /// fields the client does not know and has therefore not filled into + /// the request will be reset to their default. If this is unwanted + /// behavior, a specific service may require a client to always specify + /// a field mask, producing an error if not. + /// + /// As with get operations, the location of the resource which + /// describes the updated values in the request message depends on the + /// operation kind. In any case, the effect of the field mask is + /// required to be honored by the API. + /// + /// ## Considerations for HTTP REST + /// + /// The HTTP kind of an update operation which uses a field mask must + /// be set to PATCH instead of PUT in order to satisfy HTTP semantics + /// (PUT must only be used for full updates). + /// + /// # JSON Encoding of Field Masks + /// + /// In JSON, a field mask is encoded as a single string where paths are + /// separated by a comma. Fields name in each path are converted + /// to/from lower-camel naming conventions. + /// + /// As an example, consider the following message declarations: + /// + /// message Profile { + /// User user = 1; + /// Photo photo = 2; + /// } + /// message User { + /// string display_name = 1; + /// string address = 2; + /// } + /// + /// In proto a field mask for `Profile` may look as such: + /// + /// mask { + /// paths: "user.display_name" + /// paths: "photo" + /// } + /// + /// In JSON, the same mask is represented as below: + /// + /// { + /// mask: "user.displayName,photo" + /// } + /// + /// # Field Masks and Oneof Fields + /// + /// Field masks treat fields in oneofs just as regular fields. Consider the + /// following message: + /// + /// message SampleMessage { + /// oneof test_oneof { + /// string name = 4; + /// SubMessage sub_message = 9; + /// } + /// } + /// + /// The field mask can be: + /// + /// mask { + /// paths: "name" + /// } + /// + /// Or: + /// + /// mask { + /// paths: "sub_message" + /// } + /// + /// Note that oneof type names ("test_oneof" in this case) cannot be used in + /// paths. + /// + /// ## Field Mask Verification + /// + /// The implementation of any API method which has a FieldMask type field in the + /// request should verify the included field paths, and return an + /// `INVALID_ARGUMENT` error if any path is unmappable. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FieldMask : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldMask()); + 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::Google.Protobuf.WellKnownTypes.FieldMaskReflection.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 FieldMask() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldMask(FieldMask other) : this() { + paths_ = other.paths_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FieldMask Clone() { + return new FieldMask(this); + } + + /// Field number for the "paths" field. + public const int PathsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_paths_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField paths_ = new pbc::RepeatedField(); + /// + /// The set of field mask paths. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Paths { + get { return paths_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FieldMask); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FieldMask other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!paths_.Equals(other.paths_)) 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 ^= paths_.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 + paths_.WriteTo(output, _repeated_paths_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) { + paths_.WriteTo(ref output, _repeated_paths_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 += paths_.CalculateSize(_repeated_paths_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FieldMask other) { + if (other == null) { + return; + } + paths_.Add(other.paths_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + paths_.AddEntriesFrom(input, _repeated_paths_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + paths_.AddEntriesFrom(ref input, _repeated_paths_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs.meta new file mode 100644 index 00000000..a408cab0 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMask.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bdf05fb2cf34f44fad76a8cbdedce74 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs new file mode 100644 index 00000000..d99a6314 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs @@ -0,0 +1,343 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2016 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using Google.Protobuf.Reflection; + +namespace Google.Protobuf.WellKnownTypes +{ + // Manually-written partial class for the FieldMask well-known type. + public partial class FieldMask : ICustomDiagnosticMessage + { + private const char FIELD_PATH_SEPARATOR = ','; + private const char FIELD_SEPARATOR_REGEX = '.'; + + /// + /// Converts a field mask specified by paths to a string. + /// + /// + /// If the value is a normalized duration in the range described in field_mask.proto, + /// is ignored. Otherwise, if the parameter is true, + /// a JSON object with a warning is returned; if it is false, an is thrown. + /// + /// Paths in the field mask + /// Determines the handling of non-normalized values + /// The represented field mask is invalid, and is false. + internal static string ToJson(IList paths, bool diagnosticOnly) + { + var firstInvalid = paths.FirstOrDefault(p => !IsPathValid(p)); + if (firstInvalid == null) + { + var writer = new StringWriter(); + JsonFormatter.WriteString(writer, string.Join(",", paths.Select(JsonFormatter.ToJsonName))); + return writer.ToString(); + } + else + { + if (diagnosticOnly) + { + var writer = new StringWriter(); + writer.Write("{ \"@warning\": \"Invalid FieldMask\", \"paths\": "); + JsonFormatter.Default.WriteList(writer, (IList)paths); + writer.Write(" }"); + return writer.ToString(); + } + else + { + throw new InvalidOperationException($"Invalid field mask to be converted to JSON: {firstInvalid}"); + } + } + } + + /// + /// Returns a string representation of this for diagnostic purposes. + /// + /// + /// Normally the returned value will be a JSON string value (including leading and trailing quotes) but + /// when the value is non-normalized or out of range, a JSON object representation will be returned + /// instead, including a warning. This is to avoid exceptions being thrown when trying to + /// diagnose problems - the regular JSON formatter will still throw an exception for non-normalized + /// values. + /// + /// A string representation of this value. + public string ToDiagnosticString() + { + return ToJson(Paths, true); + } + + /// + /// Parses from a string to a FieldMask. + /// + public static FieldMask FromString(string value) + { + return FromStringEnumerable(new List(value.Split(FIELD_PATH_SEPARATOR))); + } + + /// + /// Parses from a string to a FieldMask and validates all field paths. + /// + /// The type to validate the field paths against. + public static FieldMask FromString<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]T>(string value) where T : IMessage + { + return FromStringEnumerable(new List(value.Split(FIELD_PATH_SEPARATOR))); + } + + /// + /// Constructs a FieldMask for a list of field paths in a certain type. + /// + /// The type to validate the field paths against. + public static FieldMask FromStringEnumerable<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]T>(IEnumerable paths) where T : IMessage + { + var mask = new FieldMask(); + foreach (var path in paths) + { + if (path.Length == 0) + { + // Ignore empty field paths. + continue; + } + + if (typeof(T) != typeof(Empty) + && !IsValid(path)) + { + throw new InvalidProtocolBufferException(path + " is not a valid path for " + typeof(T)); + } + + mask.Paths.Add(path); + } + + return mask; + } + + /// + /// Constructs a FieldMask from the passed field numbers. + /// + /// The type to validate the field paths against. + public static FieldMask FromFieldNumbers<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]T>(params int[] fieldNumbers) where T : IMessage + { + return FromFieldNumbers((IEnumerable)fieldNumbers); + } + + /// + /// Constructs a FieldMask from the passed field numbers. + /// + /// The type to validate the field paths against. + public static FieldMask FromFieldNumbers<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]T>(IEnumerable fieldNumbers) where T : IMessage + { + var descriptor = Activator.CreateInstance().Descriptor; + + var mask = new FieldMask(); + foreach (var fieldNumber in fieldNumbers) + { + var field = descriptor.FindFieldByNumber(fieldNumber); + if (field == null) + { + throw new ArgumentNullException($"{fieldNumber} is not a valid field number for {descriptor.Name}"); + } + + mask.Paths.Add(field.Name); + } + + return mask; + } + + /// + /// Checks whether the given path is valid for a field mask. + /// + /// true if the path is valid; false otherwise + private static bool IsPathValid(string input) + { + for (int i = 0; i < input.Length; i++) + { + char c = input[i]; + if (c >= 'A' && c <= 'Z') + { + return false; + } + if (c == '_' && i < input.Length - 1) + { + char next = input[i + 1]; + if (next < 'a' || next > 'z') + { + return false; + } + } + } + return true; + } + + /// + /// Checks whether paths in a given fields mask are valid. + /// + /// The type to validate the field paths against. + public static bool IsValid<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]T>(FieldMask fieldMask) where T : IMessage + { + var descriptor = Activator.CreateInstance().Descriptor; + + return IsValid(descriptor, fieldMask); + } + + /// + /// Checks whether paths in a given fields mask are valid. + /// + public static bool IsValid(MessageDescriptor descriptor, FieldMask fieldMask) + { + foreach (var path in fieldMask.Paths) + { + if (!IsValid(descriptor, path)) + { + return false; + } + } + + return true; + } + + /// + /// Checks whether a given field path is valid. + /// + /// The type to validate the field paths against. + public static bool IsValid<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]T>(string path) where T : IMessage + { + var descriptor = Activator.CreateInstance().Descriptor; + + return IsValid(descriptor, path); + } + + /// + /// Checks whether paths in a given fields mask are valid. + /// + public static bool IsValid(MessageDescriptor descriptor, string path) + { + var parts = path.Split(FIELD_SEPARATOR_REGEX); + if (parts.Length == 0) + { + return false; + } + + foreach (var name in parts) + { + var field = descriptor?.FindFieldByName(name); + if (field == null) + { + return false; + } + + if (!field.IsRepeated + && field.FieldType == FieldType.Message) + { + descriptor = field.MessageType; + } + else + { + descriptor = null; + } + } + + return true; + } + + /// + /// Converts this FieldMask to its canonical form. In the canonical form of a + /// FieldMask, all field paths are sorted alphabetically and redundant field + /// paths are removed. + /// + public FieldMask Normalize() + { + return new FieldMaskTree(this).ToFieldMask(); + } + + /// + /// Creates a union of two or more FieldMasks. + /// + public FieldMask Union(params FieldMask[] otherMasks) + { + var maskTree = new FieldMaskTree(this); + foreach (var mask in otherMasks) + { + maskTree.MergeFromFieldMask(mask); + } + + return maskTree.ToFieldMask(); + } + + /// + /// Calculates the intersection of two FieldMasks. + /// + public FieldMask Intersection(FieldMask additionalMask) + { + var tree = new FieldMaskTree(this); + var result = new FieldMaskTree(); + foreach (var path in additionalMask.Paths) + { + tree.IntersectFieldPath(path, result); + } + + return result.ToFieldMask(); + } + + /// + /// Merges fields specified by this FieldMask from one message to another with the + /// specified merge options. + /// + public void Merge(IMessage source, IMessage destination, MergeOptions options) + { + new FieldMaskTree(this).Merge(source, destination, options); + } + + /// + /// Merges fields specified by this FieldMask from one message to another. + /// + public void Merge(IMessage source, IMessage destination) + { + Merge(source, destination, new MergeOptions()); + } + + /// + /// Options to customize merging behavior. + /// + public sealed class MergeOptions + { + /// + /// Whether to replace message fields(i.e., discard existing content in + /// destination message fields) when merging. + /// Default behavior is to merge the source message field into the + /// destination message field. + /// + public bool ReplaceMessageFields { get; set; } = false; + + /// + /// Whether to replace repeated fields (i.e., discard existing content in + /// destination repeated fields) when merging. + /// Default behavior is to append elements from source repeated field to the + /// destination repeated field. + /// + public bool ReplaceRepeatedFields { get; set; } = false; + + /// + /// Whether to replace primitive (non-repeated and non-message) fields in + /// destination message fields with the source primitive fields (i.e., if the + /// field is set in the source, the value is copied to the + /// destination; if the field is unset in the source, the field is cleared + /// from the destination) when merging. + /// + /// Default behavior is to always set the value of the source primitive + /// field to the destination primitive field, and if the source field is + /// unset, the default value of the source field is copied to the + /// destination. + /// + public bool ReplacePrimitiveFields { get; set; } = false; + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs.meta new file mode 100644 index 00000000..7e89eeeb --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c416683ef57fc246acd181526fe1987 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs new file mode 100644 index 00000000..18dc152a --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs @@ -0,0 +1,253 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/source_context.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/source_context.proto + public static partial class SourceContextReflection { + + #region Descriptor + /// File descriptor for google/protobuf/source_context.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SourceContextReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2ds", + "ZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEo", + "CUKKAQoTY29tLmdvb2dsZS5wcm90b2J1ZkISU291cmNlQ29udGV4dFByb3Rv", + "UAFaNmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3Nv", + "dXJjZWNvbnRleHRwYqICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25v", + "d25UeXBlc2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.SourceContext), global::Google.Protobuf.WellKnownTypes.SourceContext.Parser, new[]{ "FileName" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// `SourceContext` represents information about the source of a + /// protobuf element, like the file in which it is defined. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SourceContext : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SourceContext()); + 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::Google.Protobuf.WellKnownTypes.SourceContextReflection.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 SourceContext() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SourceContext(SourceContext other) : this() { + fileName_ = other.fileName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SourceContext Clone() { + return new SourceContext(this); + } + + /// Field number for the "file_name" field. + public const int FileNameFieldNumber = 1; + private string fileName_ = ""; + /// + /// The path-qualified name of the .proto file that contained the associated + /// protobuf element. For example: `"google/protobuf/source_context.proto"`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FileName { + get { return fileName_; } + set { + fileName_ = 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 SourceContext); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SourceContext other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FileName != other.FileName) 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 (FileName.Length != 0) hash ^= FileName.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 (FileName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FileName); + } + 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 (FileName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FileName); + } + 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 (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SourceContext other) { + if (other == null) { + return; + } + if (other.FileName.Length != 0) { + FileName = other.FileName; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + FileName = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FileName = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs.meta new file mode 100644 index 00000000..608890ac --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/SourceContext.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a795752d93c0c243889724c86f0511e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs new file mode 100644 index 00000000..51e77721 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs @@ -0,0 +1,1007 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/struct.proto + public static partial class StructReflection { + + #region Descriptor + /// File descriptor for google/protobuf/struct.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StructReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i", + "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i", + "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB", + "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC", + "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv", + "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM", + "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K", + "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI", + "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW", + "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW", + "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W", + "QUxVRRAAQn8KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAFa", + "L2dvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3N0cnVj", + "dHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVz", + "YgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.NullValue), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Struct), global::Google.Protobuf.WellKnownTypes.Struct.Parser, new[]{ "Fields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Value), global::Google.Protobuf.WellKnownTypes.Value.Parser, new[]{ "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue" }, new[]{ "Kind" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.ListValue), global::Google.Protobuf.WellKnownTypes.ListValue.Parser, new[]{ "Values" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// `NullValue` is a singleton enumeration to represent the null value for the + /// `Value` type union. + /// + /// The JSON representation for `NullValue` is JSON `null`. + /// + public enum NullValue { + /// + /// Null value. + /// + [pbr::OriginalName("NULL_VALUE")] NullValue = 0, + } + + #endregion + + #region Messages + /// + /// `Struct` represents a structured data value, consisting of fields + /// which map to dynamically typed values. In some languages, `Struct` + /// might be supported by a native representation. For example, in + /// scripting languages like JS a struct is represented as an + /// object. The details of that representation are described together + /// with the proto support for the language. + /// + /// The JSON representation for `Struct` is JSON object. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Struct : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Struct()); + 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::Google.Protobuf.WellKnownTypes.StructReflection.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 Struct() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Struct(Struct other) : this() { + fields_ = other.fields_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Struct Clone() { + return new Struct(this); + } + + /// Field number for the "fields" field. + public const int FieldsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_fields_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser), 10); + private readonly pbc::MapField fields_ = new pbc::MapField(); + /// + /// Unordered map of dynamically typed values. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Fields { + get { return fields_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Struct); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Struct other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Fields.Equals(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; + 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 + fields_.WriteTo(output, _map_fields_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) { + fields_.WriteTo(ref output, _map_fields_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 += fields_.CalculateSize(_map_fields_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Struct other) { + if (other == null) { + return; + } + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + fields_.AddEntriesFrom(input, _map_fields_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + fields_.AddEntriesFrom(ref input, _map_fields_codec); + break; + } + } + } + } + #endif + + } + + /// + /// `Value` represents a dynamically typed value which can be either + /// null, a number, a string, a boolean, a recursive struct value, or a + /// list of values. A producer of value is expected to set one of these + /// variants. Absence of any variant indicates an error. + /// + /// The JSON representation for `Value` is JSON value. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Value : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Value()); + 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::Google.Protobuf.WellKnownTypes.StructReflection.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 Value() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Value(Value other) : this() { + switch (other.KindCase) { + case KindOneofCase.NullValue: + NullValue = other.NullValue; + break; + case KindOneofCase.NumberValue: + NumberValue = other.NumberValue; + break; + case KindOneofCase.StringValue: + StringValue = other.StringValue; + break; + case KindOneofCase.BoolValue: + BoolValue = other.BoolValue; + break; + case KindOneofCase.StructValue: + StructValue = other.StructValue.Clone(); + break; + case KindOneofCase.ListValue: + ListValue = other.ListValue.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Value Clone() { + return new Value(this); + } + + /// Field number for the "null_value" field. + public const int NullValueFieldNumber = 1; + /// + /// Represents a null value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.NullValue NullValue { + get { return HasNullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NullValue; } + set { + kind_ = value; + kindCase_ = KindOneofCase.NullValue; + } + } + /// Gets whether the "null_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNullValue { + get { return kindCase_ == KindOneofCase.NullValue; } + } + /// Clears the value of the oneof if it's currently set to "null_value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNullValue() { + if (HasNullValue) { + ClearKind(); + } + } + + /// Field number for the "number_value" field. + public const int NumberValueFieldNumber = 2; + /// + /// Represents a double value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double NumberValue { + get { return HasNumberValue ? (double) kind_ : 0D; } + set { + kind_ = value; + kindCase_ = KindOneofCase.NumberValue; + } + } + /// Gets whether the "number_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNumberValue { + get { return kindCase_ == KindOneofCase.NumberValue; } + } + /// Clears the value of the oneof if it's currently set to "number_value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNumberValue() { + if (HasNumberValue) { + ClearKind(); + } + } + + /// Field number for the "string_value" field. + public const int StringValueFieldNumber = 3; + /// + /// Represents a string value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StringValue { + get { return HasStringValue ? (string) kind_ : ""; } + set { + kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + kindCase_ = KindOneofCase.StringValue; + } + } + /// Gets whether the "string_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasStringValue { + get { return kindCase_ == KindOneofCase.StringValue; } + } + /// Clears the value of the oneof if it's currently set to "string_value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStringValue() { + if (HasStringValue) { + ClearKind(); + } + } + + /// Field number for the "bool_value" field. + public const int BoolValueFieldNumber = 4; + /// + /// Represents a boolean value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool BoolValue { + get { return HasBoolValue ? (bool) kind_ : false; } + set { + kind_ = value; + kindCase_ = KindOneofCase.BoolValue; + } + } + /// Gets whether the "bool_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasBoolValue { + get { return kindCase_ == KindOneofCase.BoolValue; } + } + /// Clears the value of the oneof if it's currently set to "bool_value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearBoolValue() { + if (HasBoolValue) { + ClearKind(); + } + } + + /// Field number for the "struct_value" field. + public const int StructValueFieldNumber = 5; + /// + /// Represents a structured value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct StructValue { + get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue; + } + } + + /// Field number for the "list_value" field. + public const int ListValueFieldNumber = 6; + /// + /// Represents a repeated `Value`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.ListValue ListValue { + get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue; + } + } + + private object kind_; + /// Enum of possible cases for the "kind" oneof. + public enum KindOneofCase { + None = 0, + NullValue = 1, + NumberValue = 2, + StringValue = 3, + BoolValue = 4, + StructValue = 5, + ListValue = 6, + } + private KindOneofCase kindCase_ = KindOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KindOneofCase KindCase { + get { return kindCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearKind() { + kindCase_ = KindOneofCase.None; + kind_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Value); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Value other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NullValue != other.NullValue) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NumberValue, other.NumberValue)) return false; + if (StringValue != other.StringValue) return false; + if (BoolValue != other.BoolValue) return false; + if (!object.Equals(StructValue, other.StructValue)) return false; + if (!object.Equals(ListValue, other.ListValue)) return false; + if (KindCase != other.KindCase) 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 (HasNullValue) hash ^= NullValue.GetHashCode(); + if (HasNumberValue) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NumberValue); + if (HasStringValue) hash ^= StringValue.GetHashCode(); + if (HasBoolValue) hash ^= BoolValue.GetHashCode(); + if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode(); + if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode(); + hash ^= (int) kindCase_; + 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 (HasNullValue) { + output.WriteRawTag(8); + output.WriteEnum((int) NullValue); + } + if (HasNumberValue) { + output.WriteRawTag(17); + output.WriteDouble(NumberValue); + } + if (HasStringValue) { + output.WriteRawTag(26); + output.WriteString(StringValue); + } + if (HasBoolValue) { + output.WriteRawTag(32); + output.WriteBool(BoolValue); + } + if (kindCase_ == KindOneofCase.StructValue) { + output.WriteRawTag(42); + output.WriteMessage(StructValue); + } + if (kindCase_ == KindOneofCase.ListValue) { + output.WriteRawTag(50); + output.WriteMessage(ListValue); + } + 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 (HasNullValue) { + output.WriteRawTag(8); + output.WriteEnum((int) NullValue); + } + if (HasNumberValue) { + output.WriteRawTag(17); + output.WriteDouble(NumberValue); + } + if (HasStringValue) { + output.WriteRawTag(26); + output.WriteString(StringValue); + } + if (HasBoolValue) { + output.WriteRawTag(32); + output.WriteBool(BoolValue); + } + if (kindCase_ == KindOneofCase.StructValue) { + output.WriteRawTag(42); + output.WriteMessage(StructValue); + } + if (kindCase_ == KindOneofCase.ListValue) { + output.WriteRawTag(50); + output.WriteMessage(ListValue); + } + 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 (HasNullValue) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue); + } + if (HasNumberValue) { + size += 1 + 8; + } + if (HasStringValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue); + } + if (HasBoolValue) { + size += 1 + 1; + } + if (kindCase_ == KindOneofCase.StructValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue); + } + if (kindCase_ == KindOneofCase.ListValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Value other) { + if (other == null) { + return; + } + switch (other.KindCase) { + case KindOneofCase.NullValue: + NullValue = other.NullValue; + break; + case KindOneofCase.NumberValue: + NumberValue = other.NumberValue; + break; + case KindOneofCase.StringValue: + StringValue = other.StringValue; + break; + case KindOneofCase.BoolValue: + BoolValue = other.BoolValue; + break; + case KindOneofCase.StructValue: + if (StructValue == null) { + StructValue = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + StructValue.MergeFrom(other.StructValue); + break; + case KindOneofCase.ListValue: + if (ListValue == null) { + ListValue = new global::Google.Protobuf.WellKnownTypes.ListValue(); + } + ListValue.MergeFrom(other.ListValue); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + kind_ = input.ReadEnum(); + kindCase_ = KindOneofCase.NullValue; + break; + } + case 17: { + NumberValue = input.ReadDouble(); + break; + } + case 26: { + StringValue = input.ReadString(); + break; + } + case 32: { + BoolValue = input.ReadBool(); + break; + } + case 42: { + global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct(); + if (kindCase_ == KindOneofCase.StructValue) { + subBuilder.MergeFrom(StructValue); + } + input.ReadMessage(subBuilder); + StructValue = subBuilder; + break; + } + case 50: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (kindCase_ == KindOneofCase.ListValue) { + subBuilder.MergeFrom(ListValue); + } + input.ReadMessage(subBuilder); + ListValue = subBuilder; + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + kind_ = input.ReadEnum(); + kindCase_ = KindOneofCase.NullValue; + break; + } + case 17: { + NumberValue = input.ReadDouble(); + break; + } + case 26: { + StringValue = input.ReadString(); + break; + } + case 32: { + BoolValue = input.ReadBool(); + break; + } + case 42: { + global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct(); + if (kindCase_ == KindOneofCase.StructValue) { + subBuilder.MergeFrom(StructValue); + } + input.ReadMessage(subBuilder); + StructValue = subBuilder; + break; + } + case 50: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (kindCase_ == KindOneofCase.ListValue) { + subBuilder.MergeFrom(ListValue); + } + input.ReadMessage(subBuilder); + ListValue = subBuilder; + break; + } + } + } + } + #endif + + } + + /// + /// `ListValue` is a wrapper around a repeated field of values. + /// + /// The JSON representation for `ListValue` is JSON array. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListValue : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListValue()); + 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::Google.Protobuf.WellKnownTypes.StructReflection.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 ListValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListValue(ListValue other) : this() { + values_ = other.values_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListValue Clone() { + return new ListValue(this); + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + /// + /// Repeated field of dynamically typed values. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Values { + get { return values_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!values_.Equals(other.values_)) 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 ^= values_.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 + values_.WriteTo(output, _repeated_values_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) { + values_.WriteTo(ref output, _repeated_values_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 += values_.CalculateSize(_repeated_values_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListValue other) { + if (other == null) { + return; + } + values_.Add(other.values_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + values_.AddEntriesFrom(input, _repeated_values_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + values_.AddEntriesFrom(ref input, _repeated_values_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs.meta new file mode 100644 index 00000000..32a2cc26 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Struct.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d0afc05c366e7684190f83cc31845f02 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs new file mode 100644 index 00000000..b18de0e2 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs @@ -0,0 +1,53 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; + +namespace Google.Protobuf.WellKnownTypes +{ + /// + /// Extension methods on BCL time-related types, converting to protobuf types. + /// + public static class TimeExtensions + { + /// + /// Converts the given to a . + /// + /// The date and time to convert to a timestamp. + /// The value has a other than Utc. + /// The converted timestamp. + public static Timestamp ToTimestamp(this DateTime dateTime) + { + return Timestamp.FromDateTime(dateTime); + } + + /// + /// Converts the given to a + /// + /// The offset is taken into consideration when converting the value (so the same instant in time + /// is represented) but is not a separate part of the resulting value. In other words, there is no + /// roundtrip operation to retrieve the original DateTimeOffset. + /// The date and time (with UTC offset) to convert to a timestamp. + /// The converted timestamp. + public static Timestamp ToTimestamp(this DateTimeOffset dateTimeOffset) + { + return Timestamp.FromDateTimeOffset(dateTimeOffset); + } + + /// + /// Converts the given to a . + /// + /// The time span to convert. + /// The converted duration. + public static Duration ToDuration(this TimeSpan timeSpan) + { + return Duration.FromTimeSpan(timeSpan); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs.meta new file mode 100644 index 00000000..59380253 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimeExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ade76500a5f2e7a4b99a2c6225c2d383 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs new file mode 100644 index 00000000..11fc473e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs @@ -0,0 +1,384 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/timestamp.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/timestamp.proto + public static partial class TimestampReflection { + + #region Descriptor + /// File descriptor for google/protobuf/timestamp.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TimestampReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJv", + "dG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MY", + "AiABKAVChQEKE2NvbS5nb29nbGUucHJvdG9idWZCDlRpbWVzdGFtcFByb3Rv", + "UAFaMmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3Rp", + "bWVzdGFtcHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93", + "blR5cGVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Timestamp), global::Google.Protobuf.WellKnownTypes.Timestamp.Parser, new[]{ "Seconds", "Nanos" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// A Timestamp represents a point in time independent of any time zone or local + /// calendar, encoded as a count of seconds and fractions of seconds at + /// nanosecond resolution. The count is relative to an epoch at UTC midnight on + /// January 1, 1970, in the proleptic Gregorian calendar which extends the + /// Gregorian calendar backwards to year one. + /// + /// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + /// second table is needed for interpretation, using a [24-hour linear + /// smear](https://developers.google.com/time/smear). + /// + /// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + /// restricting to that range, we ensure that we can convert to and from [RFC + /// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + /// + /// # Examples + /// + /// Example 1: Compute Timestamp from POSIX `time()`. + /// + /// Timestamp timestamp; + /// timestamp.set_seconds(time(NULL)); + /// timestamp.set_nanos(0); + /// + /// Example 2: Compute Timestamp from POSIX `gettimeofday()`. + /// + /// struct timeval tv; + /// gettimeofday(&tv, NULL); + /// + /// Timestamp timestamp; + /// timestamp.set_seconds(tv.tv_sec); + /// timestamp.set_nanos(tv.tv_usec * 1000); + /// + /// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + /// + /// FILETIME ft; + /// GetSystemTimeAsFileTime(&ft); + /// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + /// + /// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + /// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + /// Timestamp timestamp; + /// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + /// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + /// + /// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + /// + /// long millis = System.currentTimeMillis(); + /// + /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + /// .setNanos((int) ((millis % 1000) * 1000000)).build(); + /// + /// Example 5: Compute Timestamp from Java `Instant.now()`. + /// + /// Instant now = Instant.now(); + /// + /// Timestamp timestamp = + /// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + /// .setNanos(now.getNano()).build(); + /// + /// Example 6: Compute Timestamp from current time in Python. + /// + /// timestamp = Timestamp() + /// timestamp.GetCurrentTime() + /// + /// # JSON Mapping + /// + /// In JSON format, the Timestamp type is encoded as a string in the + /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + /// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + /// where {year} is always expressed using four digits while {month}, {day}, + /// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + /// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + /// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + /// is required. A proto3 JSON serializer should always use UTC (as indicated by + /// "Z") when printing the Timestamp type and a proto3 JSON parser should be + /// able to accept both UTC and other timezones (as indicated by an offset). + /// + /// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + /// 01:30 UTC on January 15, 2017. + /// + /// In JavaScript, one can convert a Date object to this format using the + /// standard + /// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + /// method. In Python, a standard `datetime.datetime` object can be converted + /// to this format using + /// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + /// the Joda Time's [`ISODateTimeFormat.dateTime()`]( + /// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + /// ) to obtain a formatter capable of generating timestamps in this format. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Timestamp : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Timestamp()); + 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::Google.Protobuf.WellKnownTypes.TimestampReflection.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 Timestamp() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timestamp(Timestamp other) : this() { + seconds_ = other.seconds_; + nanos_ = other.nanos_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timestamp Clone() { + return new Timestamp(this); + } + + /// Field number for the "seconds" field. + public const int SecondsFieldNumber = 1; + private long seconds_; + /// + /// Represents seconds of UTC time since Unix epoch + /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + /// 9999-12-31T23:59:59Z inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Seconds { + get { return seconds_; } + set { + seconds_ = value; + } + } + + /// Field number for the "nanos" field. + public const int NanosFieldNumber = 2; + private int nanos_; + /// + /// Non-negative fractions of a second at nanosecond resolution. Negative + /// second values with fractions must still have non-negative nanos values + /// that count forward in time. Must be from 0 to 999,999,999 + /// inclusive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Nanos { + get { return nanos_; } + set { + nanos_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Timestamp); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Timestamp other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Seconds != other.Seconds) return false; + if (Nanos != other.Nanos) 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 (Seconds != 0L) hash ^= Seconds.GetHashCode(); + if (Nanos != 0) hash ^= Nanos.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 (Seconds != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Seconds); + } + if (Nanos != 0) { + output.WriteRawTag(16); + output.WriteInt32(Nanos); + } + 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 (Seconds != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Seconds); + } + if (Nanos != 0) { + output.WriteRawTag(16); + output.WriteInt32(Nanos); + } + 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 (Seconds != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds); + } + if (Nanos != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Timestamp other) { + if (other == null) { + return; + } + if (other.Seconds != 0L) { + Seconds = other.Seconds; + } + if (other.Nanos != 0) { + Nanos = other.Nanos; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Seconds = input.ReadInt64(); + break; + } + case 16: { + Nanos = input.ReadInt32(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Seconds = input.ReadInt64(); + break; + } + case 16: { + Nanos = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs.meta new file mode 100644 index 00000000..4ea10b82 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Timestamp.pb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 15ad0fbd95e117b418bd460340702797 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs new file mode 100644 index 00000000..2aa3a1c3 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs @@ -0,0 +1,321 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +#endregion + +using System; +using System.Globalization; +using System.Text; + +namespace Google.Protobuf.WellKnownTypes +{ + public partial class Timestamp : ICustomDiagnosticMessage, IComparable + { + private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + // Constants determined programmatically, but then hard-coded so they can be constant expressions. + private const long BclSecondsAtUnixEpoch = 62135596800; + internal const long UnixSecondsAtBclMaxValue = 253402300799; + internal const long UnixSecondsAtBclMinValue = -BclSecondsAtUnixEpoch; + internal const int MaxNanos = Duration.NanosecondsPerSecond - 1; + + private static bool IsNormalized(long seconds, int nanoseconds) => + nanoseconds >= 0 && + nanoseconds <= MaxNanos && + seconds >= UnixSecondsAtBclMinValue && + seconds <= UnixSecondsAtBclMaxValue; + + /// + /// Returns the difference between one and another, as a . + /// + /// The timestamp to subtract from. Must not be null. + /// The timestamp to subtract. Must not be null. + /// The difference between the two specified timestamps. + public static Duration operator -(Timestamp lhs, Timestamp rhs) + { + ProtoPreconditions.CheckNotNull(lhs, nameof(lhs)); + ProtoPreconditions.CheckNotNull(rhs, nameof(rhs)); + checked + { + return Duration.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos); + } + } + + /// + /// Adds a to a , to obtain another Timestamp. + /// + /// The timestamp to add the duration to. Must not be null. + /// The duration to add. Must not be null. + /// The result of adding the duration to the timestamp. + public static Timestamp operator +(Timestamp lhs, Duration rhs) + { + ProtoPreconditions.CheckNotNull(lhs, nameof(lhs)); + ProtoPreconditions.CheckNotNull(rhs, nameof(rhs)); + checked + { + return Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos); + } + } + + /// + /// Subtracts a from a , to obtain another Timestamp. + /// + /// The timestamp to subtract the duration from. Must not be null. + /// The duration to subtract. + /// The result of subtracting the duration from the timestamp. + public static Timestamp operator -(Timestamp lhs, Duration rhs) + { + ProtoPreconditions.CheckNotNull(lhs, nameof(lhs)); + ProtoPreconditions.CheckNotNull(rhs, nameof(rhs)); + checked + { + return Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos); + } + } + + /// + /// Converts this timestamp into a . + /// + /// + /// The resulting DateTime will always have a Kind of Utc. + /// If the timestamp is not a precise number of ticks, it will be truncated towards the start + /// of time. For example, a timestamp with a value of 99 will result in a + /// value precisely on a second. + /// + /// This timestamp as a DateTime. + /// The timestamp contains invalid values; either it is + /// incorrectly normalized or is outside the valid range. + public DateTime ToDateTime() + { + if (!IsNormalized(Seconds, Nanos)) + { + throw new InvalidOperationException(@"Timestamp contains invalid values: Seconds={Seconds}; Nanos={Nanos}"); + } + return UnixEpoch.AddSeconds(Seconds).AddTicks(Nanos / Duration.NanosecondsPerTick); + } + + /// + /// Converts this timestamp into a . + /// + /// + /// The resulting DateTimeOffset will always have an Offset of zero. + /// If the timestamp is not a precise number of ticks, it will be truncated towards the start + /// of time. For example, a timestamp with a value of 99 will result in a + /// value precisely on a second. + /// + /// This timestamp as a DateTimeOffset. + /// The timestamp contains invalid values; either it is + /// incorrectly normalized or is outside the valid range. + public DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset(ToDateTime(), TimeSpan.Zero); + } + + /// + /// Converts the specified to a . + /// + /// + /// The Kind of is not DateTimeKind.Utc. + /// The converted timestamp. + public static Timestamp FromDateTime(DateTime dateTime) + { + if (dateTime.Kind != DateTimeKind.Utc) + { + throw new ArgumentException("Conversion from DateTime to Timestamp requires the DateTime kind to be Utc", "dateTime"); + } + // Do the arithmetic using DateTime.Ticks, which is always non-negative, making things simpler. + long secondsSinceBclEpoch = dateTime.Ticks / TimeSpan.TicksPerSecond; + int nanoseconds = (int) (dateTime.Ticks % TimeSpan.TicksPerSecond) * Duration.NanosecondsPerTick; + return new Timestamp { Seconds = secondsSinceBclEpoch - BclSecondsAtUnixEpoch, Nanos = nanoseconds }; + } + + /// + /// Converts the given to a + /// + /// The offset is taken into consideration when converting the value (so the same instant in time + /// is represented) but is not a separate part of the resulting value. In other words, there is no + /// roundtrip operation to retrieve the original DateTimeOffset. + /// The date and time (with UTC offset) to convert to a timestamp. + /// The converted timestamp. + public static Timestamp FromDateTimeOffset(DateTimeOffset dateTimeOffset) + { + // We don't need to worry about this having negative ticks: DateTimeOffset is constrained to handle + // values whose *UTC* value is in the range of DateTime. + return FromDateTime(dateTimeOffset.UtcDateTime); + } + + internal static Timestamp Normalize(long seconds, int nanoseconds) + { + int extraSeconds = nanoseconds / Duration.NanosecondsPerSecond; + seconds += extraSeconds; + nanoseconds -= extraSeconds * Duration.NanosecondsPerSecond; + + if (nanoseconds < 0) + { + nanoseconds += Duration.NanosecondsPerSecond; + seconds--; + } + return new Timestamp { Seconds = seconds, Nanos = nanoseconds }; + } + + /// + /// Converts a timestamp specified in seconds/nanoseconds to a string. + /// + /// + /// If the value is a normalized duration in the range described in timestamp.proto, + /// is ignored. Otherwise, if the parameter is true, + /// a JSON object with a warning is returned; if it is false, an is thrown. + /// + /// Seconds portion of the duration. + /// Nanoseconds portion of the duration. + /// Determines the handling of non-normalized values + /// The represented duration is invalid, and is false. + internal static string ToJson(long seconds, int nanoseconds, bool diagnosticOnly) + { + if (IsNormalized(seconds, nanoseconds)) + { + // Use .NET's formatting for the value down to the second, including an opening double quote (as it's a string value) + DateTime dateTime = UnixEpoch.AddSeconds(seconds); + var builder = new StringBuilder(); + builder.Append('"'); + builder.Append(dateTime.ToString("yyyy'-'MM'-'dd'T'HH:mm:ss", CultureInfo.InvariantCulture)); + Duration.AppendNanoseconds(builder, nanoseconds); + builder.Append("Z\""); + return builder.ToString(); + } + if (diagnosticOnly) + { + return string.Format(CultureInfo.InvariantCulture, + "{{ \"@warning\": \"Invalid Timestamp\", \"seconds\": \"{0}\", \"nanos\": {1} }}", + seconds, + nanoseconds); + } + else + { + throw new InvalidOperationException("Non-normalized timestamp value"); + } + } + + /// + /// Given another timestamp, returns 0 if the timestamps are equivalent, -1 if this timestamp precedes the other, and 1 otherwise + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// Timestamp to compare + /// an integer indicating whether this timestamp precedes or follows the other + public int CompareTo(Timestamp other) + { + return other == null ? 1 + : Seconds < other.Seconds ? -1 + : Seconds > other.Seconds ? 1 + : Nanos < other.Nanos ? -1 + : Nanos > other.Nanos ? 1 + : 0; + } + + /// + /// Compares two timestamps and returns whether the first is less than (chronologically precedes) the second + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// + /// + /// true if a precedes b + public static bool operator <(Timestamp a, Timestamp b) + { + return a.CompareTo(b) < 0; + } + + /// + /// Compares two timestamps and returns whether the first is greater than (chronologically follows) the second + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// + /// + /// true if a follows b + public static bool operator >(Timestamp a, Timestamp b) + { + return a.CompareTo(b) > 0; + } + + /// + /// Compares two timestamps and returns whether the first is less than (chronologically precedes) the second + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// + /// + /// true if a precedes b + public static bool operator <=(Timestamp a, Timestamp b) + { + return a.CompareTo(b) <= 0; + } + + /// + /// Compares two timestamps and returns whether the first is greater than (chronologically follows) the second + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// + /// + /// true if a follows b + public static bool operator >=(Timestamp a, Timestamp b) + { + return a.CompareTo(b) >= 0; + } + + + /// + /// Returns whether two timestamps are equivalent + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// + /// + /// true if the two timestamps refer to the same nanosecond + public static bool operator ==(Timestamp a, Timestamp b) + { + return ReferenceEquals(a, b) || (a is null ? (b is null) : a.Equals(b)); + } + + /// + /// Returns whether two timestamps differ + /// + /// + /// Make sure the timestamps are normalized. Comparing non-normalized timestamps is not specified and may give unexpected results. + /// + /// + /// + /// true if the two timestamps differ + public static bool operator !=(Timestamp a, Timestamp b) + { + return !(a == b); + } + + /// + /// Returns a string representation of this for diagnostic purposes. + /// + /// + /// Normally the returned value will be a JSON string value (including leading and trailing quotes) but + /// when the value is non-normalized or out of range, a JSON object representation will be returned + /// instead, including a warning. This is to avoid exceptions being thrown when trying to + /// diagnose problems - the regular JSON formatter will still throw an exception for non-normalized + /// values. + /// + /// A string representation of this value. + public string ToDiagnosticString() + { + return ToJson(Seconds, Nanos, true); + } + } +} diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs.meta new file mode 100644 index 00000000..2454fb0e --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/TimestampPartial.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40dd8e24ce736dc41b97918d65fc2d6b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Type.pb.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Type.pb.cs new file mode 100644 index 00000000..6b8ef856 --- /dev/null +++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/Google.Protobuf/WellKnownTypes/Type.pb.cs @@ -0,0 +1,2114 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.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 Google.Protobuf.WellKnownTypes { + + /// Holder for reflection information generated from google/protobuf/type.proto + public static partial class TypeReflection { + + #region Descriptor + /// File descriptor for google/protobuf/type.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TypeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxIPZ29vZ2xlLnByb3RvYnVm", + "Ghlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvGiRnb29nbGUvcHJvdG9idWYv", + "c291cmNlX2NvbnRleHQucHJvdG8i6AEKBFR5cGUSDAoEbmFtZRgBIAEoCRIm", + "CgZmaWVsZHMYAiADKAsyFi5nb29nbGUucHJvdG9idWYuRmllbGQSDgoGb25l", + "b2ZzGAMgAygJEigKB29wdGlvbnMYBCADKAsyFy5nb29nbGUucHJvdG9idWYu", + "T3B0aW9uEjYKDnNvdXJjZV9jb250ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3Rv", + "YnVmLlNvdXJjZUNvbnRleHQSJwoGc3ludGF4GAYgASgOMhcuZ29vZ2xlLnBy", + "b3RvYnVmLlN5bnRheBIPCgdlZGl0aW9uGAcgASgJItUFCgVGaWVsZBIpCgRr", + "aW5kGAEgASgOMhsuZ29vZ2xlLnByb3RvYnVmLkZpZWxkLktpbmQSNwoLY2Fy", + "ZGluYWxpdHkYAiABKA4yIi5nb29nbGUucHJvdG9idWYuRmllbGQuQ2FyZGlu", + "YWxpdHkSDgoGbnVtYmVyGAMgASgFEgwKBG5hbWUYBCABKAkSEAoIdHlwZV91", + "cmwYBiABKAkSEwoLb25lb2Zf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nRheBIPCgdlZGl0aW9uGAYgASgJIlMKCUVu", + "dW1WYWx1ZRIMCgRuYW1lGAEgASgJEg4KBm51bWJlchgCIAEoBRIoCgdvcHRp", + "b25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbiI7CgZPcHRpb24S", + "DAoEbmFtZRgBIAEoCRIjCgV2YWx1ZRgCIAEoCzIULmdvb2dsZS5wcm90b2J1", + "Zi5BbnkqQwoGU3ludGF4EhEKDVNZTlRBWF9QUk9UTzIQABIRCg1TWU5UQVhf", + "UFJPVE8zEAESEwoPU1lOVEFYX0VESVRJT05TEAJCewoTY29tLmdvb2dsZS5w", + "cm90b2J1ZkIJVHlwZVByb3RvUAFaLWdvb2dsZS5nb2xhbmcub3JnL3Byb3Rv", + "YnVmL3R5cGVzL2tub3duL3R5cGVwYvgBAaICA0dQQqoCHkdvb2dsZS5Qcm90", + "b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.WellKnownTypes.Syntax), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Type), global::Google.Protobuf.WellKnownTypes.Type.Parser, new[]{ "Name", "Fields", "Oneofs", "Options", "SourceContext", "Syntax", "Edition" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Field), global::Google.Protobuf.WellKnownTypes.Field.Parser, new[]{ "Kind", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options", "JsonName", "DefaultValue" }, null, new[]{ typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Kind), typeof(global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Enum), global::Google.Protobuf.WellKnownTypes.Enum.Parser, new[]{ "Name", "Enumvalue", "Options", "SourceContext", "Syntax", "Edition" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.EnumValue), global::Google.Protobuf.WellKnownTypes.EnumValue.Parser, new[]{ "Name", "Number", "Options" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Option), global::Google.Protobuf.WellKnownTypes.Option.Parser, new[]{ "Name", "Value" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// The syntax in which a protocol buffer element is defined. + /// + public enum Syntax { + /// + /// Syntax `proto2`. + /// + [pbr::OriginalName("SYNTAX_PROTO2")] Proto2 = 0, + /// + /// Syntax `proto3`. + /// + [pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1, + /// + /// Syntax `editions`. + /// + [pbr::OriginalName("SYNTAX_EDITIONS")] Editions = 2, + } + + #endregion + + #region Messages + /// + /// A protocol buffer message type. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Type : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Type()); + 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::Google.Protobuf.WellKnownTypes.TypeReflection.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 Type() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Type(Type other) : this() { + name_ = other.name_; + fields_ = other.fields_.Clone(); + oneofs_ = other.oneofs_.Clone(); + options_ = other.options_.Clone(); + sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; + syntax_ = other.syntax_; + edition_ = other.edition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Type Clone() { + return new Type(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// The fully qualified message name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fields" field. + public const int FieldsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_fields_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser); + private readonly pbc::RepeatedField fields_ = new pbc::RepeatedField(); + /// + /// The list of fields. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Fields { + get { return fields_; } + } + + /// Field number for the "oneofs" field. + public const int OneofsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_oneofs_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField oneofs_ = new pbc::RepeatedField(); + /// + /// The list of types appearing in `oneof` definitions in this type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Oneofs { + get { return oneofs_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_options_codec + = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser); + private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// The protocol buffer options. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Options { + get { return options_; } + } + + /// Field number for the "source_context" field. + public const int SourceContextFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// + /// The source context. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { + get { return sourceContext_; } + set { + sourceContext_ = value; + } + } + + /// Field number for the "syntax" field. + public const int SyntaxFieldNumber = 6; + private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; + /// + /// The source syntax. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { + get { return syntax_; } + set { + syntax_ = value; + } + } + + /// Field number for the "edition" field. + public const int EditionFieldNumber = 7; + private string edition_ = ""; + /// + /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Edition { + get { return edition_; } + set { + edition_ = 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 Type); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Type other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!fields_.Equals(other.fields_)) return false; + if(!oneofs_.Equals(other.oneofs_)) return false; + if(!options_.Equals(other.options_)) return false; + if (!object.Equals(SourceContext, other.SourceContext)) return false; + if (Syntax != other.Syntax) return false; + if (Edition != other.Edition) 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 (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= fields_.GetHashCode(); + hash ^= oneofs_.GetHashCode(); + hash ^= options_.GetHashCode(); + if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); + if (Edition.Length != 0) hash ^= Edition.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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + fields_.WriteTo(output, _repeated_fields_codec); + oneofs_.WriteTo(output, _repeated_oneofs_codec); + options_.WriteTo(output, _repeated_options_codec); + if (sourceContext_ != null) { + output.WriteRawTag(42); + output.WriteMessage(SourceContext); + } + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(48); + output.WriteEnum((int) Syntax); + } + if (Edition.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Edition); + } + 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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + fields_.WriteTo(ref output, _repeated_fields_codec); + oneofs_.WriteTo(ref output, _repeated_oneofs_codec); + options_.WriteTo(ref output, _repeated_options_codec); + if (sourceContext_ != null) { + output.WriteRawTag(42); + output.WriteMessage(SourceContext); + } + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(48); + output.WriteEnum((int) Syntax); + } + if (Edition.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Edition); + } + 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 (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += fields_.CalculateSize(_repeated_fields_codec); + size += oneofs_.CalculateSize(_repeated_oneofs_codec); + size += options_.CalculateSize(_repeated_options_codec); + if (sourceContext_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); + } + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); + } + if (Edition.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Edition); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Type other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + fields_.Add(other.fields_); + oneofs_.Add(other.oneofs_); + options_.Add(other.options_); + if (other.sourceContext_ != null) { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + SourceContext.MergeFrom(other.SourceContext); + } + if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + Syntax = other.Syntax; + } + if (other.Edition.Length != 0) { + Edition = other.Edition; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + fields_.AddEntriesFrom(input, _repeated_fields_codec); + break; + } + case 26: { + oneofs_.AddEntriesFrom(input, _repeated_oneofs_codec); + break; + } + case 34: { + options_.AddEntriesFrom(input, _repeated_options_codec); + break; + } + case 42: { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + input.ReadMessage(SourceContext); + break; + } + case 48: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + case 58: { + Edition = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + fields_.AddEntriesFrom(ref input, _repeated_fields_codec); + break; + } + case 26: { + oneofs_.AddEntriesFrom(ref input, _repeated_oneofs_codec); + break; + } + case 34: { + options_.AddEntriesFrom(ref input, _repeated_options_codec); + break; + } + case 42: { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + input.ReadMessage(SourceContext); + break; + } + case 48: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + case 58: { + Edition = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// A single field of a message type. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Field : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Field()); + 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::Google.Protobuf.WellKnownTypes.TypeReflection.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 Field() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Field(Field other) : this() { + kind_ = other.kind_; + cardinality_ = other.cardinality_; + number_ = other.number_; + name_ = other.name_; + typeUrl_ = other.typeUrl_; + oneofIndex_ = other.oneofIndex_; + packed_ = other.packed_; + options_ = other.options_.Clone(); + jsonName_ = other.jsonName_; + defaultValue_ = other.defaultValue_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Field Clone() { + return new Field(this); + } + + /// Field number for the "kind" field. + public const int KindFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown; + /// + /// The field type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { + get { return kind_; } + set { + kind_ = value; + } + } + + /// Field number for the "cardinality" field. + public const int CardinalityFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown; + /// + /// The field cardinality. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { + get { return cardinality_; } + set { + cardinality_ = value; + } + } + + /// Field number for the "number" field. + public const int NumberFieldNumber = 3; + private int number_; + /// + /// The field number. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Number { + get { return number_; } + set { + number_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 4; + private string name_ = ""; + /// + /// The field name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "type_url" field. + public const int TypeUrlFieldNumber = 6; + private string typeUrl_ = ""; + /// + /// The field type URL, without the scheme, for message or enumeration + /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TypeUrl { + get { return typeUrl_; } + set { + typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "oneof_index" field. + public const int OneofIndexFieldNumber = 7; + private int oneofIndex_; + /// + /// The index of the field type in `Type.oneofs`, for message or enumeration + /// types. The first type has index 1; zero means the type is not in the list. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int OneofIndex { + get { return oneofIndex_; } + set { + oneofIndex_ = value; + } + } + + /// Field number for the "packed" field. + public const int PackedFieldNumber = 8; + private bool packed_; + /// + /// Whether to use alternative packed wire representation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Packed { + get { return packed_; } + set { + packed_ = value; + } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_options_codec + = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser); + private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// The protocol buffer options. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Options { + get { return options_; } + } + + /// Field number for the "json_name" field. + public const int JsonNameFieldNumber = 10; + private string jsonName_ = ""; + /// + /// The field JSON name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JsonName { + get { return jsonName_; } + set { + jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "default_value" field. + public const int DefaultValueFieldNumber = 11; + private string defaultValue_ = ""; + /// + /// The string value of the default value of this field. Proto2 syntax only. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DefaultValue { + get { return defaultValue_; } + set { + defaultValue_ = 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 Field); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Field other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Kind != other.Kind) return false; + if (Cardinality != other.Cardinality) return false; + if (Number != other.Number) return false; + if (Name != other.Name) return false; + if (TypeUrl != other.TypeUrl) return false; + if (OneofIndex != other.OneofIndex) return false; + if (Packed != other.Packed) return false; + if(!options_.Equals(other.options_)) return false; + if (JsonName != other.JsonName) return false; + if (DefaultValue != other.DefaultValue) 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 (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) hash ^= Kind.GetHashCode(); + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) hash ^= Cardinality.GetHashCode(); + if (Number != 0) hash ^= Number.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); + if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); + if (Packed != false) hash ^= Packed.GetHashCode(); + hash ^= options_.GetHashCode(); + if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); + if (DefaultValue.Length != 0) hash ^= DefaultValue.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 (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Kind); + } + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { + output.WriteRawTag(16); + output.WriteEnum((int) Cardinality); + } + if (Number != 0) { + output.WriteRawTag(24); + output.WriteInt32(Number); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (TypeUrl.Length != 0) { + output.WriteRawTag(50); + output.WriteString(TypeUrl); + } + if (OneofIndex != 0) { + output.WriteRawTag(56); + output.WriteInt32(OneofIndex); + } + if (Packed != false) { + output.WriteRawTag(64); + output.WriteBool(Packed); + } + options_.WriteTo(output, _repeated_options_codec); + if (JsonName.Length != 0) { + output.WriteRawTag(82); + output.WriteString(JsonName); + } + if (DefaultValue.Length != 0) { + output.WriteRawTag(90); + output.WriteString(DefaultValue); + } + 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 (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Kind); + } + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { + output.WriteRawTag(16); + output.WriteEnum((int) Cardinality); + } + if (Number != 0) { + output.WriteRawTag(24); + output.WriteInt32(Number); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (TypeUrl.Length != 0) { + output.WriteRawTag(50); + output.WriteString(TypeUrl); + } + if (OneofIndex != 0) { + output.WriteRawTag(56); + output.WriteInt32(OneofIndex); + } + if (Packed != false) { + output.WriteRawTag(64); + output.WriteBool(Packed); + } + options_.WriteTo(ref output, _repeated_options_codec); + if (JsonName.Length != 0) { + output.WriteRawTag(82); + output.WriteString(JsonName); + } + if (DefaultValue.Length != 0) { + output.WriteRawTag(90); + output.WriteString(DefaultValue); + } + 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 (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); + } + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality); + } + if (Number != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (TypeUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl); + } + if (OneofIndex != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); + } + if (Packed != false) { + size += 1 + 1; + } + size += options_.CalculateSize(_repeated_options_codec); + if (JsonName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); + } + if (DefaultValue.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Field other) { + if (other == null) { + return; + } + if (other.Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TypeUnknown) { + Kind = other.Kind; + } + if (other.Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.Unknown) { + Cardinality = other.Cardinality; + } + if (other.Number != 0) { + Number = other.Number; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.TypeUrl.Length != 0) { + TypeUrl = other.TypeUrl; + } + if (other.OneofIndex != 0) { + OneofIndex = other.OneofIndex; + } + if (other.Packed != false) { + Packed = other.Packed; + } + options_.Add(other.options_); + if (other.JsonName.Length != 0) { + JsonName = other.JsonName; + } + if (other.DefaultValue.Length != 0) { + DefaultValue = other.DefaultValue; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); + break; + } + case 16: { + Cardinality = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum(); + break; + } + case 24: { + Number = input.ReadInt32(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + case 50: { + TypeUrl = input.ReadString(); + break; + } + case 56: { + OneofIndex = input.ReadInt32(); + break; + } + case 64: { + Packed = input.ReadBool(); + break; + } + case 74: { + options_.AddEntriesFrom(input, _repeated_options_codec); + break; + } + case 82: { + JsonName = input.ReadString(); + break; + } + case 90: { + DefaultValue = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Kind = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); + break; + } + case 16: { + Cardinality = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality) input.ReadEnum(); + break; + } + case 24: { + Number = input.ReadInt32(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + case 50: { + TypeUrl = input.ReadString(); + break; + } + case 56: { + OneofIndex = input.ReadInt32(); + break; + } + case 64: { + Packed = input.ReadBool(); + break; + } + case 74: { + options_.AddEntriesFrom(ref input, _repeated_options_codec); + break; + } + case 82: { + JsonName = input.ReadString(); + break; + } + case 90: { + DefaultValue = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Field message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Basic field types. + /// + public enum Kind { + /// + /// Field type unknown. + /// + [pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0, + /// + /// Field type double. + /// + [pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1, + /// + /// Field type float. + /// + [pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2, + /// + /// Field type int64. + /// + [pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3, + /// + /// Field type uint64. + /// + [pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4, + /// + /// Field type int32. + /// + [pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5, + /// + /// Field type fixed64. + /// + [pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6, + /// + /// Field type fixed32. + /// + [pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7, + /// + /// Field type bool. + /// + [pbr::OriginalName("TYPE_BOOL")] TypeBool = 8, + /// + /// Field type string. + /// + [pbr::OriginalName("TYPE_STRING")] TypeString = 9, + /// + /// Field type group. Proto2 syntax only, and deprecated. + /// + [pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10, + /// + /// Field type message. + /// + [pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11, + /// + /// Field type bytes. + /// + [pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12, + /// + /// Field type uint32. + /// + [pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13, + /// + /// Field type enum. + /// + [pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14, + /// + /// Field type sfixed32. + /// + [pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15, + /// + /// Field type sfixed64. + /// + [pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16, + /// + /// Field type sint32. + /// + [pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17, + /// + /// Field type sint64. + /// + [pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18, + } + + /// + /// Whether a field is optional, required, or repeated. + /// + public enum Cardinality { + /// + /// For fields with unknown cardinality. + /// + [pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0, + /// + /// For optional fields. + /// + [pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1, + /// + /// For required fields. Proto2 syntax only. + /// + [pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2, + /// + /// For repeated fields. + /// + [pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3, + } + + } + #endregion + + } + + /// + /// Enum type definition. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Enum : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Enum()); + 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::Google.Protobuf.WellKnownTypes.TypeReflection.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 Enum() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Enum(Enum other) : this() { + name_ = other.name_; + enumvalue_ = other.enumvalue_.Clone(); + options_ = other.options_.Clone(); + sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; + syntax_ = other.syntax_; + edition_ = other.edition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Enum Clone() { + return new Enum(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Enum type name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enumvalue" field. + public const int EnumvalueFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_enumvalue_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser); + private readonly pbc::RepeatedField enumvalue_ = new pbc::RepeatedField(); + /// + /// Enum value definitions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Enumvalue { + get { return enumvalue_; } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_options_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); + private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Protocol buffer options. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Options { + get { return options_; } + } + + /// Field number for the "source_context" field. + public const int SourceContextFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// + /// The source context. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { + get { return sourceContext_; } + set { + sourceContext_ = value; + } + } + + /// Field number for the "syntax" field. + public const int SyntaxFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.Proto2; + /// + /// The source syntax. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { + get { return syntax_; } + set { + syntax_ = value; + } + } + + /// Field number for the "edition" field. + public const int EditionFieldNumber = 6; + private string edition_ = ""; + /// + /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Edition { + get { return edition_; } + set { + edition_ = 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 Enum); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Enum other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!enumvalue_.Equals(other.enumvalue_)) return false; + if(!options_.Equals(other.options_)) return false; + if (!object.Equals(SourceContext, other.SourceContext)) return false; + if (Syntax != other.Syntax) return false; + if (Edition != other.Edition) 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 (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= enumvalue_.GetHashCode(); + hash ^= options_.GetHashCode(); + if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); + if (Edition.Length != 0) hash ^= Edition.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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + enumvalue_.WriteTo(output, _repeated_enumvalue_codec); + options_.WriteTo(output, _repeated_options_codec); + if (sourceContext_ != null) { + output.WriteRawTag(34); + output.WriteMessage(SourceContext); + } + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(40); + output.WriteEnum((int) Syntax); + } + if (Edition.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Edition); + } + 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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + enumvalue_.WriteTo(ref output, _repeated_enumvalue_codec); + options_.WriteTo(ref output, _repeated_options_codec); + if (sourceContext_ != null) { + output.WriteRawTag(34); + output.WriteMessage(SourceContext); + } + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + output.WriteRawTag(40); + output.WriteEnum((int) Syntax); + } + if (Edition.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Edition); + } + 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 (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += enumvalue_.CalculateSize(_repeated_enumvalue_codec); + size += options_.CalculateSize(_repeated_options_codec); + if (sourceContext_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); + } + if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); + } + if (Edition.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Edition); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Enum other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + enumvalue_.Add(other.enumvalue_); + options_.Add(other.options_); + if (other.sourceContext_ != null) { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + SourceContext.MergeFrom(other.SourceContext); + } + if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { + Syntax = other.Syntax; + } + if (other.Edition.Length != 0) { + Edition = other.Edition; + } + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + enumvalue_.AddEntriesFrom(input, _repeated_enumvalue_codec); + break; + } + case 26: { + options_.AddEntriesFrom(input, _repeated_options_codec); + break; + } + case 34: { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + input.ReadMessage(SourceContext); + break; + } + case 40: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + case 50: { + Edition = input.ReadString(); + 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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + enumvalue_.AddEntriesFrom(ref input, _repeated_enumvalue_codec); + break; + } + case 26: { + options_.AddEntriesFrom(ref input, _repeated_options_codec); + break; + } + case 34: { + if (sourceContext_ == null) { + SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext(); + } + input.ReadMessage(SourceContext); + break; + } + case 40: { + Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); + break; + } + case 50: { + Edition = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Enum value definition. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnumValue : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValue()); + 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::Google.Protobuf.WellKnownTypes.TypeReflection.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 EnumValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumValue(EnumValue other) : this() { + name_ = other.name_; + number_ = other.number_; + options_ = other.options_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnumValue Clone() { + return new EnumValue(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Enum value name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "number" field. + public const int NumberFieldNumber = 2; + private int number_; + /// + /// Enum value number. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Number { + get { return number_; } + set { + number_ = value; + } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_options_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); + private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Protocol buffer options. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Options { + get { return options_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnumValue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnumValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Number != other.Number) return false; + if(!options_.Equals(other.options_)) 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 (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Number != 0) hash ^= Number.GetHashCode(); + hash ^= options_.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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Number != 0) { + output.WriteRawTag(16); + output.WriteInt32(Number); + } + options_.WriteTo(output, _repeated_options_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 (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Number != 0) { + output.WriteRawTag(16); + output.WriteInt32(Number); + } + options_.WriteTo(ref output, _repeated_options_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 (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Number != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); + } + size += options_.CalculateSize(_repeated_options_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnumValue other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Number != 0) { + Number = other.Number; + } + options_.Add(other.options_); + _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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Number = input.ReadInt32(); + break; + } + case 26: { + options_.AddEntriesFrom(input, _repeated_options_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) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Number = input.ReadInt32(); + break; + } + case 26: { + options_.AddEntriesFrom(ref input, _repeated_options_codec); + break; + } + } + } + } + #endif + + } + + /// + /// A protocol buffer option, which can be attached to a message, field, + /// enumeration, etc. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Option : pb::IMessage