blob: de7aea3a0b044d8c077b27cd1d9c221fcdeae024 [file] [log] [blame]
Jon Skeet62a4aa52015-07-14 14:26:49 +01001// 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
6using pb = global::Google.Protobuf;
7using pbc = global::Google.Protobuf.Collections;
8using pbr = global::Google.Protobuf.Reflection;
9using scg = global::System.Collections.Generic;
10namespace Google.Protobuf.WellKnownTypes {
11
Jon Skeet284bb452015-11-05 09:13:53 +000012 /// <summary>Holder for reflection information generated from google/protobuf/api.proto</summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class ApiReflection {
Jon Skeet62a4aa52015-07-14 14:26:49 +010015
Jon Skeet284bb452015-11-05 09:13:53 +000016 #region Descriptor
17 /// <summary>File descriptor for google/protobuf/api.proto</summary>
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010020 }
Jon Skeet284bb452015-11-05 09:13:53 +000021 private static pbr::FileDescriptor descriptor;
22
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"));
Jon Skeeta2667aa2015-11-19 17:14:23 +000042 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
Jon Skeet284bb452015-11-05 09:13:53 +000043 new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TypeReflection.Descriptor, },
Jon Skeetb6159962016-02-04 07:08:55 +000044 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)
Jon Skeet284bb452015-11-05 09:13:53 +000048 }));
49 }
50 #endregion
51
Jon Skeet62a4aa52015-07-14 14:26:49 +010052 }
53 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +010054 /// <summary>
55 /// Api is a light-weight descriptor for a protocol buffer service.
56 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010057 [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
Jon Skeet62a4aa52015-07-14 14:26:49 +010062 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +000063 get { return global::Google.Protobuf.WellKnownTypes.ApiReflection.Descriptor.MessageTypes[0]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010064 }
65
Jon Skeet96cffaa2015-07-20 19:25:07 +010066 pbr::MessageDescriptor pb::IMessage.Descriptor {
67 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010068 }
69
Jon Skeet62a4aa52015-07-14 14:26:49 +010070 public Api() {
71 OnConstruction();
72 }
73
74 partial void OnConstruction();
75
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;
Jon Skeet94898172015-09-01 15:47:48 +010082 mixins_ = other.mixins_.Clone();
83 syntax_ = other.syntax_;
Jon Skeet62a4aa52015-07-14 14:26:49 +010084 }
85
86 public Api Clone() {
87 return new Api(this);
88 }
89
Jon Skeet18e0a2e2015-10-01 10:38:01 +010090 /// <summary>Field number for the "name" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010091 public const int NameFieldNumber = 1;
92 private string name_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +010093 /// <summary>
94 /// The fully qualified name of this api, including package name
95 /// followed by the api's simple name.
96 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010097 public string Name {
98 get { return name_; }
99 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000100 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100101 }
102 }
103
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100104 /// <summary>Field number for the "methods" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100105 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>();
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100109 /// <summary>
110 /// The methods of this api, in unspecified order.
111 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100112 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> Methods {
113 get { return methods_; }
114 }
115
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100116 /// <summary>Field number for the "options" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100117 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>();
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100121 /// <summary>
122 /// Any metadata attached to the API.
123 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100124 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
125 get { return options_; }
126 }
127
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100128 /// <summary>Field number for the "version" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100129 public const int VersionFieldNumber = 4;
130 private string version_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100131 /// <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.
Jon Skeetcff900e2015-11-06 18:38:31 +0000139 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100140 /// 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.
Jon Skeetcff900e2015-11-06 18:38:31 +0000146 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100147 /// 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>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100153 public string Version {
154 get { return version_; }
155 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000156 version_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100157 }
158 }
159
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100160 /// <summary>Field number for the "source_context" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100161 public const int SourceContextFieldNumber = 5;
162 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100163 /// <summary>
164 /// Source context for the protocol buffer service represented by this
165 /// message.
166 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100167 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
168 get { return sourceContext_; }
169 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100170 sourceContext_ = value;
171 }
172 }
173
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100174 /// <summary>Field number for the "mixins" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100175 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>();
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100179 /// <summary>
180 /// Included APIs. See [Mixin][].
181 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100182 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> Mixins {
183 get { return mixins_; }
184 }
185
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100186 /// <summary>Field number for the "syntax" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100187 public const int SyntaxFieldNumber = 7;
188 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100189 /// <summary>
190 /// The source syntax of the service.
191 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100192 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
193 get { return syntax_; }
194 set {
195 syntax_ = value;
196 }
197 }
198
Jon Skeet62a4aa52015-07-14 14:26:49 +0100199 public override bool Equals(object other) {
200 return Equals(other as Api);
201 }
202
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;
Jon Skeet94898172015-09-01 15:47:48 +0100215 if(!mixins_.Equals(other.mixins_)) return false;
216 if (Syntax != other.Syntax) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100217 return true;
218 }
219
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();
Jon Skeet94898172015-09-01 15:47:48 +0100227 hash ^= mixins_.GetHashCode();
228 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) hash ^= Syntax.GetHashCode();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100229 return hash;
230 }
231
232 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000233 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100234 }
235
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 }
Jon Skeet94898172015-09-01 15:47:48 +0100251 mixins_.WriteTo(output, _repeated_mixins_codec);
252 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
253 output.WriteRawTag(56);
254 output.WriteEnum((int) Syntax);
255 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100256 }
257
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 }
Jon Skeet94898172015-09-01 15:47:48 +0100271 size += mixins_.CalculateSize(_repeated_mixins_codec);
272 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
273 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax);
274 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100275 return size;
276 }
277
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 }
Jon Skeet94898172015-09-01 15:47:48 +0100296 mixins_.Add(other.mixins_);
297 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
298 Syntax = other.Syntax;
299 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100300 }
301
302 public void MergeFrom(pb::CodedInputStream input) {
303 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100304 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100305 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100306 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100307 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100308 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 }
Jon Skeet94898172015-09-01 15:47:48 +0100332 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 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100340 }
341 }
342 }
343
344 }
345
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100346 /// <summary>
347 /// Method represents a method of an api.
348 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100349 [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
Jon Skeet62a4aa52015-07-14 14:26:49 +0100354 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000355 get { return global::Google.Protobuf.WellKnownTypes.ApiReflection.Descriptor.MessageTypes[1]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100356 }
357
Jon Skeet96cffaa2015-07-20 19:25:07 +0100358 pbr::MessageDescriptor pb::IMessage.Descriptor {
359 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100360 }
361
Jon Skeet62a4aa52015-07-14 14:26:49 +0100362 public Method() {
363 OnConstruction();
364 }
365
366 partial void OnConstruction();
367
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();
Jon Skeet94898172015-09-01 15:47:48 +0100375 syntax_ = other.syntax_;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100376 }
377
378 public Method Clone() {
379 return new Method(this);
380 }
381
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100382 /// <summary>Field number for the "name" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100383 public const int NameFieldNumber = 1;
384 private string name_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100385 /// <summary>
386 /// The simple name of this method.
387 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100388 public string Name {
389 get { return name_; }
390 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000391 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100392 }
393 }
394
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100395 /// <summary>Field number for the "request_type_url" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100396 public const int RequestTypeUrlFieldNumber = 2;
397 private string requestTypeUrl_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100398 /// <summary>
399 /// A URL of the input message type.
400 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100401 public string RequestTypeUrl {
402 get { return requestTypeUrl_; }
403 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000404 requestTypeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100405 }
406 }
407
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100408 /// <summary>Field number for the "request_streaming" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100409 public const int RequestStreamingFieldNumber = 3;
410 private bool requestStreaming_;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100411 /// <summary>
412 /// If true, the request is streamed.
413 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100414 public bool RequestStreaming {
415 get { return requestStreaming_; }
416 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100417 requestStreaming_ = value;
418 }
419 }
420
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100421 /// <summary>Field number for the "response_type_url" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100422 public const int ResponseTypeUrlFieldNumber = 4;
423 private string responseTypeUrl_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100424 /// <summary>
425 /// The URL of the output message type.
426 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100427 public string ResponseTypeUrl {
428 get { return responseTypeUrl_; }
429 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000430 responseTypeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100431 }
432 }
433
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100434 /// <summary>Field number for the "response_streaming" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100435 public const int ResponseStreamingFieldNumber = 5;
436 private bool responseStreaming_;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100437 /// <summary>
438 /// If true, the response is streamed.
439 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100440 public bool ResponseStreaming {
441 get { return responseStreaming_; }
442 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100443 responseStreaming_ = value;
444 }
445 }
446
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100447 /// <summary>Field number for the "options" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100448 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>();
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100452 /// <summary>
453 /// Any metadata attached to the method.
454 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100455 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
456 get { return options_; }
457 }
458
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100459 /// <summary>Field number for the "syntax" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100460 public const int SyntaxFieldNumber = 7;
461 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100462 /// <summary>
463 /// The source syntax of this method.
464 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100465 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
466 get { return syntax_; }
467 set {
468 syntax_ = value;
469 }
470 }
471
Jon Skeet62a4aa52015-07-14 14:26:49 +0100472 public override bool Equals(object other) {
473 return Equals(other as Method);
474 }
475
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;
Jon Skeet94898172015-09-01 15:47:48 +0100489 if (Syntax != other.Syntax) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100490 return true;
491 }
492
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();
Jon Skeet94898172015-09-01 15:47:48 +0100501 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) hash ^= Syntax.GetHashCode();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100502 return hash;
503 }
504
505 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000506 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet62a4aa52015-07-14 14:26:49 +0100507 }
508
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);
Jon Skeet94898172015-09-01 15:47:48 +0100531 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
532 output.WriteRawTag(56);
533 output.WriteEnum((int) Syntax);
534 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100535 }
536
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);
Jon Skeet94898172015-09-01 15:47:48 +0100555 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
556 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax);
557 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100558 return size;
559 }
560
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_);
Jon Skeet94898172015-09-01 15:47:48 +0100581 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
582 Syntax = other.Syntax;
583 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100584 }
585
586 public void MergeFrom(pb::CodedInputStream input) {
587 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100588 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100589 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100590 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100591 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100592 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 }
Jon Skeet94898172015-09-01 15:47:48 +0100617 case 56: {
618 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum();
619 break;
620 }
621 }
622 }
623 }
624
625 }
626
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100627 /// <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:
Jon Skeetcff900e2015-11-06 18:38:31 +0000631 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100632 /// - 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.
Jon Skeetcff900e2015-11-06 18:38:31 +0000635 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100636 /// - Each annotation belonging to the service config (http,
637 /// visibility) which is not set in the redeclared method will be
638 /// inherited.
Jon Skeetcff900e2015-11-06 18:38:31 +0000639 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100640 /// - 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.
Jon Skeetcff900e2015-11-06 18:38:31 +0000643 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100644 /// Example of a simple mixin:
Jon Skeetcff900e2015-11-06 18:38:31 +0000645 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100646 /// 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 /// }
Jon Skeetcff900e2015-11-06 18:38:31 +0000653 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100654 /// package google.storage.v2;
655 /// service Storage {
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100656 /// rpc GetAcl(GetAclRequest) returns (Acl);
Jon Skeetcff900e2015-11-06 18:38:31 +0000657 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100658 /// // Get a data record.
659 /// rpc GetData(GetDataRequest) returns (Data) {
660 /// option (google.api.http).get = "/v2/{resource=**}";
661 /// }
662 /// }
Jon Skeetcff900e2015-11-06 18:38:31 +0000663 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100664 /// Example of a mixin configuration:
Jon Skeetcff900e2015-11-06 18:38:31 +0000665 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100666 /// apis:
667 /// - name: google.storage.v2.Storage
668 /// mixins:
669 /// - name: google.acl.v1.AccessControl
Jon Skeetcff900e2015-11-06 18:38:31 +0000670 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100671 /// 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:
Jon Skeetcff900e2015-11-06 18:38:31 +0000676 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100677 /// 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 /// }
Jon Skeetcff900e2015-11-06 18:38:31 +0000684 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100685 /// Note how the version in the path pattern changed from `v1` to `v2`.
Jon Skeetcff900e2015-11-06 18:38:31 +0000686 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100687 /// If the `root` field in the mixin is specified, it should be a
688 /// relative path under which inherited HTTP paths are placed. Example:
Jon Skeetcff900e2015-11-06 18:38:31 +0000689 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100690 /// apis:
691 /// - name: google.storage.v2.Storage
692 /// mixins:
693 /// - name: google.acl.v1.AccessControl
694 /// root: acls
Jon Skeetcff900e2015-11-06 18:38:31 +0000695 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100696 /// This implies the following inherited HTTP annotation:
Jon Skeetcff900e2015-11-06 18:38:31 +0000697 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100698 /// 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>
Jon Skeet94898172015-09-01 15:47:48 +0100706 [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 {
Jon Skeet284bb452015-11-05 09:13:53 +0000712 get { return global::Google.Protobuf.WellKnownTypes.ApiReflection.Descriptor.MessageTypes[2]; }
Jon Skeet94898172015-09-01 15:47:48 +0100713 }
714
715 pbr::MessageDescriptor pb::IMessage.Descriptor {
716 get { return Descriptor; }
717 }
718
719 public Mixin() {
720 OnConstruction();
721 }
722
723 partial void OnConstruction();
724
725 public Mixin(Mixin other) : this() {
726 name_ = other.name_;
727 root_ = other.root_;
728 }
729
730 public Mixin Clone() {
731 return new Mixin(this);
732 }
733
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100734 /// <summary>Field number for the "name" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100735 public const int NameFieldNumber = 1;
736 private string name_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100737 /// <summary>
738 /// The fully qualified name of the API which is included.
739 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100740 public string Name {
741 get { return name_; }
742 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000743 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet94898172015-09-01 15:47:48 +0100744 }
745 }
746
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100747 /// <summary>Field number for the "root" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100748 public const int RootFieldNumber = 2;
749 private string root_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100750 /// <summary>
751 /// If non-empty specifies a path under which inherited HTTP paths
752 /// are rooted.
753 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100754 public string Root {
755 get { return root_; }
756 set {
Jon Skeet045b5282016-02-04 15:02:59 +0000757 root_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet94898172015-09-01 15:47:48 +0100758 }
759 }
760
761 public override bool Equals(object other) {
762 return Equals(other as Mixin);
763 }
764
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
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
784 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000785 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet94898172015-09-01 15:47:48 +0100786 }
787
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
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
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
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 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100837 }
838 }
839 }
840
841 }
842
843 #endregion
844
845}
846
847#endregion Designer generated code