diff --git a/src/app/modules/auth/sign-in/components/sign-in.component.ts b/src/app/modules/auth/sign-in/components/sign-in.component.ts index 638808e..17ffa3f 100644 --- a/src/app/modules/auth/sign-in/components/sign-in.component.ts +++ b/src/app/modules/auth/sign-in/components/sign-in.component.ts @@ -51,11 +51,8 @@ export class AuthSignInComponent implements OnInit { ngOnInit(): void { // Create the form this.signInForm = this._formBuilder.group({ - email: [ - 'hughes.brian@company.com', - [Validators.required, Validators.email], - ], - password: ['admin', Validators.required], + email: ['administrator', [Validators.required]], + password: ['beteran', Validators.required], captchaSecurityCode: ['', Validators.required], }); diff --git a/src/app/modules/protobuf/models/member/member_site_pb.d.ts b/src/app/modules/protobuf/models/domain/site_pb.d.ts similarity index 63% rename from src/app/modules/protobuf/models/member/member_site_pb.d.ts rename to src/app/modules/protobuf/models/domain/site_pb.d.ts index 0883be8..87296bc 100644 --- a/src/app/modules/protobuf/models/member/member_site_pb.d.ts +++ b/src/app/modules/protobuf/models/domain/site_pb.d.ts @@ -1,15 +1,21 @@ -// package: bet.beteran.member -// file: models/member/member_site.proto +// package: bet.beteran.domain +// file: models/domain/site.proto import * as jspb from 'google-protobuf'; -export class MemberSite extends jspb.Message { +export class Site extends jspb.Message { getId(): string; setId(value: string): void; getUrl(): string; setUrl(value: string): void; + getShow(): boolean; + setShow(value: boolean): void; + + getCanUse(): boolean; + setCanUse(value: boolean): void; + getCreatedAt(): number; setCreatedAt(value: number): void; @@ -22,30 +28,29 @@ export class MemberSite extends jspb.Message { setDeletedAt(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MemberSite.AsObject; - static toObject( - includeInstance: boolean, - msg: MemberSite - ): MemberSite.AsObject; + toObject(includeInstance?: boolean): Site.AsObject; + static toObject(includeInstance: boolean, msg: Site): Site.AsObject; static extensions: { [key: number]: jspb.ExtensionFieldInfo }; static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo; }; static serializeBinaryToWriter( - message: MemberSite, + message: Site, writer: jspb.BinaryWriter ): void; - static deserializeBinary(bytes: Uint8Array): MemberSite; + static deserializeBinary(bytes: Uint8Array): Site; static deserializeBinaryFromReader( - message: MemberSite, + message: Site, reader: jspb.BinaryReader - ): MemberSite; + ): Site; } -export namespace MemberSite { +export namespace Site { export type AsObject = { id: string; url: string; + show: boolean; + canUse: boolean; createdAt: number; updatedAt: number; deletedAt: number; diff --git a/src/app/modules/protobuf/models/member/member_site_pb.js b/src/app/modules/protobuf/models/domain/site_pb.js similarity index 53% rename from src/app/modules/protobuf/models/member/member_site_pb.js rename to src/app/modules/protobuf/models/domain/site_pb.js index 1b645b1..9707b0a 100644 --- a/src/app/modules/protobuf/models/member/member_site_pb.js +++ b/src/app/modules/protobuf/models/domain/site_pb.js @@ -1,4 +1,4 @@ -// source: models/member/member_site.proto +// source: models/domain/site.proto /** * @fileoverview * @enhanceable @@ -17,7 +17,7 @@ var global = function () { return this || window || global || self || Function("return this")(); }.call(null); -goog.exportSymbol("proto.bet.beteran.member.MemberSite", null, global); +goog.exportSymbol("proto.bet.beteran.domain.Site", null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -28,17 +28,16 @@ goog.exportSymbol("proto.bet.beteran.member.MemberSite", null, global); * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.member.MemberSite = function (opt_data) { +proto.bet.beteran.domain.Site = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.member.MemberSite, jspb.Message); +goog.inherits(proto.bet.beteran.domain.Site, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.member.MemberSite.displayName = - "proto.bet.beteran.member.MemberSite"; + proto.bet.beteran.domain.Site.displayName = "proto.bet.beteran.domain.Site"; } if (jspb.Message.GENERATE_TO_OBJECT) { @@ -54,13 +53,10 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ - proto.bet.beteran.member.MemberSite.prototype.toObject = function ( + proto.bet.beteran.domain.Site.prototype.toObject = function ( opt_includeInstance ) { - return proto.bet.beteran.member.MemberSite.toObject( - opt_includeInstance, - this - ); + return proto.bet.beteran.domain.Site.toObject(opt_includeInstance, this); }; /** @@ -68,21 +64,20 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.bet.beteran.member.MemberSite} msg The msg instance to transform. + * @param {!proto.bet.beteran.domain.Site} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ - proto.bet.beteran.member.MemberSite.toObject = function ( - includeInstance, - msg - ) { + proto.bet.beteran.domain.Site.toObject = function (includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), url: jspb.Message.getFieldWithDefault(msg, 2, ""), - createdAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - updatedAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - deletedAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + show: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + canUse: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + createdAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0), + deletedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), }; if (includeInstance) { @@ -95,25 +90,22 @@ if (jspb.Message.GENERATE_TO_OBJECT) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.bet.beteran.member.MemberSite} + * @return {!proto.bet.beteran.domain.Site} */ -proto.bet.beteran.member.MemberSite.deserializeBinary = function (bytes) { +proto.bet.beteran.domain.Site.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.member.MemberSite(); - return proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.bet.beteran.domain.Site(); + return proto.bet.beteran.domain.Site.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.bet.beteran.member.MemberSite} msg The message object to deserialize into. + * @param {!proto.bet.beteran.domain.Site} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.bet.beteran.member.MemberSite} + * @return {!proto.bet.beteran.domain.Site} */ -proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function ( +proto.bet.beteran.domain.Site.deserializeBinaryFromReader = function ( msg, reader ) { @@ -132,14 +124,22 @@ proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function ( msg.setUrl(value); break; case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setShow(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCanUse(value); + break; + case 5: var value = /** @type {number} */ (reader.readUint64()); msg.setCreatedAt(value); break; - case 4: + case 6: var value = /** @type {number} */ (reader.readUint64()); msg.setUpdatedAt(value); break; - case 5: + case 7: var value = /** @type {number} */ (reader.readUint64()); msg.setDeletedAt(value); break; @@ -155,20 +155,20 @@ proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function ( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.member.MemberSite.prototype.serializeBinary = function () { +proto.bet.beteran.domain.Site.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); - proto.bet.beteran.member.MemberSite.serializeBinaryToWriter(this, writer); + proto.bet.beteran.domain.Site.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.bet.beteran.member.MemberSite} message + * @param {!proto.bet.beteran.domain.Site} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function ( +proto.bet.beteran.domain.Site.serializeBinaryToWriter = function ( message, writer ) { @@ -181,17 +181,25 @@ proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function ( if (f.length > 0) { writer.writeString(2, f); } + f = message.getShow(); + if (f) { + writer.writeBool(3, f); + } + f = message.getCanUse(); + if (f) { + writer.writeBool(4, f); + } f = message.getCreatedAt(); if (f !== 0) { - writer.writeUint64(3, f); + writer.writeUint64(5, f); } f = message.getUpdatedAt(); if (f !== 0) { - writer.writeUint64(4, f); + writer.writeUint64(6, f); } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); + f = /** @type {number} */ (jspb.Message.getField(message, 7)); if (f != null) { - writer.writeUint64(5, f); + writer.writeUint64(7, f); } }; @@ -199,15 +207,15 @@ proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function ( * optional string id = 1; * @return {string} */ -proto.bet.beteran.member.MemberSite.prototype.getId = function () { +proto.bet.beteran.domain.Site.prototype.getId = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.bet.beteran.member.MemberSite} returns this + * @return {!proto.bet.beteran.domain.Site} returns this */ -proto.bet.beteran.member.MemberSite.prototype.setId = function (value) { +proto.bet.beteran.domain.Site.prototype.setId = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -215,80 +223,116 @@ proto.bet.beteran.member.MemberSite.prototype.setId = function (value) { * optional string url = 2; * @return {string} */ -proto.bet.beteran.member.MemberSite.prototype.getUrl = function () { +proto.bet.beteran.domain.Site.prototype.getUrl = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.bet.beteran.member.MemberSite} returns this + * @return {!proto.bet.beteran.domain.Site} returns this */ -proto.bet.beteran.member.MemberSite.prototype.setUrl = function (value) { +proto.bet.beteran.domain.Site.prototype.setUrl = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional uint64 created_at = 3; + * optional bool show = 3; + * @return {boolean} + */ +proto.bet.beteran.domain.Site.prototype.getShow = function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 3, false) + ); +}; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.domain.Site} returns this + */ +proto.bet.beteran.domain.Site.prototype.setShow = function (value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + +/** + * optional bool can_use = 4; + * @return {boolean} + */ +proto.bet.beteran.domain.Site.prototype.getCanUse = function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 4, false) + ); +}; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.domain.Site} returns this + */ +proto.bet.beteran.domain.Site.prototype.setCanUse = function (value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + +/** + * optional uint64 created_at = 5; * @return {number} */ -proto.bet.beteran.member.MemberSite.prototype.getCreatedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - -/** - * @param {number} value - * @return {!proto.bet.beteran.member.MemberSite} returns this - */ -proto.bet.beteran.member.MemberSite.prototype.setCreatedAt = function (value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - -/** - * optional uint64 updated_at = 4; - * @return {number} - */ -proto.bet.beteran.member.MemberSite.prototype.getUpdatedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - -/** - * @param {number} value - * @return {!proto.bet.beteran.member.MemberSite} returns this - */ -proto.bet.beteran.member.MemberSite.prototype.setUpdatedAt = function (value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - -/** - * optional uint64 deleted_at = 5; - * @return {number} - */ -proto.bet.beteran.member.MemberSite.prototype.getDeletedAt = function () { +proto.bet.beteran.domain.Site.prototype.getCreatedAt = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.bet.beteran.member.MemberSite} returns this + * @return {!proto.bet.beteran.domain.Site} returns this */ -proto.bet.beteran.member.MemberSite.prototype.setDeletedAt = function (value) { - return jspb.Message.setField(this, 5, value); +proto.bet.beteran.domain.Site.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + +/** + * optional uint64 updated_at = 6; + * @return {number} + */ +proto.bet.beteran.domain.Site.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.domain.Site} returns this + */ +proto.bet.beteran.domain.Site.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + +/** + * optional uint64 deleted_at = 7; + * @return {number} + */ +proto.bet.beteran.domain.Site.prototype.getDeletedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.domain.Site} returns this + */ +proto.bet.beteran.domain.Site.prototype.setDeletedAt = function (value) { + return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. - * @return {!proto.bet.beteran.member.MemberSite} returns this + * @return {!proto.bet.beteran.domain.Site} returns this */ -proto.bet.beteran.member.MemberSite.prototype.clearDeletedAt = function () { - return jspb.Message.setField(this, 5, undefined); +proto.bet.beteran.domain.Site.prototype.clearDeletedAt = function () { + return jspb.Message.setField(this, 7, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.member.MemberSite.prototype.hasDeletedAt = function () { - return jspb.Message.getField(this, 5) != null; +proto.bet.beteran.domain.Site.prototype.hasDeletedAt = function () { + return jspb.Message.getField(this, 7) != null; }; -goog.object.extend(exports, proto.bet.beteran.member); +goog.object.extend(exports, proto.bet.beteran.domain); diff --git a/src/app/modules/protobuf/models/member/member_pb.d.ts b/src/app/modules/protobuf/models/member/member_pb.d.ts index 372dac7..7d95e6c 100644 --- a/src/app/modules/protobuf/models/member/member_pb.d.ts +++ b/src/app/modules/protobuf/models/member/member_pb.d.ts @@ -2,16 +2,18 @@ // file: models/member/member.proto import * as jspb from 'google-protobuf'; +import * as models_domain_site_pb from '../../models/domain/site_pb'; import * as models_member_member_class_pb from '../../models/member/member_class_pb'; import * as models_member_member_level_pb from '../../models/member/member_level_pb'; -import * as models_member_member_site_pb from '../../models/member/member_site_pb'; export class Member extends jspb.Message { getId(): string; setId(value: string): void; - getDomainId(): string; - setDomainId(value: string): void; + hasSite(): boolean; + clearSite(): void; + getSite(): models_domain_site_pb.Site | undefined; + setSite(value?: models_domain_site_pb.Site): void; hasMemberClass(): boolean; clearMemberClass(): void; @@ -23,11 +25,6 @@ export class Member extends jspb.Message { getMemberLevel(): models_member_member_level_pb.MemberLevel | undefined; setMemberLevel(value?: models_member_member_level_pb.MemberLevel): void; - hasMemberSite(): boolean; - clearMemberSite(): void; - getMemberSite(): models_member_member_site_pb.MemberSite | undefined; - setMemberSite(value?: models_member_member_site_pb.MemberSite): void; - hasReferrer(): boolean; clearReferrer(): void; getReferrer(): Member | undefined; @@ -97,10 +94,9 @@ export class Member extends jspb.Message { export namespace Member { export type AsObject = { id: string; - domainId: string; + site?: models_domain_site_pb.Site.AsObject; memberClass?: models_member_member_class_pb.MemberClass.AsObject; memberLevel?: models_member_member_level_pb.MemberLevel.AsObject; - memberSite?: models_member_member_site_pb.MemberSite.AsObject; referrer?: Member.AsObject; referredCount: number; username: string; diff --git a/src/app/modules/protobuf/models/member/member_pb.js b/src/app/modules/protobuf/models/member/member_pb.js index 7f7bae4..2c438a2 100644 --- a/src/app/modules/protobuf/models/member/member_pb.js +++ b/src/app/modules/protobuf/models/member/member_pb.js @@ -17,12 +17,12 @@ var global = function () { return this || window || global || self || Function("return this")(); }.call(null); +var models_domain_site_pb = require("../../models/domain/site_pb.js"); +goog.object.extend(proto, models_domain_site_pb); var models_member_member_class_pb = require("../../models/member/member_class_pb.js"); goog.object.extend(proto, models_member_member_class_pb); var models_member_member_level_pb = require("../../models/member/member_level_pb.js"); goog.object.extend(proto, models_member_member_level_pb); -var models_member_member_site_pb = require("../../models/member/member_site_pb.js"); -goog.object.extend(proto, models_member_member_site_pb); goog.exportSymbol("proto.bet.beteran.member.Member", null, global); goog.exportSymbol("proto.bet.beteran.member.MemberState", null, global); /** @@ -80,7 +80,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), - domainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + site: + (f = msg.getSite()) && + models_domain_site_pb.Site.toObject(includeInstance, f), memberClass: (f = msg.getMemberClass()) && models_member_member_class_pb.MemberClass.toObject( @@ -93,23 +95,20 @@ if (jspb.Message.GENERATE_TO_OBJECT) { includeInstance, f ), - memberSite: - (f = msg.getMemberSite()) && - models_member_member_site_pb.MemberSite.toObject(includeInstance, f), referrer: (f = msg.getReferrer()) && proto.bet.beteran.member.Member.toObject(includeInstance, f), - referredCount: jspb.Message.getFieldWithDefault(msg, 7, 0), - username: jspb.Message.getFieldWithDefault(msg, 8, ""), - nickname: jspb.Message.getFieldWithDefault(msg, 9, ""), - mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 10, ""), - state: jspb.Message.getFieldWithDefault(msg, 11, 0), - stateChangedAt: jspb.Message.getFieldWithDefault(msg, 12, 0), - lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 13, ""), - lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 14, 0), - createdAt: jspb.Message.getFieldWithDefault(msg, 15, 0), - updatedAt: jspb.Message.getFieldWithDefault(msg, 16, 0), - deletedAt: jspb.Message.getFieldWithDefault(msg, 17, 0), + referredCount: jspb.Message.getFieldWithDefault(msg, 6, 0), + username: jspb.Message.getFieldWithDefault(msg, 7, ""), + nickname: jspb.Message.getFieldWithDefault(msg, 8, ""), + mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 9, ""), + state: jspb.Message.getFieldWithDefault(msg, 10, 0), + stateChangedAt: jspb.Message.getFieldWithDefault(msg, 11, 0), + lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 12, ""), + lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 13, 0), + createdAt: jspb.Message.getFieldWithDefault(msg, 14, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 15, 0), + deletedAt: jspb.Message.getFieldWithDefault(msg, 16, 0), }; if (includeInstance) { @@ -155,8 +154,12 @@ proto.bet.beteran.member.Member.deserializeBinaryFromReader = function ( msg.setId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDomainId(value); + var value = new models_domain_site_pb.Site(); + reader.readMessage( + value, + models_domain_site_pb.Site.deserializeBinaryFromReader + ); + msg.setSite(value); break; case 3: var value = new models_member_member_class_pb.MemberClass(); @@ -175,14 +178,6 @@ proto.bet.beteran.member.Member.deserializeBinaryFromReader = function ( msg.setMemberLevel(value); break; case 5: - var value = new models_member_member_site_pb.MemberSite(); - reader.readMessage( - value, - models_member_member_site_pb.MemberSite.deserializeBinaryFromReader - ); - msg.setMemberSite(value); - break; - case 6: var value = new proto.bet.beteran.member.Member(); reader.readMessage( value, @@ -190,49 +185,49 @@ proto.bet.beteran.member.Member.deserializeBinaryFromReader = function ( ); msg.setReferrer(value); break; - case 7: + case 6: var value = /** @type {number} */ (reader.readUint64()); msg.setReferredCount(value); break; - case 8: + case 7: var value = /** @type {string} */ (reader.readString()); msg.setUsername(value); break; - case 9: + case 8: var value = /** @type {string} */ (reader.readString()); msg.setNickname(value); break; - case 10: + case 9: var value = /** @type {string} */ (reader.readString()); msg.setMobilePhoneNumber(value); break; - case 11: + case 10: var value = /** @type {!proto.bet.beteran.member.MemberState} */ ( reader.readEnum() ); msg.setState(value); break; - case 12: + case 11: var value = /** @type {number} */ (reader.readUint64()); msg.setStateChangedAt(value); break; - case 13: + case 12: var value = /** @type {string} */ (reader.readString()); msg.setLastSigninedIp(value); break; - case 14: + case 13: var value = /** @type {number} */ (reader.readUint64()); msg.setLastSigninedAt(value); break; - case 15: + case 14: var value = /** @type {number} */ (reader.readUint64()); msg.setCreatedAt(value); break; - case 16: + case 15: var value = /** @type {number} */ (reader.readUint64()); msg.setUpdatedAt(value); break; - case 17: + case 16: var value = /** @type {number} */ (reader.readUint64()); msg.setDeletedAt(value); break; @@ -270,9 +265,13 @@ proto.bet.beteran.member.Member.serializeBinaryToWriter = function ( if (f.length > 0) { writer.writeString(1, f); } - f = message.getDomainId(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getSite(); + if (f != null) { + writer.writeMessage( + 2, + f, + models_domain_site_pb.Site.serializeBinaryToWriter + ); } f = message.getMemberClass(); if (f != null) { @@ -290,65 +289,57 @@ proto.bet.beteran.member.Member.serializeBinaryToWriter = function ( models_member_member_level_pb.MemberLevel.serializeBinaryToWriter ); } - f = message.getMemberSite(); - if (f != null) { - writer.writeMessage( - 5, - f, - models_member_member_site_pb.MemberSite.serializeBinaryToWriter - ); - } f = message.getReferrer(); if (f != null) { writer.writeMessage( - 6, + 5, f, proto.bet.beteran.member.Member.serializeBinaryToWriter ); } f = message.getReferredCount(); if (f !== 0) { - writer.writeUint64(7, f); + writer.writeUint64(6, f); } f = message.getUsername(); if (f.length > 0) { - writer.writeString(8, f); + writer.writeString(7, f); } f = message.getNickname(); if (f.length > 0) { - writer.writeString(9, f); + writer.writeString(8, f); } - f = /** @type {string} */ (jspb.Message.getField(message, 10)); + f = /** @type {string} */ (jspb.Message.getField(message, 9)); if (f != null) { - writer.writeString(10, f); + writer.writeString(9, f); } f = message.getState(); if (f !== 0.0) { - writer.writeEnum(11, f); + writer.writeEnum(10, f); } - f = /** @type {number} */ (jspb.Message.getField(message, 12)); + f = /** @type {number} */ (jspb.Message.getField(message, 11)); if (f != null) { - writer.writeUint64(12, f); + writer.writeUint64(11, f); } - f = /** @type {string} */ (jspb.Message.getField(message, 13)); + f = /** @type {string} */ (jspb.Message.getField(message, 12)); if (f != null) { - writer.writeString(13, f); + writer.writeString(12, f); } - f = /** @type {number} */ (jspb.Message.getField(message, 14)); + f = /** @type {number} */ (jspb.Message.getField(message, 13)); if (f != null) { - writer.writeUint64(14, f); + writer.writeUint64(13, f); } f = message.getCreatedAt(); if (f !== 0) { - writer.writeUint64(15, f); + writer.writeUint64(14, f); } f = message.getUpdatedAt(); if (f !== 0) { - writer.writeUint64(16, f); + writer.writeUint64(15, f); } - f = /** @type {number} */ (jspb.Message.getField(message, 17)); + f = /** @type {number} */ (jspb.Message.getField(message, 16)); if (f != null) { - writer.writeUint64(17, f); + writer.writeUint64(16, f); } }; @@ -369,19 +360,37 @@ proto.bet.beteran.member.Member.prototype.setId = function (value) { }; /** - * optional string domain_id = 2; - * @return {string} + * optional bet.beteran.domain.Site site = 2; + * @return {?proto.bet.beteran.domain.Site} */ -proto.bet.beteran.member.Member.prototype.getDomainId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.bet.beteran.member.Member.prototype.getSite = function () { + return /** @type{?proto.bet.beteran.domain.Site} */ ( + jspb.Message.getWrapperField(this, models_domain_site_pb.Site, 2) + ); }; /** - * @param {string} value + * @param {?proto.bet.beteran.domain.Site|undefined} value * @return {!proto.bet.beteran.member.Member} returns this */ -proto.bet.beteran.member.Member.prototype.setDomainId = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.bet.beteran.member.Member.prototype.setSite = function (value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearSite = function () { + return this.setSite(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasSite = function () { + return jspb.Message.getField(this, 2) != null; }; /** @@ -461,50 +470,12 @@ proto.bet.beteran.member.Member.prototype.hasMemberLevel = function () { }; /** - * optional MemberSite member_site = 5; - * @return {?proto.bet.beteran.member.MemberSite} - */ -proto.bet.beteran.member.Member.prototype.getMemberSite = function () { - return /** @type{?proto.bet.beteran.member.MemberSite} */ ( - jspb.Message.getWrapperField( - this, - models_member_member_site_pb.MemberSite, - 5 - ) - ); -}; - -/** - * @param {?proto.bet.beteran.member.MemberSite|undefined} value - * @return {!proto.bet.beteran.member.Member} returns this - */ -proto.bet.beteran.member.Member.prototype.setMemberSite = function (value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - -/** - * Clears the message field making it undefined. - * @return {!proto.bet.beteran.member.Member} returns this - */ -proto.bet.beteran.member.Member.prototype.clearMemberSite = function () { - return this.setMemberSite(undefined); -}; - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.bet.beteran.member.Member.prototype.hasMemberSite = function () { - return jspb.Message.getField(this, 5) != null; -}; - -/** - * optional Member referrer = 6; + * optional Member referrer = 5; * @return {?proto.bet.beteran.member.Member} */ proto.bet.beteran.member.Member.prototype.getReferrer = function () { return /** @type{?proto.bet.beteran.member.Member} */ ( - jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 6) + jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 5) ); }; @@ -513,7 +484,7 @@ proto.bet.beteran.member.Member.prototype.getReferrer = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setReferrer = function (value) { - return jspb.Message.setWrapperField(this, 6, value); + return jspb.Message.setWrapperField(this, 5, value); }; /** @@ -529,15 +500,15 @@ proto.bet.beteran.member.Member.prototype.clearReferrer = function () { * @return {boolean} */ proto.bet.beteran.member.Member.prototype.hasReferrer = function () { - return jspb.Message.getField(this, 6) != null; + return jspb.Message.getField(this, 5) != null; }; /** - * optional uint64 referred_count = 7; + * optional uint64 referred_count = 6; * @return {number} */ proto.bet.beteran.member.Member.prototype.getReferredCount = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @@ -545,15 +516,15 @@ proto.bet.beteran.member.Member.prototype.getReferredCount = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setReferredCount = function (value) { - return jspb.Message.setProto3IntField(this, 7, value); + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional string username = 8; + * optional string username = 7; * @return {string} */ proto.bet.beteran.member.Member.prototype.getUsername = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** @@ -561,15 +532,15 @@ proto.bet.beteran.member.Member.prototype.getUsername = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setUsername = function (value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * optional string nickname = 9; + * optional string nickname = 8; * @return {string} */ proto.bet.beteran.member.Member.prototype.getNickname = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** @@ -577,15 +548,15 @@ proto.bet.beteran.member.Member.prototype.getNickname = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setNickname = function (value) { - return jspb.Message.setProto3StringField(this, 9, value); + return jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional string mobile_phone_number = 10; + * optional string mobile_phone_number = 9; * @return {string} */ proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** @@ -595,7 +566,7 @@ proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () { proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function ( value ) { - return jspb.Message.setField(this, 10, value); + return jspb.Message.setField(this, 9, value); }; /** @@ -603,7 +574,7 @@ proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function ( * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () { - return jspb.Message.setField(this, 10, undefined); + return jspb.Message.setField(this, 9, undefined); }; /** @@ -611,16 +582,16 @@ proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () { * @return {boolean} */ proto.bet.beteran.member.Member.prototype.hasMobilePhoneNumber = function () { - return jspb.Message.getField(this, 10) != null; + return jspb.Message.getField(this, 9) != null; }; /** - * optional MemberState state = 11; + * optional MemberState state = 10; * @return {!proto.bet.beteran.member.MemberState} */ proto.bet.beteran.member.Member.prototype.getState = function () { return /** @type {!proto.bet.beteran.member.MemberState} */ ( - jspb.Message.getFieldWithDefault(this, 11, 0) + jspb.Message.getFieldWithDefault(this, 10, 0) ); }; @@ -629,15 +600,15 @@ proto.bet.beteran.member.Member.prototype.getState = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setState = function (value) { - return jspb.Message.setProto3EnumField(this, 11, value); + return jspb.Message.setProto3EnumField(this, 10, value); }; /** - * optional uint64 state_changed_at = 12; + * optional uint64 state_changed_at = 11; * @return {number} */ proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** @@ -645,7 +616,7 @@ proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) { - return jspb.Message.setField(this, 12, value); + return jspb.Message.setField(this, 11, value); }; /** @@ -653,7 +624,7 @@ proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () { - return jspb.Message.setField(this, 12, undefined); + return jspb.Message.setField(this, 11, undefined); }; /** @@ -661,15 +632,15 @@ proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () { * @return {boolean} */ proto.bet.beteran.member.Member.prototype.hasStateChangedAt = function () { - return jspb.Message.getField(this, 12) != null; + return jspb.Message.getField(this, 11) != null; }; /** - * optional string last_signined_ip = 13; + * optional string last_signined_ip = 12; * @return {string} */ proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** @@ -677,7 +648,7 @@ proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) { - return jspb.Message.setField(this, 13, value); + return jspb.Message.setField(this, 12, value); }; /** @@ -685,7 +656,7 @@ proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () { - return jspb.Message.setField(this, 13, undefined); + return jspb.Message.setField(this, 12, undefined); }; /** @@ -693,15 +664,15 @@ proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () { * @return {boolean} */ proto.bet.beteran.member.Member.prototype.hasLastSigninedIp = function () { - return jspb.Message.getField(this, 13) != null; + return jspb.Message.getField(this, 12) != null; }; /** - * optional uint64 last_signined_at = 14; + * optional uint64 last_signined_at = 13; * @return {number} */ proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** @@ -709,7 +680,7 @@ proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) { - return jspb.Message.setField(this, 14, value); + return jspb.Message.setField(this, 13, value); }; /** @@ -717,7 +688,7 @@ proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () { - return jspb.Message.setField(this, 14, undefined); + return jspb.Message.setField(this, 13, undefined); }; /** @@ -725,15 +696,15 @@ proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () { * @return {boolean} */ proto.bet.beteran.member.Member.prototype.hasLastSigninedAt = function () { - return jspb.Message.getField(this, 14) != null; + return jspb.Message.getField(this, 13) != null; }; /** - * optional uint64 created_at = 15; + * optional uint64 created_at = 14; * @return {number} */ proto.bet.beteran.member.Member.prototype.getCreatedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; /** @@ -741,15 +712,15 @@ proto.bet.beteran.member.Member.prototype.getCreatedAt = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setCreatedAt = function (value) { - return jspb.Message.setProto3IntField(this, 15, value); + return jspb.Message.setProto3IntField(this, 14, value); }; /** - * optional uint64 updated_at = 16; + * optional uint64 updated_at = 15; * @return {number} */ proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; /** @@ -757,15 +728,15 @@ proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setUpdatedAt = function (value) { - return jspb.Message.setProto3IntField(this, 16, value); + return jspb.Message.setProto3IntField(this, 15, value); }; /** - * optional uint64 deleted_at = 17; + * optional uint64 deleted_at = 16; * @return {number} */ proto.bet.beteran.member.Member.prototype.getDeletedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; /** @@ -773,7 +744,7 @@ proto.bet.beteran.member.Member.prototype.getDeletedAt = function () { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) { - return jspb.Message.setField(this, 17, value); + return jspb.Message.setField(this, 16, value); }; /** @@ -781,7 +752,7 @@ proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) { * @return {!proto.bet.beteran.member.Member} returns this */ proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () { - return jspb.Message.setField(this, 17, undefined); + return jspb.Message.setField(this, 16, undefined); }; /** @@ -789,7 +760,7 @@ proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () { * @return {boolean} */ proto.bet.beteran.member.Member.prototype.hasDeletedAt = function () { - return jspb.Message.getField(this, 17) != null; + return jspb.Message.getField(this, 16) != null; }; /** diff --git a/src/app/modules/protobuf/models/rbac/resource_action_pb.d.ts b/src/app/modules/protobuf/models/rbac/resource_action_pb.d.ts new file mode 100644 index 0000000..4734e69 --- /dev/null +++ b/src/app/modules/protobuf/models/rbac/resource_action_pb.d.ts @@ -0,0 +1,66 @@ +// package: bet.beteran.rbac +// file: models/rbac/resource_action.proto + +import * as jspb from 'google-protobuf'; +import * as models_rbac_resource_pb from '../../models/rbac/resource_pb'; + +export class ResourceAction extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasResource(): boolean; + clearResource(): void; + getResource(): models_rbac_resource_pb.Resource | undefined; + setResource(value?: models_rbac_resource_pb.Resource): void; + + getName(): string; + setName(value: string): void; + + getKey(): string; + setKey(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getCanUse(): boolean; + setCanUse(value: boolean): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceAction.AsObject; + static toObject( + includeInstance: boolean, + msg: ResourceAction + ): ResourceAction.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ResourceAction, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): ResourceAction; + static deserializeBinaryFromReader( + message: ResourceAction, + reader: jspb.BinaryReader + ): ResourceAction; +} + +export namespace ResourceAction { + export type AsObject = { + id: string; + resource?: models_rbac_resource_pb.Resource.AsObject; + name: string; + key: string; + description: string; + canUse: boolean; + createdAt: number; + updatedAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/rbac/resource_action_pb.js b/src/app/modules/protobuf/models/rbac/resource_action_pb.js new file mode 100644 index 0000000..b646ac7 --- /dev/null +++ b/src/app/modules/protobuf/models/rbac/resource_action_pb.js @@ -0,0 +1,391 @@ +// source: models/rbac/resource_action.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var models_rbac_resource_pb = require("../../models/rbac/resource_pb.js"); +goog.object.extend(proto, models_rbac_resource_pb); +goog.exportSymbol("proto.bet.beteran.rbac.ResourceAction", null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bet.beteran.rbac.ResourceAction = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.rbac.ResourceAction, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.rbac.ResourceAction.displayName = + "proto.bet.beteran.rbac.ResourceAction"; +} + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.rbac.ResourceAction.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.rbac.ResourceAction.toObject( + opt_includeInstance, + this + ); + }; + + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.rbac.ResourceAction} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.rbac.ResourceAction.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + resource: + (f = msg.getResource()) && + models_rbac_resource_pb.Resource.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + key: jspb.Message.getFieldWithDefault(msg, 4, ""), + description: jspb.Message.getFieldWithDefault(msg, 5, ""), + canUse: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.rbac.ResourceAction} + */ +proto.bet.beteran.rbac.ResourceAction.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.rbac.ResourceAction(); + return proto.bet.beteran.rbac.ResourceAction.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.rbac.ResourceAction} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.rbac.ResourceAction} + */ +proto.bet.beteran.rbac.ResourceAction.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new models_rbac_resource_pb.Resource(); + reader.readMessage( + value, + models_rbac_resource_pb.Resource.deserializeBinaryFromReader + ); + msg.setResource(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCanUse(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.rbac.ResourceAction.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.rbac.ResourceAction} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.rbac.ResourceAction.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getResource(); + if (f != null) { + writer.writeMessage( + 2, + f, + models_rbac_resource_pb.Resource.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString(4, f); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString(5, f); + } + f = message.getCanUse(); + if (f) { + writer.writeBool(6, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(7, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(8, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional Resource resource = 2; + * @return {?proto.bet.beteran.rbac.Resource} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getResource = function () { + return /** @type{?proto.bet.beteran.rbac.Resource} */ ( + jspb.Message.getWrapperField(this, models_rbac_resource_pb.Resource, 2) + ); +}; + +/** + * @param {?proto.bet.beteran.rbac.Resource|undefined} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setResource = function (value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.clearResource = function () { + return this.setResource(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.hasResource = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional string name = 3; + * @return {string} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getName = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setName = function (value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + +/** + * optional string key = 4; + * @return {string} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getKey = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setKey = function (value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + +/** + * optional string description = 5; + * @return {string} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getDescription = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setDescription = function ( + value +) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + +/** + * optional bool can_use = 6; + * @return {boolean} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getCanUse = function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 6, false) + ); +}; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setCanUse = function (value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + +/** + * optional uint64 created_at = 7; + * @return {number} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setCreatedAt = function ( + value +) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + +/** + * optional uint64 updated_at = 8; + * @return {number} + */ +proto.bet.beteran.rbac.ResourceAction.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.rbac.ResourceAction} returns this + */ +proto.bet.beteran.rbac.ResourceAction.prototype.setUpdatedAt = function ( + value +) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + +goog.object.extend(exports, proto.bet.beteran.rbac); diff --git a/src/app/modules/protobuf/models/rbac/resource_pb.d.ts b/src/app/modules/protobuf/models/rbac/resource_pb.d.ts new file mode 100644 index 0000000..a17a0eb --- /dev/null +++ b/src/app/modules/protobuf/models/rbac/resource_pb.d.ts @@ -0,0 +1,62 @@ +// package: bet.beteran.rbac +// file: models/rbac/resource.proto + +import * as jspb from 'google-protobuf'; + +export class Resource extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasParent(): boolean; + clearParent(): void; + getParent(): Resource | undefined; + setParent(value?: Resource): void; + + getName(): string; + setName(value: string): void; + + getKey(): string; + setKey(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getCanUse(): boolean; + setCanUse(value: boolean): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Resource.AsObject; + static toObject(includeInstance: boolean, msg: Resource): Resource.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Resource, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Resource; + static deserializeBinaryFromReader( + message: Resource, + reader: jspb.BinaryReader + ): Resource; +} + +export namespace Resource { + export type AsObject = { + id: string; + parent?: Resource.AsObject; + name: string; + key: string; + description: string; + canUse: boolean; + createdAt: number; + updatedAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/rbac/resource_pb.js b/src/app/modules/protobuf/models/rbac/resource_pb.js new file mode 100644 index 0000000..e79497f --- /dev/null +++ b/src/app/modules/protobuf/models/rbac/resource_pb.js @@ -0,0 +1,377 @@ +// source: models/rbac/resource.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.beteran.rbac.Resource", null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bet.beteran.rbac.Resource = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.rbac.Resource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.rbac.Resource.displayName = + "proto.bet.beteran.rbac.Resource"; +} + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.rbac.Resource.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.rbac.Resource.toObject(opt_includeInstance, this); + }; + + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.rbac.Resource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.rbac.Resource.toObject = function (includeInstance, msg) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + parent: + (f = msg.getParent()) && + proto.bet.beteran.rbac.Resource.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + key: jspb.Message.getFieldWithDefault(msg, 4, ""), + description: jspb.Message.getFieldWithDefault(msg, 5, ""), + canUse: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.rbac.Resource} + */ +proto.bet.beteran.rbac.Resource.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.rbac.Resource(); + return proto.bet.beteran.rbac.Resource.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.rbac.Resource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.rbac.Resource} + */ +proto.bet.beteran.rbac.Resource.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.bet.beteran.rbac.Resource(); + reader.readMessage( + value, + proto.bet.beteran.rbac.Resource.deserializeBinaryFromReader + ); + msg.setParent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCanUse(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.rbac.Resource.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.rbac.Resource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.rbac.Resource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.rbac.Resource.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getParent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.rbac.Resource.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString(4, f); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString(5, f); + } + f = message.getCanUse(); + if (f) { + writer.writeBool(6, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(7, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(8, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.rbac.Resource.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional Resource parent = 2; + * @return {?proto.bet.beteran.rbac.Resource} + */ +proto.bet.beteran.rbac.Resource.prototype.getParent = function () { + return /** @type{?proto.bet.beteran.rbac.Resource} */ ( + jspb.Message.getWrapperField(this, proto.bet.beteran.rbac.Resource, 2) + ); +}; + +/** + * @param {?proto.bet.beteran.rbac.Resource|undefined} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setParent = function (value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.clearParent = function () { + return this.setParent(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.rbac.Resource.prototype.hasParent = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional string name = 3; + * @return {string} + */ +proto.bet.beteran.rbac.Resource.prototype.getName = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setName = function (value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + +/** + * optional string key = 4; + * @return {string} + */ +proto.bet.beteran.rbac.Resource.prototype.getKey = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setKey = function (value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + +/** + * optional string description = 5; + * @return {string} + */ +proto.bet.beteran.rbac.Resource.prototype.getDescription = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setDescription = function (value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + +/** + * optional bool can_use = 6; + * @return {boolean} + */ +proto.bet.beteran.rbac.Resource.prototype.getCanUse = function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 6, false) + ); +}; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setCanUse = function (value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + +/** + * optional uint64 created_at = 7; + * @return {number} + */ +proto.bet.beteran.rbac.Resource.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + +/** + * optional uint64 updated_at = 8; + * @return {number} + */ +proto.bet.beteran.rbac.Resource.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.rbac.Resource} returns this + */ +proto.bet.beteran.rbac.Resource.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + +goog.object.extend(exports, proto.bet.beteran.rbac); diff --git a/src/app/modules/protobuf/models/rbac/role_pb.d.ts b/src/app/modules/protobuf/models/rbac/role_pb.d.ts new file mode 100644 index 0000000..c89e654 --- /dev/null +++ b/src/app/modules/protobuf/models/rbac/role_pb.d.ts @@ -0,0 +1,63 @@ +// package: bet.beteran.rbac +// file: models/rbac/role.proto + +import * as jspb from 'google-protobuf'; +import * as models_rbac_resource_pb from '../../models/rbac/resource_pb'; + +export class Role extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasParent(): boolean; + clearParent(): void; + getParent(): Role | undefined; + setParent(value?: Role): void; + + getName(): string; + setName(value: string): void; + + getKey(): string; + setKey(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getCanUse(): boolean; + setCanUse(value: boolean): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Role.AsObject; + static toObject(includeInstance: boolean, msg: Role): Role.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Role, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Role; + static deserializeBinaryFromReader( + message: Role, + reader: jspb.BinaryReader + ): Role; +} + +export namespace Role { + export type AsObject = { + id: string; + parent?: Role.AsObject; + name: string; + key: string; + description: string; + canUse: boolean; + createdAt: number; + updatedAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/rbac/role_pb.js b/src/app/modules/protobuf/models/rbac/role_pb.js new file mode 100644 index 0000000..648e4f7 --- /dev/null +++ b/src/app/modules/protobuf/models/rbac/role_pb.js @@ -0,0 +1,375 @@ +// source: models/rbac/role.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var models_rbac_resource_pb = require("../../models/rbac/resource_pb.js"); +goog.object.extend(proto, models_rbac_resource_pb); +goog.exportSymbol("proto.bet.beteran.rbac.Role", null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.bet.beteran.rbac.Role = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.rbac.Role, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.rbac.Role.displayName = "proto.bet.beteran.rbac.Role"; +} + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.rbac.Role.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.rbac.Role.toObject(opt_includeInstance, this); + }; + + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.rbac.Role} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.rbac.Role.toObject = function (includeInstance, msg) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + parent: + (f = msg.getParent()) && + proto.bet.beteran.rbac.Role.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + key: jspb.Message.getFieldWithDefault(msg, 4, ""), + description: jspb.Message.getFieldWithDefault(msg, 5, ""), + canUse: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.rbac.Role} + */ +proto.bet.beteran.rbac.Role.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.rbac.Role(); + return proto.bet.beteran.rbac.Role.deserializeBinaryFromReader(msg, reader); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.rbac.Role} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.rbac.Role} + */ +proto.bet.beteran.rbac.Role.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.bet.beteran.rbac.Role(); + reader.readMessage( + value, + proto.bet.beteran.rbac.Role.deserializeBinaryFromReader + ); + msg.setParent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCanUse(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.rbac.Role.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.rbac.Role.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.rbac.Role} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.rbac.Role.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getParent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.rbac.Role.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString(4, f); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString(5, f); + } + f = message.getCanUse(); + if (f) { + writer.writeBool(6, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(7, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(8, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.rbac.Role.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional Role parent = 2; + * @return {?proto.bet.beteran.rbac.Role} + */ +proto.bet.beteran.rbac.Role.prototype.getParent = function () { + return /** @type{?proto.bet.beteran.rbac.Role} */ ( + jspb.Message.getWrapperField(this, proto.bet.beteran.rbac.Role, 2) + ); +}; + +/** + * @param {?proto.bet.beteran.rbac.Role|undefined} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setParent = function (value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.clearParent = function () { + return this.setParent(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.rbac.Role.prototype.hasParent = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional string name = 3; + * @return {string} + */ +proto.bet.beteran.rbac.Role.prototype.getName = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setName = function (value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + +/** + * optional string key = 4; + * @return {string} + */ +proto.bet.beteran.rbac.Role.prototype.getKey = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setKey = function (value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + +/** + * optional string description = 5; + * @return {string} + */ +proto.bet.beteran.rbac.Role.prototype.getDescription = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setDescription = function (value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + +/** + * optional bool can_use = 6; + * @return {boolean} + */ +proto.bet.beteran.rbac.Role.prototype.getCanUse = function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 6, false) + ); +}; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setCanUse = function (value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + +/** + * optional uint64 created_at = 7; + * @return {number} + */ +proto.bet.beteran.rbac.Role.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + +/** + * optional uint64 updated_at = 8; + * @return {number} + */ +proto.bet.beteran.rbac.Role.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.rbac.Role} returns this + */ +proto.bet.beteran.rbac.Role.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + +goog.object.extend(exports, proto.bet.beteran.rbac);