Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/grpc/src/csharp/Grpc.HealthCheck/Health.cs

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: health.proto
3 #pragma warning disable 1591, 0612, 3021
4 #region Designer generated code
5
6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic;
10 namespace Grpc.Health.V1 {
11
12 /// <summary>Holder for reflection information generated from health.proto</su mmary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class HealthReflection {
15
16 #region Descriptor
17 /// <summary>File descriptor for health.proto</summary>
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
20 }
21 private static pbr::FileDescriptor descriptor;
22
23 static HealthReflection() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "CgxoZWFsdGgucHJvdG8SDmdycGMuaGVhbHRoLnYxIiUKEkhlYWx0aENoZWNr",
27 "UmVxdWVzdBIPCgdzZXJ2aWNlGAEgASgJIpQBChNIZWFsdGhDaGVja1Jlc3Bv",
28 "bnNlEkEKBnN0YXR1cxgBIAEoDjIxLmdycGMuaGVhbHRoLnYxLkhlYWx0aENo",
29 "ZWNrUmVzcG9uc2UuU2VydmluZ1N0YXR1cyI6Cg1TZXJ2aW5nU3RhdHVzEgsK",
30 "B1VOS05PV04QABILCgdTRVJWSU5HEAESDwoLTk9UX1NFUlZJTkcQAjJaCgZI",
31 "ZWFsdGgSUAoFQ2hlY2sSIi5ncnBjLmhlYWx0aC52MS5IZWFsdGhDaGVja1Jl",
32 "cXVlc3QaIy5ncnBjLmhlYWx0aC52MS5IZWFsdGhDaGVja1Jlc3BvbnNlQhGq",
33 "Ag5HcnBjLkhlYWx0aC5WMWIGcHJvdG8z"));
34 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
35 new pbr::FileDescriptor[] { },
36 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
37 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1.HealthCheck Request), global::Grpc.Health.V1.HealthCheckRequest.Parser, new[]{ "Service" }, null, null, null),
38 new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1.HealthCheck Response), global::Grpc.Health.V1.HealthCheckResponse.Parser, new[]{ "Status" }, null, new[]{ typeof(global::Grpc.Health.V1.HealthCheckResponse.Types.ServingSta tus) }, null)
39 }));
40 }
41 #endregion
42
43 }
44 #region Messages
45 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
46 public sealed partial class HealthCheckRequest : pb::IMessage<HealthCheckReque st> {
47 private static readonly pb::MessageParser<HealthCheckRequest> _parser = new pb::MessageParser<HealthCheckRequest>(() => new HealthCheckRequest());
48 public static pb::MessageParser<HealthCheckRequest> Parser { get { return _p arser; } }
49
50 public static pbr::MessageDescriptor Descriptor {
51 get { return global::Grpc.Health.V1.HealthReflection.Descriptor.MessageTyp es[0]; }
52 }
53
54 pbr::MessageDescriptor pb::IMessage.Descriptor {
55 get { return Descriptor; }
56 }
57
58 public HealthCheckRequest() {
59 OnConstruction();
60 }
61
62 partial void OnConstruction();
63
64 public HealthCheckRequest(HealthCheckRequest other) : this() {
65 service_ = other.service_;
66 }
67
68 public HealthCheckRequest Clone() {
69 return new HealthCheckRequest(this);
70 }
71
72 /// <summary>Field number for the "service" field.</summary>
73 public const int ServiceFieldNumber = 1;
74 private string service_ = "";
75 public string Service {
76 get { return service_; }
77 set {
78 service_ = pb::Preconditions.CheckNotNull(value, "value");
79 }
80 }
81
82 public override bool Equals(object other) {
83 return Equals(other as HealthCheckRequest);
84 }
85
86 public bool Equals(HealthCheckRequest other) {
87 if (ReferenceEquals(other, null)) {
88 return false;
89 }
90 if (ReferenceEquals(other, this)) {
91 return true;
92 }
93 if (Service != other.Service) return false;
94 return true;
95 }
96
97 public override int GetHashCode() {
98 int hash = 1;
99 if (Service.Length != 0) hash ^= Service.GetHashCode();
100 return hash;
101 }
102
103 public override string ToString() {
104 return pb::JsonFormatter.ToDiagnosticString(this);
105 }
106
107 public void WriteTo(pb::CodedOutputStream output) {
108 if (Service.Length != 0) {
109 output.WriteRawTag(10);
110 output.WriteString(Service);
111 }
112 }
113
114 public int CalculateSize() {
115 int size = 0;
116 if (Service.Length != 0) {
117 size += 1 + pb::CodedOutputStream.ComputeStringSize(Service);
118 }
119 return size;
120 }
121
122 public void MergeFrom(HealthCheckRequest other) {
123 if (other == null) {
124 return;
125 }
126 if (other.Service.Length != 0) {
127 Service = other.Service;
128 }
129 }
130
131 public void MergeFrom(pb::CodedInputStream input) {
132 uint tag;
133 while ((tag = input.ReadTag()) != 0) {
134 switch(tag) {
135 default:
136 input.SkipLastField();
137 break;
138 case 10: {
139 Service = input.ReadString();
140 break;
141 }
142 }
143 }
144 }
145
146 }
147
148 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
149 public sealed partial class HealthCheckResponse : pb::IMessage<HealthCheckResp onse> {
150 private static readonly pb::MessageParser<HealthCheckResponse> _parser = new pb::MessageParser<HealthCheckResponse>(() => new HealthCheckResponse());
151 public static pb::MessageParser<HealthCheckResponse> Parser { get { return _ parser; } }
152
153 public static pbr::MessageDescriptor Descriptor {
154 get { return global::Grpc.Health.V1.HealthReflection.Descriptor.MessageTyp es[1]; }
155 }
156
157 pbr::MessageDescriptor pb::IMessage.Descriptor {
158 get { return Descriptor; }
159 }
160
161 public HealthCheckResponse() {
162 OnConstruction();
163 }
164
165 partial void OnConstruction();
166
167 public HealthCheckResponse(HealthCheckResponse other) : this() {
168 status_ = other.status_;
169 }
170
171 public HealthCheckResponse Clone() {
172 return new HealthCheckResponse(this);
173 }
174
175 /// <summary>Field number for the "status" field.</summary>
176 public const int StatusFieldNumber = 1;
177 private global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus statu s_ = global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN;
178 public global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus Status {
179 get { return status_; }
180 set {
181 status_ = value;
182 }
183 }
184
185 public override bool Equals(object other) {
186 return Equals(other as HealthCheckResponse);
187 }
188
189 public bool Equals(HealthCheckResponse other) {
190 if (ReferenceEquals(other, null)) {
191 return false;
192 }
193 if (ReferenceEquals(other, this)) {
194 return true;
195 }
196 if (Status != other.Status) return false;
197 return true;
198 }
199
200 public override int GetHashCode() {
201 int hash = 1;
202 if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStat us.UNKNOWN) hash ^= Status.GetHashCode();
203 return hash;
204 }
205
206 public override string ToString() {
207 return pb::JsonFormatter.ToDiagnosticString(this);
208 }
209
210 public void WriteTo(pb::CodedOutputStream output) {
211 if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStat us.UNKNOWN) {
212 output.WriteRawTag(8);
213 output.WriteEnum((int) Status);
214 }
215 }
216
217 public int CalculateSize() {
218 int size = 0;
219 if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStat us.UNKNOWN) {
220 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
221 }
222 return size;
223 }
224
225 public void MergeFrom(HealthCheckResponse other) {
226 if (other == null) {
227 return;
228 }
229 if (other.Status != global::Grpc.Health.V1.HealthCheckResponse.Types.Servi ngStatus.UNKNOWN) {
230 Status = other.Status;
231 }
232 }
233
234 public void MergeFrom(pb::CodedInputStream input) {
235 uint tag;
236 while ((tag = input.ReadTag()) != 0) {
237 switch(tag) {
238 default:
239 input.SkipLastField();
240 break;
241 case 8: {
242 status_ = (global::Grpc.Health.V1.HealthCheckResponse.Types.ServingS tatus) input.ReadEnum();
243 break;
244 }
245 }
246 }
247 }
248
249 #region Nested types
250 /// <summary>Container for nested types declared in the HealthCheckResponse message type.</summary>
251 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
252 public static partial class Types {
253 public enum ServingStatus {
254 UNKNOWN = 0,
255 SERVING = 1,
256 NOT_SERVING = 2,
257 }
258
259 }
260 #endregion
261
262 }
263
264 #endregion
265
266 }
267
268 #endregion Designer generated code
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698