murgatroid99 | 611bfc2 | 2016-07-06 09:25:47 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @fileoverview |
| 3 | * @enhanceable |
| 4 | * @public |
| 5 | */ |
| 6 | // GENERATED CODE -- DO NOT EDIT! |
| 7 | |
| 8 | var jspb = require('google-protobuf'); |
| 9 | var goog = jspb; |
| 10 | var global = Function('return this')(); |
| 11 | |
| 12 | goog.exportSymbol('proto.grpc.health.v1.HealthCheckRequest', null, global); |
| 13 | goog.exportSymbol('proto.grpc.health.v1.HealthCheckResponse', null, global); |
| 14 | goog.exportSymbol('proto.grpc.health.v1.HealthCheckResponse.ServingStatus', null, global); |
| 15 | |
| 16 | /** |
| 17 | * Generated by JsPbCodeGenerator. |
| 18 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 19 | * server response, or constructed directly in Javascript. The array is used |
| 20 | * in place and becomes part of the constructed object. It is not cloned. |
| 21 | * If no data is provided, the constructed object will be empty, but still |
| 22 | * valid. |
| 23 | * @extends {jspb.Message} |
| 24 | * @constructor |
| 25 | */ |
| 26 | proto.grpc.health.v1.HealthCheckRequest = function(opt_data) { |
| 27 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 28 | }; |
| 29 | goog.inherits(proto.grpc.health.v1.HealthCheckRequest, jspb.Message); |
| 30 | if (goog.DEBUG && !COMPILED) { |
| 31 | proto.grpc.health.v1.HealthCheckRequest.displayName = 'proto.grpc.health.v1.HealthCheckRequest'; |
| 32 | } |
| 33 | |
| 34 | |
| 35 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 36 | /** |
| 37 | * Creates an object representation of this proto suitable for use in Soy templates. |
| 38 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 39 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 40 | * For the list of reserved names please see: |
| 41 | * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. |
| 42 | * @param {boolean=} opt_includeInstance Whether to include the JSPB instance |
| 43 | * for transitional soy proto support: http://goto/soy-param-migration |
| 44 | * @return {!Object} |
| 45 | */ |
| 46 | proto.grpc.health.v1.HealthCheckRequest.prototype.toObject = function(opt_includeInstance) { |
| 47 | return proto.grpc.health.v1.HealthCheckRequest.toObject(opt_includeInstance, this); |
| 48 | }; |
| 49 | |
| 50 | |
| 51 | /** |
| 52 | * Static version of the {@see toObject} method. |
| 53 | * @param {boolean|undefined} includeInstance Whether to include the JSPB |
| 54 | * instance for transitional soy proto support: |
| 55 | * http://goto/soy-param-migration |
| 56 | * @param {!proto.grpc.health.v1.HealthCheckRequest} msg The msg instance to transform. |
| 57 | * @return {!Object} |
| 58 | */ |
| 59 | proto.grpc.health.v1.HealthCheckRequest.toObject = function(includeInstance, msg) { |
| 60 | var f, obj = { |
| 61 | service: msg.getService() |
| 62 | }; |
| 63 | |
| 64 | if (includeInstance) { |
| 65 | obj.$jspbMessageInstance = msg; |
| 66 | } |
| 67 | return obj; |
| 68 | }; |
| 69 | } |
| 70 | |
| 71 | |
| 72 | /** |
| 73 | * Deserializes binary data (in protobuf wire format). |
| 74 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 75 | * @return {!proto.grpc.health.v1.HealthCheckRequest} |
| 76 | */ |
| 77 | proto.grpc.health.v1.HealthCheckRequest.deserializeBinary = function(bytes) { |
| 78 | var reader = new jspb.BinaryReader(bytes); |
| 79 | var msg = new proto.grpc.health.v1.HealthCheckRequest; |
| 80 | return proto.grpc.health.v1.HealthCheckRequest.deserializeBinaryFromReader(msg, reader); |
| 81 | }; |
| 82 | |
| 83 | |
| 84 | /** |
| 85 | * Deserializes binary data (in protobuf wire format) from the |
| 86 | * given reader into the given message object. |
| 87 | * @param {!proto.grpc.health.v1.HealthCheckRequest} msg The message object to deserialize into. |
| 88 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 89 | * @return {!proto.grpc.health.v1.HealthCheckRequest} |
| 90 | */ |
| 91 | proto.grpc.health.v1.HealthCheckRequest.deserializeBinaryFromReader = function(msg, reader) { |
| 92 | while (reader.nextField()) { |
| 93 | if (reader.isEndGroup()) { |
| 94 | break; |
| 95 | } |
| 96 | var field = reader.getFieldNumber(); |
| 97 | switch (field) { |
| 98 | case 1: |
| 99 | var value = /** @type {string} */ (reader.readString()); |
| 100 | msg.setService(value); |
| 101 | break; |
| 102 | default: |
| 103 | reader.skipField(); |
| 104 | break; |
| 105 | } |
| 106 | } |
| 107 | return msg; |
| 108 | }; |
| 109 | |
| 110 | |
| 111 | /** |
| 112 | * Class method variant: serializes the given message to binary data |
| 113 | * (in protobuf wire format), writing to the given BinaryWriter. |
| 114 | * @param {!proto.grpc.health.v1.HealthCheckRequest} message |
| 115 | * @param {!jspb.BinaryWriter} writer |
| 116 | */ |
| 117 | proto.grpc.health.v1.HealthCheckRequest.serializeBinaryToWriter = function(message, writer) { |
| 118 | message.serializeBinaryToWriter(writer); |
| 119 | }; |
| 120 | |
| 121 | |
| 122 | /** |
| 123 | * Serializes the message to binary data (in protobuf wire format). |
| 124 | * @return {!Uint8Array} |
| 125 | */ |
| 126 | proto.grpc.health.v1.HealthCheckRequest.prototype.serializeBinary = function() { |
| 127 | var writer = new jspb.BinaryWriter(); |
| 128 | this.serializeBinaryToWriter(writer); |
| 129 | return writer.getResultBuffer(); |
| 130 | }; |
| 131 | |
| 132 | |
| 133 | /** |
| 134 | * Serializes the message to binary data (in protobuf wire format), |
| 135 | * writing to the given BinaryWriter. |
| 136 | * @param {!jspb.BinaryWriter} writer |
| 137 | */ |
| 138 | proto.grpc.health.v1.HealthCheckRequest.prototype.serializeBinaryToWriter = function (writer) { |
| 139 | var f = undefined; |
| 140 | f = this.getService(); |
| 141 | if (f.length > 0) { |
| 142 | writer.writeString( |
| 143 | 1, |
| 144 | f |
| 145 | ); |
| 146 | } |
| 147 | }; |
| 148 | |
| 149 | |
| 150 | /** |
| 151 | * Creates a deep clone of this proto. No data is shared with the original. |
| 152 | * @return {!proto.grpc.health.v1.HealthCheckRequest} The clone. |
| 153 | */ |
| 154 | proto.grpc.health.v1.HealthCheckRequest.prototype.cloneMessage = function() { |
| 155 | return /** @type {!proto.grpc.health.v1.HealthCheckRequest} */ (jspb.Message.cloneMessage(this)); |
| 156 | }; |
| 157 | |
| 158 | |
| 159 | /** |
| 160 | * optional string service = 1; |
| 161 | * @return {string} |
| 162 | */ |
| 163 | proto.grpc.health.v1.HealthCheckRequest.prototype.getService = function() { |
| 164 | return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); |
| 165 | }; |
| 166 | |
| 167 | |
| 168 | /** @param {string} value */ |
| 169 | proto.grpc.health.v1.HealthCheckRequest.prototype.setService = function(value) { |
| 170 | jspb.Message.setField(this, 1, value); |
| 171 | }; |
| 172 | |
| 173 | |
| 174 | |
| 175 | /** |
| 176 | * Generated by JsPbCodeGenerator. |
| 177 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 178 | * server response, or constructed directly in Javascript. The array is used |
| 179 | * in place and becomes part of the constructed object. It is not cloned. |
| 180 | * If no data is provided, the constructed object will be empty, but still |
| 181 | * valid. |
| 182 | * @extends {jspb.Message} |
| 183 | * @constructor |
| 184 | */ |
| 185 | proto.grpc.health.v1.HealthCheckResponse = function(opt_data) { |
| 186 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 187 | }; |
| 188 | goog.inherits(proto.grpc.health.v1.HealthCheckResponse, jspb.Message); |
| 189 | if (goog.DEBUG && !COMPILED) { |
| 190 | proto.grpc.health.v1.HealthCheckResponse.displayName = 'proto.grpc.health.v1.HealthCheckResponse'; |
| 191 | } |
| 192 | |
| 193 | |
| 194 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 195 | /** |
| 196 | * Creates an object representation of this proto suitable for use in Soy templates. |
| 197 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 198 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 199 | * For the list of reserved names please see: |
| 200 | * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. |
| 201 | * @param {boolean=} opt_includeInstance Whether to include the JSPB instance |
| 202 | * for transitional soy proto support: http://goto/soy-param-migration |
| 203 | * @return {!Object} |
| 204 | */ |
| 205 | proto.grpc.health.v1.HealthCheckResponse.prototype.toObject = function(opt_includeInstance) { |
| 206 | return proto.grpc.health.v1.HealthCheckResponse.toObject(opt_includeInstance, this); |
| 207 | }; |
| 208 | |
| 209 | |
| 210 | /** |
| 211 | * Static version of the {@see toObject} method. |
| 212 | * @param {boolean|undefined} includeInstance Whether to include the JSPB |
| 213 | * instance for transitional soy proto support: |
| 214 | * http://goto/soy-param-migration |
| 215 | * @param {!proto.grpc.health.v1.HealthCheckResponse} msg The msg instance to transform. |
| 216 | * @return {!Object} |
| 217 | */ |
| 218 | proto.grpc.health.v1.HealthCheckResponse.toObject = function(includeInstance, msg) { |
| 219 | var f, obj = { |
| 220 | status: msg.getStatus() |
| 221 | }; |
| 222 | |
| 223 | if (includeInstance) { |
| 224 | obj.$jspbMessageInstance = msg; |
| 225 | } |
| 226 | return obj; |
| 227 | }; |
| 228 | } |
| 229 | |
| 230 | |
| 231 | /** |
| 232 | * Deserializes binary data (in protobuf wire format). |
| 233 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 234 | * @return {!proto.grpc.health.v1.HealthCheckResponse} |
| 235 | */ |
| 236 | proto.grpc.health.v1.HealthCheckResponse.deserializeBinary = function(bytes) { |
| 237 | var reader = new jspb.BinaryReader(bytes); |
| 238 | var msg = new proto.grpc.health.v1.HealthCheckResponse; |
| 239 | return proto.grpc.health.v1.HealthCheckResponse.deserializeBinaryFromReader(msg, reader); |
| 240 | }; |
| 241 | |
| 242 | |
| 243 | /** |
| 244 | * Deserializes binary data (in protobuf wire format) from the |
| 245 | * given reader into the given message object. |
| 246 | * @param {!proto.grpc.health.v1.HealthCheckResponse} msg The message object to deserialize into. |
| 247 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 248 | * @return {!proto.grpc.health.v1.HealthCheckResponse} |
| 249 | */ |
| 250 | proto.grpc.health.v1.HealthCheckResponse.deserializeBinaryFromReader = function(msg, reader) { |
| 251 | while (reader.nextField()) { |
| 252 | if (reader.isEndGroup()) { |
| 253 | break; |
| 254 | } |
| 255 | var field = reader.getFieldNumber(); |
| 256 | switch (field) { |
| 257 | case 1: |
| 258 | var value = /** @type {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} */ (reader.readEnum()); |
| 259 | msg.setStatus(value); |
| 260 | break; |
| 261 | default: |
| 262 | reader.skipField(); |
| 263 | break; |
| 264 | } |
| 265 | } |
| 266 | return msg; |
| 267 | }; |
| 268 | |
| 269 | |
| 270 | /** |
| 271 | * Class method variant: serializes the given message to binary data |
| 272 | * (in protobuf wire format), writing to the given BinaryWriter. |
| 273 | * @param {!proto.grpc.health.v1.HealthCheckResponse} message |
| 274 | * @param {!jspb.BinaryWriter} writer |
| 275 | */ |
| 276 | proto.grpc.health.v1.HealthCheckResponse.serializeBinaryToWriter = function(message, writer) { |
| 277 | message.serializeBinaryToWriter(writer); |
| 278 | }; |
| 279 | |
| 280 | |
| 281 | /** |
| 282 | * Serializes the message to binary data (in protobuf wire format). |
| 283 | * @return {!Uint8Array} |
| 284 | */ |
| 285 | proto.grpc.health.v1.HealthCheckResponse.prototype.serializeBinary = function() { |
| 286 | var writer = new jspb.BinaryWriter(); |
| 287 | this.serializeBinaryToWriter(writer); |
| 288 | return writer.getResultBuffer(); |
| 289 | }; |
| 290 | |
| 291 | |
| 292 | /** |
| 293 | * Serializes the message to binary data (in protobuf wire format), |
| 294 | * writing to the given BinaryWriter. |
| 295 | * @param {!jspb.BinaryWriter} writer |
| 296 | */ |
| 297 | proto.grpc.health.v1.HealthCheckResponse.prototype.serializeBinaryToWriter = function (writer) { |
| 298 | var f = undefined; |
| 299 | f = this.getStatus(); |
| 300 | if (f !== 0.0) { |
| 301 | writer.writeEnum( |
| 302 | 1, |
| 303 | f |
| 304 | ); |
| 305 | } |
| 306 | }; |
| 307 | |
| 308 | |
| 309 | /** |
| 310 | * Creates a deep clone of this proto. No data is shared with the original. |
| 311 | * @return {!proto.grpc.health.v1.HealthCheckResponse} The clone. |
| 312 | */ |
| 313 | proto.grpc.health.v1.HealthCheckResponse.prototype.cloneMessage = function() { |
| 314 | return /** @type {!proto.grpc.health.v1.HealthCheckResponse} */ (jspb.Message.cloneMessage(this)); |
| 315 | }; |
| 316 | |
| 317 | |
| 318 | /** |
| 319 | * optional ServingStatus status = 1; |
| 320 | * @return {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} |
| 321 | */ |
| 322 | proto.grpc.health.v1.HealthCheckResponse.prototype.getStatus = function() { |
| 323 | return /** @type {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} */ (jspb.Message.getFieldProto3(this, 1, 0)); |
| 324 | }; |
| 325 | |
| 326 | |
| 327 | /** @param {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} value */ |
| 328 | proto.grpc.health.v1.HealthCheckResponse.prototype.setStatus = function(value) { |
| 329 | jspb.Message.setField(this, 1, value); |
| 330 | }; |
| 331 | |
| 332 | |
| 333 | /** |
| 334 | * @enum {number} |
| 335 | */ |
| 336 | proto.grpc.health.v1.HealthCheckResponse.ServingStatus = { |
| 337 | UNKNOWN: 0, |
| 338 | SERVING: 1, |
| 339 | NOT_SERVING: 2 |
| 340 | }; |
| 341 | |
| 342 | goog.object.extend(exports, proto.grpc.health.v1); |