|
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
|
|
|
|
|
using pb = global::Google.ProtocolBuffers;
|
|
|
|
using pbc = global::Google.ProtocolBuffers.Collections;
|
|
|
|
using pbd = global::Google.ProtocolBuffers.Descriptors;
|
|
|
|
using scg = global::System.Collections.Generic;
|
|
|
|
using self = global::Google.ProtocolBuffers.TestProtos;
|
|
|
|
|
|
|
|
namespace Google.ProtocolBuffers.TestProtos {
|
|
|
|
|
|
|
|
public static partial class UnitTestOptimizeForProtoFile {
|
|
|
|
|
|
|
|
#region Descriptor
|
|
|
|
public static pbd::FileDescriptor Descriptor {
|
|
|
|
get { return descriptor; }
|
|
|
|
}
|
|
|
|
private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom (
|
|
|
|
new byte[] {
|
|
|
|
0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x75, 0x6e,
|
|
|
|
0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x2e,
|
|
|
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74,
|
|
|
|
0x74, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
|
|
|
0x66, 0x2f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x01, 0x0a,
|
|
|
|
0x14, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x53, 0x69, 0x7a,
|
|
|
|
0x65, 0x12, 0x09, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x2e, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
|
|
|
|
0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69,
|
|
|
|
0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
|
|
|
0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x32, 0x40, 0x0a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x5f,
|
|
|
|
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
|
|
|
0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69,
|
|
|
|
0x7a, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x18, 0xd2, 0x09, 0x20, 0x01, 0x28, 0x05, 0x42, 0x45, 0x48,
|
|
|
|
0x02, 0xc2, 0x3e, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42,
|
|
|
|
0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x1c,
|
|
|
|
0x55, 0x6e, 0x69, 0x74, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50,
|
|
|
|
0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
|
|
|
|
}, new pbd::FileDescriptor[] {
|
|
|
|
self::UnitTestProtoFile.Descriptor,
|
|
|
|
});
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Extensions
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Static variables
|
|
|
|
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor
|
|
|
|
= Descriptor.MessageTypes[0];
|
|
|
|
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable
|
|
|
|
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor,
|
|
|
|
new string[] { "I", "Msg", },
|
|
|
|
typeof (self::TestOptimizedForSize),
|
|
|
|
typeof (self::TestOptimizedForSize.Builder));
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#region Enums
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Messages
|
|
|
|
public sealed partial class TestOptimizedForSize : pb::ExtendableMessage<TestOptimizedForSize, TestOptimizedForSize.Builder> {
|
|
|
|
// Use TestOptimizedForSize.CreateBuilder() to construct.
|
|
|
|
private TestOptimizedForSize() {}
|
|
|
|
|
|
|
|
private static readonly TestOptimizedForSize defaultInstance = new TestOptimizedForSize();
|
|
|
|
public static TestOptimizedForSize DefaultInstance {
|
|
|
|
get { return defaultInstance; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public override TestOptimizedForSize DefaultInstanceForType {
|
|
|
|
get { return defaultInstance; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public static pbd::MessageDescriptor Descriptor {
|
|
|
|
get { return self::UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor; }
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
|
|
|
|
get { return self::UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable; }
|
|
|
|
}
|
|
|
|
|
|
|
|
#region Nested types
|
|
|
|
public static class Types {
|
|
|
|
public static readonly pb::GeneratedExtensionBase<self::TestOptimizedForSize, int> TestExtension =
|
|
|
|
pb::GeneratedSingleExtension<self::TestOptimizedForSize, int>.CreateInstance(Descriptor.Extensions[0]);
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
// optional int32 i = 1;
|
|
|
|
private bool hasI;
|
|
|
|
private int i_ = 0;
|
|
|
|
public bool HasI {
|
|
|
|
get { return hasI; }
|
|
|
|
}
|
|
|
|
public int I {
|
|
|
|
get { return i_; }
|
|
|
|
}
|
|
|
|
|
|
|
|
// optional .protobuf_unittest.ForeignMessage msg = 19;
|
|
|
|
private bool hasMsg;
|
|
|
|
private self::ForeignMessage msg_ = self::ForeignMessage.DefaultInstance;
|
|
|
|
public bool HasMsg {
|
|
|
|
get { return hasMsg; }
|
|
|
|
}
|
|
|
|
public self::ForeignMessage Msg {
|
|
|
|
get { return msg_; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(pb::ByteString data) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(pb::ByteString data,
|
|
|
|
pb::ExtensionRegistry extensionRegistry) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
|
|
|
|
.BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(byte[] data) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize parseFrom(byte[] data,
|
|
|
|
pb::ExtensionRegistry extensionRegistry) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
|
|
|
|
.BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(global::System.IO.Stream input) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(
|
|
|
|
global::System.IO.Stream input,
|
|
|
|
pb::ExtensionRegistry extensionRegistry) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
|
|
|
|
.BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(pb::CodedInputStream input) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
|
|
|
}
|
|
|
|
public static self::TestOptimizedForSize ParseFrom(pb::CodedInputStream input,
|
|
|
|
pb::ExtensionRegistry extensionRegistry) {
|
|
|
|
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
|
|
|
|
.BuildParsed();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Builder CreateBuilder() { return new Builder(); }
|
|
|
|
public override IBuilder<self::TestOptimizedForSize> CreateBuilderForType() { return new Builder(); }
|
|
|
|
public static Builder CreateBuilder(self::TestOptimizedForSize prototype) {
|
|
|
|
return (Builder) new Builder().MergeFrom(prototype);
|
|
|
|
}
|
|
|
|
|
|
|
|
public sealed partial class Builder : pb::ExtendableBuilder<self::TestOptimizedForSize, self::TestOptimizedForSize.Builder> {
|
|
|
|
// Construct using self::TestOptimizedForSize.CreateBuilder()
|
|
|
|
internal Builder() {}
|
|
|
|
|
|
|
|
self::TestOptimizedForSize result = new self::TestOptimizedForSize();
|
|
|
|
|
|
|
|
protected override self::TestOptimizedForSize MessageBeingBuilt {
|
|
|
|
get { return result; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public override IBuilder<self::TestOptimizedForSize> Clear() {
|
|
|
|
result = new self::TestOptimizedForSize();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override IBuilder<self::TestOptimizedForSize> Clone() {
|
|
|
|
return new Builder().MergeFrom(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
public override pbd::MessageDescriptor DescriptorForType {
|
|
|
|
get { return self::TestOptimizedForSize.Descriptor; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public override self::TestOptimizedForSize DefaultInstanceForType {
|
|
|
|
get { return self::TestOptimizedForSize.DefaultInstance; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public override self::TestOptimizedForSize BuildPartial() {
|
|
|
|
self::TestOptimizedForSize returnMe = result;
|
|
|
|
result = null;
|
|
|
|
return returnMe;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// optional int32 i = 1;
|
|
|
|
public bool HasI {
|
|
|
|
get { return result.HasI; }
|
|
|
|
}
|
|
|
|
public int I {
|
|
|
|
get { return result.I; }
|
|
|
|
set { SetI(value); }
|
|
|
|
}
|
|
|
|
public Builder SetI(int value) {
|
|
|
|
result.hasI = true;
|
|
|
|
result.i_ = value;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder ClearI() {
|
|
|
|
result.hasI = false;
|
|
|
|
result.i_ = 0;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// optional .protobuf_unittest.ForeignMessage msg = 19;
|
|
|
|
public bool HasMsg {
|
|
|
|
get { return result.HasMsg; }
|
|
|
|
}
|
|
|
|
public self::ForeignMessage Msg {
|
|
|
|
get { return result.Msg; }
|
|
|
|
set { SetMsg(value); }
|
|
|
|
}
|
|
|
|
public Builder SetMsg(self::ForeignMessage value) {
|
|
|
|
result.hasMsg = true;
|
|
|
|
result.msg_ = value;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder SetMsg(self::ForeignMessage.Builder builderForValue) {
|
|
|
|
result.hasMsg = true;
|
|
|
|
result.msg_ = builderForValue.Build();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder MergeMsg(self::ForeignMessage value) {
|
|
|
|
if (result.HasMsg &&
|
|
|
|
result.msg_ != self::ForeignMessage.DefaultInstance) {
|
|
|
|
result.msg_ =
|
|
|
|
self::ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
|
|
|
|
} else {
|
|
|
|
result.msg_ = value;
|
|
|
|
}
|
|
|
|
result.hasMsg = true;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder ClearMsg() {
|
|
|
|
result.hasMsg = false;
|
|
|
|
result.msg_ = self::ForeignMessage.DefaultInstance;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Services
|
|
|
|
#endregion
|
|
|
|
}
|