protobuf-platform 1.0.261 → 1.0.263

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,8 @@ service Config {
14
14
  rpc changeGlobalData(GlobalDataRequest) returns (ConfigStatusResponse);
15
15
  //Currency Rates
16
16
  rpc getCurrencyRate(CurrencyRateRequest) returns (CurrencyRateResponse);
17
+ //OpenAI
18
+ rpc generateText(PromptRequest) returns (GeneratedTextResponse);
17
19
  }
18
20
 
19
21
  message PingRequest { string ping = 1; }
@@ -69,4 +71,18 @@ message CurrencyRateRequest {
69
71
  }
70
72
  message CurrencyRateResponse {
71
73
  float rate = 1;
74
+ }
75
+ //OpenAI
76
+ message PromptRequest {
77
+ string environment = 1;
78
+ string customer = 2;
79
+ string prompt = 3;
80
+ optional int32 max_tokens = 4;
81
+ optional float temperature = 5;
82
+ optional float top_p = 6;
83
+ optional float frequency_penalty = 7;
84
+ optional float presence_penalty = 8;
85
+ }
86
+ message GeneratedTextResponse {
87
+ string text = 1;
72
88
  }
@@ -81,6 +81,17 @@ function deserialize_config_ErrorStatusResponse(buffer_arg) {
81
81
  return config_pb.ErrorStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
82
82
  }
83
83
 
84
+ function serialize_config_GeneratedTextResponse(arg) {
85
+ if (!(arg instanceof config_pb.GeneratedTextResponse)) {
86
+ throw new Error('Expected argument of type config.GeneratedTextResponse');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_config_GeneratedTextResponse(buffer_arg) {
92
+ return config_pb.GeneratedTextResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
84
95
  function serialize_config_GlobalDataRequest(arg) {
85
96
  if (!(arg instanceof config_pb.GlobalDataRequest)) {
86
97
  throw new Error('Expected argument of type config.GlobalDataRequest');
@@ -114,6 +125,17 @@ function deserialize_config_PongResponse(buffer_arg) {
114
125
  return config_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
115
126
  }
116
127
 
128
+ function serialize_config_PromptRequest(arg) {
129
+ if (!(arg instanceof config_pb.PromptRequest)) {
130
+ throw new Error('Expected argument of type config.PromptRequest');
131
+ }
132
+ return Buffer.from(arg.serializeBinary());
133
+ }
134
+
135
+ function deserialize_config_PromptRequest(buffer_arg) {
136
+ return config_pb.PromptRequest.deserializeBinary(new Uint8Array(buffer_arg));
137
+ }
138
+
117
139
  function serialize_config_SettingsRequest(arg) {
118
140
  if (!(arg instanceof config_pb.SettingsRequest)) {
119
141
  throw new Error('Expected argument of type config.SettingsRequest');
@@ -219,6 +241,18 @@ getCurrencyRate: {
219
241
  responseSerialize: serialize_config_CurrencyRateResponse,
220
242
  responseDeserialize: deserialize_config_CurrencyRateResponse,
221
243
  },
244
+ // OpenAI
245
+ generateText: {
246
+ path: '/config.Config/generateText',
247
+ requestStream: false,
248
+ responseStream: false,
249
+ requestType: config_pb.PromptRequest,
250
+ responseType: config_pb.GeneratedTextResponse,
251
+ requestSerialize: serialize_config_PromptRequest,
252
+ requestDeserialize: deserialize_config_PromptRequest,
253
+ responseSerialize: serialize_config_GeneratedTextResponse,
254
+ responseDeserialize: deserialize_config_GeneratedTextResponse,
255
+ },
222
256
  };
223
257
 
224
258
  exports.ConfigClient = grpc.makeGenericClientConstructor(ConfigService);
@@ -28,9 +28,11 @@ goog.exportSymbol('proto.config.CurrencyRateRequest', null, global);
28
28
  goog.exportSymbol('proto.config.CurrencyRateResponse', null, global);
29
29
  goog.exportSymbol('proto.config.ErrorRequest', null, global);
30
30
  goog.exportSymbol('proto.config.ErrorStatusResponse', null, global);
31
+ goog.exportSymbol('proto.config.GeneratedTextResponse', null, global);
31
32
  goog.exportSymbol('proto.config.GlobalDataRequest', null, global);
32
33
  goog.exportSymbol('proto.config.PingRequest', null, global);
33
34
  goog.exportSymbol('proto.config.PongResponse', null, global);
35
+ goog.exportSymbol('proto.config.PromptRequest', null, global);
34
36
  goog.exportSymbol('proto.config.SettingsRequest', null, global);
35
37
  goog.exportSymbol('proto.config.SettingsResponse', null, global);
36
38
  /**
@@ -285,6 +287,48 @@ if (goog.DEBUG && !COMPILED) {
285
287
  */
286
288
  proto.config.CurrencyRateResponse.displayName = 'proto.config.CurrencyRateResponse';
287
289
  }
290
+ /**
291
+ * Generated by JsPbCodeGenerator.
292
+ * @param {Array=} opt_data Optional initial data array, typically from a
293
+ * server response, or constructed directly in Javascript. The array is used
294
+ * in place and becomes part of the constructed object. It is not cloned.
295
+ * If no data is provided, the constructed object will be empty, but still
296
+ * valid.
297
+ * @extends {jspb.Message}
298
+ * @constructor
299
+ */
300
+ proto.config.PromptRequest = function(opt_data) {
301
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
302
+ };
303
+ goog.inherits(proto.config.PromptRequest, jspb.Message);
304
+ if (goog.DEBUG && !COMPILED) {
305
+ /**
306
+ * @public
307
+ * @override
308
+ */
309
+ proto.config.PromptRequest.displayName = 'proto.config.PromptRequest';
310
+ }
311
+ /**
312
+ * Generated by JsPbCodeGenerator.
313
+ * @param {Array=} opt_data Optional initial data array, typically from a
314
+ * server response, or constructed directly in Javascript. The array is used
315
+ * in place and becomes part of the constructed object. It is not cloned.
316
+ * If no data is provided, the constructed object will be empty, but still
317
+ * valid.
318
+ * @extends {jspb.Message}
319
+ * @constructor
320
+ */
321
+ proto.config.GeneratedTextResponse = function(opt_data) {
322
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
323
+ };
324
+ goog.inherits(proto.config.GeneratedTextResponse, jspb.Message);
325
+ if (goog.DEBUG && !COMPILED) {
326
+ /**
327
+ * @public
328
+ * @override
329
+ */
330
+ proto.config.GeneratedTextResponse.displayName = 'proto.config.GeneratedTextResponse';
331
+ }
288
332
 
289
333
 
290
334
 
@@ -2528,4 +2572,564 @@ proto.config.CurrencyRateResponse.prototype.setRate = function(value) {
2528
2572
  };
2529
2573
 
2530
2574
 
2575
+
2576
+
2577
+
2578
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2579
+ /**
2580
+ * Creates an object representation of this proto.
2581
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2582
+ * Optional fields that are not set will be set to undefined.
2583
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2584
+ * For the list of reserved names please see:
2585
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2586
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2587
+ * JSPB instance for transitional soy proto support:
2588
+ * http://goto/soy-param-migration
2589
+ * @return {!Object}
2590
+ */
2591
+ proto.config.PromptRequest.prototype.toObject = function(opt_includeInstance) {
2592
+ return proto.config.PromptRequest.toObject(opt_includeInstance, this);
2593
+ };
2594
+
2595
+
2596
+ /**
2597
+ * Static version of the {@see toObject} method.
2598
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2599
+ * the JSPB instance for transitional soy proto support:
2600
+ * http://goto/soy-param-migration
2601
+ * @param {!proto.config.PromptRequest} msg The msg instance to transform.
2602
+ * @return {!Object}
2603
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2604
+ */
2605
+ proto.config.PromptRequest.toObject = function(includeInstance, msg) {
2606
+ var f, obj = {
2607
+ environment: jspb.Message.getFieldWithDefault(msg, 1, ""),
2608
+ customer: jspb.Message.getFieldWithDefault(msg, 2, ""),
2609
+ prompt: jspb.Message.getFieldWithDefault(msg, 3, ""),
2610
+ maxTokens: jspb.Message.getFieldWithDefault(msg, 4, 0),
2611
+ temperature: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
2612
+ topP: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
2613
+ frequencyPenalty: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0),
2614
+ presencePenalty: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0)
2615
+ };
2616
+
2617
+ if (includeInstance) {
2618
+ obj.$jspbMessageInstance = msg;
2619
+ }
2620
+ return obj;
2621
+ };
2622
+ }
2623
+
2624
+
2625
+ /**
2626
+ * Deserializes binary data (in protobuf wire format).
2627
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2628
+ * @return {!proto.config.PromptRequest}
2629
+ */
2630
+ proto.config.PromptRequest.deserializeBinary = function(bytes) {
2631
+ var reader = new jspb.BinaryReader(bytes);
2632
+ var msg = new proto.config.PromptRequest;
2633
+ return proto.config.PromptRequest.deserializeBinaryFromReader(msg, reader);
2634
+ };
2635
+
2636
+
2637
+ /**
2638
+ * Deserializes binary data (in protobuf wire format) from the
2639
+ * given reader into the given message object.
2640
+ * @param {!proto.config.PromptRequest} msg The message object to deserialize into.
2641
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2642
+ * @return {!proto.config.PromptRequest}
2643
+ */
2644
+ proto.config.PromptRequest.deserializeBinaryFromReader = function(msg, reader) {
2645
+ while (reader.nextField()) {
2646
+ if (reader.isEndGroup()) {
2647
+ break;
2648
+ }
2649
+ var field = reader.getFieldNumber();
2650
+ switch (field) {
2651
+ case 1:
2652
+ var value = /** @type {string} */ (reader.readString());
2653
+ msg.setEnvironment(value);
2654
+ break;
2655
+ case 2:
2656
+ var value = /** @type {string} */ (reader.readString());
2657
+ msg.setCustomer(value);
2658
+ break;
2659
+ case 3:
2660
+ var value = /** @type {string} */ (reader.readString());
2661
+ msg.setPrompt(value);
2662
+ break;
2663
+ case 4:
2664
+ var value = /** @type {number} */ (reader.readInt32());
2665
+ msg.setMaxTokens(value);
2666
+ break;
2667
+ case 5:
2668
+ var value = /** @type {number} */ (reader.readFloat());
2669
+ msg.setTemperature(value);
2670
+ break;
2671
+ case 6:
2672
+ var value = /** @type {number} */ (reader.readFloat());
2673
+ msg.setTopP(value);
2674
+ break;
2675
+ case 7:
2676
+ var value = /** @type {number} */ (reader.readFloat());
2677
+ msg.setFrequencyPenalty(value);
2678
+ break;
2679
+ case 8:
2680
+ var value = /** @type {number} */ (reader.readFloat());
2681
+ msg.setPresencePenalty(value);
2682
+ break;
2683
+ default:
2684
+ reader.skipField();
2685
+ break;
2686
+ }
2687
+ }
2688
+ return msg;
2689
+ };
2690
+
2691
+
2692
+ /**
2693
+ * Serializes the message to binary data (in protobuf wire format).
2694
+ * @return {!Uint8Array}
2695
+ */
2696
+ proto.config.PromptRequest.prototype.serializeBinary = function() {
2697
+ var writer = new jspb.BinaryWriter();
2698
+ proto.config.PromptRequest.serializeBinaryToWriter(this, writer);
2699
+ return writer.getResultBuffer();
2700
+ };
2701
+
2702
+
2703
+ /**
2704
+ * Serializes the given message to binary data (in protobuf wire
2705
+ * format), writing to the given BinaryWriter.
2706
+ * @param {!proto.config.PromptRequest} message
2707
+ * @param {!jspb.BinaryWriter} writer
2708
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2709
+ */
2710
+ proto.config.PromptRequest.serializeBinaryToWriter = function(message, writer) {
2711
+ var f = undefined;
2712
+ f = message.getEnvironment();
2713
+ if (f.length > 0) {
2714
+ writer.writeString(
2715
+ 1,
2716
+ f
2717
+ );
2718
+ }
2719
+ f = message.getCustomer();
2720
+ if (f.length > 0) {
2721
+ writer.writeString(
2722
+ 2,
2723
+ f
2724
+ );
2725
+ }
2726
+ f = message.getPrompt();
2727
+ if (f.length > 0) {
2728
+ writer.writeString(
2729
+ 3,
2730
+ f
2731
+ );
2732
+ }
2733
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
2734
+ if (f != null) {
2735
+ writer.writeInt32(
2736
+ 4,
2737
+ f
2738
+ );
2739
+ }
2740
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
2741
+ if (f != null) {
2742
+ writer.writeFloat(
2743
+ 5,
2744
+ f
2745
+ );
2746
+ }
2747
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
2748
+ if (f != null) {
2749
+ writer.writeFloat(
2750
+ 6,
2751
+ f
2752
+ );
2753
+ }
2754
+ f = /** @type {number} */ (jspb.Message.getField(message, 7));
2755
+ if (f != null) {
2756
+ writer.writeFloat(
2757
+ 7,
2758
+ f
2759
+ );
2760
+ }
2761
+ f = /** @type {number} */ (jspb.Message.getField(message, 8));
2762
+ if (f != null) {
2763
+ writer.writeFloat(
2764
+ 8,
2765
+ f
2766
+ );
2767
+ }
2768
+ };
2769
+
2770
+
2771
+ /**
2772
+ * optional string environment = 1;
2773
+ * @return {string}
2774
+ */
2775
+ proto.config.PromptRequest.prototype.getEnvironment = function() {
2776
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2777
+ };
2778
+
2779
+
2780
+ /**
2781
+ * @param {string} value
2782
+ * @return {!proto.config.PromptRequest} returns this
2783
+ */
2784
+ proto.config.PromptRequest.prototype.setEnvironment = function(value) {
2785
+ return jspb.Message.setProto3StringField(this, 1, value);
2786
+ };
2787
+
2788
+
2789
+ /**
2790
+ * optional string customer = 2;
2791
+ * @return {string}
2792
+ */
2793
+ proto.config.PromptRequest.prototype.getCustomer = function() {
2794
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2795
+ };
2796
+
2797
+
2798
+ /**
2799
+ * @param {string} value
2800
+ * @return {!proto.config.PromptRequest} returns this
2801
+ */
2802
+ proto.config.PromptRequest.prototype.setCustomer = function(value) {
2803
+ return jspb.Message.setProto3StringField(this, 2, value);
2804
+ };
2805
+
2806
+
2807
+ /**
2808
+ * optional string prompt = 3;
2809
+ * @return {string}
2810
+ */
2811
+ proto.config.PromptRequest.prototype.getPrompt = function() {
2812
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2813
+ };
2814
+
2815
+
2816
+ /**
2817
+ * @param {string} value
2818
+ * @return {!proto.config.PromptRequest} returns this
2819
+ */
2820
+ proto.config.PromptRequest.prototype.setPrompt = function(value) {
2821
+ return jspb.Message.setProto3StringField(this, 3, value);
2822
+ };
2823
+
2824
+
2825
+ /**
2826
+ * optional int32 max_tokens = 4;
2827
+ * @return {number}
2828
+ */
2829
+ proto.config.PromptRequest.prototype.getMaxTokens = function() {
2830
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2831
+ };
2832
+
2833
+
2834
+ /**
2835
+ * @param {number} value
2836
+ * @return {!proto.config.PromptRequest} returns this
2837
+ */
2838
+ proto.config.PromptRequest.prototype.setMaxTokens = function(value) {
2839
+ return jspb.Message.setField(this, 4, value);
2840
+ };
2841
+
2842
+
2843
+ /**
2844
+ * Clears the field making it undefined.
2845
+ * @return {!proto.config.PromptRequest} returns this
2846
+ */
2847
+ proto.config.PromptRequest.prototype.clearMaxTokens = function() {
2848
+ return jspb.Message.setField(this, 4, undefined);
2849
+ };
2850
+
2851
+
2852
+ /**
2853
+ * Returns whether this field is set.
2854
+ * @return {boolean}
2855
+ */
2856
+ proto.config.PromptRequest.prototype.hasMaxTokens = function() {
2857
+ return jspb.Message.getField(this, 4) != null;
2858
+ };
2859
+
2860
+
2861
+ /**
2862
+ * optional float temperature = 5;
2863
+ * @return {number}
2864
+ */
2865
+ proto.config.PromptRequest.prototype.getTemperature = function() {
2866
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
2867
+ };
2868
+
2869
+
2870
+ /**
2871
+ * @param {number} value
2872
+ * @return {!proto.config.PromptRequest} returns this
2873
+ */
2874
+ proto.config.PromptRequest.prototype.setTemperature = function(value) {
2875
+ return jspb.Message.setField(this, 5, value);
2876
+ };
2877
+
2878
+
2879
+ /**
2880
+ * Clears the field making it undefined.
2881
+ * @return {!proto.config.PromptRequest} returns this
2882
+ */
2883
+ proto.config.PromptRequest.prototype.clearTemperature = function() {
2884
+ return jspb.Message.setField(this, 5, undefined);
2885
+ };
2886
+
2887
+
2888
+ /**
2889
+ * Returns whether this field is set.
2890
+ * @return {boolean}
2891
+ */
2892
+ proto.config.PromptRequest.prototype.hasTemperature = function() {
2893
+ return jspb.Message.getField(this, 5) != null;
2894
+ };
2895
+
2896
+
2897
+ /**
2898
+ * optional float top_p = 6;
2899
+ * @return {number}
2900
+ */
2901
+ proto.config.PromptRequest.prototype.getTopP = function() {
2902
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
2903
+ };
2904
+
2905
+
2906
+ /**
2907
+ * @param {number} value
2908
+ * @return {!proto.config.PromptRequest} returns this
2909
+ */
2910
+ proto.config.PromptRequest.prototype.setTopP = function(value) {
2911
+ return jspb.Message.setField(this, 6, value);
2912
+ };
2913
+
2914
+
2915
+ /**
2916
+ * Clears the field making it undefined.
2917
+ * @return {!proto.config.PromptRequest} returns this
2918
+ */
2919
+ proto.config.PromptRequest.prototype.clearTopP = function() {
2920
+ return jspb.Message.setField(this, 6, undefined);
2921
+ };
2922
+
2923
+
2924
+ /**
2925
+ * Returns whether this field is set.
2926
+ * @return {boolean}
2927
+ */
2928
+ proto.config.PromptRequest.prototype.hasTopP = function() {
2929
+ return jspb.Message.getField(this, 6) != null;
2930
+ };
2931
+
2932
+
2933
+ /**
2934
+ * optional float frequency_penalty = 7;
2935
+ * @return {number}
2936
+ */
2937
+ proto.config.PromptRequest.prototype.getFrequencyPenalty = function() {
2938
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0));
2939
+ };
2940
+
2941
+
2942
+ /**
2943
+ * @param {number} value
2944
+ * @return {!proto.config.PromptRequest} returns this
2945
+ */
2946
+ proto.config.PromptRequest.prototype.setFrequencyPenalty = function(value) {
2947
+ return jspb.Message.setField(this, 7, value);
2948
+ };
2949
+
2950
+
2951
+ /**
2952
+ * Clears the field making it undefined.
2953
+ * @return {!proto.config.PromptRequest} returns this
2954
+ */
2955
+ proto.config.PromptRequest.prototype.clearFrequencyPenalty = function() {
2956
+ return jspb.Message.setField(this, 7, undefined);
2957
+ };
2958
+
2959
+
2960
+ /**
2961
+ * Returns whether this field is set.
2962
+ * @return {boolean}
2963
+ */
2964
+ proto.config.PromptRequest.prototype.hasFrequencyPenalty = function() {
2965
+ return jspb.Message.getField(this, 7) != null;
2966
+ };
2967
+
2968
+
2969
+ /**
2970
+ * optional float presence_penalty = 8;
2971
+ * @return {number}
2972
+ */
2973
+ proto.config.PromptRequest.prototype.getPresencePenalty = function() {
2974
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0));
2975
+ };
2976
+
2977
+
2978
+ /**
2979
+ * @param {number} value
2980
+ * @return {!proto.config.PromptRequest} returns this
2981
+ */
2982
+ proto.config.PromptRequest.prototype.setPresencePenalty = function(value) {
2983
+ return jspb.Message.setField(this, 8, value);
2984
+ };
2985
+
2986
+
2987
+ /**
2988
+ * Clears the field making it undefined.
2989
+ * @return {!proto.config.PromptRequest} returns this
2990
+ */
2991
+ proto.config.PromptRequest.prototype.clearPresencePenalty = function() {
2992
+ return jspb.Message.setField(this, 8, undefined);
2993
+ };
2994
+
2995
+
2996
+ /**
2997
+ * Returns whether this field is set.
2998
+ * @return {boolean}
2999
+ */
3000
+ proto.config.PromptRequest.prototype.hasPresencePenalty = function() {
3001
+ return jspb.Message.getField(this, 8) != null;
3002
+ };
3003
+
3004
+
3005
+
3006
+
3007
+
3008
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3009
+ /**
3010
+ * Creates an object representation of this proto.
3011
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3012
+ * Optional fields that are not set will be set to undefined.
3013
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3014
+ * For the list of reserved names please see:
3015
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3016
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3017
+ * JSPB instance for transitional soy proto support:
3018
+ * http://goto/soy-param-migration
3019
+ * @return {!Object}
3020
+ */
3021
+ proto.config.GeneratedTextResponse.prototype.toObject = function(opt_includeInstance) {
3022
+ return proto.config.GeneratedTextResponse.toObject(opt_includeInstance, this);
3023
+ };
3024
+
3025
+
3026
+ /**
3027
+ * Static version of the {@see toObject} method.
3028
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3029
+ * the JSPB instance for transitional soy proto support:
3030
+ * http://goto/soy-param-migration
3031
+ * @param {!proto.config.GeneratedTextResponse} msg The msg instance to transform.
3032
+ * @return {!Object}
3033
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3034
+ */
3035
+ proto.config.GeneratedTextResponse.toObject = function(includeInstance, msg) {
3036
+ var f, obj = {
3037
+ text: jspb.Message.getFieldWithDefault(msg, 1, "")
3038
+ };
3039
+
3040
+ if (includeInstance) {
3041
+ obj.$jspbMessageInstance = msg;
3042
+ }
3043
+ return obj;
3044
+ };
3045
+ }
3046
+
3047
+
3048
+ /**
3049
+ * Deserializes binary data (in protobuf wire format).
3050
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3051
+ * @return {!proto.config.GeneratedTextResponse}
3052
+ */
3053
+ proto.config.GeneratedTextResponse.deserializeBinary = function(bytes) {
3054
+ var reader = new jspb.BinaryReader(bytes);
3055
+ var msg = new proto.config.GeneratedTextResponse;
3056
+ return proto.config.GeneratedTextResponse.deserializeBinaryFromReader(msg, reader);
3057
+ };
3058
+
3059
+
3060
+ /**
3061
+ * Deserializes binary data (in protobuf wire format) from the
3062
+ * given reader into the given message object.
3063
+ * @param {!proto.config.GeneratedTextResponse} msg The message object to deserialize into.
3064
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3065
+ * @return {!proto.config.GeneratedTextResponse}
3066
+ */
3067
+ proto.config.GeneratedTextResponse.deserializeBinaryFromReader = function(msg, reader) {
3068
+ while (reader.nextField()) {
3069
+ if (reader.isEndGroup()) {
3070
+ break;
3071
+ }
3072
+ var field = reader.getFieldNumber();
3073
+ switch (field) {
3074
+ case 1:
3075
+ var value = /** @type {string} */ (reader.readString());
3076
+ msg.setText(value);
3077
+ break;
3078
+ default:
3079
+ reader.skipField();
3080
+ break;
3081
+ }
3082
+ }
3083
+ return msg;
3084
+ };
3085
+
3086
+
3087
+ /**
3088
+ * Serializes the message to binary data (in protobuf wire format).
3089
+ * @return {!Uint8Array}
3090
+ */
3091
+ proto.config.GeneratedTextResponse.prototype.serializeBinary = function() {
3092
+ var writer = new jspb.BinaryWriter();
3093
+ proto.config.GeneratedTextResponse.serializeBinaryToWriter(this, writer);
3094
+ return writer.getResultBuffer();
3095
+ };
3096
+
3097
+
3098
+ /**
3099
+ * Serializes the given message to binary data (in protobuf wire
3100
+ * format), writing to the given BinaryWriter.
3101
+ * @param {!proto.config.GeneratedTextResponse} message
3102
+ * @param {!jspb.BinaryWriter} writer
3103
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3104
+ */
3105
+ proto.config.GeneratedTextResponse.serializeBinaryToWriter = function(message, writer) {
3106
+ var f = undefined;
3107
+ f = message.getText();
3108
+ if (f.length > 0) {
3109
+ writer.writeString(
3110
+ 1,
3111
+ f
3112
+ );
3113
+ }
3114
+ };
3115
+
3116
+
3117
+ /**
3118
+ * optional string text = 1;
3119
+ * @return {string}
3120
+ */
3121
+ proto.config.GeneratedTextResponse.prototype.getText = function() {
3122
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3123
+ };
3124
+
3125
+
3126
+ /**
3127
+ * @param {string} value
3128
+ * @return {!proto.config.GeneratedTextResponse} returns this
3129
+ */
3130
+ proto.config.GeneratedTextResponse.prototype.setText = function(value) {
3131
+ return jspb.Message.setProto3StringField(this, 1, value);
3132
+ };
3133
+
3134
+
2531
3135
  goog.object.extend(exports, proto.config);