protobuf-platform 1.0.42 → 1.0.44
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.
- package/game/game.proto +2 -2
- package/game/game_pb.js +43 -13
- package/package.json +1 -1
- package/user/user.proto +12 -0
- package/user/user_grpc_pb.js +34 -0
- package/user/user_pb.js +430 -0
package/game/game.proto
CHANGED
@@ -17,7 +17,7 @@ message PingRequest { string ping = 1; }
|
|
17
17
|
message PongResponse { string pong = 1; }
|
18
18
|
//Media
|
19
19
|
message File { bytes media = 1; }
|
20
|
-
message GetFileRequest { string
|
20
|
+
message GetFileRequest { string file_name = 1; string instance_type = 2; }
|
21
21
|
//Category CRUD
|
22
22
|
message CategoryItem {
|
23
23
|
optional int32 id = 1;
|
@@ -25,7 +25,7 @@ message CategoryItem {
|
|
25
25
|
optional string slug = 3;
|
26
26
|
optional string description = 4;
|
27
27
|
optional int32 is_active = 5;
|
28
|
-
optional string
|
28
|
+
optional string image = 6;
|
29
29
|
}
|
30
30
|
//Category CRUD | Requests
|
31
31
|
message CategoryRequest {
|
package/game/game_pb.js
CHANGED
@@ -732,7 +732,8 @@ proto.game.GetFileRequest.prototype.toObject = function(opt_includeInstance) {
|
|
732
732
|
*/
|
733
733
|
proto.game.GetFileRequest.toObject = function(includeInstance, msg) {
|
734
734
|
var f, obj = {
|
735
|
-
|
735
|
+
fileName: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
736
|
+
instanceType: jspb.Message.getFieldWithDefault(msg, 2, "")
|
736
737
|
};
|
737
738
|
|
738
739
|
if (includeInstance) {
|
@@ -771,7 +772,11 @@ proto.game.GetFileRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
771
772
|
switch (field) {
|
772
773
|
case 1:
|
773
774
|
var value = /** @type {string} */ (reader.readString());
|
774
|
-
msg.
|
775
|
+
msg.setFileName(value);
|
776
|
+
break;
|
777
|
+
case 2:
|
778
|
+
var value = /** @type {string} */ (reader.readString());
|
779
|
+
msg.setInstanceType(value);
|
775
780
|
break;
|
776
781
|
default:
|
777
782
|
reader.skipField();
|
@@ -802,21 +807,28 @@ proto.game.GetFileRequest.prototype.serializeBinary = function() {
|
|
802
807
|
*/
|
803
808
|
proto.game.GetFileRequest.serializeBinaryToWriter = function(message, writer) {
|
804
809
|
var f = undefined;
|
805
|
-
f = message.
|
810
|
+
f = message.getFileName();
|
806
811
|
if (f.length > 0) {
|
807
812
|
writer.writeString(
|
808
813
|
1,
|
809
814
|
f
|
810
815
|
);
|
811
816
|
}
|
817
|
+
f = message.getInstanceType();
|
818
|
+
if (f.length > 0) {
|
819
|
+
writer.writeString(
|
820
|
+
2,
|
821
|
+
f
|
822
|
+
);
|
823
|
+
}
|
812
824
|
};
|
813
825
|
|
814
826
|
|
815
827
|
/**
|
816
|
-
* optional string
|
828
|
+
* optional string file_name = 1;
|
817
829
|
* @return {string}
|
818
830
|
*/
|
819
|
-
proto.game.GetFileRequest.prototype.
|
831
|
+
proto.game.GetFileRequest.prototype.getFileName = function() {
|
820
832
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
821
833
|
};
|
822
834
|
|
@@ -825,11 +837,29 @@ proto.game.GetFileRequest.prototype.getFilePath = function() {
|
|
825
837
|
* @param {string} value
|
826
838
|
* @return {!proto.game.GetFileRequest} returns this
|
827
839
|
*/
|
828
|
-
proto.game.GetFileRequest.prototype.
|
840
|
+
proto.game.GetFileRequest.prototype.setFileName = function(value) {
|
829
841
|
return jspb.Message.setProto3StringField(this, 1, value);
|
830
842
|
};
|
831
843
|
|
832
844
|
|
845
|
+
/**
|
846
|
+
* optional string instance_type = 2;
|
847
|
+
* @return {string}
|
848
|
+
*/
|
849
|
+
proto.game.GetFileRequest.prototype.getInstanceType = function() {
|
850
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
851
|
+
};
|
852
|
+
|
853
|
+
|
854
|
+
/**
|
855
|
+
* @param {string} value
|
856
|
+
* @return {!proto.game.GetFileRequest} returns this
|
857
|
+
*/
|
858
|
+
proto.game.GetFileRequest.prototype.setInstanceType = function(value) {
|
859
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
860
|
+
};
|
861
|
+
|
862
|
+
|
833
863
|
|
834
864
|
|
835
865
|
|
@@ -867,7 +897,7 @@ proto.game.CategoryItem.toObject = function(includeInstance, msg) {
|
|
867
897
|
slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
868
898
|
description: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
869
899
|
isActive: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
870
|
-
|
900
|
+
image: jspb.Message.getFieldWithDefault(msg, 6, "")
|
871
901
|
};
|
872
902
|
|
873
903
|
if (includeInstance) {
|
@@ -926,7 +956,7 @@ proto.game.CategoryItem.deserializeBinaryFromReader = function(msg, reader) {
|
|
926
956
|
break;
|
927
957
|
case 6:
|
928
958
|
var value = /** @type {string} */ (reader.readString());
|
929
|
-
msg.
|
959
|
+
msg.setImage(value);
|
930
960
|
break;
|
931
961
|
default:
|
932
962
|
reader.skipField();
|
@@ -1183,10 +1213,10 @@ proto.game.CategoryItem.prototype.hasIsActive = function() {
|
|
1183
1213
|
|
1184
1214
|
|
1185
1215
|
/**
|
1186
|
-
* optional string
|
1216
|
+
* optional string image = 6;
|
1187
1217
|
* @return {string}
|
1188
1218
|
*/
|
1189
|
-
proto.game.CategoryItem.prototype.
|
1219
|
+
proto.game.CategoryItem.prototype.getImage = function() {
|
1190
1220
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
1191
1221
|
};
|
1192
1222
|
|
@@ -1195,7 +1225,7 @@ proto.game.CategoryItem.prototype.getImagePath = function() {
|
|
1195
1225
|
* @param {string} value
|
1196
1226
|
* @return {!proto.game.CategoryItem} returns this
|
1197
1227
|
*/
|
1198
|
-
proto.game.CategoryItem.prototype.
|
1228
|
+
proto.game.CategoryItem.prototype.setImage = function(value) {
|
1199
1229
|
return jspb.Message.setField(this, 6, value);
|
1200
1230
|
};
|
1201
1231
|
|
@@ -1204,7 +1234,7 @@ proto.game.CategoryItem.prototype.setImagePath = function(value) {
|
|
1204
1234
|
* Clears the field making it undefined.
|
1205
1235
|
* @return {!proto.game.CategoryItem} returns this
|
1206
1236
|
*/
|
1207
|
-
proto.game.CategoryItem.prototype.
|
1237
|
+
proto.game.CategoryItem.prototype.clearImage = function() {
|
1208
1238
|
return jspb.Message.setField(this, 6, undefined);
|
1209
1239
|
};
|
1210
1240
|
|
@@ -1213,7 +1243,7 @@ proto.game.CategoryItem.prototype.clearImagePath = function() {
|
|
1213
1243
|
* Returns whether this field is set.
|
1214
1244
|
* @return {boolean}
|
1215
1245
|
*/
|
1216
|
-
proto.game.CategoryItem.prototype.
|
1246
|
+
proto.game.CategoryItem.prototype.hasImage = function() {
|
1217
1247
|
return jspb.Message.getField(this, 6) != null;
|
1218
1248
|
};
|
1219
1249
|
|
package/package.json
CHANGED
package/user/user.proto
CHANGED
@@ -8,6 +8,8 @@ service User {
|
|
8
8
|
rpc signUp(RegistrationRequest) returns (LoggedInResponse);
|
9
9
|
rpc signIn(LoginRequest) returns (LoggedInResponse);
|
10
10
|
rpc getUserData(UserDataRequest) returns (UserDataResponse);
|
11
|
+
//Role and Permissions
|
12
|
+
rpc addPermissionToUserRole(RolePermissionRequest) returns (RolePermissionStatusResponse);
|
11
13
|
}
|
12
14
|
|
13
15
|
message PingRequest { string ping = 1; }
|
@@ -50,3 +52,13 @@ message UserDataResponse {
|
|
50
52
|
optional string birthday = 8;
|
51
53
|
optional string locale = 9;
|
52
54
|
}
|
55
|
+
//Permissions
|
56
|
+
message RolePermissionRequest {
|
57
|
+
string role = 1;
|
58
|
+
string section1 = 2;
|
59
|
+
optional string section2 = 3;
|
60
|
+
optional string section3 = 4;
|
61
|
+
}
|
62
|
+
message RolePermissionStatusResponse {
|
63
|
+
string status = 1;
|
64
|
+
}
|
package/user/user_grpc_pb.js
CHANGED
@@ -59,6 +59,28 @@ function deserialize_user_RegistrationRequest(buffer_arg) {
|
|
59
59
|
return user_pb.RegistrationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
60
|
}
|
61
61
|
|
62
|
+
function serialize_user_RolePermissionRequest(arg) {
|
63
|
+
if (!(arg instanceof user_pb.RolePermissionRequest)) {
|
64
|
+
throw new Error('Expected argument of type user.RolePermissionRequest');
|
65
|
+
}
|
66
|
+
return Buffer.from(arg.serializeBinary());
|
67
|
+
}
|
68
|
+
|
69
|
+
function deserialize_user_RolePermissionRequest(buffer_arg) {
|
70
|
+
return user_pb.RolePermissionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
71
|
+
}
|
72
|
+
|
73
|
+
function serialize_user_RolePermissionStatusResponse(arg) {
|
74
|
+
if (!(arg instanceof user_pb.RolePermissionStatusResponse)) {
|
75
|
+
throw new Error('Expected argument of type user.RolePermissionStatusResponse');
|
76
|
+
}
|
77
|
+
return Buffer.from(arg.serializeBinary());
|
78
|
+
}
|
79
|
+
|
80
|
+
function deserialize_user_RolePermissionStatusResponse(buffer_arg) {
|
81
|
+
return user_pb.RolePermissionStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
82
|
+
}
|
83
|
+
|
62
84
|
function serialize_user_UserDataRequest(arg) {
|
63
85
|
if (!(arg instanceof user_pb.UserDataRequest)) {
|
64
86
|
throw new Error('Expected argument of type user.UserDataRequest');
|
@@ -128,6 +150,18 @@ signUp: {
|
|
128
150
|
responseSerialize: serialize_user_UserDataResponse,
|
129
151
|
responseDeserialize: deserialize_user_UserDataResponse,
|
130
152
|
},
|
153
|
+
// Role and Permissions
|
154
|
+
addPermissionToUserRole: {
|
155
|
+
path: '/user.User/addPermissionToUserRole',
|
156
|
+
requestStream: false,
|
157
|
+
responseStream: false,
|
158
|
+
requestType: user_pb.RolePermissionRequest,
|
159
|
+
responseType: user_pb.RolePermissionStatusResponse,
|
160
|
+
requestSerialize: serialize_user_RolePermissionRequest,
|
161
|
+
requestDeserialize: deserialize_user_RolePermissionRequest,
|
162
|
+
responseSerialize: serialize_user_RolePermissionStatusResponse,
|
163
|
+
responseDeserialize: deserialize_user_RolePermissionStatusResponse,
|
164
|
+
},
|
131
165
|
};
|
132
166
|
|
133
167
|
exports.UserClient = grpc.makeGenericClientConstructor(UserService);
|
package/user/user_pb.js
CHANGED
@@ -26,6 +26,8 @@ goog.exportSymbol('proto.user.LoginRequest', null, global);
|
|
26
26
|
goog.exportSymbol('proto.user.PingRequest', null, global);
|
27
27
|
goog.exportSymbol('proto.user.PongResponse', null, global);
|
28
28
|
goog.exportSymbol('proto.user.RegistrationRequest', null, global);
|
29
|
+
goog.exportSymbol('proto.user.RolePermissionRequest', null, global);
|
30
|
+
goog.exportSymbol('proto.user.RolePermissionStatusResponse', null, global);
|
29
31
|
goog.exportSymbol('proto.user.UserDataRequest', null, global);
|
30
32
|
goog.exportSymbol('proto.user.UserDataResponse', null, global);
|
31
33
|
/**
|
@@ -175,6 +177,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
175
177
|
*/
|
176
178
|
proto.user.UserDataResponse.displayName = 'proto.user.UserDataResponse';
|
177
179
|
}
|
180
|
+
/**
|
181
|
+
* Generated by JsPbCodeGenerator.
|
182
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
183
|
+
* server response, or constructed directly in Javascript. The array is used
|
184
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
185
|
+
* If no data is provided, the constructed object will be empty, but still
|
186
|
+
* valid.
|
187
|
+
* @extends {jspb.Message}
|
188
|
+
* @constructor
|
189
|
+
*/
|
190
|
+
proto.user.RolePermissionRequest = function(opt_data) {
|
191
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
192
|
+
};
|
193
|
+
goog.inherits(proto.user.RolePermissionRequest, jspb.Message);
|
194
|
+
if (goog.DEBUG && !COMPILED) {
|
195
|
+
/**
|
196
|
+
* @public
|
197
|
+
* @override
|
198
|
+
*/
|
199
|
+
proto.user.RolePermissionRequest.displayName = 'proto.user.RolePermissionRequest';
|
200
|
+
}
|
201
|
+
/**
|
202
|
+
* Generated by JsPbCodeGenerator.
|
203
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
204
|
+
* server response, or constructed directly in Javascript. The array is used
|
205
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
206
|
+
* If no data is provided, the constructed object will be empty, but still
|
207
|
+
* valid.
|
208
|
+
* @extends {jspb.Message}
|
209
|
+
* @constructor
|
210
|
+
*/
|
211
|
+
proto.user.RolePermissionStatusResponse = function(opt_data) {
|
212
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
213
|
+
};
|
214
|
+
goog.inherits(proto.user.RolePermissionStatusResponse, jspb.Message);
|
215
|
+
if (goog.DEBUG && !COMPILED) {
|
216
|
+
/**
|
217
|
+
* @public
|
218
|
+
* @override
|
219
|
+
*/
|
220
|
+
proto.user.RolePermissionStatusResponse.displayName = 'proto.user.RolePermissionStatusResponse';
|
221
|
+
}
|
178
222
|
|
179
223
|
|
180
224
|
|
@@ -1913,4 +1957,390 @@ proto.user.UserDataResponse.prototype.hasLocale = function() {
|
|
1913
1957
|
};
|
1914
1958
|
|
1915
1959
|
|
1960
|
+
|
1961
|
+
|
1962
|
+
|
1963
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1964
|
+
/**
|
1965
|
+
* Creates an object representation of this proto.
|
1966
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1967
|
+
* Optional fields that are not set will be set to undefined.
|
1968
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1969
|
+
* For the list of reserved names please see:
|
1970
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1971
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1972
|
+
* JSPB instance for transitional soy proto support:
|
1973
|
+
* http://goto/soy-param-migration
|
1974
|
+
* @return {!Object}
|
1975
|
+
*/
|
1976
|
+
proto.user.RolePermissionRequest.prototype.toObject = function(opt_includeInstance) {
|
1977
|
+
return proto.user.RolePermissionRequest.toObject(opt_includeInstance, this);
|
1978
|
+
};
|
1979
|
+
|
1980
|
+
|
1981
|
+
/**
|
1982
|
+
* Static version of the {@see toObject} method.
|
1983
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1984
|
+
* the JSPB instance for transitional soy proto support:
|
1985
|
+
* http://goto/soy-param-migration
|
1986
|
+
* @param {!proto.user.RolePermissionRequest} msg The msg instance to transform.
|
1987
|
+
* @return {!Object}
|
1988
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1989
|
+
*/
|
1990
|
+
proto.user.RolePermissionRequest.toObject = function(includeInstance, msg) {
|
1991
|
+
var f, obj = {
|
1992
|
+
role: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
1993
|
+
section1: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1994
|
+
section2: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1995
|
+
section3: jspb.Message.getFieldWithDefault(msg, 4, "")
|
1996
|
+
};
|
1997
|
+
|
1998
|
+
if (includeInstance) {
|
1999
|
+
obj.$jspbMessageInstance = msg;
|
2000
|
+
}
|
2001
|
+
return obj;
|
2002
|
+
};
|
2003
|
+
}
|
2004
|
+
|
2005
|
+
|
2006
|
+
/**
|
2007
|
+
* Deserializes binary data (in protobuf wire format).
|
2008
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2009
|
+
* @return {!proto.user.RolePermissionRequest}
|
2010
|
+
*/
|
2011
|
+
proto.user.RolePermissionRequest.deserializeBinary = function(bytes) {
|
2012
|
+
var reader = new jspb.BinaryReader(bytes);
|
2013
|
+
var msg = new proto.user.RolePermissionRequest;
|
2014
|
+
return proto.user.RolePermissionRequest.deserializeBinaryFromReader(msg, reader);
|
2015
|
+
};
|
2016
|
+
|
2017
|
+
|
2018
|
+
/**
|
2019
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2020
|
+
* given reader into the given message object.
|
2021
|
+
* @param {!proto.user.RolePermissionRequest} msg The message object to deserialize into.
|
2022
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2023
|
+
* @return {!proto.user.RolePermissionRequest}
|
2024
|
+
*/
|
2025
|
+
proto.user.RolePermissionRequest.deserializeBinaryFromReader = function(msg, reader) {
|
2026
|
+
while (reader.nextField()) {
|
2027
|
+
if (reader.isEndGroup()) {
|
2028
|
+
break;
|
2029
|
+
}
|
2030
|
+
var field = reader.getFieldNumber();
|
2031
|
+
switch (field) {
|
2032
|
+
case 1:
|
2033
|
+
var value = /** @type {string} */ (reader.readString());
|
2034
|
+
msg.setRole(value);
|
2035
|
+
break;
|
2036
|
+
case 2:
|
2037
|
+
var value = /** @type {string} */ (reader.readString());
|
2038
|
+
msg.setSection1(value);
|
2039
|
+
break;
|
2040
|
+
case 3:
|
2041
|
+
var value = /** @type {string} */ (reader.readString());
|
2042
|
+
msg.setSection2(value);
|
2043
|
+
break;
|
2044
|
+
case 4:
|
2045
|
+
var value = /** @type {string} */ (reader.readString());
|
2046
|
+
msg.setSection3(value);
|
2047
|
+
break;
|
2048
|
+
default:
|
2049
|
+
reader.skipField();
|
2050
|
+
break;
|
2051
|
+
}
|
2052
|
+
}
|
2053
|
+
return msg;
|
2054
|
+
};
|
2055
|
+
|
2056
|
+
|
2057
|
+
/**
|
2058
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2059
|
+
* @return {!Uint8Array}
|
2060
|
+
*/
|
2061
|
+
proto.user.RolePermissionRequest.prototype.serializeBinary = function() {
|
2062
|
+
var writer = new jspb.BinaryWriter();
|
2063
|
+
proto.user.RolePermissionRequest.serializeBinaryToWriter(this, writer);
|
2064
|
+
return writer.getResultBuffer();
|
2065
|
+
};
|
2066
|
+
|
2067
|
+
|
2068
|
+
/**
|
2069
|
+
* Serializes the given message to binary data (in protobuf wire
|
2070
|
+
* format), writing to the given BinaryWriter.
|
2071
|
+
* @param {!proto.user.RolePermissionRequest} message
|
2072
|
+
* @param {!jspb.BinaryWriter} writer
|
2073
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2074
|
+
*/
|
2075
|
+
proto.user.RolePermissionRequest.serializeBinaryToWriter = function(message, writer) {
|
2076
|
+
var f = undefined;
|
2077
|
+
f = message.getRole();
|
2078
|
+
if (f.length > 0) {
|
2079
|
+
writer.writeString(
|
2080
|
+
1,
|
2081
|
+
f
|
2082
|
+
);
|
2083
|
+
}
|
2084
|
+
f = message.getSection1();
|
2085
|
+
if (f.length > 0) {
|
2086
|
+
writer.writeString(
|
2087
|
+
2,
|
2088
|
+
f
|
2089
|
+
);
|
2090
|
+
}
|
2091
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
2092
|
+
if (f != null) {
|
2093
|
+
writer.writeString(
|
2094
|
+
3,
|
2095
|
+
f
|
2096
|
+
);
|
2097
|
+
}
|
2098
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
2099
|
+
if (f != null) {
|
2100
|
+
writer.writeString(
|
2101
|
+
4,
|
2102
|
+
f
|
2103
|
+
);
|
2104
|
+
}
|
2105
|
+
};
|
2106
|
+
|
2107
|
+
|
2108
|
+
/**
|
2109
|
+
* optional string role = 1;
|
2110
|
+
* @return {string}
|
2111
|
+
*/
|
2112
|
+
proto.user.RolePermissionRequest.prototype.getRole = function() {
|
2113
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
2114
|
+
};
|
2115
|
+
|
2116
|
+
|
2117
|
+
/**
|
2118
|
+
* @param {string} value
|
2119
|
+
* @return {!proto.user.RolePermissionRequest} returns this
|
2120
|
+
*/
|
2121
|
+
proto.user.RolePermissionRequest.prototype.setRole = function(value) {
|
2122
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
2123
|
+
};
|
2124
|
+
|
2125
|
+
|
2126
|
+
/**
|
2127
|
+
* optional string section1 = 2;
|
2128
|
+
* @return {string}
|
2129
|
+
*/
|
2130
|
+
proto.user.RolePermissionRequest.prototype.getSection1 = function() {
|
2131
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
2132
|
+
};
|
2133
|
+
|
2134
|
+
|
2135
|
+
/**
|
2136
|
+
* @param {string} value
|
2137
|
+
* @return {!proto.user.RolePermissionRequest} returns this
|
2138
|
+
*/
|
2139
|
+
proto.user.RolePermissionRequest.prototype.setSection1 = function(value) {
|
2140
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
2141
|
+
};
|
2142
|
+
|
2143
|
+
|
2144
|
+
/**
|
2145
|
+
* optional string section2 = 3;
|
2146
|
+
* @return {string}
|
2147
|
+
*/
|
2148
|
+
proto.user.RolePermissionRequest.prototype.getSection2 = function() {
|
2149
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
2150
|
+
};
|
2151
|
+
|
2152
|
+
|
2153
|
+
/**
|
2154
|
+
* @param {string} value
|
2155
|
+
* @return {!proto.user.RolePermissionRequest} returns this
|
2156
|
+
*/
|
2157
|
+
proto.user.RolePermissionRequest.prototype.setSection2 = function(value) {
|
2158
|
+
return jspb.Message.setField(this, 3, value);
|
2159
|
+
};
|
2160
|
+
|
2161
|
+
|
2162
|
+
/**
|
2163
|
+
* Clears the field making it undefined.
|
2164
|
+
* @return {!proto.user.RolePermissionRequest} returns this
|
2165
|
+
*/
|
2166
|
+
proto.user.RolePermissionRequest.prototype.clearSection2 = function() {
|
2167
|
+
return jspb.Message.setField(this, 3, undefined);
|
2168
|
+
};
|
2169
|
+
|
2170
|
+
|
2171
|
+
/**
|
2172
|
+
* Returns whether this field is set.
|
2173
|
+
* @return {boolean}
|
2174
|
+
*/
|
2175
|
+
proto.user.RolePermissionRequest.prototype.hasSection2 = function() {
|
2176
|
+
return jspb.Message.getField(this, 3) != null;
|
2177
|
+
};
|
2178
|
+
|
2179
|
+
|
2180
|
+
/**
|
2181
|
+
* optional string section3 = 4;
|
2182
|
+
* @return {string}
|
2183
|
+
*/
|
2184
|
+
proto.user.RolePermissionRequest.prototype.getSection3 = function() {
|
2185
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
2186
|
+
};
|
2187
|
+
|
2188
|
+
|
2189
|
+
/**
|
2190
|
+
* @param {string} value
|
2191
|
+
* @return {!proto.user.RolePermissionRequest} returns this
|
2192
|
+
*/
|
2193
|
+
proto.user.RolePermissionRequest.prototype.setSection3 = function(value) {
|
2194
|
+
return jspb.Message.setField(this, 4, value);
|
2195
|
+
};
|
2196
|
+
|
2197
|
+
|
2198
|
+
/**
|
2199
|
+
* Clears the field making it undefined.
|
2200
|
+
* @return {!proto.user.RolePermissionRequest} returns this
|
2201
|
+
*/
|
2202
|
+
proto.user.RolePermissionRequest.prototype.clearSection3 = function() {
|
2203
|
+
return jspb.Message.setField(this, 4, undefined);
|
2204
|
+
};
|
2205
|
+
|
2206
|
+
|
2207
|
+
/**
|
2208
|
+
* Returns whether this field is set.
|
2209
|
+
* @return {boolean}
|
2210
|
+
*/
|
2211
|
+
proto.user.RolePermissionRequest.prototype.hasSection3 = function() {
|
2212
|
+
return jspb.Message.getField(this, 4) != null;
|
2213
|
+
};
|
2214
|
+
|
2215
|
+
|
2216
|
+
|
2217
|
+
|
2218
|
+
|
2219
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
2220
|
+
/**
|
2221
|
+
* Creates an object representation of this proto.
|
2222
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
2223
|
+
* Optional fields that are not set will be set to undefined.
|
2224
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
2225
|
+
* For the list of reserved names please see:
|
2226
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
2227
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
2228
|
+
* JSPB instance for transitional soy proto support:
|
2229
|
+
* http://goto/soy-param-migration
|
2230
|
+
* @return {!Object}
|
2231
|
+
*/
|
2232
|
+
proto.user.RolePermissionStatusResponse.prototype.toObject = function(opt_includeInstance) {
|
2233
|
+
return proto.user.RolePermissionStatusResponse.toObject(opt_includeInstance, this);
|
2234
|
+
};
|
2235
|
+
|
2236
|
+
|
2237
|
+
/**
|
2238
|
+
* Static version of the {@see toObject} method.
|
2239
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
2240
|
+
* the JSPB instance for transitional soy proto support:
|
2241
|
+
* http://goto/soy-param-migration
|
2242
|
+
* @param {!proto.user.RolePermissionStatusResponse} msg The msg instance to transform.
|
2243
|
+
* @return {!Object}
|
2244
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2245
|
+
*/
|
2246
|
+
proto.user.RolePermissionStatusResponse.toObject = function(includeInstance, msg) {
|
2247
|
+
var f, obj = {
|
2248
|
+
status: jspb.Message.getFieldWithDefault(msg, 1, "")
|
2249
|
+
};
|
2250
|
+
|
2251
|
+
if (includeInstance) {
|
2252
|
+
obj.$jspbMessageInstance = msg;
|
2253
|
+
}
|
2254
|
+
return obj;
|
2255
|
+
};
|
2256
|
+
}
|
2257
|
+
|
2258
|
+
|
2259
|
+
/**
|
2260
|
+
* Deserializes binary data (in protobuf wire format).
|
2261
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2262
|
+
* @return {!proto.user.RolePermissionStatusResponse}
|
2263
|
+
*/
|
2264
|
+
proto.user.RolePermissionStatusResponse.deserializeBinary = function(bytes) {
|
2265
|
+
var reader = new jspb.BinaryReader(bytes);
|
2266
|
+
var msg = new proto.user.RolePermissionStatusResponse;
|
2267
|
+
return proto.user.RolePermissionStatusResponse.deserializeBinaryFromReader(msg, reader);
|
2268
|
+
};
|
2269
|
+
|
2270
|
+
|
2271
|
+
/**
|
2272
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2273
|
+
* given reader into the given message object.
|
2274
|
+
* @param {!proto.user.RolePermissionStatusResponse} msg The message object to deserialize into.
|
2275
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2276
|
+
* @return {!proto.user.RolePermissionStatusResponse}
|
2277
|
+
*/
|
2278
|
+
proto.user.RolePermissionStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
|
2279
|
+
while (reader.nextField()) {
|
2280
|
+
if (reader.isEndGroup()) {
|
2281
|
+
break;
|
2282
|
+
}
|
2283
|
+
var field = reader.getFieldNumber();
|
2284
|
+
switch (field) {
|
2285
|
+
case 1:
|
2286
|
+
var value = /** @type {string} */ (reader.readString());
|
2287
|
+
msg.setStatus(value);
|
2288
|
+
break;
|
2289
|
+
default:
|
2290
|
+
reader.skipField();
|
2291
|
+
break;
|
2292
|
+
}
|
2293
|
+
}
|
2294
|
+
return msg;
|
2295
|
+
};
|
2296
|
+
|
2297
|
+
|
2298
|
+
/**
|
2299
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2300
|
+
* @return {!Uint8Array}
|
2301
|
+
*/
|
2302
|
+
proto.user.RolePermissionStatusResponse.prototype.serializeBinary = function() {
|
2303
|
+
var writer = new jspb.BinaryWriter();
|
2304
|
+
proto.user.RolePermissionStatusResponse.serializeBinaryToWriter(this, writer);
|
2305
|
+
return writer.getResultBuffer();
|
2306
|
+
};
|
2307
|
+
|
2308
|
+
|
2309
|
+
/**
|
2310
|
+
* Serializes the given message to binary data (in protobuf wire
|
2311
|
+
* format), writing to the given BinaryWriter.
|
2312
|
+
* @param {!proto.user.RolePermissionStatusResponse} message
|
2313
|
+
* @param {!jspb.BinaryWriter} writer
|
2314
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2315
|
+
*/
|
2316
|
+
proto.user.RolePermissionStatusResponse.serializeBinaryToWriter = function(message, writer) {
|
2317
|
+
var f = undefined;
|
2318
|
+
f = message.getStatus();
|
2319
|
+
if (f.length > 0) {
|
2320
|
+
writer.writeString(
|
2321
|
+
1,
|
2322
|
+
f
|
2323
|
+
);
|
2324
|
+
}
|
2325
|
+
};
|
2326
|
+
|
2327
|
+
|
2328
|
+
/**
|
2329
|
+
* optional string status = 1;
|
2330
|
+
* @return {string}
|
2331
|
+
*/
|
2332
|
+
proto.user.RolePermissionStatusResponse.prototype.getStatus = function() {
|
2333
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
2334
|
+
};
|
2335
|
+
|
2336
|
+
|
2337
|
+
/**
|
2338
|
+
* @param {string} value
|
2339
|
+
* @return {!proto.user.RolePermissionStatusResponse} returns this
|
2340
|
+
*/
|
2341
|
+
proto.user.RolePermissionStatusResponse.prototype.setStatus = function(value) {
|
2342
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
2343
|
+
};
|
2344
|
+
|
2345
|
+
|
1916
2346
|
goog.object.extend(exports, proto.user);
|