• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/api.proto
3 #pragma warning disable 1591, 0612, 3021
4 #region Designer generated code
5 
6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic;
10 namespace Google.Protobuf.WellKnownTypes {
11 
12   /// <summary>Holder for reflection information generated from google/protobuf/api.proto</summary>
13   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14   public static partial class ApiReflection {
15 
16     #region Descriptor
17     /// <summary>File descriptor for google/protobuf/api.proto</summary>
18     public static pbr::FileDescriptor Descriptor {
19       get { return descriptor; }
20     }
21     private static pbr::FileDescriptor descriptor;
22 
ApiReflection()23     static ApiReflection() {
24       byte[] descriptorData = global::System.Convert.FromBase64String(
25           string.Concat(
26             "Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa",
27             "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl",
28             "L3Byb3RvYnVmL3R5cGUucHJvdG8igQIKA0FwaRIMCgRuYW1lGAEgASgJEigK",
29             "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w",
30             "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp",
31             "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv",
32             "dG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUu",
33             "cHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3Rv",
34             "YnVmLlN5bnRheCLVAQoGTWV0aG9kEgwKBG5hbWUYASABKAkSGAoQcmVxdWVz",
35             "dF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCBIZ",
36             "ChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25zZV9zdHJlYW1p",
37             "bmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5P",
38             "cHRpb24SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRh",
39             "eCIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCSwoTY29t",
40             "Lmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAaABAaICA0dQQqoCHkdvb2ds",
41             "ZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"));
42       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
43           new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor, },
44           new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
45             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Api), global::Google.Protobuf.WellKnownTypes.Api.Parser, new[]{ "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax" }, null, null, null),
46             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Method), global::Google.Protobuf.WellKnownTypes.Method.Parser, new[]{ "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax" }, null, null, null),
47             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Mixin), global::Google.Protobuf.WellKnownTypes.Mixin.Parser, new[]{ "Name", "Root" }, null, null, null)
48           }));
49     }
50     #endregion
51 
52   }
53   #region Messages
54   /// <summary>
55   ///  Api is a light-weight descriptor for a protocol buffer service.
56   /// </summary>
57   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
58   public sealed partial class Api : pb::IMessage<Api> {
59     private static readonly pb::MessageParser<Api> _parser = new pb::MessageParser<Api>(() => new Api());
60     public static pb::MessageParser<Api> Parser { get { return _parser; } }
61 
62     public static pbr::MessageDescriptor Descriptor {
63       get { return global::Google.Protobuf.WellKnownTypes.ApiReflection.Descriptor.MessageTypes[0]; }
64     }
65 
66     pbr::MessageDescriptor pb::IMessage.Descriptor {
67       get { return Descriptor; }
68     }
69 
Api()70     public Api() {
71       OnConstruction();
72     }
73 
OnConstruction()74     partial void OnConstruction();
75 
Api(Api other)76     public Api(Api other) : this() {
77       name_ = other.name_;
78       methods_ = other.methods_.Clone();
79       options_ = other.options_.Clone();
80       version_ = other.version_;
81       SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
82       mixins_ = other.mixins_.Clone();
83       syntax_ = other.syntax_;
84     }
85 
Clone()86     public Api Clone() {
87       return new Api(this);
88     }
89 
90     /// <summary>Field number for the "name" field.</summary>
91     public const int NameFieldNumber = 1;
92     private string name_ = "";
93     /// <summary>
94     ///  The fully qualified name of this api, including package name
95     ///  followed by the api's simple name.
96     /// </summary>
97     public string Name {
98       get { return name_; }
99       set {
100         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
101       }
102     }
103 
104     /// <summary>Field number for the "methods" field.</summary>
105     public const int MethodsFieldNumber = 2;
106     private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Method> _repeated_methods_codec
107         = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser);
108     private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> methods_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method>();
109     /// <summary>
110     ///  The methods of this api, in unspecified order.
111     /// </summary>
112     public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> Methods {
113       get { return methods_; }
114     }
115 
116     /// <summary>Field number for the "options" field.</summary>
117     public const int OptionsFieldNumber = 3;
118     private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
119         = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
120     private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
121     /// <summary>
122     ///  Any metadata attached to the API.
123     /// </summary>
124     public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
125       get { return options_; }
126     }
127 
128     /// <summary>Field number for the "version" field.</summary>
129     public const int VersionFieldNumber = 4;
130     private string version_ = "";
131     /// <summary>
132     ///  A version string for this api. If specified, must have the form
133     ///  `major-version.minor-version`, as in `1.10`. If the minor version
134     ///  is omitted, it defaults to zero. If the entire version field is
135     ///  empty, the major version is derived from the package name, as
136     ///  outlined below. If the field is not empty, the version in the
137     ///  package name will be verified to be consistent with what is
138     ///  provided here.
139     ///
140     ///  The versioning schema uses [semantic
141     ///  versioning](http://semver.org) where the major version number
142     ///  indicates a breaking change and the minor version an additive,
143     ///  non-breaking change. Both version numbers are signals to users
144     ///  what to expect from different versions, and should be carefully
145     ///  chosen based on the product plan.
146     ///
147     ///  The major version is also reflected in the package name of the
148     ///  API, which must end in `v&lt;major-version>`, as in
149     ///  `google.feature.v1`. For major versions 0 and 1, the suffix can
150     ///  be omitted. Zero major versions must only be used for
151     ///  experimental, none-GA apis.
152     /// </summary>
153     public string Version {
154       get { return version_; }
155       set {
156         version_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
157       }
158     }
159 
160     /// <summary>Field number for the "source_context" field.</summary>
161     public const int SourceContextFieldNumber = 5;
162     private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
163     /// <summary>
164     ///  Source context for the protocol buffer service represented by this
165     ///  message.
166     /// </summary>
167     public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
168       get { return sourceContext_; }
169       set {
170         sourceContext_ = value;
171       }
172     }
173 
174     /// <summary>Field number for the "mixins" field.</summary>
175     public const int MixinsFieldNumber = 6;
176     private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Mixin> _repeated_mixins_codec
177         = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser);
178     private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> mixins_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin>();
179     /// <summary>
180     ///  Included APIs. See [Mixin][].
181     /// </summary>
182     public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> Mixins {
183       get { return mixins_; }
184     }
185 
186     /// <summary>Field number for the "syntax" field.</summary>
187     public const int SyntaxFieldNumber = 7;
188     private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0;
189     /// <summary>
190     ///  The source syntax of the service.
191     /// </summary>
192     public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
193       get { return syntax_; }
194       set {
195         syntax_ = value;
196       }
197     }
198 
Equals(object other)199     public override bool Equals(object other) {
200       return Equals(other as Api);
201     }
202 
Equals(Api other)203     public bool Equals(Api other) {
204       if (ReferenceEquals(other, null)) {
205         return false;
206       }
207       if (ReferenceEquals(other, this)) {
208         return true;
209       }
210       if (Name != other.Name) return false;
211       if(!methods_.Equals(other.methods_)) return false;
212       if(!options_.Equals(other.options_)) return false;
213       if (Version != other.Version) return false;
214       if (!object.Equals(SourceContext, other.SourceContext)) return false;
215       if(!mixins_.Equals(other.mixins_)) return false;
216       if (Syntax != other.Syntax) return false;
217       return true;
218     }
219 
GetHashCode()220     public override int GetHashCode() {
221       int hash = 1;
222       if (Name.Length != 0) hash ^= Name.GetHashCode();
223       hash ^= methods_.GetHashCode();
224       hash ^= options_.GetHashCode();
225       if (Version.Length != 0) hash ^= Version.GetHashCode();
226       if (sourceContext_ != null) hash ^= SourceContext.GetHashCode();
227       hash ^= mixins_.GetHashCode();
228       if (Syntax != 0) hash ^= Syntax.GetHashCode();
229       return hash;
230     }
231 
ToString()232     public override string ToString() {
233       return pb::JsonFormatter.ToDiagnosticString(this);
234     }
235 
WriteTo(pb::CodedOutputStream output)236     public void WriteTo(pb::CodedOutputStream output) {
237       if (Name.Length != 0) {
238         output.WriteRawTag(10);
239         output.WriteString(Name);
240       }
241       methods_.WriteTo(output, _repeated_methods_codec);
242       options_.WriteTo(output, _repeated_options_codec);
243       if (Version.Length != 0) {
244         output.WriteRawTag(34);
245         output.WriteString(Version);
246       }
247       if (sourceContext_ != null) {
248         output.WriteRawTag(42);
249         output.WriteMessage(SourceContext);
250       }
251       mixins_.WriteTo(output, _repeated_mixins_codec);
252       if (Syntax != 0) {
253         output.WriteRawTag(56);
254         output.WriteEnum((int) Syntax);
255       }
256     }
257 
CalculateSize()258     public int CalculateSize() {
259       int size = 0;
260       if (Name.Length != 0) {
261         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
262       }
263       size += methods_.CalculateSize(_repeated_methods_codec);
264       size += options_.CalculateSize(_repeated_options_codec);
265       if (Version.Length != 0) {
266         size += 1 + pb::CodedOutputStream.ComputeStringSize(Version);
267       }
268       if (sourceContext_ != null) {
269         size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext);
270       }
271       size += mixins_.CalculateSize(_repeated_mixins_codec);
272       if (Syntax != 0) {
273         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax);
274       }
275       return size;
276     }
277 
MergeFrom(Api other)278     public void MergeFrom(Api other) {
279       if (other == null) {
280         return;
281       }
282       if (other.Name.Length != 0) {
283         Name = other.Name;
284       }
285       methods_.Add(other.methods_);
286       options_.Add(other.options_);
287       if (other.Version.Length != 0) {
288         Version = other.Version;
289       }
290       if (other.sourceContext_ != null) {
291         if (sourceContext_ == null) {
292           sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
293         }
294         SourceContext.MergeFrom(other.SourceContext);
295       }
296       mixins_.Add(other.mixins_);
297       if (other.Syntax != 0) {
298         Syntax = other.Syntax;
299       }
300     }
301 
MergeFrom(pb::CodedInputStream input)302     public void MergeFrom(pb::CodedInputStream input) {
303       uint tag;
304       while ((tag = input.ReadTag()) != 0) {
305         switch(tag) {
306           default:
307             input.SkipLastField();
308             break;
309           case 10: {
310             Name = input.ReadString();
311             break;
312           }
313           case 18: {
314             methods_.AddEntriesFrom(input, _repeated_methods_codec);
315             break;
316           }
317           case 26: {
318             options_.AddEntriesFrom(input, _repeated_options_codec);
319             break;
320           }
321           case 34: {
322             Version = input.ReadString();
323             break;
324           }
325           case 42: {
326             if (sourceContext_ == null) {
327               sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
328             }
329             input.ReadMessage(sourceContext_);
330             break;
331           }
332           case 50: {
333             mixins_.AddEntriesFrom(input, _repeated_mixins_codec);
334             break;
335           }
336           case 56: {
337             syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum();
338             break;
339           }
340         }
341       }
342     }
343 
344   }
345 
346   /// <summary>
347   ///  Method represents a method of an api.
348   /// </summary>
349   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350   public sealed partial class Method : pb::IMessage<Method> {
351     private static readonly pb::MessageParser<Method> _parser = new pb::MessageParser<Method>(() => new Method());
352     public static pb::MessageParser<Method> Parser { get { return _parser; } }
353 
354     public static pbr::MessageDescriptor Descriptor {
355       get { return global::Google.Protobuf.WellKnownTypes.ApiReflection.Descriptor.MessageTypes[1]; }
356     }
357 
358     pbr::MessageDescriptor pb::IMessage.Descriptor {
359       get { return Descriptor; }
360     }
361 
Method()362     public Method() {
363       OnConstruction();
364     }
365 
OnConstruction()366     partial void OnConstruction();
367 
Method(Method other)368     public Method(Method other) : this() {
369       name_ = other.name_;
370       requestTypeUrl_ = other.requestTypeUrl_;
371       requestStreaming_ = other.requestStreaming_;
372       responseTypeUrl_ = other.responseTypeUrl_;
373       responseStreaming_ = other.responseStreaming_;
374       options_ = other.options_.Clone();
375       syntax_ = other.syntax_;
376     }
377 
Clone()378     public Method Clone() {
379       return new Method(this);
380     }
381 
382     /// <summary>Field number for the "name" field.</summary>
383     public const int NameFieldNumber = 1;
384     private string name_ = "";
385     /// <summary>
386     ///  The simple name of this method.
387     /// </summary>
388     public string Name {
389       get { return name_; }
390       set {
391         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
392       }
393     }
394 
395     /// <summary>Field number for the "request_type_url" field.</summary>
396     public const int RequestTypeUrlFieldNumber = 2;
397     private string requestTypeUrl_ = "";
398     /// <summary>
399     ///  A URL of the input message type.
400     /// </summary>
401     public string RequestTypeUrl {
402       get { return requestTypeUrl_; }
403       set {
404         requestTypeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
405       }
406     }
407 
408     /// <summary>Field number for the "request_streaming" field.</summary>
409     public const int RequestStreamingFieldNumber = 3;
410     private bool requestStreaming_;
411     /// <summary>
412     ///  If true, the request is streamed.
413     /// </summary>
414     public bool RequestStreaming {
415       get { return requestStreaming_; }
416       set {
417         requestStreaming_ = value;
418       }
419     }
420 
421     /// <summary>Field number for the "response_type_url" field.</summary>
422     public const int ResponseTypeUrlFieldNumber = 4;
423     private string responseTypeUrl_ = "";
424     /// <summary>
425     ///  The URL of the output message type.
426     /// </summary>
427     public string ResponseTypeUrl {
428       get { return responseTypeUrl_; }
429       set {
430         responseTypeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
431       }
432     }
433 
434     /// <summary>Field number for the "response_streaming" field.</summary>
435     public const int ResponseStreamingFieldNumber = 5;
436     private bool responseStreaming_;
437     /// <summary>
438     ///  If true, the response is streamed.
439     /// </summary>
440     public bool ResponseStreaming {
441       get { return responseStreaming_; }
442       set {
443         responseStreaming_ = value;
444       }
445     }
446 
447     /// <summary>Field number for the "options" field.</summary>
448     public const int OptionsFieldNumber = 6;
449     private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
450         = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser);
451     private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option>();
452     /// <summary>
453     ///  Any metadata attached to the method.
454     /// </summary>
455     public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
456       get { return options_; }
457     }
458 
459     /// <summary>Field number for the "syntax" field.</summary>
460     public const int SyntaxFieldNumber = 7;
461     private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0;
462     /// <summary>
463     ///  The source syntax of this method.
464     /// </summary>
465     public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
466       get { return syntax_; }
467       set {
468         syntax_ = value;
469       }
470     }
471 
Equals(object other)472     public override bool Equals(object other) {
473       return Equals(other as Method);
474     }
475 
Equals(Method other)476     public bool Equals(Method other) {
477       if (ReferenceEquals(other, null)) {
478         return false;
479       }
480       if (ReferenceEquals(other, this)) {
481         return true;
482       }
483       if (Name != other.Name) return false;
484       if (RequestTypeUrl != other.RequestTypeUrl) return false;
485       if (RequestStreaming != other.RequestStreaming) return false;
486       if (ResponseTypeUrl != other.ResponseTypeUrl) return false;
487       if (ResponseStreaming != other.ResponseStreaming) return false;
488       if(!options_.Equals(other.options_)) return false;
489       if (Syntax != other.Syntax) return false;
490       return true;
491     }
492 
GetHashCode()493     public override int GetHashCode() {
494       int hash = 1;
495       if (Name.Length != 0) hash ^= Name.GetHashCode();
496       if (RequestTypeUrl.Length != 0) hash ^= RequestTypeUrl.GetHashCode();
497       if (RequestStreaming != false) hash ^= RequestStreaming.GetHashCode();
498       if (ResponseTypeUrl.Length != 0) hash ^= ResponseTypeUrl.GetHashCode();
499       if (ResponseStreaming != false) hash ^= ResponseStreaming.GetHashCode();
500       hash ^= options_.GetHashCode();
501       if (Syntax != 0) hash ^= Syntax.GetHashCode();
502       return hash;
503     }
504 
ToString()505     public override string ToString() {
506       return pb::JsonFormatter.ToDiagnosticString(this);
507     }
508 
WriteTo(pb::CodedOutputStream output)509     public void WriteTo(pb::CodedOutputStream output) {
510       if (Name.Length != 0) {
511         output.WriteRawTag(10);
512         output.WriteString(Name);
513       }
514       if (RequestTypeUrl.Length != 0) {
515         output.WriteRawTag(18);
516         output.WriteString(RequestTypeUrl);
517       }
518       if (RequestStreaming != false) {
519         output.WriteRawTag(24);
520         output.WriteBool(RequestStreaming);
521       }
522       if (ResponseTypeUrl.Length != 0) {
523         output.WriteRawTag(34);
524         output.WriteString(ResponseTypeUrl);
525       }
526       if (ResponseStreaming != false) {
527         output.WriteRawTag(40);
528         output.WriteBool(ResponseStreaming);
529       }
530       options_.WriteTo(output, _repeated_options_codec);
531       if (Syntax != 0) {
532         output.WriteRawTag(56);
533         output.WriteEnum((int) Syntax);
534       }
535     }
536 
CalculateSize()537     public int CalculateSize() {
538       int size = 0;
539       if (Name.Length != 0) {
540         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
541       }
542       if (RequestTypeUrl.Length != 0) {
543         size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestTypeUrl);
544       }
545       if (RequestStreaming != false) {
546         size += 1 + 1;
547       }
548       if (ResponseTypeUrl.Length != 0) {
549         size += 1 + pb::CodedOutputStream.ComputeStringSize(ResponseTypeUrl);
550       }
551       if (ResponseStreaming != false) {
552         size += 1 + 1;
553       }
554       size += options_.CalculateSize(_repeated_options_codec);
555       if (Syntax != 0) {
556         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax);
557       }
558       return size;
559     }
560 
MergeFrom(Method other)561     public void MergeFrom(Method other) {
562       if (other == null) {
563         return;
564       }
565       if (other.Name.Length != 0) {
566         Name = other.Name;
567       }
568       if (other.RequestTypeUrl.Length != 0) {
569         RequestTypeUrl = other.RequestTypeUrl;
570       }
571       if (other.RequestStreaming != false) {
572         RequestStreaming = other.RequestStreaming;
573       }
574       if (other.ResponseTypeUrl.Length != 0) {
575         ResponseTypeUrl = other.ResponseTypeUrl;
576       }
577       if (other.ResponseStreaming != false) {
578         ResponseStreaming = other.ResponseStreaming;
579       }
580       options_.Add(other.options_);
581       if (other.Syntax != 0) {
582         Syntax = other.Syntax;
583       }
584     }
585 
MergeFrom(pb::CodedInputStream input)586     public void MergeFrom(pb::CodedInputStream input) {
587       uint tag;
588       while ((tag = input.ReadTag()) != 0) {
589         switch(tag) {
590           default:
591             input.SkipLastField();
592             break;
593           case 10: {
594             Name = input.ReadString();
595             break;
596           }
597           case 18: {
598             RequestTypeUrl = input.ReadString();
599             break;
600           }
601           case 24: {
602             RequestStreaming = input.ReadBool();
603             break;
604           }
605           case 34: {
606             ResponseTypeUrl = input.ReadString();
607             break;
608           }
609           case 40: {
610             ResponseStreaming = input.ReadBool();
611             break;
612           }
613           case 50: {
614             options_.AddEntriesFrom(input, _repeated_options_codec);
615             break;
616           }
617           case 56: {
618             syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum();
619             break;
620           }
621         }
622       }
623     }
624 
625   }
626 
627   /// <summary>
628   ///  Declares an API to be included in this API. The including API must
629   ///  redeclare all the methods from the included API, but documentation
630   ///  and options are inherited as follows:
631   ///
632   ///  - If after comment and whitespace stripping, the documentation
633   ///    string of the redeclared method is empty, it will be inherited
634   ///    from the original method.
635   ///
636   ///  - Each annotation belonging to the service config (http,
637   ///    visibility) which is not set in the redeclared method will be
638   ///    inherited.
639   ///
640   ///  - If an http annotation is inherited, the path pattern will be
641   ///    modified as follows. Any version prefix will be replaced by the
642   ///    version of the including API plus the [root][] path if specified.
643   ///
644   ///  Example of a simple mixin:
645   ///
646   ///      package google.acl.v1;
647   ///      service AccessControl {
648   ///        // Get the underlying ACL object.
649   ///        rpc GetAcl(GetAclRequest) returns (Acl) {
650   ///          option (google.api.http).get = "/v1/{resource=**}:getAcl";
651   ///        }
652   ///      }
653   ///
654   ///      package google.storage.v2;
655   ///      service Storage {
656   ///        rpc GetAcl(GetAclRequest) returns (Acl);
657   ///
658   ///        // Get a data record.
659   ///        rpc GetData(GetDataRequest) returns (Data) {
660   ///          option (google.api.http).get = "/v2/{resource=**}";
661   ///        }
662   ///      }
663   ///
664   ///  Example of a mixin configuration:
665   ///
666   ///      apis:
667   ///      - name: google.storage.v2.Storage
668   ///        mixins:
669   ///        - name: google.acl.v1.AccessControl
670   ///
671   ///  The mixin construct implies that all methods in `AccessControl` are
672   ///  also declared with same name and request/response types in
673   ///  `Storage`. A documentation generator or annotation processor will
674   ///  see the effective `Storage.GetAcl` method after inherting
675   ///  documentation and annotations as follows:
676   ///
677   ///      service Storage {
678   ///        // Get the underlying ACL object.
679   ///        rpc GetAcl(GetAclRequest) returns (Acl) {
680   ///          option (google.api.http).get = "/v2/{resource=**}:getAcl";
681   ///        }
682   ///        ...
683   ///      }
684   ///
685   ///  Note how the version in the path pattern changed from `v1` to `v2`.
686   ///
687   ///  If the `root` field in the mixin is specified, it should be a
688   ///  relative path under which inherited HTTP paths are placed. Example:
689   ///
690   ///      apis:
691   ///      - name: google.storage.v2.Storage
692   ///        mixins:
693   ///        - name: google.acl.v1.AccessControl
694   ///          root: acls
695   ///
696   ///  This implies the following inherited HTTP annotation:
697   ///
698   ///      service Storage {
699   ///        // Get the underlying ACL object.
700   ///        rpc GetAcl(GetAclRequest) returns (Acl) {
701   ///          option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
702   ///        }
703   ///        ...
704   ///      }
705   /// </summary>
706   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
707   public sealed partial class Mixin : pb::IMessage<Mixin> {
708     private static readonly pb::MessageParser<Mixin> _parser = new pb::MessageParser<Mixin>(() => new Mixin());
709     public static pb::MessageParser<Mixin> Parser { get { return _parser; } }
710 
711     public static pbr::MessageDescriptor Descriptor {
712       get { return global::Google.Protobuf.WellKnownTypes.ApiReflection.Descriptor.MessageTypes[2]; }
713     }
714 
715     pbr::MessageDescriptor pb::IMessage.Descriptor {
716       get { return Descriptor; }
717     }
718 
Mixin()719     public Mixin() {
720       OnConstruction();
721     }
722 
OnConstruction()723     partial void OnConstruction();
724 
Mixin(Mixin other)725     public Mixin(Mixin other) : this() {
726       name_ = other.name_;
727       root_ = other.root_;
728     }
729 
Clone()730     public Mixin Clone() {
731       return new Mixin(this);
732     }
733 
734     /// <summary>Field number for the "name" field.</summary>
735     public const int NameFieldNumber = 1;
736     private string name_ = "";
737     /// <summary>
738     ///  The fully qualified name of the API which is included.
739     /// </summary>
740     public string Name {
741       get { return name_; }
742       set {
743         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
744       }
745     }
746 
747     /// <summary>Field number for the "root" field.</summary>
748     public const int RootFieldNumber = 2;
749     private string root_ = "";
750     /// <summary>
751     ///  If non-empty specifies a path under which inherited HTTP paths
752     ///  are rooted.
753     /// </summary>
754     public string Root {
755       get { return root_; }
756       set {
757         root_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
758       }
759     }
760 
Equals(object other)761     public override bool Equals(object other) {
762       return Equals(other as Mixin);
763     }
764 
Equals(Mixin other)765     public bool Equals(Mixin other) {
766       if (ReferenceEquals(other, null)) {
767         return false;
768       }
769       if (ReferenceEquals(other, this)) {
770         return true;
771       }
772       if (Name != other.Name) return false;
773       if (Root != other.Root) return false;
774       return true;
775     }
776 
GetHashCode()777     public override int GetHashCode() {
778       int hash = 1;
779       if (Name.Length != 0) hash ^= Name.GetHashCode();
780       if (Root.Length != 0) hash ^= Root.GetHashCode();
781       return hash;
782     }
783 
ToString()784     public override string ToString() {
785       return pb::JsonFormatter.ToDiagnosticString(this);
786     }
787 
WriteTo(pb::CodedOutputStream output)788     public void WriteTo(pb::CodedOutputStream output) {
789       if (Name.Length != 0) {
790         output.WriteRawTag(10);
791         output.WriteString(Name);
792       }
793       if (Root.Length != 0) {
794         output.WriteRawTag(18);
795         output.WriteString(Root);
796       }
797     }
798 
CalculateSize()799     public int CalculateSize() {
800       int size = 0;
801       if (Name.Length != 0) {
802         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
803       }
804       if (Root.Length != 0) {
805         size += 1 + pb::CodedOutputStream.ComputeStringSize(Root);
806       }
807       return size;
808     }
809 
MergeFrom(Mixin other)810     public void MergeFrom(Mixin other) {
811       if (other == null) {
812         return;
813       }
814       if (other.Name.Length != 0) {
815         Name = other.Name;
816       }
817       if (other.Root.Length != 0) {
818         Root = other.Root;
819       }
820     }
821 
MergeFrom(pb::CodedInputStream input)822     public void MergeFrom(pb::CodedInputStream input) {
823       uint tag;
824       while ((tag = input.ReadTag()) != 0) {
825         switch(tag) {
826           default:
827             input.SkipLastField();
828             break;
829           case 10: {
830             Name = input.ReadString();
831             break;
832           }
833           case 18: {
834             Root = input.ReadString();
835             break;
836           }
837         }
838       }
839     }
840 
841   }
842 
843   #endregion
844 
845 }
846 
847 #endregion Designer generated code
848