1 | // Generated by the protocol buffer compiler. DO NOT EDIT!
|
---|
2 |
|
---|
3 | using pb = global::Google.ProtocolBuffers;
|
---|
4 | using pbd = global::Google.ProtocolBuffers.Descriptors;
|
---|
5 | namespace Google.ProtocolBuffers.TestProtos {
|
---|
6 |
|
---|
7 | public static partial class UnitTestCSharpOptionsProtoFile {
|
---|
8 |
|
---|
9 | #region Extension registration
|
---|
10 | public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
|
---|
11 | }
|
---|
12 | #endregion
|
---|
13 | #region Static variables
|
---|
14 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionsMessage__Descriptor;
|
---|
15 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder> internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable;
|
---|
16 | #endregion
|
---|
17 | #region Descriptor
|
---|
18 | public static pbd::FileDescriptor Descriptor {
|
---|
19 | get { return descriptor; }
|
---|
20 | }
|
---|
21 | private static pbd::FileDescriptor descriptor;
|
---|
22 |
|
---|
23 | static UnitTestCSharpOptionsProtoFile() {
|
---|
24 | byte[] descriptorData = global::System.Convert.FromBase64String(
|
---|
25 | "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" +
|
---|
26 | "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" +
|
---|
27 | "X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" +
|
---|
28 | "ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" +
|
---|
29 | "ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" +
|
---|
30 | "ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" +
|
---|
31 | "bGU=");
|
---|
32 | pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
|
---|
33 | descriptor = root;
|
---|
34 | internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0];
|
---|
35 | internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable =
|
---|
36 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor,
|
---|
37 | new string[] { "Normal", "OptionsMessage_", "CustomName", });
|
---|
38 | pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
|
---|
39 | RegisterAllExtensions(registry);
|
---|
40 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
|
---|
41 | return registry;
|
---|
42 | };
|
---|
43 | pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
|
---|
44 | new pbd::FileDescriptor[] {
|
---|
45 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
|
---|
46 | }, assigner);
|
---|
47 | }
|
---|
48 | #endregion
|
---|
49 |
|
---|
50 | }
|
---|
51 | #region Messages
|
---|
52 | public sealed partial class OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> {
|
---|
53 | private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial();
|
---|
54 | public static OptionsMessage DefaultInstance {
|
---|
55 | get { return defaultInstance; }
|
---|
56 | }
|
---|
57 |
|
---|
58 | public override OptionsMessage DefaultInstanceForType {
|
---|
59 | get { return defaultInstance; }
|
---|
60 | }
|
---|
61 |
|
---|
62 | protected override OptionsMessage ThisMessage {
|
---|
63 | get { return this; }
|
---|
64 | }
|
---|
65 |
|
---|
66 | public static pbd::MessageDescriptor Descriptor {
|
---|
67 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; }
|
---|
68 | }
|
---|
69 |
|
---|
70 | protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors {
|
---|
71 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; }
|
---|
72 | }
|
---|
73 |
|
---|
74 | public const int NormalFieldNumber = 1;
|
---|
75 | private bool hasNormal;
|
---|
76 | private string normal_ = "";
|
---|
77 | public bool HasNormal {
|
---|
78 | get { return hasNormal; }
|
---|
79 | }
|
---|
80 | public string Normal {
|
---|
81 | get { return normal_; }
|
---|
82 | }
|
---|
83 |
|
---|
84 | public const int OptionsMessage_FieldNumber = 2;
|
---|
85 | private bool hasOptionsMessage_;
|
---|
86 | private string optionsMessage_ = "";
|
---|
87 | public bool HasOptionsMessage_ {
|
---|
88 | get { return hasOptionsMessage_; }
|
---|
89 | }
|
---|
90 | public string OptionsMessage_ {
|
---|
91 | get { return optionsMessage_; }
|
---|
92 | }
|
---|
93 |
|
---|
94 | public const int CustomNameFieldNumber = 3;
|
---|
95 | private bool hasCustomName;
|
---|
96 | private string customized_ = "";
|
---|
97 | public bool HasCustomName {
|
---|
98 | get { return hasCustomName; }
|
---|
99 | }
|
---|
100 | public string CustomName {
|
---|
101 | get { return customized_; }
|
---|
102 | }
|
---|
103 |
|
---|
104 | public override bool IsInitialized {
|
---|
105 | get {
|
---|
106 | return true;
|
---|
107 | }
|
---|
108 | }
|
---|
109 |
|
---|
110 | public override void WriteTo(pb::CodedOutputStream output) {
|
---|
111 | int size = SerializedSize;
|
---|
112 | if (HasNormal) {
|
---|
113 | output.WriteString(1, Normal);
|
---|
114 | }
|
---|
115 | if (HasOptionsMessage_) {
|
---|
116 | output.WriteString(2, OptionsMessage_);
|
---|
117 | }
|
---|
118 | if (HasCustomName) {
|
---|
119 | output.WriteString(3, CustomName);
|
---|
120 | }
|
---|
121 | UnknownFields.WriteTo(output);
|
---|
122 | }
|
---|
123 |
|
---|
124 | private int memoizedSerializedSize = -1;
|
---|
125 | public override int SerializedSize {
|
---|
126 | get {
|
---|
127 | int size = memoizedSerializedSize;
|
---|
128 | if (size != -1) return size;
|
---|
129 |
|
---|
130 | size = 0;
|
---|
131 | if (HasNormal) {
|
---|
132 | size += pb::CodedOutputStream.ComputeStringSize(1, Normal);
|
---|
133 | }
|
---|
134 | if (HasOptionsMessage_) {
|
---|
135 | size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_);
|
---|
136 | }
|
---|
137 | if (HasCustomName) {
|
---|
138 | size += pb::CodedOutputStream.ComputeStringSize(3, CustomName);
|
---|
139 | }
|
---|
140 | size += UnknownFields.SerializedSize;
|
---|
141 | memoizedSerializedSize = size;
|
---|
142 | return size;
|
---|
143 | }
|
---|
144 | }
|
---|
145 |
|
---|
146 | public static OptionsMessage ParseFrom(pb::ByteString data) {
|
---|
147 | return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
|
---|
148 | }
|
---|
149 | public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
---|
150 | return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
---|
151 | }
|
---|
152 | public static OptionsMessage ParseFrom(byte[] data) {
|
---|
153 | return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
|
---|
154 | }
|
---|
155 | public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
---|
156 | return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
---|
157 | }
|
---|
158 | public static OptionsMessage ParseFrom(global::System.IO.Stream input) {
|
---|
159 | return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
|
---|
160 | }
|
---|
161 | public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
162 | return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
---|
163 | }
|
---|
164 | public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) {
|
---|
165 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
---|
166 | }
|
---|
167 | public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
168 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
---|
169 | }
|
---|
170 | public static OptionsMessage ParseFrom(pb::CodedInputStream input) {
|
---|
171 | return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
|
---|
172 | }
|
---|
173 | public static OptionsMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
174 | return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
---|
175 | }
|
---|
176 | public static Builder CreateBuilder() { return new Builder(); }
|
---|
177 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
---|
178 | public override Builder CreateBuilderForType() { return new Builder(); }
|
---|
179 | public static Builder CreateBuilder(OptionsMessage prototype) {
|
---|
180 | return (Builder)new Builder().MergeFrom(prototype);
|
---|
181 | }
|
---|
182 |
|
---|
183 | public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> {
|
---|
184 | protected override Builder ThisBuilder {
|
---|
185 | get { return this; }
|
---|
186 | }
|
---|
187 | public Builder() { }
|
---|
188 |
|
---|
189 | OptionsMessage result = new OptionsMessage();
|
---|
190 |
|
---|
191 | protected override OptionsMessage MessageBeingBuilt {
|
---|
192 | get { return result; }
|
---|
193 | }
|
---|
194 |
|
---|
195 | public override Builder Clear() {
|
---|
196 | result = new OptionsMessage();
|
---|
197 | return this;
|
---|
198 | }
|
---|
199 |
|
---|
200 | public override Builder Clone() {
|
---|
201 | return new Builder().MergeFrom(result);
|
---|
202 | }
|
---|
203 |
|
---|
204 | public override pbd::MessageDescriptor DescriptorForType {
|
---|
205 | get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; }
|
---|
206 | }
|
---|
207 |
|
---|
208 | public override OptionsMessage DefaultInstanceForType {
|
---|
209 | get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; }
|
---|
210 | }
|
---|
211 |
|
---|
212 | public override OptionsMessage BuildPartial() {
|
---|
213 | if (result == null) {
|
---|
214 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
---|
215 | }
|
---|
216 | OptionsMessage returnMe = result;
|
---|
217 | result = null;
|
---|
218 | return returnMe;
|
---|
219 | }
|
---|
220 |
|
---|
221 | public override Builder MergeFrom(pb::IMessage other) {
|
---|
222 | if (other is OptionsMessage) {
|
---|
223 | return MergeFrom((OptionsMessage)other);
|
---|
224 | } else {
|
---|
225 | base.MergeFrom(other);
|
---|
226 | return this;
|
---|
227 | }
|
---|
228 | }
|
---|
229 |
|
---|
230 | public override Builder MergeFrom(OptionsMessage other) {
|
---|
231 | if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this;
|
---|
232 | if (other.HasNormal) {
|
---|
233 | Normal = other.Normal;
|
---|
234 | }
|
---|
235 | if (other.HasOptionsMessage_) {
|
---|
236 | OptionsMessage_ = other.OptionsMessage_;
|
---|
237 | }
|
---|
238 | if (other.HasCustomName) {
|
---|
239 | CustomName = other.CustomName;
|
---|
240 | }
|
---|
241 | this.MergeUnknownFields(other.UnknownFields);
|
---|
242 | return this;
|
---|
243 | }
|
---|
244 |
|
---|
245 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
---|
246 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
---|
247 | }
|
---|
248 |
|
---|
249 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
---|
250 | pb::UnknownFieldSet.Builder unknownFields = null;
|
---|
251 | while (true) {
|
---|
252 | uint tag = input.ReadTag();
|
---|
253 | switch (tag) {
|
---|
254 | case 0: {
|
---|
255 | if (unknownFields != null) {
|
---|
256 | this.UnknownFields = unknownFields.Build();
|
---|
257 | }
|
---|
258 | return this;
|
---|
259 | }
|
---|
260 | default: {
|
---|
261 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
---|
262 | if (unknownFields != null) {
|
---|
263 | this.UnknownFields = unknownFields.Build();
|
---|
264 | }
|
---|
265 | return this;
|
---|
266 | }
|
---|
267 | if (unknownFields == null) {
|
---|
268 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
---|
269 | }
|
---|
270 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
---|
271 | break;
|
---|
272 | }
|
---|
273 | case 10: {
|
---|
274 | Normal = input.ReadString();
|
---|
275 | break;
|
---|
276 | }
|
---|
277 | case 18: {
|
---|
278 | OptionsMessage_ = input.ReadString();
|
---|
279 | break;
|
---|
280 | }
|
---|
281 | case 26: {
|
---|
282 | CustomName = input.ReadString();
|
---|
283 | break;
|
---|
284 | }
|
---|
285 | }
|
---|
286 | }
|
---|
287 | }
|
---|
288 |
|
---|
289 |
|
---|
290 | public bool HasNormal {
|
---|
291 | get { return result.HasNormal; }
|
---|
292 | }
|
---|
293 | public string Normal {
|
---|
294 | get { return result.Normal; }
|
---|
295 | set { SetNormal(value); }
|
---|
296 | }
|
---|
297 | public Builder SetNormal(string value) {
|
---|
298 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
---|
299 | result.hasNormal = true;
|
---|
300 | result.normal_ = value;
|
---|
301 | return this;
|
---|
302 | }
|
---|
303 | public Builder ClearNormal() {
|
---|
304 | result.hasNormal = false;
|
---|
305 | result.normal_ = "";
|
---|
306 | return this;
|
---|
307 | }
|
---|
308 |
|
---|
309 | public bool HasOptionsMessage_ {
|
---|
310 | get { return result.HasOptionsMessage_; }
|
---|
311 | }
|
---|
312 | public string OptionsMessage_ {
|
---|
313 | get { return result.OptionsMessage_; }
|
---|
314 | set { SetOptionsMessage_(value); }
|
---|
315 | }
|
---|
316 | public Builder SetOptionsMessage_(string value) {
|
---|
317 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
---|
318 | result.hasOptionsMessage_ = true;
|
---|
319 | result.optionsMessage_ = value;
|
---|
320 | return this;
|
---|
321 | }
|
---|
322 | public Builder ClearOptionsMessage_() {
|
---|
323 | result.hasOptionsMessage_ = false;
|
---|
324 | result.optionsMessage_ = "";
|
---|
325 | return this;
|
---|
326 | }
|
---|
327 |
|
---|
328 | public bool HasCustomName {
|
---|
329 | get { return result.HasCustomName; }
|
---|
330 | }
|
---|
331 | public string CustomName {
|
---|
332 | get { return result.CustomName; }
|
---|
333 | set { SetCustomName(value); }
|
---|
334 | }
|
---|
335 | public Builder SetCustomName(string value) {
|
---|
336 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
---|
337 | result.hasCustomName = true;
|
---|
338 | result.customized_ = value;
|
---|
339 | return this;
|
---|
340 | }
|
---|
341 | public Builder ClearCustomName() {
|
---|
342 | result.hasCustomName = false;
|
---|
343 | result.customized_ = "";
|
---|
344 | return this;
|
---|
345 | }
|
---|
346 | }
|
---|
347 | static OptionsMessage() {
|
---|
348 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.Descriptor, null);
|
---|
349 | }
|
---|
350 | }
|
---|
351 |
|
---|
352 | #endregion
|
---|
353 |
|
---|
354 | }
|
---|