From 62a4aa56d445644fb94de7517e542f5683603488 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Tue, 14 Jul 2015 14:26:49 +0100 Subject: Generated code for well-known types --- csharp/src/AddressBook/Addressbook.cs | 6 +- .../TestProtos/MapUnittestProto3.cs | 88 +- .../TestProtos/UnittestImportProto3.cs | 2 +- .../TestProtos/UnittestImportPublicProto3.cs | 2 +- .../TestProtos/UnittestIssues.cs | 14 +- .../TestProtos/UnittestProto3.cs | 70 +- .../Reflection/DescriptorProtoFile.cs | 44 +- csharp/src/ProtocolBuffers/WellKnownTypes/Any.cs | 195 ++++ csharp/src/ProtocolBuffers/WellKnownTypes/Api.cs | 528 +++++++++ .../src/ProtocolBuffers/WellKnownTypes/Duration.cs | 196 ++++ csharp/src/ProtocolBuffers/WellKnownTypes/Empty.cs | 141 +++ .../ProtocolBuffers/WellKnownTypes/FieldMask.cs | 160 +++ .../WellKnownTypes/SourceContext.cs | 169 +++ .../src/ProtocolBuffers/WellKnownTypes/Struct.cs | 764 +++++++++++++ .../ProtocolBuffers/WellKnownTypes/Timestamp.cs | 196 ++++ csharp/src/ProtocolBuffers/WellKnownTypes/Type.cs | 1147 +++++++++++++++++++ .../src/ProtocolBuffers/WellKnownTypes/Wrappers.cs | 1154 ++++++++++++++++++++ 17 files changed, 4763 insertions(+), 113 deletions(-) create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Any.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Api.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Duration.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Empty.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/FieldMask.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/SourceContext.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Timestamp.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Type.cs create mode 100644 csharp/src/ProtocolBuffers/WellKnownTypes/Wrappers.cs (limited to 'csharp') diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs index d358f5a6..494ee9eb 100644 --- a/csharp/src/AddressBook/Addressbook.cs +++ b/csharp/src/AddressBook/Addressbook.cs @@ -63,7 +63,7 @@ namespace Google.Protobuf.Examples.AddressBook { get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.internal__static_tutorial_Person__FieldAccessorTable; } } @@ -262,7 +262,7 @@ namespace Google.Protobuf.Examples.AddressBook { get { return global::Google.Protobuf.Examples.AddressBook.Person.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.internal__static_tutorial_Person_PhoneNumber__FieldAccessorTable; } } @@ -413,7 +413,7 @@ namespace Google.Protobuf.Examples.AddressBook { get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.Descriptor.MessageTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.internal__static_tutorial_AddressBook__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs index 38bb13c7..843991f8 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs @@ -352,7 +352,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap__FieldAccessorTable; } } @@ -768,7 +768,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt32Int32Entry__FieldAccessorTable; } } @@ -914,7 +914,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt64Int64Entry__FieldAccessorTable; } } @@ -1060,7 +1060,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[2]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapUint32Uint32Entry__FieldAccessorTable; } } @@ -1206,7 +1206,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[3]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapUint64Uint64Entry__FieldAccessorTable; } } @@ -1352,7 +1352,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[4]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapSint32Sint32Entry__FieldAccessorTable; } } @@ -1498,7 +1498,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[5]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapSint64Sint64Entry__FieldAccessorTable; } } @@ -1644,7 +1644,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[6]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapFixed32Fixed32Entry__FieldAccessorTable; } } @@ -1790,7 +1790,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[7]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapFixed64Fixed64Entry__FieldAccessorTable; } } @@ -1936,7 +1936,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[8]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapSfixed32Sfixed32Entry__FieldAccessorTable; } } @@ -2082,7 +2082,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[9]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapSfixed64Sfixed64Entry__FieldAccessorTable; } } @@ -2228,7 +2228,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[10]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt32FloatEntry__FieldAccessorTable; } } @@ -2374,7 +2374,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[11]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt32DoubleEntry__FieldAccessorTable; } } @@ -2520,7 +2520,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[12]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapBoolBoolEntry__FieldAccessorTable; } } @@ -2666,7 +2666,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[13]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapStringStringEntry__FieldAccessorTable; } } @@ -2812,7 +2812,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[14]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt32BytesEntry__FieldAccessorTable; } } @@ -2958,7 +2958,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[15]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt32EnumEntry__FieldAccessorTable; } } @@ -3104,7 +3104,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMap.Descriptor.NestedTypes[16]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMap_MapInt32ForeignMessageEntry__FieldAccessorTable; } } @@ -3262,7 +3262,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMapSubmessage__FieldAccessorTable; } } @@ -3388,7 +3388,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[2]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMessageMap__FieldAccessorTable; } } @@ -3500,7 +3500,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestMessageMap.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestMessageMap_MapInt32MessageEntry__FieldAccessorTable; } } @@ -3658,7 +3658,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[3]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestSameTypeMap__FieldAccessorTable; } } @@ -3789,7 +3789,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestSameTypeMap.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestSameTypeMap_Map1Entry__FieldAccessorTable; } } @@ -3935,7 +3935,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestSameTypeMap.Descriptor.NestedTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestSameTypeMap_Map2Entry__FieldAccessorTable; } } @@ -4086,7 +4086,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[4]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap__FieldAccessorTable; } } @@ -4464,7 +4464,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapInt32Int32Entry__FieldAccessorTable; } } @@ -4610,7 +4610,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapInt64Int64Entry__FieldAccessorTable; } } @@ -4756,7 +4756,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[2]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapUint32Uint32Entry__FieldAccessorTable; } } @@ -4902,7 +4902,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[3]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapUint64Uint64Entry__FieldAccessorTable; } } @@ -5048,7 +5048,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[4]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapSint32Sint32Entry__FieldAccessorTable; } } @@ -5194,7 +5194,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[5]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapSint64Sint64Entry__FieldAccessorTable; } } @@ -5340,7 +5340,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[6]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapFixed32Fixed32Entry__FieldAccessorTable; } } @@ -5486,7 +5486,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[7]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapFixed64Fixed64Entry__FieldAccessorTable; } } @@ -5632,7 +5632,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[8]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapSfixed32Sfixed32Entry__FieldAccessorTable; } } @@ -5778,7 +5778,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[9]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapSfixed64Sfixed64Entry__FieldAccessorTable; } } @@ -5924,7 +5924,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[10]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapInt32FloatEntry__FieldAccessorTable; } } @@ -6070,7 +6070,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[11]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapInt32DoubleEntry__FieldAccessorTable; } } @@ -6216,7 +6216,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[12]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapBoolBoolEntry__FieldAccessorTable; } } @@ -6362,7 +6362,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[13]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapInt32EnumEntry__FieldAccessorTable; } } @@ -6508,7 +6508,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestArenaMap.Descriptor.NestedTypes[14]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_TestArenaMap_MapInt32ForeignMessageEntry__FieldAccessorTable; } } @@ -6666,7 +6666,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[5]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_MessageContainingEnumCalledType__FieldAccessorTable; } } @@ -6782,7 +6782,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_MessageContainingEnumCalledType_TypeEntry__FieldAccessorTable; } } @@ -6940,7 +6940,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[6]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_MessageContainingMapCalledEntry__FieldAccessorTable; } } @@ -7052,7 +7052,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.MessageContainingMapCalledEntry.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.internal__static_protobuf_unittest_MessageContainingMapCalledEntry_EntryEntry__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs index 3aa34047..3875a4c3 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs @@ -65,7 +65,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestImportProto3.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestImportProto3.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs index 53657b96..048ae5e9 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs @@ -50,7 +50,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3.internal__static_protobuf_unittest_import_PublicImportMessage__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs index 5c56d180..c68c67fb 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs @@ -102,7 +102,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307__FieldAccessorTable; } } @@ -195,7 +195,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307_NestedOnce__FieldAccessorTable; } } @@ -288,7 +288,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307_NestedOnce_NestedTwice__FieldAccessorTable; } } @@ -390,7 +390,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable; } } @@ -547,7 +547,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[2]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; } } @@ -639,7 +639,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[3]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; } } @@ -883,7 +883,7 @@ namespace UnitTest.Issues.TestProtos { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[4]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_ItemField__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs index 7e43a543..67c42708 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs @@ -339,7 +339,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable; } } @@ -1640,7 +1640,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable; } } @@ -1764,7 +1764,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_NestedTestAllTypes__FieldAccessorTable; } } @@ -1943,7 +1943,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[2]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable; } } @@ -2063,7 +2063,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[3]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable; } } @@ -2182,7 +2182,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[4]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestReservedFields__FieldAccessorTable; } } @@ -2274,7 +2274,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[5]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable; } } @@ -2400,7 +2400,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[6]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable; } } @@ -2546,7 +2546,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[7]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable; } } @@ -2699,7 +2699,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[8]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable; } } @@ -2825,7 +2825,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[9]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable; } } @@ -2978,7 +2978,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[10]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable; } } @@ -3262,7 +3262,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[11]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable; } } @@ -3470,7 +3470,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__FieldAccessorTable; } } @@ -3621,7 +3621,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[12]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable; } } @@ -3740,7 +3740,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[13]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_OneString__FieldAccessorTable; } } @@ -3859,7 +3859,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[14]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_MoreString__FieldAccessorTable; } } @@ -3970,7 +3970,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[15]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_OneBytes__FieldAccessorTable; } } @@ -4089,7 +4089,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[16]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_MoreBytes__FieldAccessorTable; } } @@ -4208,7 +4208,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[17]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_Int32Message__FieldAccessorTable; } } @@ -4327,7 +4327,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[18]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_Uint32Message__FieldAccessorTable; } } @@ -4446,7 +4446,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[19]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_Int64Message__FieldAccessorTable; } } @@ -4565,7 +4565,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[20]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_Uint64Message__FieldAccessorTable; } } @@ -4684,7 +4684,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[21]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_BoolMessage__FieldAccessorTable; } } @@ -4803,7 +4803,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[22]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestOneof__FieldAccessorTable; } } @@ -5012,7 +5012,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[23]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable; } } @@ -5383,7 +5383,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[24]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable; } } @@ -5754,7 +5754,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[25]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable; } } @@ -5966,7 +5966,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[26]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_TestCommentInjectionMessage__FieldAccessorTable; } } @@ -6085,7 +6085,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[27]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_FooRequest__FieldAccessorTable; } } @@ -6177,7 +6177,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[28]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_FooResponse__FieldAccessorTable; } } @@ -6269,7 +6269,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[29]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_FooClientMessage__FieldAccessorTable; } } @@ -6361,7 +6361,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[30]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_FooServerMessage__FieldAccessorTable; } } @@ -6453,7 +6453,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[31]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_BarRequest__FieldAccessorTable; } } @@ -6545,7 +6545,7 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor.MessageTypes[32]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.TestProtos.UnittestProto3.internal__static_protobuf_unittest_BarResponse__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers/Reflection/DescriptorProtoFile.cs b/csharp/src/ProtocolBuffers/Reflection/DescriptorProtoFile.cs index 2ab69400..c87969b9 100644 --- a/csharp/src/ProtocolBuffers/Reflection/DescriptorProtoFile.cs +++ b/csharp/src/ProtocolBuffers/Reflection/DescriptorProtoFile.cs @@ -241,7 +241,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FileDescriptorSet__FieldAccessorTable; } } @@ -352,7 +352,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FileDescriptorProto__FieldAccessorTable; } } @@ -728,7 +728,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[2]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto__FieldAccessorTable; } } @@ -1034,7 +1034,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable; } } @@ -1180,7 +1180,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[1]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ReservedRange__FieldAccessorTable; } } @@ -1331,7 +1331,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[3]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable; } } @@ -1706,7 +1706,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[4]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_OneofDescriptorProto__FieldAccessorTable; } } @@ -1825,7 +1825,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[5]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumDescriptorProto__FieldAccessorTable; } } @@ -1997,7 +1997,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[6]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumValueDescriptorProto__FieldAccessorTable; } } @@ -2177,7 +2177,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[7]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_ServiceDescriptorProto__FieldAccessorTable; } } @@ -2349,7 +2349,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[8]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_MethodDescriptorProto__FieldAccessorTable; } } @@ -2610,7 +2610,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[9]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FileOptions__FieldAccessorTable; } } @@ -3111,7 +3111,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[10]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_MessageOptions__FieldAccessorTable; } } @@ -3330,7 +3330,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[11]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FieldOptions__FieldAccessorTable; } } @@ -3621,7 +3621,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[12]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumOptions__FieldAccessorTable; } } @@ -3786,7 +3786,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[13]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumValueOptions__FieldAccessorTable; } } @@ -3924,7 +3924,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[14]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_ServiceOptions__FieldAccessorTable; } } @@ -4062,7 +4062,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[15]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_MethodOptions__FieldAccessorTable; } } @@ -4200,7 +4200,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[16]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_UninterpretedOption__FieldAccessorTable; } } @@ -4474,7 +4474,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.UninterpretedOption.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_UninterpretedOption_NamePart__FieldAccessorTable; } } @@ -4625,7 +4625,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[17]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo__FieldAccessorTable; } } @@ -4737,7 +4737,7 @@ namespace Google.Protobuf.Reflection { get { return global::Google.Protobuf.Reflection.SourceCodeInfo.Descriptor.NestedTypes[0]; } } - public pbr::FieldAccessorTable Fields { + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo_Location__FieldAccessorTable; } } diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Any.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Any.cs new file mode 100644 index 00000000..64d52ac5 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Any.cs @@ -0,0 +1,195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Any { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Any__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Any() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYi", + "JgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQksKE2Nv", + "bS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAGgAQGiAgNHUEKqAh5Hb29n", + "bGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_Any__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Any), descriptor.MessageTypes[0], + new string[] { "TypeUrl", "Value", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Any : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Any()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "type_url", "value" }; + private static readonly uint[] _fieldTags = new uint[] { 10, 18 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Any.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Any.internal__static_google_protobuf_Any__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Any() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Any(Any other) : this() { + typeUrl_ = other.typeUrl_; + value_ = other.value_; + } + + public Any Clone() { + return new Any(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + } + + public const int TypeUrlFieldNumber = 1; + private string typeUrl_ = ""; + public string TypeUrl { + get { return typeUrl_; } + set { + pb::Freezable.CheckMutable(this); + typeUrl_ = value ?? ""; + } + } + + public const int ValueFieldNumber = 2; + private pb::ByteString value_ = pb::ByteString.Empty; + public pb::ByteString Value { + get { return value_; } + set { + pb::Freezable.CheckMutable(this); + value_ = value ?? pb::ByteString.Empty; + } + } + + public override bool Equals(object other) { + return Equals(other as Any); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (TypeUrl.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TypeUrl); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Value); + } + } + + 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); + } + return size; + } + + 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; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + TypeUrl = input.ReadString(); + break; + } + case 18: { + Value = input.ReadBytes(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Api.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Api.cs new file mode 100644 index 00000000..1e2506a4 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Api.cs @@ -0,0 +1,528 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Api { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Api__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Method__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Api() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa", + "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl", + "L3Byb3RvYnVmL3R5cGUucHJvdG8isAEKA0FwaRIMCgRuYW1lGAEgASgJEigK", + "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w", + "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp", + "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv", + "dG9idWYuU291cmNlQ29udGV4dCKsAQoGTWV0aG9kEgwKBG5hbWUYASABKAkS", + "GAoQcmVxdWVzdF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWlu", + "ZxgDIAEoCBIZChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25z", + "ZV9zdHJlYW1pbmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5w", + "cm90b2J1Zi5PcHRpb25CSAoTY29tLmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJv", + "dG9QAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IG", + "cHJvdG8z")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor, + global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor, + }); + internal__static_google_protobuf_Api__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Api), descriptor.MessageTypes[0], + new string[] { "Name", "Methods", "Options", "Version", "SourceContext", }, new string[] { }); + internal__static_google_protobuf_Method__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Method), descriptor.MessageTypes[1], + new string[] { "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Api : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Api()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "methods", "name", "options", "source_context", "version" }; + private static readonly uint[] _fieldTags = new uint[] { 18, 10, 26, 42, 34 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.internal__static_google_protobuf_Api__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Api() { + OnConstruction(); + } + + partial void OnConstruction(); + + 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; + } + + public Api Clone() { + return new Api(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + methods_.Freeze(); + options_.Freeze(); + if (sourceContext_ != null) SourceContext.Freeze(); + } + + public const int NameFieldNumber = 1; + private string name_ = ""; + public string Name { + get { return name_; } + set { + pb::Freezable.CheckMutable(this); + name_ = value ?? ""; + } + } + + 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(); + public pbc::RepeatedField Methods { + get { return methods_; } + } + + 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(); + public pbc::RepeatedField Options { + get { return options_; } + } + + public const int VersionFieldNumber = 4; + private string version_ = ""; + public string Version { + get { return version_; } + set { + pb::Freezable.CheckMutable(this); + version_ = value ?? ""; + } + } + + public const int SourceContextFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { + get { return sourceContext_; } + set { + pb::Freezable.CheckMutable(this); + sourceContext_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as Api); + } + + 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; + return true; + } + + 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(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + 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); + } + } + + 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); + } + return size; + } + + 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); + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + 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; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Method : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Method()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "name", "options", "request_streaming", "request_type_url", "response_streaming", "response_type_url" }; + private static readonly uint[] _fieldTags = new uint[] { 10, 50, 24, 18, 40, 34 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor.MessageTypes[1]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.internal__static_google_protobuf_Method__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Method() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Method(Method other) : this() { + name_ = other.name_; + requestTypeUrl_ = other.requestTypeUrl_; + requestStreaming_ = other.requestStreaming_; + responseTypeUrl_ = other.responseTypeUrl_; + responseStreaming_ = other.responseStreaming_; + options_ = other.options_.Clone(); + } + + public Method Clone() { + return new Method(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + options_.Freeze(); + } + + public const int NameFieldNumber = 1; + private string name_ = ""; + public string Name { + get { return name_; } + set { + pb::Freezable.CheckMutable(this); + name_ = value ?? ""; + } + } + + public const int RequestTypeUrlFieldNumber = 2; + private string requestTypeUrl_ = ""; + public string RequestTypeUrl { + get { return requestTypeUrl_; } + set { + pb::Freezable.CheckMutable(this); + requestTypeUrl_ = value ?? ""; + } + } + + public const int RequestStreamingFieldNumber = 3; + private bool requestStreaming_; + public bool RequestStreaming { + get { return requestStreaming_; } + set { + pb::Freezable.CheckMutable(this); + requestStreaming_ = value; + } + } + + public const int ResponseTypeUrlFieldNumber = 4; + private string responseTypeUrl_ = ""; + public string ResponseTypeUrl { + get { return responseTypeUrl_; } + set { + pb::Freezable.CheckMutable(this); + responseTypeUrl_ = value ?? ""; + } + } + + public const int ResponseStreamingFieldNumber = 5; + private bool responseStreaming_; + public bool ResponseStreaming { + get { return responseStreaming_; } + set { + pb::Freezable.CheckMutable(this); + responseStreaming_ = value; + } + } + + 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(); + public pbc::RepeatedField Options { + get { return options_; } + } + + public override bool Equals(object other) { + return Equals(other as Method); + } + + 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; + return true; + } + + 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(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream 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(output, _repeated_options_codec); + } + + 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); + return size; + } + + 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_); + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + 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; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Duration.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Duration.cs new file mode 100644 index 00000000..fbc9c007 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Duration.cs @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Duration { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Duration__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Duration() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90", + "b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIg", + "ASgFQlAKE2NvbS5nb29nbGUucHJvdG9idWZCDUR1cmF0aW9uUHJvdG9QAaAB", + "AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv", + "dG8z")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_Duration__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Duration), descriptor.MessageTypes[0], + new string[] { "Seconds", "Nanos", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Duration : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Duration()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "nanos", "seconds" }; + private static readonly uint[] _fieldTags = new uint[] { 16, 8 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Duration.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Duration.internal__static_google_protobuf_Duration__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Duration() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Duration(Duration other) : this() { + seconds_ = other.seconds_; + nanos_ = other.nanos_; + } + + public Duration Clone() { + return new Duration(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + } + + public const int SecondsFieldNumber = 1; + private long seconds_; + public long Seconds { + get { return seconds_; } + set { + pb::Freezable.CheckMutable(this); + seconds_ = value; + } + } + + public const int NanosFieldNumber = 2; + private int nanos_; + public int Nanos { + get { return nanos_; } + set { + pb::Freezable.CheckMutable(this); + nanos_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as Duration); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + if (Seconds != 0L) hash ^= Seconds.GetHashCode(); + if (Nanos != 0) hash ^= Nanos.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (Seconds != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Seconds); + } + if (Nanos != 0) { + output.WriteRawTag(16); + output.WriteInt32(Nanos); + } + } + + public int CalculateSize() { + int size = 0; + if (Seconds != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds); + } + if (Nanos != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); + } + return size; + } + + public void MergeFrom(Duration other) { + if (other == null) { + return; + } + if (other.Seconds != 0L) { + Seconds = other.Seconds; + } + if (other.Nanos != 0) { + Nanos = other.Nanos; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 8: { + Seconds = input.ReadInt64(); + break; + } + case 16: { + Nanos = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Empty.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Empty.cs new file mode 100644 index 00000000..c2681e29 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Empty.cs @@ -0,0 +1,141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Empty { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Empty__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Empty() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1", + "ZiIHCgVFbXB0eUJKChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3Rv", + "UAGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_Empty__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Empty), descriptor.MessageTypes[0], + new string[] { }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Empty : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Empty()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { }; + private static readonly uint[] _fieldTags = new uint[] { }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Empty.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Empty.internal__static_google_protobuf_Empty__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Empty() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Empty(Empty other) : this() { + } + + public Empty Clone() { + return new Empty(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + } + + public override bool Equals(object other) { + return Equals(other as Empty); + } + + public bool Equals(Empty other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return true; + } + + public override int GetHashCode() { + int hash = 1; + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + } + + public int CalculateSize() { + int size = 0; + return size; + } + + public void MergeFrom(Empty other) { + if (other == null) { + return; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/FieldMask.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/FieldMask.cs new file mode 100644 index 00000000..310c0d21 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/FieldMask.cs @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class FieldMask { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_FieldMask__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FieldMask() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnBy", + "b3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUJOChNjb20uZ29v", + "Z2xlLnByb3RvYnVmQg5GaWVsZE1hc2tQcm90b1ABogIDR1BCqgIeR29vZ2xl", + "LlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_FieldMask__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.FieldMask), descriptor.MessageTypes[0], + new string[] { "Paths", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class FieldMask : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldMask()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "paths" }; + private static readonly uint[] _fieldTags = new uint[] { 10 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.FieldMask.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.FieldMask.internal__static_google_protobuf_FieldMask__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public FieldMask() { + OnConstruction(); + } + + partial void OnConstruction(); + + public FieldMask(FieldMask other) : this() { + paths_ = other.paths_.Clone(); + } + + public FieldMask Clone() { + return new FieldMask(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + paths_.Freeze(); + } + + 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(); + public pbc::RepeatedField Paths { + get { return paths_; } + } + + public override bool Equals(object other) { + return Equals(other as FieldMask); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + hash ^= paths_.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + paths_.WriteTo(output, _repeated_paths_codec); + } + + public int CalculateSize() { + int size = 0; + size += paths_.CalculateSize(_repeated_paths_codec); + return size; + } + + public void MergeFrom(FieldMask other) { + if (other == null) { + return; + } + paths_.Add(other.paths_); + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + paths_.AddEntriesFrom(input, _repeated_paths_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/SourceContext.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/SourceContext.cs new file mode 100644 index 00000000..ee60fbe9 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/SourceContext.cs @@ -0,0 +1,169 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/source_context.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class SourceContext { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_SourceContext__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SourceContext() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2ds", + "ZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEo", + "CUJSChNjb20uZ29vZ2xlLnByb3RvYnVmQhJTb3VyY2VDb250ZXh0UHJvdG9Q", + "AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv", + "dG8z")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_SourceContext__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.SourceContext), descriptor.MessageTypes[0], + new string[] { "FileName", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class SourceContext : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SourceContext()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "file_name" }; + private static readonly uint[] _fieldTags = new uint[] { 10 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.internal__static_google_protobuf_SourceContext__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public SourceContext() { + OnConstruction(); + } + + partial void OnConstruction(); + + public SourceContext(SourceContext other) : this() { + fileName_ = other.fileName_; + } + + public SourceContext Clone() { + return new SourceContext(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + } + + public const int FileNameFieldNumber = 1; + private string fileName_ = ""; + public string FileName { + get { return fileName_; } + set { + pb::Freezable.CheckMutable(this); + fileName_ = value ?? ""; + } + } + + public override bool Equals(object other) { + return Equals(other as SourceContext); + } + + public bool Equals(SourceContext other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FileName != other.FileName) return false; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (FileName.Length != 0) hash ^= FileName.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (FileName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FileName); + } + } + + public int CalculateSize() { + int size = 0; + if (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); + } + return size; + } + + public void MergeFrom(SourceContext other) { + if (other == null) { + return; + } + if (other.FileName.Length != 0) { + FileName = other.FileName; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + FileName = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs new file mode 100644 index 00000000..98cb8138 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs @@ -0,0 +1,764 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Struct { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Struct__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Struct_FieldsEntry__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Value__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_ListValue__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Struct() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9i", + "dWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9i", + "dWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgB", + "IAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToC", + "OAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJv", + "dG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoM", + "c3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8K", + "DHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RI", + "ABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RW", + "YWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIW", + "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9W", + "QUxVRRAAQk4KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAGg", + "AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_Struct__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Struct), descriptor.MessageTypes[0], + new string[] { "Fields", }, new string[] { }); + internal__static_google_protobuf_Struct_FieldsEntry__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Struct.Types.FieldsEntry), descriptor.MessageTypes[0].NestedTypes[0], + new string[] { "Key", "Value", }, new string[] { }); + internal__static_google_protobuf_Value__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Value), descriptor.MessageTypes[1], + new string[] { "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue", }, new string[] { "Kind", }); + internal__static_google_protobuf_ListValue__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.ListValue), descriptor.MessageTypes[2], + new string[] { "Values", }, new string[] { }); + } + #endregion + + } + } + #region Enums + public enum NullValue { + NULL_VALUE = 0, + } + + #endregion + + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Struct : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Struct()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "fields" }; + private static readonly uint[] _fieldTags = new uint[] { 10 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.internal__static_google_protobuf_Struct__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Struct() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Struct(Struct other) : this() { + fields_ = other.fields_.Clone(); + } + + public Struct Clone() { + return new Struct(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + fields_.Freeze(); + } + + 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(); + public pbc::MapField Fields { + get { return fields_; } + } + + public override bool Equals(object other) { + return Equals(other as Struct); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + hash ^= Fields.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + fields_.WriteTo(output, _map_fields_codec); + } + + public int CalculateSize() { + int size = 0; + size += fields_.CalculateSize(_map_fields_codec); + return size; + } + + public void MergeFrom(Struct other) { + if (other == null) { + return; + } + fields_.Add(other.fields_); + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + fields_.AddEntriesFrom(input, _map_fields_codec); + break; + } + } + } + } + + #region Nested types + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Types { + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class FieldsEntry : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldsEntry()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "key", "value" }; + private static readonly uint[] _fieldTags = new uint[] { 10, 18 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Struct.Descriptor.NestedTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.internal__static_google_protobuf_Struct_FieldsEntry__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public FieldsEntry() { + OnConstruction(); + } + + partial void OnConstruction(); + + public FieldsEntry(FieldsEntry other) : this() { + key_ = other.key_; + Value = other.value_ != null ? other.Value.Clone() : null; + } + + public FieldsEntry Clone() { + return new FieldsEntry(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + if (value_ != null) Value.Freeze(); + } + + public const int KeyFieldNumber = 1; + private string key_ = ""; + public string Key { + get { return key_; } + set { + pb::Freezable.CheckMutable(this); + key_ = value ?? ""; + } + } + + public const int ValueFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Value value_; + public global::Google.Protobuf.WellKnownTypes.Value Value { + get { return value_; } + set { + pb::Freezable.CheckMutable(this); + value_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as FieldsEntry); + } + + public bool Equals(FieldsEntry other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Key != other.Key) return false; + if (!object.Equals(Value, other.Value)) return false; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (value_ != null) hash ^= Value.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (value_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Value); + } + } + + public int CalculateSize() { + int size = 0; + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + if (value_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); + } + return size; + } + + public void MergeFrom(FieldsEntry other) { + if (other == null) { + return; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.value_ != null) { + if (value_ == null) { + value_ = new global::Google.Protobuf.WellKnownTypes.Value(); + } + Value.MergeFrom(other.Value); + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + if (value_ == null) { + value_ = new global::Google.Protobuf.WellKnownTypes.Value(); + } + input.ReadMessage(value_); + break; + } + } + } + } + + } + + } + #endregion + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Value : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Value()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "bool_value", "list_value", "null_value", "number_value", "string_value", "struct_value" }; + private static readonly uint[] _fieldTags = new uint[] { 32, 50, 8, 17, 26, 42 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[1]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.internal__static_google_protobuf_Value__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Value() { + OnConstruction(); + } + + partial void OnConstruction(); + + 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; + } + + } + + public Value Clone() { + return new Value(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + if (kind_ is IFreezable) ((IFreezable) kind_).Freeze(); + } + + public const int NullValueFieldNumber = 1; + public global::Google.Protobuf.WellKnownTypes.NullValue NullValue { + get { return kindCase_ == KindOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) kind_ : global::Google.Protobuf.WellKnownTypes.NullValue.NULL_VALUE; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value; + kindCase_ = KindOneofCase.NullValue; + } + } + + public const int NumberValueFieldNumber = 2; + public double NumberValue { + get { return kindCase_ == KindOneofCase.NumberValue ? (double) kind_ : 0D; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value; + kindCase_ = KindOneofCase.NumberValue; + } + } + + public const int StringValueFieldNumber = 3; + public string StringValue { + get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value ?? ""; + kindCase_ = KindOneofCase.StringValue; + } + } + + public const int BoolValueFieldNumber = 4; + public bool BoolValue { + get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value; + kindCase_ = KindOneofCase.BoolValue; + } + } + + public const int StructValueFieldNumber = 5; + public global::Google.Protobuf.WellKnownTypes.Struct StructValue { + get { return kindCase_ == KindOneofCase.StructValue ? (global::Google.Protobuf.WellKnownTypes.Struct) kind_ : null; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.StructValue; + } + } + + public const int ListValueFieldNumber = 6; + public global::Google.Protobuf.WellKnownTypes.ListValue ListValue { + get { return kindCase_ == KindOneofCase.ListValue ? (global::Google.Protobuf.WellKnownTypes.ListValue) kind_ : null; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue; + } + } + + private object kind_; + public enum KindOneofCase { + None = 0, + NullValue = 1, + NumberValue = 2, + StringValue = 3, + BoolValue = 4, + StructValue = 5, + ListValue = 6, + } + private KindOneofCase kindCase_ = KindOneofCase.None; + public KindOneofCase KindCase { + get { return kindCase_; } + } + + public void ClearKind() { + pb::Freezable.CheckMutable(this); + kindCase_ = KindOneofCase.None; + kind_ = null; + } + + public override bool Equals(object other) { + return Equals(other as Value); + } + + public bool Equals(Value other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NullValue != other.NullValue) return false; + if (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; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode(); + if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode(); + if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode(); + if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode(); + if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode(); + if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (kindCase_ == KindOneofCase.NullValue) { + output.WriteRawTag(8); + output.WriteEnum((int) NullValue); + } + if (kindCase_ == KindOneofCase.NumberValue) { + output.WriteRawTag(17); + output.WriteDouble(NumberValue); + } + if (kindCase_ == KindOneofCase.StringValue) { + output.WriteRawTag(26); + output.WriteString(StringValue); + } + if (kindCase_ == KindOneofCase.BoolValue) { + 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); + } + } + + public int CalculateSize() { + int size = 0; + if (kindCase_ == KindOneofCase.NullValue) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue); + } + if (kindCase_ == KindOneofCase.NumberValue) { + size += 1 + 8; + } + if (kindCase_ == KindOneofCase.StringValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue); + } + if (kindCase_ == KindOneofCase.BoolValue) { + size += 1 + 1; + } + if (kindCase_ == KindOneofCase.StructValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructValue); + } + if (kindCase_ == KindOneofCase.ListValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue); + } + return size; + } + + 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: + StructValue = other.StructValue; + break; + case KindOneofCase.ListValue: + ListValue = other.ListValue; + break; + } + + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + 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; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class ListValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListValue()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "values" }; + private static readonly uint[] _fieldTags = new uint[] { 10 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.Descriptor.MessageTypes[2]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.internal__static_google_protobuf_ListValue__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public ListValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + public ListValue(ListValue other) : this() { + values_ = other.values_.Clone(); + } + + public ListValue Clone() { + return new ListValue(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + values_.Freeze(); + } + + 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(); + public pbc::RepeatedField Values { + get { return values_; } + } + + public override bool Equals(object other) { + return Equals(other as ListValue); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + hash ^= values_.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + values_.WriteTo(output, _repeated_values_codec); + } + + public int CalculateSize() { + int size = 0; + size += values_.CalculateSize(_repeated_values_codec); + return size; + } + + public void MergeFrom(ListValue other) { + if (other == null) { + return; + } + values_.Add(other.values_); + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Timestamp.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Timestamp.cs new file mode 100644 index 00000000..e3bb3c37 --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Timestamp.cs @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/timestamp.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Timestamp { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Timestamp__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Timestamp() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJv", + "dG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MY", + "AiABKAVCUQoTY29tLmdvb2dsZS5wcm90b2J1ZkIOVGltZXN0YW1wUHJvdG9Q", + "AaABAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IG", + "cHJvdG8z")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + }); + internal__static_google_protobuf_Timestamp__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Timestamp), descriptor.MessageTypes[0], + new string[] { "Seconds", "Nanos", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Timestamp : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Timestamp()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "nanos", "seconds" }; + private static readonly uint[] _fieldTags = new uint[] { 16, 8 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.internal__static_google_protobuf_Timestamp__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Timestamp() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Timestamp(Timestamp other) : this() { + seconds_ = other.seconds_; + nanos_ = other.nanos_; + } + + public Timestamp Clone() { + return new Timestamp(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + } + + public const int SecondsFieldNumber = 1; + private long seconds_; + public long Seconds { + get { return seconds_; } + set { + pb::Freezable.CheckMutable(this); + seconds_ = value; + } + } + + public const int NanosFieldNumber = 2; + private int nanos_; + public int Nanos { + get { return nanos_; } + set { + pb::Freezable.CheckMutable(this); + nanos_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as Timestamp); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + if (Seconds != 0L) hash ^= Seconds.GetHashCode(); + if (Nanos != 0) hash ^= Nanos.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (Seconds != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Seconds); + } + if (Nanos != 0) { + output.WriteRawTag(16); + output.WriteInt32(Nanos); + } + } + + public int CalculateSize() { + int size = 0; + if (Seconds != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds); + } + if (Nanos != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); + } + return size; + } + + public void MergeFrom(Timestamp other) { + if (other == null) { + return; + } + if (other.Seconds != 0L) { + Seconds = other.Seconds; + } + if (other.Nanos != 0) { + Nanos = other.Nanos; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 8: { + Seconds = input.ReadInt64(); + break; + } + case 16: { + Nanos = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Type.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Type.cs new file mode 100644 index 00000000..dbc1ee0d --- /dev/null +++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Type.cs @@ -0,0 +1,1147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto +#pragma warning disable 1591, 0612, 3021 +#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 { + + namespace Proto { + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Type { + + #region Static variables + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Type__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Field__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Enum__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_EnumValue__FieldAccessorTable; + internal static pbr::FieldAccessorTable internal__static_google_protobuf_Option__FieldAccessorTable; + #endregion + #region Descriptor + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static Type() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxIPZ29vZ2xlLnByb3RvYnVm", + "Ghlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvGiRnb29nbGUvcHJvdG9idWYv", + "c291cmNlX2NvbnRleHQucHJvdG8irgEKBFR5cGUSDAoEbmFtZRgBIAEoCRIm", + "CgZmaWVsZHMYAiADKAsyFi5nb29nbGUucHJvdG9idWYuRmllbGQSDgoGb25l", + "b2ZzGAMgAygJEigKB29wdGlvbnMYBCADKAsyFy5nb29nbGUucHJvdG9idWYu", + "T3B0aW9uEjYKDnNvdXJjZV9jb250ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3Rv", + "YnVmLlNvdXJjZUNvbnRleHQimwUKBUZpZWxkEikKBGtpbmQYASABKA4yGy5n", + "b29nbGUucHJvdG9idWYuRmllbGQuS2luZBI3CgtjYXJkaW5hbGl0eRgCIAEo", + "DjIiLmdvb2dsZS5wcm90b2J1Zi5GaWVsZC5DYXJkaW5hbGl0eRIOCgZudW1i", + "ZXIYAyABKAUSDAoEbmFtZRgEIAEoCRIQCgh0eXBlX3VybBgGIAEoCRITCgtv", + "bmVvZl9pbmRleBgHIAEoBRIOCgZwYWNrZWQYCCABKAgSKAoHb3B0aW9ucxgJ", + "IAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb24iuAIKBEtpbmQSEAoMVFlQ", + "RV9VTktOT1dOEAASDwoLVFlQRV9ET1VCTEUQARIOCgpUWVBFX0ZMT0FUEAIS", + "DgoKVFlQRV9JTlQ2NBADEg8KC1RZUEVfVUlOVDY0EAQSDgoKVFlQRV9JTlQz", + "MhAFEhAKDFRZUEVfRklYRUQ2NBAGEhAKDFRZUEVfRklYRUQzMhAHEg0KCVRZ", + "UEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkSEAoMVFlQRV9NRVNTQUdFEAsS", + "DgoKVFlQRV9CWVRFUxAMEg8KC1RZUEVfVUlOVDMyEA0SDQoJVFlQRV9FTlVN", + "EA4SEQoNVFlQRV9TRklYRUQzMhAPEhEKDVRZUEVfU0ZJWEVENjQQEBIPCgtU", + "WVBFX1NJTlQzMhAREg8KC1RZUEVfU0lOVDY0EBIidAoLQ2FyZGluYWxpdHkS", + "FwoTQ0FSRElOQUxJVFlfVU5LTk9XThAAEhgKFENBUkRJTkFMSVRZX09QVElP", + "TkFMEAESGAoUQ0FSRElOQUxJVFlfUkVRVUlSRUQQAhIYChRDQVJESU5BTElU", + "WV9SRVBFQVRFRBADIqUBCgRFbnVtEgwKBG5hbWUYASABKAkSLQoJZW51bXZh", + "bHVlGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1ZRIoCgdvcHRp", + "b25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2Cg5zb3VyY2Vf", + "Y29udGV4dBgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb250ZXh0", + "IlMKCUVudW1WYWx1ZRIMCgRuYW1lGAEgASgJEg4KBm51bWJlchgCIAEoBRIo", + "CgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbiI7CgZP", + "cHRpb24SDAoEbmFtZRgBIAEoCRIjCgV2YWx1ZRgCIAEoCzIULmdvb2dsZS5w", + "cm90b2J1Zi5BbnlCSQoTY29tLmdvb2dsZS5wcm90b2J1ZkIJVHlwZVByb3Rv", + "UAGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbr::FileDescriptor[] { + global::Google.Protobuf.WellKnownTypes.Proto.Any.Descriptor, + global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor, + }); + internal__static_google_protobuf_Type__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Type), descriptor.MessageTypes[0], + new string[] { "Name", "Fields", "Oneofs", "Options", "SourceContext", }, new string[] { }); + internal__static_google_protobuf_Field__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Field), descriptor.MessageTypes[1], + new string[] { "Kind", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options", }, new string[] { }); + internal__static_google_protobuf_Enum__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Enum), descriptor.MessageTypes[2], + new string[] { "Name", "Enumvalue", "Options", "SourceContext", }, new string[] { }); + internal__static_google_protobuf_EnumValue__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.EnumValue), descriptor.MessageTypes[3], + new string[] { "Name", "Number", "Options", }, new string[] { }); + internal__static_google_protobuf_Option__FieldAccessorTable = + new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Option), descriptor.MessageTypes[4], + new string[] { "Name", "Value", }, new string[] { }); + } + #endregion + + } + } + #region Messages + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Type : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Type()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "fields", "name", "oneofs", "options", "source_context" }; + private static readonly uint[] _fieldTags = new uint[] { 18, 10, 26, 34, 42 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[0]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.internal__static_google_protobuf_Type__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Type() { + OnConstruction(); + } + + partial void OnConstruction(); + + 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; + } + + public Type Clone() { + return new Type(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + fields_.Freeze(); + oneofs_.Freeze(); + options_.Freeze(); + if (sourceContext_ != null) SourceContext.Freeze(); + } + + public const int NameFieldNumber = 1; + private string name_ = ""; + public string Name { + get { return name_; } + set { + pb::Freezable.CheckMutable(this); + name_ = value ?? ""; + } + } + + 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(); + public pbc::RepeatedField Fields { + get { return fields_; } + } + + 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(); + public pbc::RepeatedField Oneofs { + get { return oneofs_; } + } + + 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(); + public pbc::RepeatedField Options { + get { return options_; } + } + + public const int SourceContextFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { + get { return sourceContext_; } + set { + pb::Freezable.CheckMutable(this); + sourceContext_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as Type); + } + + 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; + return true; + } + + 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(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + 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); + } + } + + 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); + } + return size; + } + + 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); + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + 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; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Field : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Field()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "cardinality", "kind", "name", "number", "oneof_index", "options", "packed", "type_url" }; + private static readonly uint[] _fieldTags = new uint[] { 16, 8, 34, 24, 56, 74, 64, 50 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[1]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.internal__static_google_protobuf_Field__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Field() { + OnConstruction(); + } + + partial void OnConstruction(); + + 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(); + } + + public Field Clone() { + return new Field(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + options_.Freeze(); + } + + public const int KindFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN; + public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { + get { return kind_; } + set { + pb::Freezable.CheckMutable(this); + kind_ = value; + } + } + + public const int CardinalityFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardinality_ = global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.CARDINALITY_UNKNOWN; + public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardinality { + get { return cardinality_; } + set { + pb::Freezable.CheckMutable(this); + cardinality_ = value; + } + } + + public const int NumberFieldNumber = 3; + private int number_; + public int Number { + get { return number_; } + set { + pb::Freezable.CheckMutable(this); + number_ = value; + } + } + + public const int NameFieldNumber = 4; + private string name_ = ""; + public string Name { + get { return name_; } + set { + pb::Freezable.CheckMutable(this); + name_ = value ?? ""; + } + } + + public const int TypeUrlFieldNumber = 6; + private string typeUrl_ = ""; + public string TypeUrl { + get { return typeUrl_; } + set { + pb::Freezable.CheckMutable(this); + typeUrl_ = value ?? ""; + } + } + + public const int OneofIndexFieldNumber = 7; + private int oneofIndex_; + public int OneofIndex { + get { return oneofIndex_; } + set { + pb::Freezable.CheckMutable(this); + oneofIndex_ = value; + } + } + + public const int PackedFieldNumber = 8; + private bool packed_; + public bool Packed { + get { return packed_; } + set { + pb::Freezable.CheckMutable(this); + packed_ = value; + } + } + + 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(); + public pbc::RepeatedField Options { + get { return options_; } + } + + public override bool Equals(object other) { + return Equals(other as Field); + } + + 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; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) hash ^= Kind.GetHashCode(); + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.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(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) { + output.WriteRawTag(8); + output.WriteEnum((int) Kind); + } + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.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); + } + + public int CalculateSize() { + int size = 0; + if (Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); + } + if (Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.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); + return size; + } + + public void MergeFrom(Field other) { + if (other == null) { + return; + } + if (other.Kind != global::Google.Protobuf.WellKnownTypes.Field.Types.Kind.TYPE_UNKNOWN) { + Kind = other.Kind; + } + if (other.Cardinality != global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality.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_); + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + 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; + } + } + } + } + + #region Nested types + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static partial class Types { + public enum Kind { + TYPE_UNKNOWN = 0, + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + + public enum Cardinality { + CARDINALITY_UNKNOWN = 0, + CARDINALITY_OPTIONAL = 1, + CARDINALITY_REQUIRED = 2, + CARDINALITY_REPEATED = 3, + } + + } + #endregion + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Enum : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Enum()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "enumvalue", "name", "options", "source_context" }; + private static readonly uint[] _fieldTags = new uint[] { 18, 10, 26, 34 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[2]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.internal__static_google_protobuf_Enum__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public Enum() { + OnConstruction(); + } + + partial void OnConstruction(); + + public Enum(Enum other) : this() { + name_ = other.name_; + enumvalue_ = other.enumvalue_.Clone(); + options_ = other.options_.Clone(); + SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null; + } + + public Enum Clone() { + return new Enum(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + enumvalue_.Freeze(); + options_.Freeze(); + if (sourceContext_ != null) SourceContext.Freeze(); + } + + public const int NameFieldNumber = 1; + private string name_ = ""; + public string Name { + get { return name_; } + set { + pb::Freezable.CheckMutable(this); + name_ = value ?? ""; + } + } + + 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(); + public pbc::RepeatedField Enumvalue { + get { return enumvalue_; } + } + + 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(); + public pbc::RepeatedField Options { + get { return options_; } + } + + public const int SourceContextFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { + get { return sourceContext_; } + set { + pb::Freezable.CheckMutable(this); + sourceContext_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as Enum); + } + + 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; + return true; + } + + 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(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + 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); + } + } + + 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); + } + return size; + } + + 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); + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + 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; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class EnumValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValue()); + public static pb::MessageParser Parser { get { return _parser; } } + + private static readonly string[] _fieldNames = new string[] { "name", "number", "options" }; + private static readonly uint[] _fieldTags = new uint[] { 10, 16, 26 }; + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor.MessageTypes[3]; } + } + + pbr::FieldAccessorTable pb::IReflectedMessage.Fields { + get { return global::Google.Protobuf.WellKnownTypes.Proto.Type.internal__static_google_protobuf_EnumValue__FieldAccessorTable; } + } + + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + + public EnumValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + public EnumValue(EnumValue other) : this() { + name_ = other.name_; + number_ = other.number_; + options_ = other.options_.Clone(); + } + + public EnumValue Clone() { + return new EnumValue(this); + } + + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + options_.Freeze(); + } + + public const int NameFieldNumber = 1; + private string name_ = ""; + public string Name { + get { return name_; } + set { + pb::Freezable.CheckMutable(this); + name_ = value ?? ""; + } + } + + public const int NumberFieldNumber = 2; + private int number_; + public int Number { + get { return number_; } + set { + pb::Freezable.CheckMutable(this); + number_ = value; + } + } + + 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(); + public pbc::RepeatedField Options { + get { return options_; } + } + + public override bool Equals(object other) { + return Equals(other as EnumValue); + } + + 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 true; + } + + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Number != 0) hash ^= Number.GetHashCode(); + hash ^= options_.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.Default.Format(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + 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); + } + + 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); + return size; + } + + 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_); + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while (input.ReadTag(out tag)) { + switch(tag) { + case 0: + throw pb::InvalidProtocolBufferException.InvalidTag(); + default: + if (pb::WireFormat.IsEndGroupTag(tag)) { + return; + } + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Number = input.ReadInt32(); + break; + } + case 26: { + options_.AddEntriesFrom(input, _repeated_options_codec); + break; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class Option : pb::IMessage