blob: 899613f99674f007f20722e69a5aa447a5aab771 [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
12 namespace Proto {
13
Jon Skeetb0888a42015-09-29 13:37:30 +010014 /// <summary>Holder for reflection information generated from google/protobuf/api.proto</summary>
Jon Skeete2c82302015-09-29 14:34:31 +010015 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jon Skeet62a4aa52015-07-14 14:26:49 +010016 public static partial class Api {
17
Jon Skeet62a4aa52015-07-14 14:26:49 +010018 #region Descriptor
Jon Skeetb0888a42015-09-29 13:37:30 +010019 /// <summary>File descriptor for google/protobuf/api.proto</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010020 public static pbr::FileDescriptor Descriptor {
21 get { return descriptor; }
22 }
23 private static pbr::FileDescriptor descriptor;
24
25 static Api() {
26 byte[] descriptorData = global::System.Convert.FromBase64String(
27 string.Concat(
Jon Skeet94898172015-09-01 15:47:48 +010028 "Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYa",
29 "JGdvb2dsZS9wcm90b2J1Zi9zb3VyY2VfY29udGV4dC5wcm90bxoaZ29vZ2xl",
30 "L3Byb3RvYnVmL3R5cGUucHJvdG8igQIKA0FwaRIMCgRuYW1lGAEgASgJEigK",
31 "B21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29w",
32 "dGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNp",
33 "b24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJv",
34 "dG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUu",
35 "cHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3Rv",
36 "YnVmLlN5bnRheCLVAQoGTWV0aG9kEgwKBG5hbWUYASABKAkSGAoQcmVxdWVz",
37 "dF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCBIZ",
38 "ChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25zZV9zdHJlYW1p",
39 "bmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5P",
40 "cHRpb24SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRh",
41 "eCIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCSwoTY29t",
42 "Lmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAaABAaICA0dQQqoCHkdvb2ds",
43 "ZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"));
Jon Skeet62a4aa52015-07-14 14:26:49 +010044 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
Jon Skeet96cffaa2015-07-20 19:25:07 +010045 new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor, global::Google.Protobuf.WellKnownTypes.Proto.Type.Descriptor, },
Jon Skeet47bf49b2015-07-22 11:39:38 +010046 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
Jon Skeet94898172015-09-01 15:47:48 +010047 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Api), new[]{ "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax" }, null, null, null),
48 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Method), new[]{ "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax" }, null, null, null),
49 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Mixin), new[]{ "Name", "Root" }, null, null, null)
Jon Skeet47bf49b2015-07-22 11:39:38 +010050 }));
Jon Skeet62a4aa52015-07-14 14:26:49 +010051 }
52 #endregion
53
54 }
55 }
56 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +010057 /// <summary>
58 /// Api is a light-weight descriptor for a protocol buffer service.
59 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010060 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
61 public sealed partial class Api : pb::IMessage<Api> {
62 private static readonly pb::MessageParser<Api> _parser = new pb::MessageParser<Api>(() => new Api());
63 public static pb::MessageParser<Api> Parser { get { return _parser; } }
64
Jon Skeet62a4aa52015-07-14 14:26:49 +010065 public static pbr::MessageDescriptor Descriptor {
66 get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor.MessageTypes[0]; }
67 }
68
Jon Skeet96cffaa2015-07-20 19:25:07 +010069 pbr::MessageDescriptor pb::IMessage.Descriptor {
70 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010071 }
72
Jon Skeet62a4aa52015-07-14 14:26:49 +010073 public Api() {
74 OnConstruction();
75 }
76
77 partial void OnConstruction();
78
79 public Api(Api other) : this() {
80 name_ = other.name_;
81 methods_ = other.methods_.Clone();
82 options_ = other.options_.Clone();
83 version_ = other.version_;
84 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
Jon Skeet94898172015-09-01 15:47:48 +010085 mixins_ = other.mixins_.Clone();
86 syntax_ = other.syntax_;
Jon Skeet62a4aa52015-07-14 14:26:49 +010087 }
88
89 public Api Clone() {
90 return new Api(this);
91 }
92
Jon Skeet18e0a2e2015-10-01 10:38:01 +010093 /// <summary>Field number for the "name" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010094 public const int NameFieldNumber = 1;
95 private string name_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +010096 /// <summary>
97 /// The fully qualified name of this api, including package name
98 /// followed by the api's simple name.
99 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100100 public string Name {
101 get { return name_; }
102 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100103 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100104 }
105 }
106
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100107 /// <summary>Field number for the "methods" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100108 public const int MethodsFieldNumber = 2;
109 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Method> _repeated_methods_codec
110 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser);
111 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 +0100112 /// <summary>
113 /// The methods of this api, in unspecified order.
114 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100115 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Method> Methods {
116 get { return methods_; }
117 }
118
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100119 /// <summary>Field number for the "options" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100120 public const int OptionsFieldNumber = 3;
121 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
122 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
123 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 +0100124 /// <summary>
125 /// Any metadata attached to the API.
126 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100127 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
128 get { return options_; }
129 }
130
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100131 /// <summary>Field number for the "version" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100132 public const int VersionFieldNumber = 4;
133 private string version_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100134 /// <summary>
135 /// A version string for this api. If specified, must have the form
136 /// `major-version.minor-version`, as in `1.10`. If the minor version
137 /// is omitted, it defaults to zero. If the entire version field is
138 /// empty, the major version is derived from the package name, as
139 /// outlined below. If the field is not empty, the version in the
140 /// package name will be verified to be consistent with what is
141 /// provided here.
Jon Skeetcff900e2015-11-06 18:38:31 +0000142 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100143 /// The versioning schema uses [semantic
144 /// versioning](http://semver.org) where the major version number
145 /// indicates a breaking change and the minor version an additive,
146 /// non-breaking change. Both version numbers are signals to users
147 /// what to expect from different versions, and should be carefully
148 /// chosen based on the product plan.
Jon Skeetcff900e2015-11-06 18:38:31 +0000149 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100150 /// The major version is also reflected in the package name of the
151 /// API, which must end in `v&lt;major-version>`, as in
152 /// `google.feature.v1`. For major versions 0 and 1, the suffix can
153 /// be omitted. Zero major versions must only be used for
154 /// experimental, none-GA apis.
155 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100156 public string Version {
157 get { return version_; }
158 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100159 version_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100160 }
161 }
162
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100163 /// <summary>Field number for the "source_context" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100164 public const int SourceContextFieldNumber = 5;
165 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100166 /// <summary>
167 /// Source context for the protocol buffer service represented by this
168 /// message.
169 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100170 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext {
171 get { return sourceContext_; }
172 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100173 sourceContext_ = value;
174 }
175 }
176
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100177 /// <summary>Field number for the "mixins" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100178 public const int MixinsFieldNumber = 6;
179 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Mixin> _repeated_mixins_codec
180 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser);
181 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 +0100182 /// <summary>
183 /// Included APIs. See [Mixin][].
184 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100185 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Mixin> Mixins {
186 get { return mixins_; }
187 }
188
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100189 /// <summary>Field number for the "syntax" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100190 public const int SyntaxFieldNumber = 7;
191 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100192 /// <summary>
193 /// The source syntax of the service.
194 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100195 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
196 get { return syntax_; }
197 set {
198 syntax_ = value;
199 }
200 }
201
Jon Skeet62a4aa52015-07-14 14:26:49 +0100202 public override bool Equals(object other) {
203 return Equals(other as Api);
204 }
205
206 public bool Equals(Api other) {
207 if (ReferenceEquals(other, null)) {
208 return false;
209 }
210 if (ReferenceEquals(other, this)) {
211 return true;
212 }
213 if (Name != other.Name) return false;
214 if(!methods_.Equals(other.methods_)) return false;
215 if(!options_.Equals(other.options_)) return false;
216 if (Version != other.Version) return false;
217 if (!object.Equals(SourceContext, other.SourceContext)) return false;
Jon Skeet94898172015-09-01 15:47:48 +0100218 if(!mixins_.Equals(other.mixins_)) return false;
219 if (Syntax != other.Syntax) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100220 return true;
221 }
222
223 public override int GetHashCode() {
224 int hash = 1;
225 if (Name.Length != 0) hash ^= Name.GetHashCode();
226 hash ^= methods_.GetHashCode();
227 hash ^= options_.GetHashCode();
228 if (Version.Length != 0) hash ^= Version.GetHashCode();
229 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode();
Jon Skeet94898172015-09-01 15:47:48 +0100230 hash ^= mixins_.GetHashCode();
231 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) hash ^= Syntax.GetHashCode();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100232 return hash;
233 }
234
235 public override string ToString() {
236 return pb::JsonFormatter.Default.Format(this);
237 }
238
239 public void WriteTo(pb::CodedOutputStream output) {
240 if (Name.Length != 0) {
241 output.WriteRawTag(10);
242 output.WriteString(Name);
243 }
244 methods_.WriteTo(output, _repeated_methods_codec);
245 options_.WriteTo(output, _repeated_options_codec);
246 if (Version.Length != 0) {
247 output.WriteRawTag(34);
248 output.WriteString(Version);
249 }
250 if (sourceContext_ != null) {
251 output.WriteRawTag(42);
252 output.WriteMessage(SourceContext);
253 }
Jon Skeet94898172015-09-01 15:47:48 +0100254 mixins_.WriteTo(output, _repeated_mixins_codec);
255 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
256 output.WriteRawTag(56);
257 output.WriteEnum((int) Syntax);
258 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100259 }
260
261 public int CalculateSize() {
262 int size = 0;
263 if (Name.Length != 0) {
264 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
265 }
266 size += methods_.CalculateSize(_repeated_methods_codec);
267 size += options_.CalculateSize(_repeated_options_codec);
268 if (Version.Length != 0) {
269 size += 1 + pb::CodedOutputStream.ComputeStringSize(Version);
270 }
271 if (sourceContext_ != null) {
272 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext);
273 }
Jon Skeet94898172015-09-01 15:47:48 +0100274 size += mixins_.CalculateSize(_repeated_mixins_codec);
275 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
276 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax);
277 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100278 return size;
279 }
280
281 public void MergeFrom(Api other) {
282 if (other == null) {
283 return;
284 }
285 if (other.Name.Length != 0) {
286 Name = other.Name;
287 }
288 methods_.Add(other.methods_);
289 options_.Add(other.options_);
290 if (other.Version.Length != 0) {
291 Version = other.Version;
292 }
293 if (other.sourceContext_ != null) {
294 if (sourceContext_ == null) {
295 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
296 }
297 SourceContext.MergeFrom(other.SourceContext);
298 }
Jon Skeet94898172015-09-01 15:47:48 +0100299 mixins_.Add(other.mixins_);
300 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
301 Syntax = other.Syntax;
302 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100303 }
304
305 public void MergeFrom(pb::CodedInputStream input) {
306 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100307 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100308 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100309 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100310 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100311 break;
312 case 10: {
313 Name = input.ReadString();
314 break;
315 }
316 case 18: {
317 methods_.AddEntriesFrom(input, _repeated_methods_codec);
318 break;
319 }
320 case 26: {
321 options_.AddEntriesFrom(input, _repeated_options_codec);
322 break;
323 }
324 case 34: {
325 Version = input.ReadString();
326 break;
327 }
328 case 42: {
329 if (sourceContext_ == null) {
330 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceContext();
331 }
332 input.ReadMessage(sourceContext_);
333 break;
334 }
Jon Skeet94898172015-09-01 15:47:48 +0100335 case 50: {
336 mixins_.AddEntriesFrom(input, _repeated_mixins_codec);
337 break;
338 }
339 case 56: {
340 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum();
341 break;
342 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100343 }
344 }
345 }
346
347 }
348
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100349 /// <summary>
350 /// Method represents a method of an api.
351 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100352 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
353 public sealed partial class Method : pb::IMessage<Method> {
354 private static readonly pb::MessageParser<Method> _parser = new pb::MessageParser<Method>(() => new Method());
355 public static pb::MessageParser<Method> Parser { get { return _parser; } }
356
Jon Skeet62a4aa52015-07-14 14:26:49 +0100357 public static pbr::MessageDescriptor Descriptor {
358 get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor.MessageTypes[1]; }
359 }
360
Jon Skeet96cffaa2015-07-20 19:25:07 +0100361 pbr::MessageDescriptor pb::IMessage.Descriptor {
362 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100363 }
364
Jon Skeet62a4aa52015-07-14 14:26:49 +0100365 public Method() {
366 OnConstruction();
367 }
368
369 partial void OnConstruction();
370
371 public Method(Method other) : this() {
372 name_ = other.name_;
373 requestTypeUrl_ = other.requestTypeUrl_;
374 requestStreaming_ = other.requestStreaming_;
375 responseTypeUrl_ = other.responseTypeUrl_;
376 responseStreaming_ = other.responseStreaming_;
377 options_ = other.options_.Clone();
Jon Skeet94898172015-09-01 15:47:48 +0100378 syntax_ = other.syntax_;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100379 }
380
381 public Method Clone() {
382 return new Method(this);
383 }
384
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100385 /// <summary>Field number for the "name" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100386 public const int NameFieldNumber = 1;
387 private string name_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100388 /// <summary>
389 /// The simple name of this method.
390 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100391 public string Name {
392 get { return name_; }
393 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100394 name_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100395 }
396 }
397
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100398 /// <summary>Field number for the "request_type_url" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100399 public const int RequestTypeUrlFieldNumber = 2;
400 private string requestTypeUrl_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100401 /// <summary>
402 /// A URL of the input message type.
403 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100404 public string RequestTypeUrl {
405 get { return requestTypeUrl_; }
406 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100407 requestTypeUrl_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100408 }
409 }
410
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100411 /// <summary>Field number for the "request_streaming" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100412 public const int RequestStreamingFieldNumber = 3;
413 private bool requestStreaming_;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100414 /// <summary>
415 /// If true, the request is streamed.
416 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100417 public bool RequestStreaming {
418 get { return requestStreaming_; }
419 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100420 requestStreaming_ = value;
421 }
422 }
423
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100424 /// <summary>Field number for the "response_type_url" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100425 public const int ResponseTypeUrlFieldNumber = 4;
426 private string responseTypeUrl_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100427 /// <summary>
428 /// The URL of the output message type.
429 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100430 public string ResponseTypeUrl {
431 get { return responseTypeUrl_; }
432 set {
Jon Skeetd18cc082015-07-30 13:50:02 +0100433 responseTypeUrl_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +0100434 }
435 }
436
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100437 /// <summary>Field number for the "response_streaming" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100438 public const int ResponseStreamingFieldNumber = 5;
439 private bool responseStreaming_;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100440 /// <summary>
441 /// If true, the response is streamed.
442 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100443 public bool ResponseStreaming {
444 get { return responseStreaming_; }
445 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100446 responseStreaming_ = value;
447 }
448 }
449
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100450 /// <summary>Field number for the "options" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100451 public const int OptionsFieldNumber = 6;
452 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
453 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser);
454 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 +0100455 /// <summary>
456 /// Any metadata attached to the method.
457 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +0100458 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Options {
459 get { return options_; }
460 }
461
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100462 /// <summary>Field number for the "syntax" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100463 public const int SyntaxFieldNumber = 7;
464 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2;
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100465 /// <summary>
466 /// The source syntax of this method.
467 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100468 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax {
469 get { return syntax_; }
470 set {
471 syntax_ = value;
472 }
473 }
474
Jon Skeet62a4aa52015-07-14 14:26:49 +0100475 public override bool Equals(object other) {
476 return Equals(other as Method);
477 }
478
479 public bool Equals(Method other) {
480 if (ReferenceEquals(other, null)) {
481 return false;
482 }
483 if (ReferenceEquals(other, this)) {
484 return true;
485 }
486 if (Name != other.Name) return false;
487 if (RequestTypeUrl != other.RequestTypeUrl) return false;
488 if (RequestStreaming != other.RequestStreaming) return false;
489 if (ResponseTypeUrl != other.ResponseTypeUrl) return false;
490 if (ResponseStreaming != other.ResponseStreaming) return false;
491 if(!options_.Equals(other.options_)) return false;
Jon Skeet94898172015-09-01 15:47:48 +0100492 if (Syntax != other.Syntax) return false;
Jon Skeet62a4aa52015-07-14 14:26:49 +0100493 return true;
494 }
495
496 public override int GetHashCode() {
497 int hash = 1;
498 if (Name.Length != 0) hash ^= Name.GetHashCode();
499 if (RequestTypeUrl.Length != 0) hash ^= RequestTypeUrl.GetHashCode();
500 if (RequestStreaming != false) hash ^= RequestStreaming.GetHashCode();
501 if (ResponseTypeUrl.Length != 0) hash ^= ResponseTypeUrl.GetHashCode();
502 if (ResponseStreaming != false) hash ^= ResponseStreaming.GetHashCode();
503 hash ^= options_.GetHashCode();
Jon Skeet94898172015-09-01 15:47:48 +0100504 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) hash ^= Syntax.GetHashCode();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100505 return hash;
506 }
507
508 public override string ToString() {
509 return pb::JsonFormatter.Default.Format(this);
510 }
511
512 public void WriteTo(pb::CodedOutputStream output) {
513 if (Name.Length != 0) {
514 output.WriteRawTag(10);
515 output.WriteString(Name);
516 }
517 if (RequestTypeUrl.Length != 0) {
518 output.WriteRawTag(18);
519 output.WriteString(RequestTypeUrl);
520 }
521 if (RequestStreaming != false) {
522 output.WriteRawTag(24);
523 output.WriteBool(RequestStreaming);
524 }
525 if (ResponseTypeUrl.Length != 0) {
526 output.WriteRawTag(34);
527 output.WriteString(ResponseTypeUrl);
528 }
529 if (ResponseStreaming != false) {
530 output.WriteRawTag(40);
531 output.WriteBool(ResponseStreaming);
532 }
533 options_.WriteTo(output, _repeated_options_codec);
Jon Skeet94898172015-09-01 15:47:48 +0100534 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
535 output.WriteRawTag(56);
536 output.WriteEnum((int) Syntax);
537 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100538 }
539
540 public int CalculateSize() {
541 int size = 0;
542 if (Name.Length != 0) {
543 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
544 }
545 if (RequestTypeUrl.Length != 0) {
546 size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestTypeUrl);
547 }
548 if (RequestStreaming != false) {
549 size += 1 + 1;
550 }
551 if (ResponseTypeUrl.Length != 0) {
552 size += 1 + pb::CodedOutputStream.ComputeStringSize(ResponseTypeUrl);
553 }
554 if (ResponseStreaming != false) {
555 size += 1 + 1;
556 }
557 size += options_.CalculateSize(_repeated_options_codec);
Jon Skeet94898172015-09-01 15:47:48 +0100558 if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
559 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax);
560 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100561 return size;
562 }
563
564 public void MergeFrom(Method other) {
565 if (other == null) {
566 return;
567 }
568 if (other.Name.Length != 0) {
569 Name = other.Name;
570 }
571 if (other.RequestTypeUrl.Length != 0) {
572 RequestTypeUrl = other.RequestTypeUrl;
573 }
574 if (other.RequestStreaming != false) {
575 RequestStreaming = other.RequestStreaming;
576 }
577 if (other.ResponseTypeUrl.Length != 0) {
578 ResponseTypeUrl = other.ResponseTypeUrl;
579 }
580 if (other.ResponseStreaming != false) {
581 ResponseStreaming = other.ResponseStreaming;
582 }
583 options_.Add(other.options_);
Jon Skeet94898172015-09-01 15:47:48 +0100584 if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2) {
585 Syntax = other.Syntax;
586 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100587 }
588
589 public void MergeFrom(pb::CodedInputStream input) {
590 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100591 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100592 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100593 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100594 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100595 break;
596 case 10: {
597 Name = input.ReadString();
598 break;
599 }
600 case 18: {
601 RequestTypeUrl = input.ReadString();
602 break;
603 }
604 case 24: {
605 RequestStreaming = input.ReadBool();
606 break;
607 }
608 case 34: {
609 ResponseTypeUrl = input.ReadString();
610 break;
611 }
612 case 40: {
613 ResponseStreaming = input.ReadBool();
614 break;
615 }
616 case 50: {
617 options_.AddEntriesFrom(input, _repeated_options_codec);
618 break;
619 }
Jon Skeet94898172015-09-01 15:47:48 +0100620 case 56: {
621 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum();
622 break;
623 }
624 }
625 }
626 }
627
628 }
629
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100630 /// <summary>
631 /// Declares an API to be included in this API. The including API must
632 /// redeclare all the methods from the included API, but documentation
633 /// and options are inherited as follows:
Jon Skeetcff900e2015-11-06 18:38:31 +0000634 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100635 /// - If after comment and whitespace stripping, the documentation
636 /// string of the redeclared method is empty, it will be inherited
637 /// from the original method.
Jon Skeetcff900e2015-11-06 18:38:31 +0000638 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100639 /// - Each annotation belonging to the service config (http,
640 /// visibility) which is not set in the redeclared method will be
641 /// inherited.
Jon Skeetcff900e2015-11-06 18:38:31 +0000642 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100643 /// - If an http annotation is inherited, the path pattern will be
644 /// modified as follows. Any version prefix will be replaced by the
645 /// version of the including API plus the [root][] path if specified.
Jon Skeetcff900e2015-11-06 18:38:31 +0000646 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100647 /// Example of a simple mixin:
Jon Skeetcff900e2015-11-06 18:38:31 +0000648 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100649 /// package google.acl.v1;
650 /// service AccessControl {
651 /// // Get the underlying ACL object.
652 /// rpc GetAcl(GetAclRequest) returns (Acl) {
653 /// option (google.api.http).get = "/v1/{resource=**}:getAcl";
654 /// }
655 /// }
Jon Skeetcff900e2015-11-06 18:38:31 +0000656 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100657 /// package google.storage.v2;
658 /// service Storage {
659 /// // (-- see AccessControl.GetAcl --)
660 /// rpc GetAcl(GetAclRequest) returns (Acl);
Jon Skeetcff900e2015-11-06 18:38:31 +0000661 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100662 /// // Get a data record.
663 /// rpc GetData(GetDataRequest) returns (Data) {
664 /// option (google.api.http).get = "/v2/{resource=**}";
665 /// }
666 /// }
Jon Skeetcff900e2015-11-06 18:38:31 +0000667 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100668 /// Example of a mixin configuration:
Jon Skeetcff900e2015-11-06 18:38:31 +0000669 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100670 /// apis:
671 /// - name: google.storage.v2.Storage
672 /// mixins:
673 /// - name: google.acl.v1.AccessControl
Jon Skeetcff900e2015-11-06 18:38:31 +0000674 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100675 /// The mixin construct implies that all methods in `AccessControl` are
676 /// also declared with same name and request/response types in
677 /// `Storage`. A documentation generator or annotation processor will
678 /// see the effective `Storage.GetAcl` method after inherting
679 /// documentation and annotations as follows:
Jon Skeetcff900e2015-11-06 18:38:31 +0000680 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100681 /// service Storage {
682 /// // Get the underlying ACL object.
683 /// rpc GetAcl(GetAclRequest) returns (Acl) {
684 /// option (google.api.http).get = "/v2/{resource=**}:getAcl";
685 /// }
686 /// ...
687 /// }
Jon Skeetcff900e2015-11-06 18:38:31 +0000688 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100689 /// Note how the version in the path pattern changed from `v1` to `v2`.
Jon Skeetcff900e2015-11-06 18:38:31 +0000690 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100691 /// If the `root` field in the mixin is specified, it should be a
692 /// relative path under which inherited HTTP paths are placed. Example:
Jon Skeetcff900e2015-11-06 18:38:31 +0000693 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100694 /// apis:
695 /// - name: google.storage.v2.Storage
696 /// mixins:
697 /// - name: google.acl.v1.AccessControl
698 /// root: acls
Jon Skeetcff900e2015-11-06 18:38:31 +0000699 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100700 /// This implies the following inherited HTTP annotation:
Jon Skeetcff900e2015-11-06 18:38:31 +0000701 ///
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100702 /// service Storage {
703 /// // Get the underlying ACL object.
704 /// rpc GetAcl(GetAclRequest) returns (Acl) {
705 /// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
706 /// }
707 /// ...
708 /// }
709 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100710 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
711 public sealed partial class Mixin : pb::IMessage<Mixin> {
712 private static readonly pb::MessageParser<Mixin> _parser = new pb::MessageParser<Mixin>(() => new Mixin());
713 public static pb::MessageParser<Mixin> Parser { get { return _parser; } }
714
715 public static pbr::MessageDescriptor Descriptor {
716 get { return global::Google.Protobuf.WellKnownTypes.Proto.Api.Descriptor.MessageTypes[2]; }
717 }
718
719 pbr::MessageDescriptor pb::IMessage.Descriptor {
720 get { return Descriptor; }
721 }
722
723 public Mixin() {
724 OnConstruction();
725 }
726
727 partial void OnConstruction();
728
729 public Mixin(Mixin other) : this() {
730 name_ = other.name_;
731 root_ = other.root_;
732 }
733
734 public Mixin Clone() {
735 return new Mixin(this);
736 }
737
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100738 /// <summary>Field number for the "name" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100739 public const int NameFieldNumber = 1;
740 private string name_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100741 /// <summary>
742 /// The fully qualified name of the API which is included.
743 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100744 public string Name {
745 get { return name_; }
746 set {
747 name_ = pb::Preconditions.CheckNotNull(value, "value");
748 }
749 }
750
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100751 /// <summary>Field number for the "root" field.</summary>
Jon Skeet94898172015-09-01 15:47:48 +0100752 public const int RootFieldNumber = 2;
753 private string root_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100754 /// <summary>
755 /// If non-empty specifies a path under which inherited HTTP paths
756 /// are rooted.
757 /// </summary>
Jon Skeet94898172015-09-01 15:47:48 +0100758 public string Root {
759 get { return root_; }
760 set {
761 root_ = pb::Preconditions.CheckNotNull(value, "value");
762 }
763 }
764
765 public override bool Equals(object other) {
766 return Equals(other as Mixin);
767 }
768
769 public bool Equals(Mixin other) {
770 if (ReferenceEquals(other, null)) {
771 return false;
772 }
773 if (ReferenceEquals(other, this)) {
774 return true;
775 }
776 if (Name != other.Name) return false;
777 if (Root != other.Root) return false;
778 return true;
779 }
780
781 public override int GetHashCode() {
782 int hash = 1;
783 if (Name.Length != 0) hash ^= Name.GetHashCode();
784 if (Root.Length != 0) hash ^= Root.GetHashCode();
785 return hash;
786 }
787
788 public override string ToString() {
789 return pb::JsonFormatter.Default.Format(this);
790 }
791
792 public void WriteTo(pb::CodedOutputStream output) {
793 if (Name.Length != 0) {
794 output.WriteRawTag(10);
795 output.WriteString(Name);
796 }
797 if (Root.Length != 0) {
798 output.WriteRawTag(18);
799 output.WriteString(Root);
800 }
801 }
802
803 public int CalculateSize() {
804 int size = 0;
805 if (Name.Length != 0) {
806 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
807 }
808 if (Root.Length != 0) {
809 size += 1 + pb::CodedOutputStream.ComputeStringSize(Root);
810 }
811 return size;
812 }
813
814 public void MergeFrom(Mixin other) {
815 if (other == null) {
816 return;
817 }
818 if (other.Name.Length != 0) {
819 Name = other.Name;
820 }
821 if (other.Root.Length != 0) {
822 Root = other.Root;
823 }
824 }
825
826 public void MergeFrom(pb::CodedInputStream input) {
827 uint tag;
828 while ((tag = input.ReadTag()) != 0) {
829 switch(tag) {
830 default:
831 input.SkipLastField();
832 break;
833 case 10: {
834 Name = input.ReadString();
835 break;
836 }
837 case 18: {
838 Root = input.ReadString();
839 break;
840 }
Jon Skeet62a4aa52015-07-14 14:26:49 +0100841 }
842 }
843 }
844
845 }
846
847 #endregion
848
849}
850
851#endregion Designer generated code