blob: 7ca47860f65b1f64f70c994c04c879b0635a6cc4 [file] [log] [blame]
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch72ce4422016-01-20 13:54:38 -08002// source: src/proto/grpc/testing/messages.proto
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08003#pragma warning disable 1591, 0612, 3021
4#region Designer generated code
Jan Tattermuscha7608b02015-02-03 17:54:38 -08005
Jan Tattermusch475f75a2015-08-03 09:46:04 -07006using pb = global::Google.Protobuf;
7using pbc = global::Google.Protobuf.Collections;
8using pbr = global::Google.Protobuf.Reflection;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08009using scg = global::System.Collections.Generic;
Jan Tattermusch475f75a2015-08-03 09:46:04 -070010namespace Grpc.Testing {
Craig Tiller190d3602015-02-18 09:23:38 -080011
Jan Tattermusch72ce4422016-01-20 13:54:38 -080012 /// <summary>Holder for reflection information generated from src/proto/grpc/testing/messages.proto</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080013 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch72ce4422016-01-20 13:54:38 -080014 public static partial class MessagesReflection {
Craig Tiller190d3602015-02-18 09:23:38 -080015
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080016 #region Descriptor
Jan Tattermusch72ce4422016-01-20 13:54:38 -080017 /// <summary>File descriptor for src/proto/grpc/testing/messages.proto</summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -070018 public static pbr::FileDescriptor Descriptor {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080019 get { return descriptor; }
20 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -070021 private static pbr::FileDescriptor descriptor;
Craig Tiller190d3602015-02-18 09:23:38 -080022
Jan Tattermusch72ce4422016-01-20 13:54:38 -080023 static MessagesReflection() {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080024 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
Jan Tattermusch72ce4422016-01-20 13:54:38 -080026 "CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL21lc3NhZ2VzLnByb3RvEgxncnBj",
27 "LnRlc3RpbmciQAoHUGF5bG9hZBInCgR0eXBlGAEgASgOMhkuZ3JwYy50ZXN0",
28 "aW5nLlBheWxvYWRUeXBlEgwKBGJvZHkYAiABKAwiKwoKRWNob1N0YXR1cxIM",
29 "CgRjb2RlGAEgASgFEg8KB21lc3NhZ2UYAiABKAkioQIKDVNpbXBsZVJlcXVl",
30 "c3QSMAoNcmVzcG9uc2VfdHlwZRgBIAEoDjIZLmdycGMudGVzdGluZy5QYXls",
31 "b2FkVHlwZRIVCg1yZXNwb25zZV9zaXplGAIgASgFEiYKB3BheWxvYWQYAyAB",
32 "KAsyFS5ncnBjLnRlc3RpbmcuUGF5bG9hZBIVCg1maWxsX3VzZXJuYW1lGAQg",
33 "ASgIEhgKEGZpbGxfb2F1dGhfc2NvcGUYBSABKAgSOwoUcmVzcG9uc2VfY29t",
34 "cHJlc3Npb24YBiABKA4yHS5ncnBjLnRlc3RpbmcuQ29tcHJlc3Npb25UeXBl",
35 "EjEKD3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdycGMudGVzdGluZy5FY2hv",
36 "U3RhdHVzIl8KDlNpbXBsZVJlc3BvbnNlEiYKB3BheWxvYWQYASABKAsyFS5n",
37 "cnBjLnRlc3RpbmcuUGF5bG9hZBIQCgh1c2VybmFtZRgCIAEoCRITCgtvYXV0",
38 "aF9zY29wZRgDIAEoCSJDChlTdHJlYW1pbmdJbnB1dENhbGxSZXF1ZXN0EiYK",
39 "B3BheWxvYWQYASABKAsyFS5ncnBjLnRlc3RpbmcuUGF5bG9hZCI9ChpTdHJl",
40 "YW1pbmdJbnB1dENhbGxSZXNwb25zZRIfChdhZ2dyZWdhdGVkX3BheWxvYWRf",
41 "c2l6ZRgBIAEoBSI3ChJSZXNwb25zZVBhcmFtZXRlcnMSDAoEc2l6ZRgBIAEo",
42 "BRITCgtpbnRlcnZhbF91cxgCIAEoBSKlAgoaU3RyZWFtaW5nT3V0cHV0Q2Fs",
43 "bFJlcXVlc3QSMAoNcmVzcG9uc2VfdHlwZRgBIAEoDjIZLmdycGMudGVzdGlu",
44 "Zy5QYXlsb2FkVHlwZRI9ChNyZXNwb25zZV9wYXJhbWV0ZXJzGAIgAygLMiAu",
45 "Z3JwYy50ZXN0aW5nLlJlc3BvbnNlUGFyYW1ldGVycxImCgdwYXlsb2FkGAMg",
46 "ASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQSOwoUcmVzcG9uc2VfY29tcHJl",
47 "c3Npb24YBiABKA4yHS5ncnBjLnRlc3RpbmcuQ29tcHJlc3Npb25UeXBlEjEK",
48 "D3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdycGMudGVzdGluZy5FY2hvU3Rh",
49 "dHVzIkUKG1N0cmVhbWluZ091dHB1dENhbGxSZXNwb25zZRImCgdwYXlsb2Fk",
50 "GAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQiMwoNUmVjb25uZWN0SW5m",
51 "bxIOCgZwYXNzZWQYASABKAgSEgoKYmFja29mZl9tcxgCIAMoBSo/CgtQYXls",
52 "b2FkVHlwZRIQCgxDT01QUkVTU0FCTEUQABISCg5VTkNPTVBSRVNTQUJMRRAB",
53 "EgoKBlJBTkRPTRACKjIKD0NvbXByZXNzaW9uVHlwZRIICgROT05FEAASCAoE",
54 "R1pJUBABEgsKB0RFRkxBVEUQAmIGcHJvdG8z"));
55 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
Jan Tattermusch475f75a2015-08-03 09:46:04 -070056 new pbr::FileDescriptor[] { },
Jan Tattermusch70f86522015-10-07 18:23:51 -070057 new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.CompressionType), }, new pbr::GeneratedCodeInfo[] {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080058 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Payload), global::Grpc.Testing.Payload.Parser, new[]{ "Type", "Body" }, null, null, null),
59 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.EchoStatus), global::Grpc.Testing.EchoStatus.Parser, new[]{ "Code", "Message" }, null, null, null),
60 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompression", "ResponseStatus" }, null, null, null),
61 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope" }, null, null, null),
62 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload" }, null, null, null),
63 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingInputCallResponse), global::Grpc.Testing.StreamingInputCallResponse.Parser, new[]{ "AggregatedPayloadSize" }, null, null, null),
64 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs" }, null, null, null),
65 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus" }, null, null, null),
66 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallResponse), global::Grpc.Testing.StreamingOutputCallResponse.Parser, new[]{ "Payload" }, null, null, null),
67 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectInfo), global::Grpc.Testing.ReconnectInfo.Parser, new[]{ "Passed", "BackoffMs" }, null, null, null)
Jan Tattermusch475f75a2015-08-03 09:46:04 -070068 }));
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080069 }
70 #endregion
Craig Tiller190d3602015-02-18 09:23:38 -080071
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080072 }
73 #region Enums
Jan Tattermusch72ce4422016-01-20 13:54:38 -080074 /// <summary>
75 /// The type of payload that should be returned.
76 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080077 public enum PayloadType {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080078 /// <summary>
79 /// Compressable text format.
80 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080081 COMPRESSABLE = 0,
Jan Tattermusch72ce4422016-01-20 13:54:38 -080082 /// <summary>
83 /// Uncompressable binary format.
84 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080085 UNCOMPRESSABLE = 1,
Jan Tattermusch72ce4422016-01-20 13:54:38 -080086 /// <summary>
87 /// Randomly chosen from all other formats defined in this enum.
88 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -080089 RANDOM = 2,
90 }
Craig Tiller190d3602015-02-18 09:23:38 -080091
Jan Tattermusch72ce4422016-01-20 13:54:38 -080092 /// <summary>
93 /// Compression algorithms
94 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -070095 public enum CompressionType {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080096 /// <summary>
97 /// No compression
98 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -070099 NONE = 0,
100 GZIP = 1,
101 DEFLATE = 2,
102 }
103
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800104 #endregion
Craig Tiller190d3602015-02-18 09:23:38 -0800105
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800106 #region Messages
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800107 /// <summary>
108 /// A block of data, to simply increase gRPC message size.
109 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700111 public sealed partial class Payload : pb::IMessage<Payload> {
112 private static readonly pb::MessageParser<Payload> _parser = new pb::MessageParser<Payload>(() => new Payload());
113 public static pb::MessageParser<Payload> Parser { get { return _parser; } }
114
115 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800116 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[0]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800117 }
Craig Tiller190d3602015-02-18 09:23:38 -0800118
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700119 pbr::MessageDescriptor pb::IMessage.Descriptor {
120 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800121 }
Craig Tiller190d3602015-02-18 09:23:38 -0800122
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700123 public Payload() {
124 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800125 }
Craig Tiller190d3602015-02-18 09:23:38 -0800126
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700127 partial void OnConstruction();
128
129 public Payload(Payload other) : this() {
130 type_ = other.type_;
131 body_ = other.body_;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800132 }
Craig Tiller190d3602015-02-18 09:23:38 -0800133
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700134 public Payload Clone() {
135 return new Payload(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800136 }
Craig Tiller190d3602015-02-18 09:23:38 -0800137
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800138 /// <summary>Field number for the "type" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800139 public const int TypeFieldNumber = 1;
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700140 private global::Grpc.Testing.PayloadType type_ = global::Grpc.Testing.PayloadType.COMPRESSABLE;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800141 /// <summary>
142 /// The type of data in body.
143 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700144 public global::Grpc.Testing.PayloadType Type {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800145 get { return type_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700146 set {
147 type_ = value;
148 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800149 }
Craig Tiller190d3602015-02-18 09:23:38 -0800150
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800151 /// <summary>Field number for the "body" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800152 public const int BodyFieldNumber = 2;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800153 private pb::ByteString body_ = pb::ByteString.Empty;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800154 /// <summary>
155 /// Primary contents of payload.
156 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800157 public pb::ByteString Body {
158 get { return body_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700159 set {
160 body_ = pb::Preconditions.CheckNotNull(value, "value");
161 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800162 }
Craig Tiller190d3602015-02-18 09:23:38 -0800163
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700164 public override bool Equals(object other) {
165 return Equals(other as Payload);
166 }
167
168 public bool Equals(Payload other) {
169 if (ReferenceEquals(other, null)) {
170 return false;
171 }
172 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800173 return true;
174 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700175 if (Type != other.Type) return false;
176 if (Body != other.Body) return false;
177 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800178 }
Craig Tiller190d3602015-02-18 09:23:38 -0800179
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700180 public override int GetHashCode() {
181 int hash = 1;
182 if (Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) hash ^= Type.GetHashCode();
183 if (Body.Length != 0) hash ^= Body.GetHashCode();
184 return hash;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800185 }
Craig Tiller190d3602015-02-18 09:23:38 -0800186
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700187 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800188 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700189 }
Craig Tiller190d3602015-02-18 09:23:38 -0800190
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700191 public void WriteTo(pb::CodedOutputStream output) {
192 if (Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
193 output.WriteRawTag(8);
194 output.WriteEnum((int) Type);
195 }
196 if (Body.Length != 0) {
197 output.WriteRawTag(18);
198 output.WriteBytes(Body);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800199 }
200 }
Craig Tiller190d3602015-02-18 09:23:38 -0800201
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700202 public int CalculateSize() {
203 int size = 0;
204 if (Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
205 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
206 }
207 if (Body.Length != 0) {
208 size += 1 + pb::CodedOutputStream.ComputeBytesSize(Body);
209 }
210 return size;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800211 }
Craig Tiller190d3602015-02-18 09:23:38 -0800212
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700213 public void MergeFrom(Payload other) {
214 if (other == null) {
215 return;
216 }
217 if (other.Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
218 Type = other.Type;
219 }
220 if (other.Body.Length != 0) {
221 Body = other.Body;
222 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800223 }
Craig Tiller190d3602015-02-18 09:23:38 -0800224
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700225 public void MergeFrom(pb::CodedInputStream input) {
226 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -0700227 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700228 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700229 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -0700230 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700231 break;
232 case 8: {
233 type_ = (global::Grpc.Testing.PayloadType) input.ReadEnum();
234 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800235 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700236 case 18: {
237 Body = input.ReadBytes();
238 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800239 }
240 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800241 }
242 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700243
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800244 }
Craig Tiller190d3602015-02-18 09:23:38 -0800245
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800246 /// <summary>
247 /// A protobuf representation for grpc status. This is used by test
248 /// clients to specify a status that the server should attempt to return.
249 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800250 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700251 public sealed partial class EchoStatus : pb::IMessage<EchoStatus> {
252 private static readonly pb::MessageParser<EchoStatus> _parser = new pb::MessageParser<EchoStatus>(() => new EchoStatus());
253 public static pb::MessageParser<EchoStatus> Parser { get { return _parser; } }
254
255 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800256 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[1]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700257 }
258
259 pbr::MessageDescriptor pb::IMessage.Descriptor {
260 get { return Descriptor; }
261 }
262
263 public EchoStatus() {
264 OnConstruction();
265 }
266
267 partial void OnConstruction();
268
269 public EchoStatus(EchoStatus other) : this() {
270 code_ = other.code_;
271 message_ = other.message_;
272 }
273
274 public EchoStatus Clone() {
275 return new EchoStatus(this);
276 }
277
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800278 /// <summary>Field number for the "code" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700279 public const int CodeFieldNumber = 1;
280 private int code_;
281 public int Code {
282 get { return code_; }
283 set {
284 code_ = value;
285 }
286 }
287
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800288 /// <summary>Field number for the "message" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700289 public const int MessageFieldNumber = 2;
290 private string message_ = "";
291 public string Message {
292 get { return message_; }
293 set {
294 message_ = pb::Preconditions.CheckNotNull(value, "value");
295 }
296 }
297
298 public override bool Equals(object other) {
299 return Equals(other as EchoStatus);
300 }
301
302 public bool Equals(EchoStatus other) {
303 if (ReferenceEquals(other, null)) {
304 return false;
305 }
306 if (ReferenceEquals(other, this)) {
307 return true;
308 }
309 if (Code != other.Code) return false;
310 if (Message != other.Message) return false;
311 return true;
312 }
313
314 public override int GetHashCode() {
315 int hash = 1;
316 if (Code != 0) hash ^= Code.GetHashCode();
317 if (Message.Length != 0) hash ^= Message.GetHashCode();
318 return hash;
319 }
320
321 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800322 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700323 }
324
325 public void WriteTo(pb::CodedOutputStream output) {
326 if (Code != 0) {
327 output.WriteRawTag(8);
328 output.WriteInt32(Code);
329 }
330 if (Message.Length != 0) {
331 output.WriteRawTag(18);
332 output.WriteString(Message);
333 }
334 }
335
336 public int CalculateSize() {
337 int size = 0;
338 if (Code != 0) {
339 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
340 }
341 if (Message.Length != 0) {
342 size += 1 + pb::CodedOutputStream.ComputeStringSize(Message);
343 }
344 return size;
345 }
346
347 public void MergeFrom(EchoStatus other) {
348 if (other == null) {
349 return;
350 }
351 if (other.Code != 0) {
352 Code = other.Code;
353 }
354 if (other.Message.Length != 0) {
355 Message = other.Message;
356 }
357 }
358
359 public void MergeFrom(pb::CodedInputStream input) {
360 uint tag;
361 while ((tag = input.ReadTag()) != 0) {
362 switch(tag) {
363 default:
364 input.SkipLastField();
365 break;
366 case 8: {
367 Code = input.ReadInt32();
368 break;
369 }
370 case 18: {
371 Message = input.ReadString();
372 break;
373 }
374 }
375 }
376 }
377
378 }
379
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800380 /// <summary>
381 /// Unary request.
382 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700383 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700384 public sealed partial class SimpleRequest : pb::IMessage<SimpleRequest> {
385 private static readonly pb::MessageParser<SimpleRequest> _parser = new pb::MessageParser<SimpleRequest>(() => new SimpleRequest());
386 public static pb::MessageParser<SimpleRequest> Parser { get { return _parser; } }
387
388 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800389 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[2]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800390 }
Craig Tiller190d3602015-02-18 09:23:38 -0800391
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700392 pbr::MessageDescriptor pb::IMessage.Descriptor {
393 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800394 }
Craig Tiller190d3602015-02-18 09:23:38 -0800395
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700396 public SimpleRequest() {
397 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800398 }
Craig Tiller190d3602015-02-18 09:23:38 -0800399
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700400 partial void OnConstruction();
401
402 public SimpleRequest(SimpleRequest other) : this() {
403 responseType_ = other.responseType_;
404 responseSize_ = other.responseSize_;
405 Payload = other.payload_ != null ? other.Payload.Clone() : null;
406 fillUsername_ = other.fillUsername_;
407 fillOauthScope_ = other.fillOauthScope_;
Jan Tattermusch70f86522015-10-07 18:23:51 -0700408 responseCompression_ = other.responseCompression_;
409 ResponseStatus = other.responseStatus_ != null ? other.ResponseStatus.Clone() : null;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800410 }
Craig Tiller190d3602015-02-18 09:23:38 -0800411
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700412 public SimpleRequest Clone() {
413 return new SimpleRequest(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800414 }
Craig Tiller190d3602015-02-18 09:23:38 -0800415
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800416 /// <summary>Field number for the "response_type" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800417 public const int ResponseTypeFieldNumber = 1;
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700418 private global::Grpc.Testing.PayloadType responseType_ = global::Grpc.Testing.PayloadType.COMPRESSABLE;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800419 /// <summary>
420 /// Desired payload type in the response from the server.
421 /// If response_type is RANDOM, server randomly chooses one from other formats.
422 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700423 public global::Grpc.Testing.PayloadType ResponseType {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800424 get { return responseType_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700425 set {
426 responseType_ = value;
427 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800428 }
Craig Tiller190d3602015-02-18 09:23:38 -0800429
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800430 /// <summary>Field number for the "response_size" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800431 public const int ResponseSizeFieldNumber = 2;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800432 private int responseSize_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800433 /// <summary>
434 /// Desired payload size in the response from the server.
435 /// If response_type is COMPRESSABLE, this denotes the size before compression.
436 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800437 public int ResponseSize {
438 get { return responseSize_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700439 set {
440 responseSize_ = value;
441 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800442 }
Craig Tiller190d3602015-02-18 09:23:38 -0800443
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800444 /// <summary>Field number for the "payload" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800445 public const int PayloadFieldNumber = 3;
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700446 private global::Grpc.Testing.Payload payload_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800447 /// <summary>
448 /// Optional input payload sent along with the request.
449 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700450 public global::Grpc.Testing.Payload Payload {
451 get { return payload_; }
452 set {
453 payload_ = value;
454 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800455 }
Craig Tiller190d3602015-02-18 09:23:38 -0800456
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800457 /// <summary>Field number for the "fill_username" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800458 public const int FillUsernameFieldNumber = 4;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800459 private bool fillUsername_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800460 /// <summary>
461 /// Whether SimpleResponse should include username.
462 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800463 public bool FillUsername {
464 get { return fillUsername_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700465 set {
466 fillUsername_ = value;
467 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800468 }
Craig Tiller190d3602015-02-18 09:23:38 -0800469
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800470 /// <summary>Field number for the "fill_oauth_scope" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800471 public const int FillOauthScopeFieldNumber = 5;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800472 private bool fillOauthScope_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800473 /// <summary>
474 /// Whether SimpleResponse should include OAuth scope.
475 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800476 public bool FillOauthScope {
477 get { return fillOauthScope_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700478 set {
479 fillOauthScope_ = value;
480 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800481 }
Craig Tiller190d3602015-02-18 09:23:38 -0800482
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800483 /// <summary>Field number for the "response_compression" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700484 public const int ResponseCompressionFieldNumber = 6;
485 private global::Grpc.Testing.CompressionType responseCompression_ = global::Grpc.Testing.CompressionType.NONE;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800486 /// <summary>
487 /// Compression algorithm to be used by the server for the response (stream)
488 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700489 public global::Grpc.Testing.CompressionType ResponseCompression {
490 get { return responseCompression_; }
491 set {
492 responseCompression_ = value;
493 }
494 }
495
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800496 /// <summary>Field number for the "response_status" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700497 public const int ResponseStatusFieldNumber = 7;
498 private global::Grpc.Testing.EchoStatus responseStatus_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800499 /// <summary>
500 /// Whether server should return a given status
501 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700502 public global::Grpc.Testing.EchoStatus ResponseStatus {
503 get { return responseStatus_; }
504 set {
505 responseStatus_ = value;
506 }
507 }
508
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700509 public override bool Equals(object other) {
510 return Equals(other as SimpleRequest);
511 }
512
513 public bool Equals(SimpleRequest other) {
514 if (ReferenceEquals(other, null)) {
515 return false;
516 }
517 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800518 return true;
519 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700520 if (ResponseType != other.ResponseType) return false;
521 if (ResponseSize != other.ResponseSize) return false;
522 if (!object.Equals(Payload, other.Payload)) return false;
523 if (FillUsername != other.FillUsername) return false;
524 if (FillOauthScope != other.FillOauthScope) return false;
Jan Tattermusch70f86522015-10-07 18:23:51 -0700525 if (ResponseCompression != other.ResponseCompression) return false;
526 if (!object.Equals(ResponseStatus, other.ResponseStatus)) return false;
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700527 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800528 }
Craig Tiller190d3602015-02-18 09:23:38 -0800529
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700530 public override int GetHashCode() {
531 int hash = 1;
532 if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) hash ^= ResponseType.GetHashCode();
533 if (ResponseSize != 0) hash ^= ResponseSize.GetHashCode();
534 if (payload_ != null) hash ^= Payload.GetHashCode();
535 if (FillUsername != false) hash ^= FillUsername.GetHashCode();
536 if (FillOauthScope != false) hash ^= FillOauthScope.GetHashCode();
Jan Tattermusch70f86522015-10-07 18:23:51 -0700537 if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) hash ^= ResponseCompression.GetHashCode();
538 if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode();
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700539 return hash;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800540 }
Craig Tiller190d3602015-02-18 09:23:38 -0800541
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700542 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800543 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700544 }
Craig Tiller190d3602015-02-18 09:23:38 -0800545
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700546 public void WriteTo(pb::CodedOutputStream output) {
547 if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
548 output.WriteRawTag(8);
549 output.WriteEnum((int) ResponseType);
550 }
551 if (ResponseSize != 0) {
552 output.WriteRawTag(16);
553 output.WriteInt32(ResponseSize);
554 }
555 if (payload_ != null) {
556 output.WriteRawTag(26);
557 output.WriteMessage(Payload);
558 }
559 if (FillUsername != false) {
560 output.WriteRawTag(32);
561 output.WriteBool(FillUsername);
562 }
563 if (FillOauthScope != false) {
564 output.WriteRawTag(40);
565 output.WriteBool(FillOauthScope);
566 }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700567 if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) {
568 output.WriteRawTag(48);
569 output.WriteEnum((int) ResponseCompression);
570 }
571 if (responseStatus_ != null) {
572 output.WriteRawTag(58);
573 output.WriteMessage(ResponseStatus);
574 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700575 }
576
577 public int CalculateSize() {
578 int size = 0;
579 if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
580 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseType);
581 }
582 if (ResponseSize != 0) {
583 size += 1 + pb::CodedOutputStream.ComputeInt32Size(ResponseSize);
584 }
585 if (payload_ != null) {
586 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
587 }
588 if (FillUsername != false) {
589 size += 1 + 1;
590 }
591 if (FillOauthScope != false) {
592 size += 1 + 1;
593 }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700594 if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) {
595 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression);
596 }
597 if (responseStatus_ != null) {
598 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResponseStatus);
599 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700600 return size;
601 }
602
603 public void MergeFrom(SimpleRequest other) {
604 if (other == null) {
605 return;
606 }
607 if (other.ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
608 ResponseType = other.ResponseType;
609 }
610 if (other.ResponseSize != 0) {
611 ResponseSize = other.ResponseSize;
612 }
613 if (other.payload_ != null) {
614 if (payload_ == null) {
615 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800616 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700617 Payload.MergeFrom(other.Payload);
618 }
619 if (other.FillUsername != false) {
620 FillUsername = other.FillUsername;
621 }
622 if (other.FillOauthScope != false) {
623 FillOauthScope = other.FillOauthScope;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800624 }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700625 if (other.ResponseCompression != global::Grpc.Testing.CompressionType.NONE) {
626 ResponseCompression = other.ResponseCompression;
627 }
628 if (other.responseStatus_ != null) {
629 if (responseStatus_ == null) {
630 responseStatus_ = new global::Grpc.Testing.EchoStatus();
631 }
632 ResponseStatus.MergeFrom(other.ResponseStatus);
633 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800634 }
Craig Tiller190d3602015-02-18 09:23:38 -0800635
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700636 public void MergeFrom(pb::CodedInputStream input) {
637 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -0700638 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700639 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700640 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -0700641 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700642 break;
643 case 8: {
644 responseType_ = (global::Grpc.Testing.PayloadType) input.ReadEnum();
645 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800646 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700647 case 16: {
648 ResponseSize = input.ReadInt32();
649 break;
650 }
651 case 26: {
652 if (payload_ == null) {
653 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800654 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700655 input.ReadMessage(payload_);
656 break;
657 }
658 case 32: {
659 FillUsername = input.ReadBool();
660 break;
661 }
662 case 40: {
663 FillOauthScope = input.ReadBool();
664 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800665 }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700666 case 48: {
667 responseCompression_ = (global::Grpc.Testing.CompressionType) input.ReadEnum();
668 break;
669 }
670 case 58: {
671 if (responseStatus_ == null) {
672 responseStatus_ = new global::Grpc.Testing.EchoStatus();
673 }
674 input.ReadMessage(responseStatus_);
675 break;
676 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800677 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800678 }
679 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700680
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800681 }
Craig Tiller190d3602015-02-18 09:23:38 -0800682
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800683 /// <summary>
684 /// Unary response, as configured by the request.
685 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800686 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700687 public sealed partial class SimpleResponse : pb::IMessage<SimpleResponse> {
688 private static readonly pb::MessageParser<SimpleResponse> _parser = new pb::MessageParser<SimpleResponse>(() => new SimpleResponse());
689 public static pb::MessageParser<SimpleResponse> Parser { get { return _parser; } }
690
691 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800692 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[3]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800693 }
Craig Tiller190d3602015-02-18 09:23:38 -0800694
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700695 pbr::MessageDescriptor pb::IMessage.Descriptor {
696 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800697 }
Craig Tiller190d3602015-02-18 09:23:38 -0800698
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700699 public SimpleResponse() {
700 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800701 }
Craig Tiller190d3602015-02-18 09:23:38 -0800702
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700703 partial void OnConstruction();
704
705 public SimpleResponse(SimpleResponse other) : this() {
706 Payload = other.payload_ != null ? other.Payload.Clone() : null;
707 username_ = other.username_;
708 oauthScope_ = other.oauthScope_;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800709 }
Craig Tiller190d3602015-02-18 09:23:38 -0800710
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700711 public SimpleResponse Clone() {
712 return new SimpleResponse(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800713 }
Craig Tiller190d3602015-02-18 09:23:38 -0800714
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800715 /// <summary>Field number for the "payload" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800716 public const int PayloadFieldNumber = 1;
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700717 private global::Grpc.Testing.Payload payload_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800718 /// <summary>
719 /// Payload to increase message size.
720 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700721 public global::Grpc.Testing.Payload Payload {
722 get { return payload_; }
723 set {
724 payload_ = value;
725 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800726 }
Craig Tiller190d3602015-02-18 09:23:38 -0800727
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800728 /// <summary>Field number for the "username" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800729 public const int UsernameFieldNumber = 2;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800730 private string username_ = "";
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800731 /// <summary>
732 /// The user the request came from, for verifying authentication was
733 /// successful when the client expected it.
734 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800735 public string Username {
736 get { return username_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700737 set {
738 username_ = pb::Preconditions.CheckNotNull(value, "value");
739 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800740 }
Craig Tiller190d3602015-02-18 09:23:38 -0800741
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800742 /// <summary>Field number for the "oauth_scope" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800743 public const int OauthScopeFieldNumber = 3;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800744 private string oauthScope_ = "";
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800745 /// <summary>
746 /// OAuth scope.
747 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800748 public string OauthScope {
749 get { return oauthScope_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700750 set {
751 oauthScope_ = pb::Preconditions.CheckNotNull(value, "value");
752 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800753 }
Craig Tiller190d3602015-02-18 09:23:38 -0800754
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700755 public override bool Equals(object other) {
756 return Equals(other as SimpleResponse);
757 }
758
759 public bool Equals(SimpleResponse other) {
760 if (ReferenceEquals(other, null)) {
761 return false;
762 }
763 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800764 return true;
765 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700766 if (!object.Equals(Payload, other.Payload)) return false;
767 if (Username != other.Username) return false;
768 if (OauthScope != other.OauthScope) return false;
769 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800770 }
Craig Tiller190d3602015-02-18 09:23:38 -0800771
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700772 public override int GetHashCode() {
773 int hash = 1;
774 if (payload_ != null) hash ^= Payload.GetHashCode();
775 if (Username.Length != 0) hash ^= Username.GetHashCode();
776 if (OauthScope.Length != 0) hash ^= OauthScope.GetHashCode();
777 return hash;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800778 }
Craig Tiller190d3602015-02-18 09:23:38 -0800779
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700780 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800781 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700782 }
Craig Tiller190d3602015-02-18 09:23:38 -0800783
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700784 public void WriteTo(pb::CodedOutputStream output) {
785 if (payload_ != null) {
786 output.WriteRawTag(10);
787 output.WriteMessage(Payload);
788 }
789 if (Username.Length != 0) {
790 output.WriteRawTag(18);
791 output.WriteString(Username);
792 }
793 if (OauthScope.Length != 0) {
794 output.WriteRawTag(26);
795 output.WriteString(OauthScope);
796 }
797 }
798
799 public int CalculateSize() {
800 int size = 0;
801 if (payload_ != null) {
802 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
803 }
804 if (Username.Length != 0) {
805 size += 1 + pb::CodedOutputStream.ComputeStringSize(Username);
806 }
807 if (OauthScope.Length != 0) {
808 size += 1 + pb::CodedOutputStream.ComputeStringSize(OauthScope);
809 }
810 return size;
811 }
812
813 public void MergeFrom(SimpleResponse other) {
814 if (other == null) {
815 return;
816 }
817 if (other.payload_ != null) {
818 if (payload_ == null) {
819 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800820 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700821 Payload.MergeFrom(other.Payload);
822 }
823 if (other.Username.Length != 0) {
824 Username = other.Username;
825 }
826 if (other.OauthScope.Length != 0) {
827 OauthScope = other.OauthScope;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800828 }
829 }
Craig Tiller190d3602015-02-18 09:23:38 -0800830
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700831 public void MergeFrom(pb::CodedInputStream input) {
832 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -0700833 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700834 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700835 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -0700836 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700837 break;
838 case 10: {
839 if (payload_ == null) {
840 payload_ = new global::Grpc.Testing.Payload();
841 }
842 input.ReadMessage(payload_);
843 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800844 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700845 case 18: {
846 Username = input.ReadString();
847 break;
848 }
849 case 26: {
850 OauthScope = input.ReadString();
851 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800852 }
853 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800854 }
855 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700856
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800857 }
Craig Tiller190d3602015-02-18 09:23:38 -0800858
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800859 /// <summary>
860 /// Client-streaming request.
861 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800862 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700863 public sealed partial class StreamingInputCallRequest : pb::IMessage<StreamingInputCallRequest> {
864 private static readonly pb::MessageParser<StreamingInputCallRequest> _parser = new pb::MessageParser<StreamingInputCallRequest>(() => new StreamingInputCallRequest());
865 public static pb::MessageParser<StreamingInputCallRequest> Parser { get { return _parser; } }
866
867 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800868 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[4]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800869 }
Craig Tiller190d3602015-02-18 09:23:38 -0800870
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700871 pbr::MessageDescriptor pb::IMessage.Descriptor {
872 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800873 }
Craig Tiller190d3602015-02-18 09:23:38 -0800874
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700875 public StreamingInputCallRequest() {
876 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800877 }
Craig Tiller190d3602015-02-18 09:23:38 -0800878
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700879 partial void OnConstruction();
880
881 public StreamingInputCallRequest(StreamingInputCallRequest other) : this() {
882 Payload = other.payload_ != null ? other.Payload.Clone() : null;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800883 }
Craig Tiller190d3602015-02-18 09:23:38 -0800884
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700885 public StreamingInputCallRequest Clone() {
886 return new StreamingInputCallRequest(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800887 }
Craig Tiller190d3602015-02-18 09:23:38 -0800888
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800889 /// <summary>Field number for the "payload" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800890 public const int PayloadFieldNumber = 1;
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700891 private global::Grpc.Testing.Payload payload_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800892 /// <summary>
893 /// Optional input payload sent along with the request.
894 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700895 public global::Grpc.Testing.Payload Payload {
896 get { return payload_; }
897 set {
898 payload_ = value;
899 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800900 }
Craig Tiller190d3602015-02-18 09:23:38 -0800901
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700902 public override bool Equals(object other) {
903 return Equals(other as StreamingInputCallRequest);
904 }
905
906 public bool Equals(StreamingInputCallRequest other) {
907 if (ReferenceEquals(other, null)) {
908 return false;
909 }
910 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800911 return true;
912 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700913 if (!object.Equals(Payload, other.Payload)) return false;
914 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800915 }
Craig Tiller190d3602015-02-18 09:23:38 -0800916
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700917 public override int GetHashCode() {
918 int hash = 1;
919 if (payload_ != null) hash ^= Payload.GetHashCode();
920 return hash;
921 }
922
923 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800924 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700925 }
926
927 public void WriteTo(pb::CodedOutputStream output) {
928 if (payload_ != null) {
929 output.WriteRawTag(10);
930 output.WriteMessage(Payload);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800931 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800932 }
Craig Tiller190d3602015-02-18 09:23:38 -0800933
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700934 public int CalculateSize() {
935 int size = 0;
936 if (payload_ != null) {
937 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
938 }
939 return size;
940 }
Craig Tiller190d3602015-02-18 09:23:38 -0800941
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700942 public void MergeFrom(StreamingInputCallRequest other) {
943 if (other == null) {
944 return;
945 }
946 if (other.payload_ != null) {
947 if (payload_ == null) {
948 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800949 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700950 Payload.MergeFrom(other.Payload);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800951 }
952 }
Craig Tiller190d3602015-02-18 09:23:38 -0800953
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700954 public void MergeFrom(pb::CodedInputStream input) {
955 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -0700956 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700957 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700958 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -0700959 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700960 break;
961 case 10: {
962 if (payload_ == null) {
963 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800964 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700965 input.ReadMessage(payload_);
966 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800967 }
968 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800969 }
970 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700971
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800972 }
Craig Tiller190d3602015-02-18 09:23:38 -0800973
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800974 /// <summary>
975 /// Client-streaming response.
976 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800977 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700978 public sealed partial class StreamingInputCallResponse : pb::IMessage<StreamingInputCallResponse> {
979 private static readonly pb::MessageParser<StreamingInputCallResponse> _parser = new pb::MessageParser<StreamingInputCallResponse>(() => new StreamingInputCallResponse());
980 public static pb::MessageParser<StreamingInputCallResponse> Parser { get { return _parser; } }
981
982 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800983 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[5]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800984 }
Craig Tiller190d3602015-02-18 09:23:38 -0800985
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700986 pbr::MessageDescriptor pb::IMessage.Descriptor {
987 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800988 }
Craig Tiller190d3602015-02-18 09:23:38 -0800989
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700990 public StreamingInputCallResponse() {
991 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800992 }
Craig Tiller190d3602015-02-18 09:23:38 -0800993
Jan Tattermusch475f75a2015-08-03 09:46:04 -0700994 partial void OnConstruction();
995
996 public StreamingInputCallResponse(StreamingInputCallResponse other) : this() {
997 aggregatedPayloadSize_ = other.aggregatedPayloadSize_;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -0800998 }
Craig Tiller190d3602015-02-18 09:23:38 -0800999
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001000 public StreamingInputCallResponse Clone() {
1001 return new StreamingInputCallResponse(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001002 }
Craig Tiller190d3602015-02-18 09:23:38 -08001003
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001004 /// <summary>Field number for the "aggregated_payload_size" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001005 public const int AggregatedPayloadSizeFieldNumber = 1;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001006 private int aggregatedPayloadSize_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001007 /// <summary>
1008 /// Aggregated size of payloads received from the client.
1009 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001010 public int AggregatedPayloadSize {
1011 get { return aggregatedPayloadSize_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001012 set {
1013 aggregatedPayloadSize_ = value;
1014 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001015 }
Craig Tiller190d3602015-02-18 09:23:38 -08001016
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001017 public override bool Equals(object other) {
1018 return Equals(other as StreamingInputCallResponse);
1019 }
1020
1021 public bool Equals(StreamingInputCallResponse other) {
1022 if (ReferenceEquals(other, null)) {
1023 return false;
1024 }
1025 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001026 return true;
1027 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001028 if (AggregatedPayloadSize != other.AggregatedPayloadSize) return false;
1029 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001030 }
Craig Tiller190d3602015-02-18 09:23:38 -08001031
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001032 public override int GetHashCode() {
1033 int hash = 1;
1034 if (AggregatedPayloadSize != 0) hash ^= AggregatedPayloadSize.GetHashCode();
1035 return hash;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001036 }
Craig Tiller190d3602015-02-18 09:23:38 -08001037
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001038 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001039 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001040 }
Craig Tiller190d3602015-02-18 09:23:38 -08001041
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001042 public void WriteTo(pb::CodedOutputStream output) {
1043 if (AggregatedPayloadSize != 0) {
1044 output.WriteRawTag(8);
1045 output.WriteInt32(AggregatedPayloadSize);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001046 }
1047 }
Craig Tiller190d3602015-02-18 09:23:38 -08001048
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001049 public int CalculateSize() {
1050 int size = 0;
1051 if (AggregatedPayloadSize != 0) {
1052 size += 1 + pb::CodedOutputStream.ComputeInt32Size(AggregatedPayloadSize);
1053 }
1054 return size;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001055 }
Craig Tiller190d3602015-02-18 09:23:38 -08001056
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001057 public void MergeFrom(StreamingInputCallResponse other) {
1058 if (other == null) {
1059 return;
1060 }
1061 if (other.AggregatedPayloadSize != 0) {
1062 AggregatedPayloadSize = other.AggregatedPayloadSize;
1063 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001064 }
Craig Tiller190d3602015-02-18 09:23:38 -08001065
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001066 public void MergeFrom(pb::CodedInputStream input) {
1067 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -07001068 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001069 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001070 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -07001071 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001072 break;
1073 case 8: {
1074 AggregatedPayloadSize = input.ReadInt32();
1075 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001076 }
1077 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001078 }
1079 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001080
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001081 }
Craig Tiller190d3602015-02-18 09:23:38 -08001082
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001083 /// <summary>
1084 /// Configuration for a particular response.
1085 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001086 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001087 public sealed partial class ResponseParameters : pb::IMessage<ResponseParameters> {
1088 private static readonly pb::MessageParser<ResponseParameters> _parser = new pb::MessageParser<ResponseParameters>(() => new ResponseParameters());
1089 public static pb::MessageParser<ResponseParameters> Parser { get { return _parser; } }
1090
1091 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001092 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[6]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001093 }
Craig Tiller190d3602015-02-18 09:23:38 -08001094
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001095 pbr::MessageDescriptor pb::IMessage.Descriptor {
1096 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001097 }
Craig Tiller190d3602015-02-18 09:23:38 -08001098
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001099 public ResponseParameters() {
1100 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001101 }
Craig Tiller190d3602015-02-18 09:23:38 -08001102
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001103 partial void OnConstruction();
1104
1105 public ResponseParameters(ResponseParameters other) : this() {
1106 size_ = other.size_;
1107 intervalUs_ = other.intervalUs_;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001108 }
Craig Tiller190d3602015-02-18 09:23:38 -08001109
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001110 public ResponseParameters Clone() {
1111 return new ResponseParameters(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001112 }
Craig Tiller190d3602015-02-18 09:23:38 -08001113
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001114 /// <summary>Field number for the "size" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001115 public const int SizeFieldNumber = 1;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001116 private int size_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001117 /// <summary>
1118 /// Desired payload sizes in responses from the server.
1119 /// If response_type is COMPRESSABLE, this denotes the size before compression.
1120 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001121 public int Size {
1122 get { return size_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001123 set {
1124 size_ = value;
1125 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001126 }
Craig Tiller190d3602015-02-18 09:23:38 -08001127
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001128 /// <summary>Field number for the "interval_us" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001129 public const int IntervalUsFieldNumber = 2;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001130 private int intervalUs_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001131 /// <summary>
1132 /// Desired interval between consecutive responses in the response stream in
1133 /// microseconds.
1134 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001135 public int IntervalUs {
1136 get { return intervalUs_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001137 set {
1138 intervalUs_ = value;
1139 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001140 }
Craig Tiller190d3602015-02-18 09:23:38 -08001141
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001142 public override bool Equals(object other) {
1143 return Equals(other as ResponseParameters);
1144 }
1145
1146 public bool Equals(ResponseParameters other) {
1147 if (ReferenceEquals(other, null)) {
1148 return false;
1149 }
1150 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001151 return true;
1152 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001153 if (Size != other.Size) return false;
1154 if (IntervalUs != other.IntervalUs) return false;
1155 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001156 }
Craig Tiller190d3602015-02-18 09:23:38 -08001157
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001158 public override int GetHashCode() {
1159 int hash = 1;
1160 if (Size != 0) hash ^= Size.GetHashCode();
1161 if (IntervalUs != 0) hash ^= IntervalUs.GetHashCode();
1162 return hash;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001163 }
Craig Tiller190d3602015-02-18 09:23:38 -08001164
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001165 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001166 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001167 }
Craig Tiller190d3602015-02-18 09:23:38 -08001168
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001169 public void WriteTo(pb::CodedOutputStream output) {
1170 if (Size != 0) {
1171 output.WriteRawTag(8);
1172 output.WriteInt32(Size);
1173 }
1174 if (IntervalUs != 0) {
1175 output.WriteRawTag(16);
1176 output.WriteInt32(IntervalUs);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001177 }
1178 }
Craig Tiller190d3602015-02-18 09:23:38 -08001179
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001180 public int CalculateSize() {
1181 int size = 0;
1182 if (Size != 0) {
1183 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Size);
1184 }
1185 if (IntervalUs != 0) {
1186 size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntervalUs);
1187 }
1188 return size;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001189 }
Craig Tiller190d3602015-02-18 09:23:38 -08001190
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001191 public void MergeFrom(ResponseParameters other) {
1192 if (other == null) {
1193 return;
1194 }
1195 if (other.Size != 0) {
1196 Size = other.Size;
1197 }
1198 if (other.IntervalUs != 0) {
1199 IntervalUs = other.IntervalUs;
1200 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001201 }
Craig Tiller190d3602015-02-18 09:23:38 -08001202
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001203 public void MergeFrom(pb::CodedInputStream input) {
1204 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -07001205 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001206 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001207 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -07001208 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001209 break;
1210 case 8: {
1211 Size = input.ReadInt32();
1212 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001213 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001214 case 16: {
1215 IntervalUs = input.ReadInt32();
1216 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001217 }
1218 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001219 }
1220 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001221
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001222 }
Craig Tiller190d3602015-02-18 09:23:38 -08001223
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001224 /// <summary>
1225 /// Server-streaming request.
1226 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001227 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001228 public sealed partial class StreamingOutputCallRequest : pb::IMessage<StreamingOutputCallRequest> {
1229 private static readonly pb::MessageParser<StreamingOutputCallRequest> _parser = new pb::MessageParser<StreamingOutputCallRequest>(() => new StreamingOutputCallRequest());
1230 public static pb::MessageParser<StreamingOutputCallRequest> Parser { get { return _parser; } }
1231
1232 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001233 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[7]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001234 }
Craig Tiller190d3602015-02-18 09:23:38 -08001235
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001236 pbr::MessageDescriptor pb::IMessage.Descriptor {
1237 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001238 }
Craig Tiller190d3602015-02-18 09:23:38 -08001239
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001240 public StreamingOutputCallRequest() {
1241 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001242 }
Craig Tiller190d3602015-02-18 09:23:38 -08001243
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001244 partial void OnConstruction();
1245
1246 public StreamingOutputCallRequest(StreamingOutputCallRequest other) : this() {
1247 responseType_ = other.responseType_;
1248 responseParameters_ = other.responseParameters_.Clone();
1249 Payload = other.payload_ != null ? other.Payload.Clone() : null;
Jan Tattermusch70f86522015-10-07 18:23:51 -07001250 responseCompression_ = other.responseCompression_;
1251 ResponseStatus = other.responseStatus_ != null ? other.ResponseStatus.Clone() : null;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001252 }
Craig Tiller190d3602015-02-18 09:23:38 -08001253
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001254 public StreamingOutputCallRequest Clone() {
1255 return new StreamingOutputCallRequest(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001256 }
Craig Tiller190d3602015-02-18 09:23:38 -08001257
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001258 /// <summary>Field number for the "response_type" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001259 public const int ResponseTypeFieldNumber = 1;
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001260 private global::Grpc.Testing.PayloadType responseType_ = global::Grpc.Testing.PayloadType.COMPRESSABLE;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001261 /// <summary>
1262 /// Desired payload type in the response from the server.
1263 /// If response_type is RANDOM, the payload from each response in the stream
1264 /// might be of different types. This is to simulate a mixed type of payload
1265 /// stream.
1266 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001267 public global::Grpc.Testing.PayloadType ResponseType {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001268 get { return responseType_; }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001269 set {
1270 responseType_ = value;
1271 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001272 }
Craig Tiller190d3602015-02-18 09:23:38 -08001273
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001274 /// <summary>Field number for the "response_parameters" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001275 public const int ResponseParametersFieldNumber = 2;
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001276 private static readonly pb::FieldCodec<global::Grpc.Testing.ResponseParameters> _repeated_responseParameters_codec
1277 = pb::FieldCodec.ForMessage(18, global::Grpc.Testing.ResponseParameters.Parser);
1278 private readonly pbc::RepeatedField<global::Grpc.Testing.ResponseParameters> responseParameters_ = new pbc::RepeatedField<global::Grpc.Testing.ResponseParameters>();
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001279 /// <summary>
1280 /// Configuration for each expected response message.
1281 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001282 public pbc::RepeatedField<global::Grpc.Testing.ResponseParameters> ResponseParameters {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001283 get { return responseParameters_; }
1284 }
Craig Tiller190d3602015-02-18 09:23:38 -08001285
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001286 /// <summary>Field number for the "payload" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001287 public const int PayloadFieldNumber = 3;
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001288 private global::Grpc.Testing.Payload payload_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001289 /// <summary>
1290 /// Optional input payload sent along with the request.
1291 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001292 public global::Grpc.Testing.Payload Payload {
1293 get { return payload_; }
1294 set {
1295 payload_ = value;
1296 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001297 }
Craig Tiller190d3602015-02-18 09:23:38 -08001298
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001299 /// <summary>Field number for the "response_compression" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001300 public const int ResponseCompressionFieldNumber = 6;
1301 private global::Grpc.Testing.CompressionType responseCompression_ = global::Grpc.Testing.CompressionType.NONE;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001302 /// <summary>
1303 /// Compression algorithm to be used by the server for the response (stream)
1304 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001305 public global::Grpc.Testing.CompressionType ResponseCompression {
1306 get { return responseCompression_; }
1307 set {
1308 responseCompression_ = value;
1309 }
1310 }
1311
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001312 /// <summary>Field number for the "response_status" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001313 public const int ResponseStatusFieldNumber = 7;
1314 private global::Grpc.Testing.EchoStatus responseStatus_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001315 /// <summary>
1316 /// Whether server should return a given status
1317 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001318 public global::Grpc.Testing.EchoStatus ResponseStatus {
1319 get { return responseStatus_; }
1320 set {
1321 responseStatus_ = value;
1322 }
1323 }
1324
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001325 public override bool Equals(object other) {
1326 return Equals(other as StreamingOutputCallRequest);
1327 }
1328
1329 public bool Equals(StreamingOutputCallRequest other) {
1330 if (ReferenceEquals(other, null)) {
1331 return false;
1332 }
1333 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001334 return true;
1335 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001336 if (ResponseType != other.ResponseType) return false;
1337 if(!responseParameters_.Equals(other.responseParameters_)) return false;
1338 if (!object.Equals(Payload, other.Payload)) return false;
Jan Tattermusch70f86522015-10-07 18:23:51 -07001339 if (ResponseCompression != other.ResponseCompression) return false;
1340 if (!object.Equals(ResponseStatus, other.ResponseStatus)) return false;
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001341 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001342 }
Craig Tiller190d3602015-02-18 09:23:38 -08001343
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001344 public override int GetHashCode() {
1345 int hash = 1;
1346 if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) hash ^= ResponseType.GetHashCode();
1347 hash ^= responseParameters_.GetHashCode();
1348 if (payload_ != null) hash ^= Payload.GetHashCode();
Jan Tattermusch70f86522015-10-07 18:23:51 -07001349 if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) hash ^= ResponseCompression.GetHashCode();
1350 if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode();
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001351 return hash;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001352 }
Craig Tiller190d3602015-02-18 09:23:38 -08001353
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001354 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001355 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001356 }
Craig Tiller190d3602015-02-18 09:23:38 -08001357
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001358 public void WriteTo(pb::CodedOutputStream output) {
1359 if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
1360 output.WriteRawTag(8);
1361 output.WriteEnum((int) ResponseType);
1362 }
1363 responseParameters_.WriteTo(output, _repeated_responseParameters_codec);
1364 if (payload_ != null) {
1365 output.WriteRawTag(26);
1366 output.WriteMessage(Payload);
1367 }
Jan Tattermusch70f86522015-10-07 18:23:51 -07001368 if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) {
1369 output.WriteRawTag(48);
1370 output.WriteEnum((int) ResponseCompression);
1371 }
1372 if (responseStatus_ != null) {
1373 output.WriteRawTag(58);
1374 output.WriteMessage(ResponseStatus);
1375 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001376 }
1377
1378 public int CalculateSize() {
1379 int size = 0;
1380 if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
1381 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseType);
1382 }
1383 size += responseParameters_.CalculateSize(_repeated_responseParameters_codec);
1384 if (payload_ != null) {
1385 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
1386 }
Jan Tattermusch70f86522015-10-07 18:23:51 -07001387 if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) {
1388 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression);
1389 }
1390 if (responseStatus_ != null) {
1391 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResponseStatus);
1392 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001393 return size;
1394 }
1395
1396 public void MergeFrom(StreamingOutputCallRequest other) {
1397 if (other == null) {
1398 return;
1399 }
1400 if (other.ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) {
1401 ResponseType = other.ResponseType;
1402 }
1403 responseParameters_.Add(other.responseParameters_);
1404 if (other.payload_ != null) {
1405 if (payload_ == null) {
1406 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001407 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001408 Payload.MergeFrom(other.Payload);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001409 }
Jan Tattermusch70f86522015-10-07 18:23:51 -07001410 if (other.ResponseCompression != global::Grpc.Testing.CompressionType.NONE) {
1411 ResponseCompression = other.ResponseCompression;
1412 }
1413 if (other.responseStatus_ != null) {
1414 if (responseStatus_ == null) {
1415 responseStatus_ = new global::Grpc.Testing.EchoStatus();
1416 }
1417 ResponseStatus.MergeFrom(other.ResponseStatus);
1418 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001419 }
Craig Tiller190d3602015-02-18 09:23:38 -08001420
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001421 public void MergeFrom(pb::CodedInputStream input) {
1422 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -07001423 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001424 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001425 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -07001426 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001427 break;
1428 case 8: {
1429 responseType_ = (global::Grpc.Testing.PayloadType) input.ReadEnum();
1430 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001431 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001432 case 18: {
1433 responseParameters_.AddEntriesFrom(input, _repeated_responseParameters_codec);
1434 break;
1435 }
1436 case 26: {
1437 if (payload_ == null) {
1438 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001439 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001440 input.ReadMessage(payload_);
1441 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001442 }
Jan Tattermusch70f86522015-10-07 18:23:51 -07001443 case 48: {
1444 responseCompression_ = (global::Grpc.Testing.CompressionType) input.ReadEnum();
1445 break;
1446 }
1447 case 58: {
1448 if (responseStatus_ == null) {
1449 responseStatus_ = new global::Grpc.Testing.EchoStatus();
1450 }
1451 input.ReadMessage(responseStatus_);
1452 break;
1453 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001454 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001455 }
1456 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001457
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001458 }
Craig Tiller190d3602015-02-18 09:23:38 -08001459
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001460 /// <summary>
1461 /// Server-streaming response, as configured by the request and parameters.
1462 /// </summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001463 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001464 public sealed partial class StreamingOutputCallResponse : pb::IMessage<StreamingOutputCallResponse> {
1465 private static readonly pb::MessageParser<StreamingOutputCallResponse> _parser = new pb::MessageParser<StreamingOutputCallResponse>(() => new StreamingOutputCallResponse());
1466 public static pb::MessageParser<StreamingOutputCallResponse> Parser { get { return _parser; } }
1467
1468 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001469 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[8]; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001470 }
Craig Tiller190d3602015-02-18 09:23:38 -08001471
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001472 pbr::MessageDescriptor pb::IMessage.Descriptor {
1473 get { return Descriptor; }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001474 }
Craig Tiller190d3602015-02-18 09:23:38 -08001475
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001476 public StreamingOutputCallResponse() {
1477 OnConstruction();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001478 }
Craig Tiller190d3602015-02-18 09:23:38 -08001479
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001480 partial void OnConstruction();
1481
1482 public StreamingOutputCallResponse(StreamingOutputCallResponse other) : this() {
1483 Payload = other.payload_ != null ? other.Payload.Clone() : null;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001484 }
Craig Tiller190d3602015-02-18 09:23:38 -08001485
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001486 public StreamingOutputCallResponse Clone() {
1487 return new StreamingOutputCallResponse(this);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001488 }
Craig Tiller190d3602015-02-18 09:23:38 -08001489
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001490 /// <summary>Field number for the "payload" field.</summary>
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001491 public const int PayloadFieldNumber = 1;
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001492 private global::Grpc.Testing.Payload payload_;
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001493 /// <summary>
1494 /// Payload to increase response size.
1495 /// </summary>
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001496 public global::Grpc.Testing.Payload Payload {
1497 get { return payload_; }
1498 set {
1499 payload_ = value;
1500 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001501 }
Craig Tiller190d3602015-02-18 09:23:38 -08001502
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001503 public override bool Equals(object other) {
1504 return Equals(other as StreamingOutputCallResponse);
1505 }
1506
1507 public bool Equals(StreamingOutputCallResponse other) {
1508 if (ReferenceEquals(other, null)) {
1509 return false;
1510 }
1511 if (ReferenceEquals(other, this)) {
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001512 return true;
1513 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001514 if (!object.Equals(Payload, other.Payload)) return false;
1515 return true;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001516 }
Craig Tiller190d3602015-02-18 09:23:38 -08001517
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001518 public override int GetHashCode() {
1519 int hash = 1;
1520 if (payload_ != null) hash ^= Payload.GetHashCode();
1521 return hash;
1522 }
1523
1524 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001525 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001526 }
1527
1528 public void WriteTo(pb::CodedOutputStream output) {
1529 if (payload_ != null) {
1530 output.WriteRawTag(10);
1531 output.WriteMessage(Payload);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001532 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001533 }
Craig Tiller190d3602015-02-18 09:23:38 -08001534
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001535 public int CalculateSize() {
1536 int size = 0;
1537 if (payload_ != null) {
1538 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
1539 }
1540 return size;
1541 }
Craig Tiller190d3602015-02-18 09:23:38 -08001542
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001543 public void MergeFrom(StreamingOutputCallResponse other) {
1544 if (other == null) {
1545 return;
1546 }
1547 if (other.payload_ != null) {
1548 if (payload_ == null) {
1549 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001550 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001551 Payload.MergeFrom(other.Payload);
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001552 }
1553 }
Craig Tiller190d3602015-02-18 09:23:38 -08001554
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001555 public void MergeFrom(pb::CodedInputStream input) {
1556 uint tag;
Jan Tattermusch38536a72015-08-08 00:45:52 -07001557 while ((tag = input.ReadTag()) != 0) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001558 switch(tag) {
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001559 default:
Jan Tattermusch38536a72015-08-08 00:45:52 -07001560 input.SkipLastField();
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001561 break;
1562 case 10: {
1563 if (payload_ == null) {
1564 payload_ = new global::Grpc.Testing.Payload();
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001565 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001566 input.ReadMessage(payload_);
1567 break;
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001568 }
1569 }
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001570 }
1571 }
Jan Tattermusch475f75a2015-08-03 09:46:04 -07001572
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001573 }
Craig Tiller190d3602015-02-18 09:23:38 -08001574
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001575 /// <summary>
1576 /// For reconnect interop test only.
1577 /// Server tells client whether its reconnects are following the spec and the
1578 /// reconnect backoffs it saw.
1579 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001580 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1581 public sealed partial class ReconnectInfo : pb::IMessage<ReconnectInfo> {
1582 private static readonly pb::MessageParser<ReconnectInfo> _parser = new pb::MessageParser<ReconnectInfo>(() => new ReconnectInfo());
1583 public static pb::MessageParser<ReconnectInfo> Parser { get { return _parser; } }
1584
1585 public static pbr::MessageDescriptor Descriptor {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001586 get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -07001587 }
1588
1589 pbr::MessageDescriptor pb::IMessage.Descriptor {
1590 get { return Descriptor; }
1591 }
1592
1593 public ReconnectInfo() {
1594 OnConstruction();
1595 }
1596
1597 partial void OnConstruction();
1598
1599 public ReconnectInfo(ReconnectInfo other) : this() {
1600 passed_ = other.passed_;
1601 backoffMs_ = other.backoffMs_.Clone();
1602 }
1603
1604 public ReconnectInfo Clone() {
1605 return new ReconnectInfo(this);
1606 }
1607
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001608 /// <summary>Field number for the "passed" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001609 public const int PassedFieldNumber = 1;
1610 private bool passed_;
1611 public bool Passed {
1612 get { return passed_; }
1613 set {
1614 passed_ = value;
1615 }
1616 }
1617
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001618 /// <summary>Field number for the "backoff_ms" field.</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -07001619 public const int BackoffMsFieldNumber = 2;
1620 private static readonly pb::FieldCodec<int> _repeated_backoffMs_codec
1621 = pb::FieldCodec.ForInt32(18);
1622 private readonly pbc::RepeatedField<int> backoffMs_ = new pbc::RepeatedField<int>();
1623 public pbc::RepeatedField<int> BackoffMs {
1624 get { return backoffMs_; }
1625 }
1626
1627 public override bool Equals(object other) {
1628 return Equals(other as ReconnectInfo);
1629 }
1630
1631 public bool Equals(ReconnectInfo other) {
1632 if (ReferenceEquals(other, null)) {
1633 return false;
1634 }
1635 if (ReferenceEquals(other, this)) {
1636 return true;
1637 }
1638 if (Passed != other.Passed) return false;
1639 if(!backoffMs_.Equals(other.backoffMs_)) return false;
1640 return true;
1641 }
1642
1643 public override int GetHashCode() {
1644 int hash = 1;
1645 if (Passed != false) hash ^= Passed.GetHashCode();
1646 hash ^= backoffMs_.GetHashCode();
1647 return hash;
1648 }
1649
1650 public override string ToString() {
Jan Tattermusch72ce4422016-01-20 13:54:38 -08001651 return pb::JsonFormatter.ToDiagnosticString(this);
Jan Tattermusch70f86522015-10-07 18:23:51 -07001652 }
1653
1654 public void WriteTo(pb::CodedOutputStream output) {
1655 if (Passed != false) {
1656 output.WriteRawTag(8);
1657 output.WriteBool(Passed);
1658 }
1659 backoffMs_.WriteTo(output, _repeated_backoffMs_codec);
1660 }
1661
1662 public int CalculateSize() {
1663 int size = 0;
1664 if (Passed != false) {
1665 size += 1 + 1;
1666 }
1667 size += backoffMs_.CalculateSize(_repeated_backoffMs_codec);
1668 return size;
1669 }
1670
1671 public void MergeFrom(ReconnectInfo other) {
1672 if (other == null) {
1673 return;
1674 }
1675 if (other.Passed != false) {
1676 Passed = other.Passed;
1677 }
1678 backoffMs_.Add(other.backoffMs_);
1679 }
1680
1681 public void MergeFrom(pb::CodedInputStream input) {
1682 uint tag;
1683 while ((tag = input.ReadTag()) != 0) {
1684 switch(tag) {
1685 default:
1686 input.SkipLastField();
1687 break;
1688 case 8: {
1689 Passed = input.ReadBool();
1690 break;
1691 }
1692 case 18:
1693 case 16: {
1694 backoffMs_.AddEntriesFrom(input, _repeated_backoffMs_codec);
1695 break;
1696 }
1697 }
1698 }
1699 }
1700
1701 }
1702
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001703 #endregion
Craig Tiller190d3602015-02-18 09:23:38 -08001704
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001705}
Jan Tattermuscha7608b02015-02-03 17:54:38 -08001706
Jan Tattermuscha4b63bf2015-02-06 10:07:59 -08001707#endregion Designer generated code