@ -24,22 +24,24 @@ namespace Conformance {
static ConformanceReflection ( ) {
static ConformanceReflection ( ) {
byte [ ] descriptorData = global :: System . Convert . FromBase64String (
byte [ ] descriptorData = global :: System . Convert . FromBase64String (
string . Concat (
string . Concat (
"ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UiwA EKEkNvbmZvcm1h" ,
"ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2Ui1Q EKEkNvbmZvcm1h" ,
"bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv" ,
"bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv" ,
"bl9wYXlsb2FkGAIgASgJSAASOAoXcmVxdWVzdGVkX291dHB1dF9mb3JtYXQY" ,
"bl9wYXlsb2FkGAIgASgJSAASOAoXcmVxdWVzdGVkX291dHB1dF9mb3JtYXQY" ,
"AyABKA4yFy5jb25mb3JtYW5jZS5XaXJlRm9ybWF0EhQKDG1lc3NhZ2VfdHlw" ,
"AyABKA4yFy5jb25mb3JtYW5jZS5XaXJlRm9ybWF0EhQKDG1lc3NhZ2VfdHlw" ,
"ZRgEIAEoCRIbChNpZ25vcmVfdW5rbm93bl9qc29uGAUgASgIQgkKB3BheWxv" ,
"ZRgEIAEoCRIwCg10ZXN0X2NhdGVnb3J5GAUgASgOMhkuY29uZm9ybWFuY2Uu" ,
"YWQisQEKE0NvbmZvcm1hbmNlUmVzcG9uc2USFQoLcGFyc2VfZXJyb3IYASAB" ,
"VGVzdENhdGVnb3J5QgkKB3BheWxvYWQisQEKE0NvbmZvcm1hbmNlUmVzcG9u" ,
"KAlIABIZCg9zZXJpYWxpemVfZXJyb3IYBiABKAlIABIXCg1ydW50aW1lX2Vy" ,
"c2USFQoLcGFyc2VfZXJyb3IYASABKAlIABIZCg9zZXJpYWxpemVfZXJyb3IY" ,
"cm9yGAIgASgJSAASGgoQcHJvdG9idWZfcGF5bG9hZBgDIAEoDEgAEhYKDGpz" ,
"BiABKAlIABIXCg1ydW50aW1lX2Vycm9yGAIgASgJSAASGgoQcHJvdG9idWZf" ,
"b25fcGF5bG9hZBgEIAEoCUgAEhEKB3NraXBwZWQYBSABKAlIAEIICgZyZXN1" ,
"cGF5bG9hZBgDIAEoDEgAEhYKDGpzb25fcGF5bG9hZBgEIAEoCUgAEhEKB3Nr" ,
"bHQqNQoKV2lyZUZvcm1hdBIPCgtVTlNQRUNJRklFRBAAEgwKCFBST1RPQlVG" ,
"aXBwZWQYBSABKAlIAEIICgZyZXN1bHQqNQoKV2lyZUZvcm1hdBIPCgtVTlNQ" ,
"EAESCAoESlNPThACQiEKH2NvbS5nb29nbGUucHJvdG9idWYuY29uZm9ybWFu" ,
"RUNJRklFRBAAEgwKCFBST1RPQlVGEAESCAoESlNPThACKlQKDFRlc3RDYXRl" ,
"Y2ViBnByb3RvMw==" ) ) ;
"Z29yeRIPCgtCSU5BUllfVEVTVBAAEg0KCUpTT05fVEVTVBABEiQKIEpTT05f" ,
"SUdOT1JFX1VOS05PV05fUEFSU0lOR19URVNUEAJCIQofY29tLmdvb2dsZS5w" ,
"cm90b2J1Zi5jb25mb3JtYW5jZWIGcHJvdG8z" ) ) ;
descriptor = pbr : : FileDescriptor . FromGeneratedCode ( descriptorData ,
descriptor = pbr : : FileDescriptor . FromGeneratedCode ( descriptorData ,
new pbr : : FileDescriptor [ ] { } ,
new pbr : : FileDescriptor [ ] { } ,
new pbr : : GeneratedClrTypeInfo ( new [ ] { typeof ( global :: Conformance . WireFormat ) , } , new pbr : : GeneratedClrTypeInfo [ ] {
new pbr : : GeneratedClrTypeInfo ( new [ ] { typeof ( global :: Conformance . WireFormat ) , typeof ( global :: Conformance . TestCategory ) , } , new pbr : : GeneratedClrTypeInfo [ ] {
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: Conformance . ConformanceRequest ) , global :: Conformance . ConformanceRequest . Parser , new [ ] { "ProtobufPayload" , "JsonPayload" , "RequestedOutputFormat" , "MessageType" , "IgnoreUnknownJson " } , new [ ] { "Payload" } , null , null ) ,
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: Conformance . ConformanceRequest ) , global :: Conformance . ConformanceRequest . Parser , new [ ] { "ProtobufPayload" , "JsonPayload" , "RequestedOutputFormat" , "MessageType" , "TestCategory " } , new [ ] { "Payload" } , null , null ) ,
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: Conformance . ConformanceResponse ) , global :: Conformance . ConformanceResponse . Parser , new [ ] { "ParseError" , "SerializeError" , "RuntimeError" , "ProtobufPayload" , "JsonPayload" , "Skipped" } , new [ ] { "Result" } , null , null )
new pbr : : GeneratedClrTypeInfo ( typeof ( global :: Conformance . ConformanceResponse ) , global :: Conformance . ConformanceResponse . Parser , new [ ] { "ParseError" , "SerializeError" , "RuntimeError" , "ProtobufPayload" , "JsonPayload" , "Skipped" } , new [ ] { "Result" } , null , null )
} ) ) ;
} ) ) ;
}
}
@ -53,6 +55,25 @@ namespace Conformance {
[pbr::OriginalName("JSON")] Json = 2 ,
[pbr::OriginalName("JSON")] Json = 2 ,
}
}
public enum TestCategory {
/// <summary>
/// Test binary wire format.
/// </summary>
[pbr::OriginalName("BINARY_TEST")] BinaryTest = 0 ,
/// <summary>
/// Test json wire format.
/// </summary>
[pbr::OriginalName("JSON_TEST")] JsonTest = 1 ,
/// <summary>
/// Similar to JSON_TEST. However, during parsing json, testee should ignore
/// unknown fields. This feature is optional. Each implementation can descide
/// whether to support it. See
/// https://developers.google.com/protocol-buffers/docs/proto3#json_options
/// for more detail.
/// </summary>
[pbr::OriginalName("JSON_IGNORE_UNKNOWN_PARSING_TEST")] JsonIgnoreUnknownParsingTest = 2 ,
}
# endregion
# endregion
#region Messages
#region Messages
@ -90,7 +111,7 @@ namespace Conformance {
public ConformanceRequest ( ConformanceRequest other ) : this ( ) {
public ConformanceRequest ( ConformanceRequest other ) : this ( ) {
requestedOutputFormat_ = other . requestedOutputFormat_ ;
requestedOutputFormat_ = other . requestedOutputFormat_ ;
messageType_ = other . messageType_ ;
messageType_ = other . messageType_ ;
ignoreUnknownJson _ = other . ignoreUnknownJson _;
testCategory _ = other . testCategory _;
switch ( other . PayloadCase ) {
switch ( other . PayloadCase ) {
case PayloadOneofCase . ProtobufPayload :
case PayloadOneofCase . ProtobufPayload :
ProtobufPayload = other . ProtobufPayload ;
ProtobufPayload = other . ProtobufPayload ;
@ -160,14 +181,19 @@ namespace Conformance {
}
}
}
}
/// <summary>Field number for the "ignore_unknown_json" field.</summary>
/// <summary>Field number for the "test_category" field.</summary>
public const int IgnoreUnknownJsonFieldNumber = 5 ;
public const int TestCategoryFieldNumber = 5 ;
private bool ignoreUnknownJson_ ;
private global :: Conformance . TestCategory testCategory_ = 0 ;
/// <summary>
/// Each test is given a specific test category. Some category may need spedific
/// support in testee programs. Refer to the defintion of TestCategory for
/// more information.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool IgnoreUnknownJson {
public global :: Conformance . TestCategory TestCategory {
get { return ignoreUnknownJson_ ; }
get { return testCategory _; }
set {
set {
ignoreUnknownJson_ = value ;
testCategory _ = value ;
}
}
}
}
@ -207,7 +233,7 @@ namespace Conformance {
if ( JsonPayload ! = other . JsonPayload ) return false ;
if ( JsonPayload ! = other . JsonPayload ) return false ;
if ( RequestedOutputFormat ! = other . RequestedOutputFormat ) return false ;
if ( RequestedOutputFormat ! = other . RequestedOutputFormat ) return false ;
if ( MessageType ! = other . MessageType ) return false ;
if ( MessageType ! = other . MessageType ) return false ;
if ( IgnoreUnknownJson ! = other . IgnoreUnknownJson ) return false ;
if ( TestCategory ! = other . TestCategory ) return false ;
if ( PayloadCase ! = other . PayloadCase ) return false ;
if ( PayloadCase ! = other . PayloadCase ) return false ;
return Equals ( _ unknownFields , other . _ unknownFields ) ;
return Equals ( _ unknownFields , other . _ unknownFields ) ;
}
}
@ -219,7 +245,7 @@ namespace Conformance {
if ( payloadCase_ = = PayloadOneofCase . JsonPayload ) hash ^ = JsonPayload . GetHashCode ( ) ;
if ( payloadCase_ = = PayloadOneofCase . JsonPayload ) hash ^ = JsonPayload . GetHashCode ( ) ;
if ( RequestedOutputFormat ! = 0 ) hash ^ = RequestedOutputFormat . GetHashCode ( ) ;
if ( RequestedOutputFormat ! = 0 ) hash ^ = RequestedOutputFormat . GetHashCode ( ) ;
if ( MessageType . Length ! = 0 ) hash ^ = MessageType . GetHashCode ( ) ;
if ( MessageType . Length ! = 0 ) hash ^ = MessageType . GetHashCode ( ) ;
if ( IgnoreUnknownJson ! = false ) hash ^ = IgnoreUnknownJson . GetHashCode ( ) ;
if ( TestCategory ! = 0 ) hash ^ = TestCategory . GetHashCode ( ) ;
hash ^ = ( int ) payloadCase_ ;
hash ^ = ( int ) payloadCase_ ;
if ( _ unknownFields ! = null ) {
if ( _ unknownFields ! = null ) {
hash ^ = _ unknownFields . GetHashCode ( ) ;
hash ^ = _ unknownFields . GetHashCode ( ) ;
@ -250,9 +276,9 @@ namespace Conformance {
output . WriteRawTag ( 3 4 ) ;
output . WriteRawTag ( 3 4 ) ;
output . WriteString ( MessageType ) ;
output . WriteString ( MessageType ) ;
}
}
if ( IgnoreUnknownJson ! = false ) {
if ( TestCategory ! = 0 ) {
output . WriteRawTag ( 4 0 ) ;
output . WriteRawTag ( 4 0 ) ;
output . WriteBool ( IgnoreUnknownJson ) ;
output . WriteEnum ( ( int ) TestCategory ) ;
}
}
if ( _ unknownFields ! = null ) {
if ( _ unknownFields ! = null ) {
_ unknownFields . WriteTo ( output ) ;
_ unknownFields . WriteTo ( output ) ;
@ -274,8 +300,8 @@ namespace Conformance {
if ( MessageType . Length ! = 0 ) {
if ( MessageType . Length ! = 0 ) {
size + = 1 + pb : : CodedOutputStream . ComputeStringSize ( MessageType ) ;
size + = 1 + pb : : CodedOutputStream . ComputeStringSize ( MessageType ) ;
}
}
if ( IgnoreUnknownJson ! = false ) {
if ( TestCategory ! = 0 ) {
size + = 1 + 1 ;
size + = 1 + pb : : CodedOutputStream . ComputeEnumSize ( ( int ) TestCategory ) ;
}
}
if ( _ unknownFields ! = null ) {
if ( _ unknownFields ! = null ) {
size + = _ unknownFields . CalculateSize ( ) ;
size + = _ unknownFields . CalculateSize ( ) ;
@ -294,8 +320,8 @@ namespace Conformance {
if ( other . MessageType . Length ! = 0 ) {
if ( other . MessageType . Length ! = 0 ) {
MessageType = other . MessageType ;
MessageType = other . MessageType ;
}
}
if ( other . IgnoreUnknownJson ! = false ) {
if ( other . TestCategory ! = 0 ) {
IgnoreUnknownJson = other . IgnoreUnknownJson ;
TestCategory = other . TestCategory ;
}
}
switch ( other . PayloadCase ) {
switch ( other . PayloadCase ) {
case PayloadOneofCase . ProtobufPayload :
case PayloadOneofCase . ProtobufPayload :
@ -334,7 +360,7 @@ namespace Conformance {
break ;
break ;
}
}
case 4 0 : {
case 4 0 : {
IgnoreUnknownJson = input . ReadBool ( ) ;
testCategory_ = ( global :: Conformance . TestCategory ) input . ReadEnum ( ) ;
break ;
break ;
}
}
}
}