diff --git a/keeperapi/src/proto.d.ts b/keeperapi/src/proto.d.ts index 31949811..948fb5f0 100644 --- a/keeperapi/src/proto.d.ts +++ b/keeperapi/src/proto.d.ts @@ -102774,6 +102774,9 @@ export namespace Router { /** RouterUserAuth mcEnterpriseId */ mcEnterpriseId?: (number|null); + + /** RouterUserAuth deviceId */ + deviceId?: (number|null); } /** Represents a RouterUserAuth. */ @@ -102821,6 +102824,9 @@ export namespace Router { /** RouterUserAuth mcEnterpriseId. */ public mcEnterpriseId: number; + /** RouterUserAuth deviceId. */ + public deviceId?: (number|null); + /** * Creates a new RouterUserAuth instance using the specified properties. * @param [properties] Properties to set @@ -107077,6 +107083,233 @@ export namespace Router { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** UserAccessLoweredEventType enum. */ + enum UserAccessLoweredEventType { + UALE_UNSPECIFIED = 0, + UALE_DEVICE_LOGOUT = 1, + UALE_USER_LOGOUT_ALL_DEVICES = 2, + UALE_ENFORCEMENT_REMOVED = 3, + UALE_RECORD_ACCESS_LOST = 4 + } + + /** Properties of a UserAccessLoweredEvent. */ + interface IUserAccessLoweredEvent { + + /** UserAccessLoweredEvent eventType */ + eventType?: (Router.UserAccessLoweredEventType|null); + + /** UserAccessLoweredEvent enterpriseUserIds */ + enterpriseUserIds?: (number[]|null); + + /** UserAccessLoweredEvent recordUids */ + recordUids?: (Uint8Array[]|null); + + /** UserAccessLoweredEvent deviceId */ + deviceId?: (number|null); + + /** UserAccessLoweredEvent enforcementTypeId */ + enforcementTypeId?: (number|null); + } + + /** Represents a UserAccessLoweredEvent. */ + class UserAccessLoweredEvent implements IUserAccessLoweredEvent { + + /** + * Constructs a new UserAccessLoweredEvent. + * @param [properties] Properties to set + */ + constructor(properties?: Router.IUserAccessLoweredEvent); + + /** UserAccessLoweredEvent eventType. */ + public eventType: Router.UserAccessLoweredEventType; + + /** UserAccessLoweredEvent enterpriseUserIds. */ + public enterpriseUserIds: number[]; + + /** UserAccessLoweredEvent recordUids. */ + public recordUids: Uint8Array[]; + + /** UserAccessLoweredEvent deviceId. */ + public deviceId?: (number|null); + + /** UserAccessLoweredEvent enforcementTypeId. */ + public enforcementTypeId?: (number|null); + + /** + * Creates a new UserAccessLoweredEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UserAccessLoweredEvent instance + */ + public static create(properties?: Router.IUserAccessLoweredEvent): Router.UserAccessLoweredEvent; + + /** + * Encodes the specified UserAccessLoweredEvent message. Does not implicitly {@link Router.UserAccessLoweredEvent.verify|verify} messages. + * @param message UserAccessLoweredEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: Router.IUserAccessLoweredEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserAccessLoweredEvent message, length delimited. Does not implicitly {@link Router.UserAccessLoweredEvent.verify|verify} messages. + * @param message UserAccessLoweredEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: Router.IUserAccessLoweredEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserAccessLoweredEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserAccessLoweredEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Router.UserAccessLoweredEvent; + + /** + * Decodes a UserAccessLoweredEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserAccessLoweredEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Router.UserAccessLoweredEvent; + + /** + * Verifies a UserAccessLoweredEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserAccessLoweredEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserAccessLoweredEvent + */ + public static fromObject(object: { [k: string]: any }): Router.UserAccessLoweredEvent; + + /** + * Creates a plain object from a UserAccessLoweredEvent message. Also converts values to other types if specified. + * @param message UserAccessLoweredEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: Router.UserAccessLoweredEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserAccessLoweredEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserAccessLoweredEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserAccessLoweredEventsRequest. */ + interface IUserAccessLoweredEventsRequest { + + /** UserAccessLoweredEventsRequest events */ + events?: (Router.IUserAccessLoweredEvent[]|null); + } + + /** Represents a UserAccessLoweredEventsRequest. */ + class UserAccessLoweredEventsRequest implements IUserAccessLoweredEventsRequest { + + /** + * Constructs a new UserAccessLoweredEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: Router.IUserAccessLoweredEventsRequest); + + /** UserAccessLoweredEventsRequest events. */ + public events: Router.IUserAccessLoweredEvent[]; + + /** + * Creates a new UserAccessLoweredEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UserAccessLoweredEventsRequest instance + */ + public static create(properties?: Router.IUserAccessLoweredEventsRequest): Router.UserAccessLoweredEventsRequest; + + /** + * Encodes the specified UserAccessLoweredEventsRequest message. Does not implicitly {@link Router.UserAccessLoweredEventsRequest.verify|verify} messages. + * @param message UserAccessLoweredEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: Router.IUserAccessLoweredEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserAccessLoweredEventsRequest message, length delimited. Does not implicitly {@link Router.UserAccessLoweredEventsRequest.verify|verify} messages. + * @param message UserAccessLoweredEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: Router.IUserAccessLoweredEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserAccessLoweredEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserAccessLoweredEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Router.UserAccessLoweredEventsRequest; + + /** + * Decodes a UserAccessLoweredEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserAccessLoweredEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Router.UserAccessLoweredEventsRequest; + + /** + * Verifies a UserAccessLoweredEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserAccessLoweredEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserAccessLoweredEventsRequest + */ + public static fromObject(object: { [k: string]: any }): Router.UserAccessLoweredEventsRequest; + + /** + * Creates a plain object from a UserAccessLoweredEventsRequest message. Also converts values to other types if specified. + * @param message UserAccessLoweredEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: Router.UserAccessLoweredEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserAccessLoweredEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserAccessLoweredEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Namespace PAM. */ @@ -111594,6 +111827,9 @@ export namespace PAM { /** NhiUidEntry ksmNhi */ ksmNhi?: (boolean|null); + + /** NhiUidEntry appUid */ + appUid?: (string|null); } /** Represents a NhiUidEntry. */ @@ -111614,6 +111850,9 @@ export namespace PAM { /** NhiUidEntry ksmNhi. */ public ksmNhi: boolean; + /** NhiUidEntry appUid. */ + public appUid: string; + /** * Creates a new NhiUidEntry instance using the specified properties. * @param [properties] Properties to set @@ -111892,6 +112131,206 @@ export namespace PAM { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SetNhiKsmEffectiveDateRequest. */ + interface ISetNhiKsmEffectiveDateRequest { + + /** SetNhiKsmEffectiveDateRequest effectiveDate */ + effectiveDate?: (number|null); + } + + /** Represents a SetNhiKsmEffectiveDateRequest. */ + class SetNhiKsmEffectiveDateRequest implements ISetNhiKsmEffectiveDateRequest { + + /** + * Constructs a new SetNhiKsmEffectiveDateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: PAM.ISetNhiKsmEffectiveDateRequest); + + /** SetNhiKsmEffectiveDateRequest effectiveDate. */ + public effectiveDate: number; + + /** + * Creates a new SetNhiKsmEffectiveDateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNhiKsmEffectiveDateRequest instance + */ + public static create(properties?: PAM.ISetNhiKsmEffectiveDateRequest): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Encodes the specified SetNhiKsmEffectiveDateRequest message. Does not implicitly {@link PAM.SetNhiKsmEffectiveDateRequest.verify|verify} messages. + * @param message SetNhiKsmEffectiveDateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: PAM.ISetNhiKsmEffectiveDateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetNhiKsmEffectiveDateRequest message, length delimited. Does not implicitly {@link PAM.SetNhiKsmEffectiveDateRequest.verify|verify} messages. + * @param message SetNhiKsmEffectiveDateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: PAM.ISetNhiKsmEffectiveDateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNhiKsmEffectiveDateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNhiKsmEffectiveDateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Decodes a SetNhiKsmEffectiveDateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetNhiKsmEffectiveDateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Verifies a SetNhiKsmEffectiveDateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetNhiKsmEffectiveDateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNhiKsmEffectiveDateRequest + */ + public static fromObject(object: { [k: string]: any }): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Creates a plain object from a SetNhiKsmEffectiveDateRequest message. Also converts values to other types if specified. + * @param message SetNhiKsmEffectiveDateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: PAM.SetNhiKsmEffectiveDateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNhiKsmEffectiveDateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNhiKsmEffectiveDateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetNhiKsmEffectiveDateResponse. */ + interface IGetNhiKsmEffectiveDateResponse { + + /** GetNhiKsmEffectiveDateResponse effectiveDate */ + effectiveDate?: (number|null); + + /** GetNhiKsmEffectiveDateResponse defaultDate */ + defaultDate?: (number|null); + } + + /** Represents a GetNhiKsmEffectiveDateResponse. */ + class GetNhiKsmEffectiveDateResponse implements IGetNhiKsmEffectiveDateResponse { + + /** + * Constructs a new GetNhiKsmEffectiveDateResponse. + * @param [properties] Properties to set + */ + constructor(properties?: PAM.IGetNhiKsmEffectiveDateResponse); + + /** GetNhiKsmEffectiveDateResponse effectiveDate. */ + public effectiveDate: number; + + /** GetNhiKsmEffectiveDateResponse defaultDate. */ + public defaultDate: number; + + /** + * Creates a new GetNhiKsmEffectiveDateResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNhiKsmEffectiveDateResponse instance + */ + public static create(properties?: PAM.IGetNhiKsmEffectiveDateResponse): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Encodes the specified GetNhiKsmEffectiveDateResponse message. Does not implicitly {@link PAM.GetNhiKsmEffectiveDateResponse.verify|verify} messages. + * @param message GetNhiKsmEffectiveDateResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: PAM.IGetNhiKsmEffectiveDateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNhiKsmEffectiveDateResponse message, length delimited. Does not implicitly {@link PAM.GetNhiKsmEffectiveDateResponse.verify|verify} messages. + * @param message GetNhiKsmEffectiveDateResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: PAM.IGetNhiKsmEffectiveDateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNhiKsmEffectiveDateResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNhiKsmEffectiveDateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Decodes a GetNhiKsmEffectiveDateResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNhiKsmEffectiveDateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Verifies a GetNhiKsmEffectiveDateResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNhiKsmEffectiveDateResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNhiKsmEffectiveDateResponse + */ + public static fromObject(object: { [k: string]: any }): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Creates a plain object from a GetNhiKsmEffectiveDateResponse message. Also converts values to other types if specified. + * @param message GetNhiKsmEffectiveDateResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: PAM.GetNhiKsmEffectiveDateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNhiKsmEffectiveDateResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNhiKsmEffectiveDateResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a PAMUniversalSyncPreCheckRequest. */ interface IPAMUniversalSyncPreCheckRequest { diff --git a/keeperapi/src/proto.js b/keeperapi/src/proto.js index 91c6444c..ee13eab5 100644 --- a/keeperapi/src/proto.js +++ b/keeperapi/src/proto.js @@ -331,7 +331,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ QrcMessageKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -417,19 +417,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientEcPublicKey != null && message.hasOwnProperty("clientEcPublicKey")) + if (message.clientEcPublicKey != null && Object.hasOwnProperty.call(message, "clientEcPublicKey")) if (!(message.clientEcPublicKey && typeof message.clientEcPublicKey.length === "number" || $util.isString(message.clientEcPublicKey))) return "clientEcPublicKey: buffer expected"; - if (message.mlKemEncapsulatedKey != null && message.hasOwnProperty("mlKemEncapsulatedKey")) + if (message.mlKemEncapsulatedKey != null && Object.hasOwnProperty.call(message, "mlKemEncapsulatedKey")) if (!(message.mlKemEncapsulatedKey && typeof message.mlKemEncapsulatedKey.length === "number" || $util.isString(message.mlKemEncapsulatedKey))) return "mlKemEncapsulatedKey: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.msgVersion != null && message.hasOwnProperty("msgVersion")) + if (message.msgVersion != null && Object.hasOwnProperty.call(message, "msgVersion")) if (!$util.isInteger(message.msgVersion)) return "msgVersion: integer expected"; - if (message.ecKeyId != null && message.hasOwnProperty("ecKeyId")) + if (message.ecKeyId != null && Object.hasOwnProperty.call(message, "ecKeyId")) if (!$util.isInteger(message.ecKeyId)) return "ecKeyId: integer expected"; return null; @@ -446,6 +446,8 @@ export const Authentication = $root.Authentication = (() => { QrcMessageKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.QrcMessageKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.QrcMessageKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -515,15 +517,15 @@ export const Authentication = $root.Authentication = (() => { object.msgVersion = 0; object.ecKeyId = 0; } - if (message.clientEcPublicKey != null && message.hasOwnProperty("clientEcPublicKey")) + if (message.clientEcPublicKey != null && Object.hasOwnProperty.call(message, "clientEcPublicKey")) object.clientEcPublicKey = options.bytes === String ? $util.base64.encode(message.clientEcPublicKey, 0, message.clientEcPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientEcPublicKey) : message.clientEcPublicKey; - if (message.mlKemEncapsulatedKey != null && message.hasOwnProperty("mlKemEncapsulatedKey")) + if (message.mlKemEncapsulatedKey != null && Object.hasOwnProperty.call(message, "mlKemEncapsulatedKey")) object.mlKemEncapsulatedKey = options.bytes === String ? $util.base64.encode(message.mlKemEncapsulatedKey, 0, message.mlKemEncapsulatedKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mlKemEncapsulatedKey) : message.mlKemEncapsulatedKey; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.msgVersion != null && message.hasOwnProperty("msgVersion")) + if (message.msgVersion != null && Object.hasOwnProperty.call(message, "msgVersion")) object.msgVersion = message.msgVersion; - if (message.ecKeyId != null && message.hasOwnProperty("ecKeyId")) + if (message.ecKeyId != null && Object.hasOwnProperty.call(message, "ecKeyId")) object.ecKeyId = message.ecKeyId; return object; }; @@ -709,7 +711,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ApiRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -807,28 +809,28 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedTransmissionKey != null && message.hasOwnProperty("encryptedTransmissionKey")) + if (message.encryptedTransmissionKey != null && Object.hasOwnProperty.call(message, "encryptedTransmissionKey")) if (!(message.encryptedTransmissionKey && typeof message.encryptedTransmissionKey.length === "number" || $util.isString(message.encryptedTransmissionKey))) return "encryptedTransmissionKey: buffer expected"; - if (message.publicKeyId != null && message.hasOwnProperty("publicKeyId")) + if (message.publicKeyId != null && Object.hasOwnProperty.call(message, "publicKeyId")) if (!$util.isInteger(message.publicKeyId)) return "publicKeyId: integer expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; - if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) + if (message.encryptedPayload != null && Object.hasOwnProperty.call(message, "encryptedPayload")) if (!(message.encryptedPayload && typeof message.encryptedPayload.length === "number" || $util.isString(message.encryptedPayload))) return "encryptedPayload: buffer expected"; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) if (!$util.isInteger(message.encryptionType)) return "encryptionType: integer expected"; - if (message.recaptcha != null && message.hasOwnProperty("recaptcha")) + if (message.recaptcha != null && Object.hasOwnProperty.call(message, "recaptcha")) if (!$util.isString(message.recaptcha)) return "recaptcha: string expected"; - if (message.subEnvironment != null && message.hasOwnProperty("subEnvironment")) + if (message.subEnvironment != null && Object.hasOwnProperty.call(message, "subEnvironment")) if (!$util.isString(message.subEnvironment)) return "subEnvironment: string expected"; - if (message.qrcMessageKey != null && message.hasOwnProperty("qrcMessageKey")) { + if (message.qrcMessageKey != null && Object.hasOwnProperty.call(message, "qrcMessageKey")) { let error = $root.Authentication.QrcMessageKey.verify(message.qrcMessageKey, long + 1); if (error) return "qrcMessageKey." + error; @@ -847,6 +849,8 @@ export const Authentication = $root.Authentication = (() => { ApiRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ApiRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ApiRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -873,7 +877,7 @@ export const Authentication = $root.Authentication = (() => { if (object.subEnvironment != null) message.subEnvironment = String(object.subEnvironment); if (object.qrcMessageKey != null) { - if (typeof object.qrcMessageKey !== "object") + if (!$util.isObject(object.qrcMessageKey)) throw TypeError(".Authentication.ApiRequest.qrcMessageKey: object expected"); message.qrcMessageKey = $root.Authentication.QrcMessageKey.fromObject(object.qrcMessageKey, long + 1); } @@ -919,21 +923,21 @@ export const Authentication = $root.Authentication = (() => { object.subEnvironment = ""; object.qrcMessageKey = null; } - if (message.encryptedTransmissionKey != null && message.hasOwnProperty("encryptedTransmissionKey")) + if (message.encryptedTransmissionKey != null && Object.hasOwnProperty.call(message, "encryptedTransmissionKey")) object.encryptedTransmissionKey = options.bytes === String ? $util.base64.encode(message.encryptedTransmissionKey, 0, message.encryptedTransmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTransmissionKey) : message.encryptedTransmissionKey; - if (message.publicKeyId != null && message.hasOwnProperty("publicKeyId")) + if (message.publicKeyId != null && Object.hasOwnProperty.call(message, "publicKeyId")) object.publicKeyId = message.publicKeyId; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; - if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) + if (message.encryptedPayload != null && Object.hasOwnProperty.call(message, "encryptedPayload")) object.encryptedPayload = options.bytes === String ? $util.base64.encode(message.encryptedPayload, 0, message.encryptedPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPayload) : message.encryptedPayload; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) object.encryptionType = message.encryptionType; - if (message.recaptcha != null && message.hasOwnProperty("recaptcha")) + if (message.recaptcha != null && Object.hasOwnProperty.call(message, "recaptcha")) object.recaptcha = message.recaptcha; - if (message.subEnvironment != null && message.hasOwnProperty("subEnvironment")) + if (message.subEnvironment != null && Object.hasOwnProperty.call(message, "subEnvironment")) object.subEnvironment = message.subEnvironment; - if (message.qrcMessageKey != null && message.hasOwnProperty("qrcMessageKey")) + if (message.qrcMessageKey != null && Object.hasOwnProperty.call(message, "qrcMessageKey")) object.qrcMessageKey = $root.Authentication.QrcMessageKey.toObject(message.qrcMessageKey, options, q + 1); return object; }; @@ -1075,7 +1079,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ApiRequestPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1157,16 +1161,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.timeToken != null && message.hasOwnProperty("timeToken")) + if (message.timeToken != null && Object.hasOwnProperty.call(message, "timeToken")) if (!(message.timeToken && typeof message.timeToken.length === "number" || $util.isString(message.timeToken))) return "timeToken: buffer expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) if (!$util.isInteger(message.apiVersion)) return "apiVersion: integer expected"; return null; @@ -1183,6 +1187,8 @@ export const Authentication = $root.Authentication = (() => { ApiRequestPayload.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ApiRequestPayload) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ApiRequestPayload: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -1249,13 +1255,13 @@ export const Authentication = $root.Authentication = (() => { } object.apiVersion = 0; } - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; - if (message.timeToken != null && message.hasOwnProperty("timeToken")) + if (message.timeToken != null && Object.hasOwnProperty.call(message, "timeToken")) object.timeToken = options.bytes === String ? $util.base64.encode(message.timeToken, 0, message.timeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.timeToken) : message.timeToken; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) object.apiVersion = message.apiVersion; return object; }; @@ -1375,7 +1381,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ Transform.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1449,10 +1455,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; return null; @@ -1469,6 +1475,8 @@ export const Authentication = $root.Authentication = (() => { Transform.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.Transform) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.Transform: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -1520,9 +1528,9 @@ export const Authentication = $root.Authentication = (() => { object.encryptedDeviceToken = $util.newBuffer(object.encryptedDeviceToken); } } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; return object; }; @@ -1675,7 +1683,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1761,16 +1769,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) if (!$util.isString(message.devicePlatform)) return "devicePlatform: string expected"; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) switch (message.clientFormFactor) { default: return "clientFormFactor: enum value expected"; @@ -1780,7 +1788,7 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -1797,6 +1805,8 @@ export const Authentication = $root.Authentication = (() => { DeviceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -1861,15 +1871,15 @@ export const Authentication = $root.Authentication = (() => { object.clientFormFactor = options.enums === String ? "FF_EMPTY" : 0; object.username = ""; } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) object.devicePlatform = message.devicePlatform; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) object.clientFormFactor = options.enums === String ? $root.Authentication.ClientFormFactor[message.clientFormFactor] === undefined ? message.clientFormFactor : $root.Authentication.ClientFormFactor[message.clientFormFactor] : message.clientFormFactor; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -2000,7 +2010,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AuthRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2078,13 +2088,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; return null; @@ -2101,6 +2111,8 @@ export const Authentication = $root.Authentication = (() => { AuthRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AuthRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AuthRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2146,11 +2158,11 @@ export const Authentication = $root.Authentication = (() => { object.encryptedDeviceToken = $util.newBuffer(object.encryptedDeviceToken); } } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; return object; }; @@ -2318,7 +2330,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ NewUserMinimumParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2412,30 +2424,30 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.minimumIterations != null && message.hasOwnProperty("minimumIterations")) + if (message.minimumIterations != null && Object.hasOwnProperty.call(message, "minimumIterations")) if (!$util.isInteger(message.minimumIterations)) return "minimumIterations: integer expected"; - if (message.passwordMatchRegex != null && message.hasOwnProperty("passwordMatchRegex")) { + if (message.passwordMatchRegex != null && Object.hasOwnProperty.call(message, "passwordMatchRegex")) { if (!Array.isArray(message.passwordMatchRegex)) return "passwordMatchRegex: array expected"; for (let i = 0; i < message.passwordMatchRegex.length; ++i) if (!$util.isString(message.passwordMatchRegex[i])) return "passwordMatchRegex: string[] expected"; } - if (message.passwordMatchDescription != null && message.hasOwnProperty("passwordMatchDescription")) { + if (message.passwordMatchDescription != null && Object.hasOwnProperty.call(message, "passwordMatchDescription")) { if (!Array.isArray(message.passwordMatchDescription)) return "passwordMatchDescription: array expected"; for (let i = 0; i < message.passwordMatchDescription.length; ++i) if (!$util.isString(message.passwordMatchDescription[i])) return "passwordMatchDescription: string[] expected"; } - if (message.isEnterpriseDomain != null && message.hasOwnProperty("isEnterpriseDomain")) + if (message.isEnterpriseDomain != null && Object.hasOwnProperty.call(message, "isEnterpriseDomain")) if (typeof message.isEnterpriseDomain !== "boolean") return "isEnterpriseDomain: boolean expected"; - if (message.enterpriseEccPublicKey != null && message.hasOwnProperty("enterpriseEccPublicKey")) + if (message.enterpriseEccPublicKey != null && Object.hasOwnProperty.call(message, "enterpriseEccPublicKey")) if (!(message.enterpriseEccPublicKey && typeof message.enterpriseEccPublicKey.length === "number" || $util.isString(message.enterpriseEccPublicKey))) return "enterpriseEccPublicKey: buffer expected"; - if (message.forbidKeyType2 != null && message.hasOwnProperty("forbidKeyType2")) + if (message.forbidKeyType2 != null && Object.hasOwnProperty.call(message, "forbidKeyType2")) if (typeof message.forbidKeyType2 !== "boolean") return "forbidKeyType2: boolean expected"; return null; @@ -2452,6 +2464,8 @@ export const Authentication = $root.Authentication = (() => { NewUserMinimumParams.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.NewUserMinimumParams) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.NewUserMinimumParams: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2518,7 +2532,7 @@ export const Authentication = $root.Authentication = (() => { } object.forbidKeyType2 = false; } - if (message.minimumIterations != null && message.hasOwnProperty("minimumIterations")) + if (message.minimumIterations != null && Object.hasOwnProperty.call(message, "minimumIterations")) object.minimumIterations = message.minimumIterations; if (message.passwordMatchRegex && message.passwordMatchRegex.length) { object.passwordMatchRegex = []; @@ -2530,11 +2544,11 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.passwordMatchDescription.length; ++j) object.passwordMatchDescription[j] = message.passwordMatchDescription[j]; } - if (message.isEnterpriseDomain != null && message.hasOwnProperty("isEnterpriseDomain")) + if (message.isEnterpriseDomain != null && Object.hasOwnProperty.call(message, "isEnterpriseDomain")) object.isEnterpriseDomain = message.isEnterpriseDomain; - if (message.enterpriseEccPublicKey != null && message.hasOwnProperty("enterpriseEccPublicKey")) + if (message.enterpriseEccPublicKey != null && Object.hasOwnProperty.call(message, "enterpriseEccPublicKey")) object.enterpriseEccPublicKey = options.bytes === String ? $util.base64.encode(message.enterpriseEccPublicKey, 0, message.enterpriseEccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterpriseEccPublicKey) : message.enterpriseEccPublicKey; - if (message.forbidKeyType2 != null && message.hasOwnProperty("forbidKeyType2")) + if (message.forbidKeyType2 != null && Object.hasOwnProperty.call(message, "forbidKeyType2")) object.forbidKeyType2 = message.forbidKeyType2; return object; }; @@ -2665,7 +2679,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PreLoginRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2743,12 +2757,12 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authRequest != null && message.hasOwnProperty("authRequest")) { + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) { let error = $root.Authentication.AuthRequest.verify(message.authRequest, long + 1); if (error) return "authRequest." + error; } - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) switch (message.loginType) { default: return "loginType: enum value expected"; @@ -2761,7 +2775,7 @@ export const Authentication = $root.Authentication = (() => { case 6: break; } - if (message.twoFactorToken != null && message.hasOwnProperty("twoFactorToken")) + if (message.twoFactorToken != null && Object.hasOwnProperty.call(message, "twoFactorToken")) if (!(message.twoFactorToken && typeof message.twoFactorToken.length === "number" || $util.isString(message.twoFactorToken))) return "twoFactorToken: buffer expected"; return null; @@ -2778,13 +2792,15 @@ export const Authentication = $root.Authentication = (() => { PreLoginRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PreLoginRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PreLoginRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Authentication.PreLoginRequest(); if (object.authRequest != null) { - if (typeof object.authRequest !== "object") + if (!$util.isObject(object.authRequest)) throw TypeError(".Authentication.PreLoginRequest.authRequest: object expected"); message.authRequest = $root.Authentication.AuthRequest.fromObject(object.authRequest, long + 1); } @@ -2860,11 +2876,11 @@ export const Authentication = $root.Authentication = (() => { object.twoFactorToken = $util.newBuffer(object.twoFactorToken); } } - if (message.authRequest != null && message.hasOwnProperty("authRequest")) + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) object.authRequest = $root.Authentication.AuthRequest.toObject(message.authRequest, options, q + 1); - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) object.loginType = options.enums === String ? $root.Authentication.LoginType[message.loginType] === undefined ? message.loginType : $root.Authentication.LoginType[message.loginType] : message.loginType; - if (message.twoFactorToken != null && message.hasOwnProperty("twoFactorToken")) + if (message.twoFactorToken != null && Object.hasOwnProperty.call(message, "twoFactorToken")) object.twoFactorToken = options.bytes === String ? $util.base64.encode(message.twoFactorToken, 0, message.twoFactorToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.twoFactorToken) : message.twoFactorToken; return object; }; @@ -3050,7 +3066,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ LoginRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3148,12 +3164,12 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authRequest != null && message.hasOwnProperty("authRequest")) { + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) { let error = $root.Authentication.AuthRequest.verify(message.authRequest, long + 1); if (error) return "authRequest." + error; } - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) switch (message.loginType) { default: return "loginType: enum value expected"; @@ -3166,22 +3182,22 @@ export const Authentication = $root.Authentication = (() => { case 6: break; } - if (message.authenticationHashPrime != null && message.hasOwnProperty("authenticationHashPrime")) + if (message.authenticationHashPrime != null && Object.hasOwnProperty.call(message, "authenticationHashPrime")) if (!(message.authenticationHashPrime && typeof message.authenticationHashPrime.length === "number" || $util.isString(message.authenticationHashPrime))) return "authenticationHashPrime: buffer expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.authResponse != null && message.hasOwnProperty("authResponse")) + if (message.authResponse != null && Object.hasOwnProperty.call(message, "authResponse")) if (!(message.authResponse && typeof message.authResponse.length === "number" || $util.isString(message.authResponse))) return "authResponse: buffer expected"; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; - if (message.pushToken != null && message.hasOwnProperty("pushToken")) + if (message.pushToken != null && Object.hasOwnProperty.call(message, "pushToken")) if (!$util.isString(message.pushToken)) return "pushToken: string expected"; - if (message.platform != null && message.hasOwnProperty("platform")) + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) if (!$util.isString(message.platform)) return "platform: string expected"; return null; @@ -3198,13 +3214,15 @@ export const Authentication = $root.Authentication = (() => { LoginRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.LoginRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.LoginRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Authentication.LoginRequest(); if (object.authRequest != null) { - if (typeof object.authRequest !== "object") + if (!$util.isObject(object.authRequest)) throw TypeError(".Authentication.LoginRequest.authRequest: object expected"); message.authRequest = $root.Authentication.AuthRequest.fromObject(object.authRequest, long + 1); } @@ -3313,21 +3331,21 @@ export const Authentication = $root.Authentication = (() => { object.pushToken = ""; object.platform = ""; } - if (message.authRequest != null && message.hasOwnProperty("authRequest")) + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) object.authRequest = $root.Authentication.AuthRequest.toObject(message.authRequest, options, q + 1); - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) object.loginType = options.enums === String ? $root.Authentication.LoginType[message.loginType] === undefined ? message.loginType : $root.Authentication.LoginType[message.loginType] : message.loginType; - if (message.authenticationHashPrime != null && message.hasOwnProperty("authenticationHashPrime")) + if (message.authenticationHashPrime != null && Object.hasOwnProperty.call(message, "authenticationHashPrime")) object.authenticationHashPrime = options.bytes === String ? $util.base64.encode(message.authenticationHashPrime, 0, message.authenticationHashPrime.length) : options.bytes === Array ? Array.prototype.slice.call(message.authenticationHashPrime) : message.authenticationHashPrime; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.authResponse != null && message.hasOwnProperty("authResponse")) + if (message.authResponse != null && Object.hasOwnProperty.call(message, "authResponse")) object.authResponse = options.bytes === String ? $util.base64.encode(message.authResponse, 0, message.authResponse.length) : options.bytes === Array ? Array.prototype.slice.call(message.authResponse) : message.authResponse; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; - if (message.pushToken != null && message.hasOwnProperty("pushToken")) + if (message.pushToken != null && Object.hasOwnProperty.call(message, "pushToken")) object.pushToken = message.pushToken; - if (message.platform != null && message.hasOwnProperty("platform")) + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) object.platform = message.platform; return object; }; @@ -3447,7 +3465,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3521,10 +3539,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -3548,6 +3566,8 @@ export const Authentication = $root.Authentication = (() => { DeviceResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3612,9 +3632,9 @@ export const Authentication = $root.Authentication = (() => { } object.status = options.enums === String ? "DEVICE_NEEDS_APPROVAL" : 0; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Authentication.DeviceStatus[message.status] === undefined ? message.status : $root.Authentication.DeviceStatus[message.status] : message.status; return object; }; @@ -3767,7 +3787,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ Salt.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3853,19 +3873,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) if (!$util.isInteger(message.iterations)) return "iterations: integer expected"; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) if (!(message.salt && typeof message.salt.length === "number" || $util.isString(message.salt))) return "salt: buffer expected"; - if (message.algorithm != null && message.hasOwnProperty("algorithm")) + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) if (!$util.isInteger(message.algorithm)) return "algorithm: integer expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -3882,6 +3902,8 @@ export const Authentication = $root.Authentication = (() => { Salt.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.Salt) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.Salt: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3942,15 +3964,15 @@ export const Authentication = $root.Authentication = (() => { } object.name = ""; } - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) object.iterations = message.iterations; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) object.salt = options.bytes === String ? $util.base64.encode(message.salt, 0, message.salt.length) : options.bytes === Array ? Array.prototype.slice.call(message.salt) : message.salt; - if (message.algorithm != null && message.hasOwnProperty("algorithm")) + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) object.algorithm = message.algorithm; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -4059,7 +4081,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4129,7 +4151,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isInteger(message.type)) return "type: integer expected"; return null; @@ -4146,6 +4168,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorChannel.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorChannel) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorChannel: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4175,7 +4199,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.type = 0; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; return object; }; @@ -4512,7 +4536,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ StartLoginRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4630,22 +4654,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) switch (message.loginType) { default: return "loginType: enum value expected"; @@ -4658,10 +4682,10 @@ export const Authentication = $root.Authentication = (() => { case 6: break; } - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; - if (message.loginMethod != null && message.hasOwnProperty("loginMethod")) + if (message.loginMethod != null && Object.hasOwnProperty.call(message, "loginMethod")) switch (message.loginMethod) { default: return "loginMethod: enum value expected"; @@ -4672,19 +4696,19 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.forceNewLogin != null && message.hasOwnProperty("forceNewLogin")) + if (message.forceNewLogin != null && Object.hasOwnProperty.call(message, "forceNewLogin")) if (typeof message.forceNewLogin !== "boolean") return "forceNewLogin: boolean expected"; - if (message.cloneCode != null && message.hasOwnProperty("cloneCode")) + if (message.cloneCode != null && Object.hasOwnProperty.call(message, "cloneCode")) if (!(message.cloneCode && typeof message.cloneCode.length === "number" || $util.isString(message.cloneCode))) return "cloneCode: buffer expected"; - if (message.v2TwoFactorToken != null && message.hasOwnProperty("v2TwoFactorToken")) + if (message.v2TwoFactorToken != null && Object.hasOwnProperty.call(message, "v2TwoFactorToken")) if (!$util.isString(message.v2TwoFactorToken)) return "v2TwoFactorToken: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.fromSessionToken != null && message.hasOwnProperty("fromSessionToken")) + if (message.fromSessionToken != null && Object.hasOwnProperty.call(message, "fromSessionToken")) if (!(message.fromSessionToken && typeof message.fromSessionToken.length === "number" || $util.isString(message.fromSessionToken))) return "fromSessionToken: buffer expected"; return null; @@ -4701,6 +4725,8 @@ export const Authentication = $root.Authentication = (() => { StartLoginRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.StartLoginRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.StartLoginRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4881,31 +4907,31 @@ export const Authentication = $root.Authentication = (() => { object.fromSessionToken = $util.newBuffer(object.fromSessionToken); } } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) object.loginType = options.enums === String ? $root.Authentication.LoginType[message.loginType] === undefined ? message.loginType : $root.Authentication.LoginType[message.loginType] : message.loginType; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; - if (message.loginMethod != null && message.hasOwnProperty("loginMethod")) + if (message.loginMethod != null && Object.hasOwnProperty.call(message, "loginMethod")) object.loginMethod = options.enums === String ? $root.Authentication.LoginMethod[message.loginMethod] === undefined ? message.loginMethod : $root.Authentication.LoginMethod[message.loginMethod] : message.loginMethod; - if (message.forceNewLogin != null && message.hasOwnProperty("forceNewLogin")) + if (message.forceNewLogin != null && Object.hasOwnProperty.call(message, "forceNewLogin")) object.forceNewLogin = message.forceNewLogin; - if (message.cloneCode != null && message.hasOwnProperty("cloneCode")) + if (message.cloneCode != null && Object.hasOwnProperty.call(message, "cloneCode")) object.cloneCode = options.bytes === String ? $util.base64.encode(message.cloneCode, 0, message.cloneCode.length) : options.bytes === Array ? Array.prototype.slice.call(message.cloneCode) : message.cloneCode; - if (message.v2TwoFactorToken != null && message.hasOwnProperty("v2TwoFactorToken")) + if (message.v2TwoFactorToken != null && Object.hasOwnProperty.call(message, "v2TwoFactorToken")) object.v2TwoFactorToken = message.v2TwoFactorToken; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.fromSessionToken != null && message.hasOwnProperty("fromSessionToken")) + if (message.fromSessionToken != null && Object.hasOwnProperty.call(message, "fromSessionToken")) object.fromSessionToken = options.bytes === String ? $util.base64.encode(message.fromSessionToken, 0, message.fromSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.fromSessionToken) : message.fromSessionToken; return object; }; @@ -5080,7 +5106,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ KeysInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5174,25 +5200,25 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) if (!(message.encryptionParams && typeof message.encryptionParams.length === "number" || $util.isString(message.encryptionParams))) return "encryptionParams: buffer expected"; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) if (!(message.encryptedDataKey && typeof message.encryptedDataKey.length === "number" || $util.isString(message.encryptedDataKey))) return "encryptedDataKey: buffer expected"; - if (message.dataKeyBackupDate != null && message.hasOwnProperty("dataKeyBackupDate")) + if (message.dataKeyBackupDate != null && Object.hasOwnProperty.call(message, "dataKeyBackupDate")) if (typeof message.dataKeyBackupDate !== "number") return "dataKeyBackupDate: number expected"; - if (message.userAuthUid != null && message.hasOwnProperty("userAuthUid")) + if (message.userAuthUid != null && Object.hasOwnProperty.call(message, "userAuthUid")) if (!(message.userAuthUid && typeof message.userAuthUid.length === "number" || $util.isString(message.userAuthUid))) return "userAuthUid: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; - if (message.encryptedEccPrivateKey != null && message.hasOwnProperty("encryptedEccPrivateKey")) + if (message.encryptedEccPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEccPrivateKey")) if (!(message.encryptedEccPrivateKey && typeof message.encryptedEccPrivateKey.length === "number" || $util.isString(message.encryptedEccPrivateKey))) return "encryptedEccPrivateKey: buffer expected"; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) if (!(message.eccPublicKey && typeof message.eccPublicKey.length === "number" || $util.isString(message.eccPublicKey))) return "eccPublicKey: buffer expected"; return null; @@ -5209,6 +5235,8 @@ export const Authentication = $root.Authentication = (() => { KeysInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.KeysInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.KeysInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -5311,19 +5339,19 @@ export const Authentication = $root.Authentication = (() => { object.eccPublicKey = $util.newBuffer(object.eccPublicKey); } } - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) object.encryptionParams = options.bytes === String ? $util.base64.encode(message.encryptionParams, 0, message.encryptionParams.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptionParams) : message.encryptionParams; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) object.encryptedDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDataKey, 0, message.encryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDataKey) : message.encryptedDataKey; - if (message.dataKeyBackupDate != null && message.hasOwnProperty("dataKeyBackupDate")) + if (message.dataKeyBackupDate != null && Object.hasOwnProperty.call(message, "dataKeyBackupDate")) object.dataKeyBackupDate = options.json && !isFinite(message.dataKeyBackupDate) ? String(message.dataKeyBackupDate) : message.dataKeyBackupDate; - if (message.userAuthUid != null && message.hasOwnProperty("userAuthUid")) + if (message.userAuthUid != null && Object.hasOwnProperty.call(message, "userAuthUid")) object.userAuthUid = options.bytes === String ? $util.base64.encode(message.userAuthUid, 0, message.userAuthUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.userAuthUid) : message.userAuthUid; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; - if (message.encryptedEccPrivateKey != null && message.hasOwnProperty("encryptedEccPrivateKey")) + if (message.encryptedEccPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEccPrivateKey")) object.encryptedEccPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedEccPrivateKey, 0, message.encryptedEccPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedEccPrivateKey) : message.encryptedEccPrivateKey; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) object.eccPublicKey = options.bytes === String ? $util.base64.encode(message.eccPublicKey, 0, message.eccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccPublicKey) : message.eccPublicKey; return object; }; @@ -5623,7 +5651,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ LoginResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5765,7 +5793,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.loginState != null && message.hasOwnProperty("loginState")) + if (message.loginState != null && Object.hasOwnProperty.call(message, "loginState")) switch (message.loginState) { default: return "loginState: enum value expected"; @@ -5794,16 +5822,16 @@ export const Authentication = $root.Authentication = (() => { case 99: break; } - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.primaryUsername != null && message.hasOwnProperty("primaryUsername")) + if (message.primaryUsername != null && Object.hasOwnProperty.call(message, "primaryUsername")) if (!$util.isString(message.primaryUsername)) return "primaryUsername: string expected"; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) if (!(message.encryptedDataKey && typeof message.encryptedDataKey.length === "number" || $util.isString(message.encryptedDataKey))) return "encryptedDataKey: buffer expected"; - if (message.encryptedDataKeyType != null && message.hasOwnProperty("encryptedDataKeyType")) + if (message.encryptedDataKeyType != null && Object.hasOwnProperty.call(message, "encryptedDataKeyType")) switch (message.encryptedDataKeyType) { default: return "encryptedDataKeyType: enum value expected"; @@ -5814,13 +5842,13 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.sessionTokenType != null && message.hasOwnProperty("sessionTokenType")) + if (message.sessionTokenType != null && Object.hasOwnProperty.call(message, "sessionTokenType")) switch (message.sessionTokenType) { default: return "sessionTokenType: enum value expected"; @@ -5838,13 +5866,13 @@ export const Authentication = $root.Authentication = (() => { case 11: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { + if (message.channels != null && Object.hasOwnProperty.call(message, "channels")) { if (!Array.isArray(message.channels)) return "channels: array expected"; for (let i = 0; i < message.channels.length; ++i) { @@ -5853,7 +5881,7 @@ export const Authentication = $root.Authentication = (() => { return "channels." + error; } } - if (message.salt != null && message.hasOwnProperty("salt")) { + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) { if (!Array.isArray(message.salt)) return "salt: array expected"; for (let i = 0; i < message.salt.length; ++i) { @@ -5862,24 +5890,24 @@ export const Authentication = $root.Authentication = (() => { return "salt." + error; } } - if (message.cloneCode != null && message.hasOwnProperty("cloneCode")) + if (message.cloneCode != null && Object.hasOwnProperty.call(message, "cloneCode")) if (!(message.cloneCode && typeof message.cloneCode.length === "number" || $util.isString(message.cloneCode))) return "cloneCode: buffer expected"; - if (message.stateSpecificValue != null && message.hasOwnProperty("stateSpecificValue")) + if (message.stateSpecificValue != null && Object.hasOwnProperty.call(message, "stateSpecificValue")) if (!$util.isString(message.stateSpecificValue)) return "stateSpecificValue: string expected"; - if (message.ssoClientVersion != null && message.hasOwnProperty("ssoClientVersion")) + if (message.ssoClientVersion != null && Object.hasOwnProperty.call(message, "ssoClientVersion")) if (!$util.isString(message.ssoClientVersion)) return "ssoClientVersion: string expected"; - if (message.sessionTokenTypeModifier != null && message.hasOwnProperty("sessionTokenTypeModifier")) + if (message.sessionTokenTypeModifier != null && Object.hasOwnProperty.call(message, "sessionTokenTypeModifier")) if (!$util.isString(message.sessionTokenTypeModifier)) return "sessionTokenTypeModifier: string expected"; - if (message.keysInfo != null && message.hasOwnProperty("keysInfo")) { + if (message.keysInfo != null && Object.hasOwnProperty.call(message, "keysInfo")) { let error = $root.Authentication.KeysInfo.verify(message.keysInfo, long + 1); if (error) return "keysInfo." + error; } - if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) if (!(message.clientKey && typeof message.clientKey.length === "number" || $util.isString(message.clientKey))) return "clientKey: buffer expected"; return null; @@ -5896,6 +5924,8 @@ export const Authentication = $root.Authentication = (() => { LoginResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.LoginResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.LoginResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6116,7 +6146,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.LoginResponse.channels: array expected"); message.channels = []; for (let i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") + if (!$util.isObject(object.channels[i])) throw TypeError(".Authentication.LoginResponse.channels: object expected"); message.channels[i] = $root.Authentication.TwoFactorChannelInfo.fromObject(object.channels[i], long + 1); } @@ -6126,7 +6156,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.LoginResponse.salt: array expected"); message.salt = []; for (let i = 0; i < object.salt.length; ++i) { - if (typeof object.salt[i] !== "object") + if (!$util.isObject(object.salt[i])) throw TypeError(".Authentication.LoginResponse.salt: object expected"); message.salt[i] = $root.Authentication.Salt.fromObject(object.salt[i], long + 1); } @@ -6143,7 +6173,7 @@ export const Authentication = $root.Authentication = (() => { if (object.sessionTokenTypeModifier != null) message.sessionTokenTypeModifier = String(object.sessionTokenTypeModifier); if (object.keysInfo != null) { - if (typeof object.keysInfo !== "object") + if (!$util.isObject(object.keysInfo)) throw TypeError(".Authentication.LoginResponse.keysInfo: object expected"); message.keysInfo = $root.Authentication.KeysInfo.fromObject(object.keysInfo, long + 1); } @@ -6230,25 +6260,25 @@ export const Authentication = $root.Authentication = (() => { object.clientKey = $util.newBuffer(object.clientKey); } } - if (message.loginState != null && message.hasOwnProperty("loginState")) + if (message.loginState != null && Object.hasOwnProperty.call(message, "loginState")) object.loginState = options.enums === String ? $root.Authentication.LoginState[message.loginState] === undefined ? message.loginState : $root.Authentication.LoginState[message.loginState] : message.loginState; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.primaryUsername != null && message.hasOwnProperty("primaryUsername")) + if (message.primaryUsername != null && Object.hasOwnProperty.call(message, "primaryUsername")) object.primaryUsername = message.primaryUsername; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) object.encryptedDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDataKey, 0, message.encryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDataKey) : message.encryptedDataKey; - if (message.encryptedDataKeyType != null && message.hasOwnProperty("encryptedDataKeyType")) + if (message.encryptedDataKeyType != null && Object.hasOwnProperty.call(message, "encryptedDataKeyType")) object.encryptedDataKeyType = options.enums === String ? $root.Authentication.EncryptedDataKeyType[message.encryptedDataKeyType] === undefined ? message.encryptedDataKeyType : $root.Authentication.EncryptedDataKeyType[message.encryptedDataKeyType] : message.encryptedDataKeyType; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; - if (message.sessionTokenType != null && message.hasOwnProperty("sessionTokenType")) + if (message.sessionTokenType != null && Object.hasOwnProperty.call(message, "sessionTokenType")) object.sessionTokenType = options.enums === String ? $root.Authentication.SessionTokenType[message.sessionTokenType] === undefined ? message.sessionTokenType : $root.Authentication.SessionTokenType[message.sessionTokenType] : message.sessionTokenType; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.channels && message.channels.length) { object.channels = []; @@ -6260,17 +6290,17 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.salt.length; ++j) object.salt[j] = $root.Authentication.Salt.toObject(message.salt[j], options, q + 1); } - if (message.cloneCode != null && message.hasOwnProperty("cloneCode")) + if (message.cloneCode != null && Object.hasOwnProperty.call(message, "cloneCode")) object.cloneCode = options.bytes === String ? $util.base64.encode(message.cloneCode, 0, message.cloneCode.length) : options.bytes === Array ? Array.prototype.slice.call(message.cloneCode) : message.cloneCode; - if (message.stateSpecificValue != null && message.hasOwnProperty("stateSpecificValue")) + if (message.stateSpecificValue != null && Object.hasOwnProperty.call(message, "stateSpecificValue")) object.stateSpecificValue = message.stateSpecificValue; - if (message.ssoClientVersion != null && message.hasOwnProperty("ssoClientVersion")) + if (message.ssoClientVersion != null && Object.hasOwnProperty.call(message, "ssoClientVersion")) object.ssoClientVersion = message.ssoClientVersion; - if (message.sessionTokenTypeModifier != null && message.hasOwnProperty("sessionTokenTypeModifier")) + if (message.sessionTokenTypeModifier != null && Object.hasOwnProperty.call(message, "sessionTokenTypeModifier")) object.sessionTokenTypeModifier = message.sessionTokenTypeModifier; - if (message.keysInfo != null && message.hasOwnProperty("keysInfo")) + if (message.keysInfo != null && Object.hasOwnProperty.call(message, "keysInfo")) object.keysInfo = $root.Authentication.KeysInfo.toObject(message.keysInfo, options, q + 1); - if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) object.clientKey = options.bytes === String ? $util.base64.encode(message.clientKey, 0, message.clientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientKey) : message.clientKey; return object; }; @@ -6423,7 +6453,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SwitchListElement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6509,19 +6539,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.authRequired != null && message.hasOwnProperty("authRequired")) + if (message.authRequired != null && Object.hasOwnProperty.call(message, "authRequired")) if (typeof message.authRequired !== "boolean") return "authRequired: boolean expected"; - if (message.isLinked != null && message.hasOwnProperty("isLinked")) + if (message.isLinked != null && Object.hasOwnProperty.call(message, "isLinked")) if (typeof message.isLinked !== "boolean") return "isLinked: boolean expected"; - if (message.profilePicUrl != null && message.hasOwnProperty("profilePicUrl")) + if (message.profilePicUrl != null && Object.hasOwnProperty.call(message, "profilePicUrl")) if (!$util.isString(message.profilePicUrl)) return "profilePicUrl: string expected"; return null; @@ -6538,6 +6568,8 @@ export const Authentication = $root.Authentication = (() => { SwitchListElement.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SwitchListElement) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SwitchListElement: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6580,15 +6612,15 @@ export const Authentication = $root.Authentication = (() => { object.isLinked = false; object.profilePicUrl = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.authRequired != null && message.hasOwnProperty("authRequired")) + if (message.authRequired != null && Object.hasOwnProperty.call(message, "authRequired")) object.authRequired = message.authRequired; - if (message.isLinked != null && message.hasOwnProperty("isLinked")) + if (message.isLinked != null && Object.hasOwnProperty.call(message, "isLinked")) object.isLinked = message.isLinked; - if (message.profilePicUrl != null && message.hasOwnProperty("profilePicUrl")) + if (message.profilePicUrl != null && Object.hasOwnProperty.call(message, "profilePicUrl")) object.profilePicUrl = message.profilePicUrl; return object; }; @@ -6699,7 +6731,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SwitchListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6771,7 +6803,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.elements != null && message.hasOwnProperty("elements")) { + if (message.elements != null && Object.hasOwnProperty.call(message, "elements")) { if (!Array.isArray(message.elements)) return "elements: array expected"; for (let i = 0; i < message.elements.length; ++i) { @@ -6794,6 +6826,8 @@ export const Authentication = $root.Authentication = (() => { SwitchListResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SwitchListResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SwitchListResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6804,7 +6838,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SwitchListResponse.elements: array expected"); message.elements = []; for (let i = 0; i < object.elements.length; ++i) { - if (typeof object.elements[i] !== "object") + if (!$util.isObject(object.elements[i])) throw TypeError(".Authentication.SwitchListResponse.elements: object expected"); message.elements[i] = $root.Authentication.SwitchListElement.fromObject(object.elements[i], long + 1); } @@ -6998,7 +7032,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SsoUserInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7088,22 +7122,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.companyName != null && message.hasOwnProperty("companyName")) + if (message.companyName != null && Object.hasOwnProperty.call(message, "companyName")) if (!$util.isString(message.companyName)) return "companyName: string expected"; - if (message.samlRequest != null && message.hasOwnProperty("samlRequest")) + if (message.samlRequest != null && Object.hasOwnProperty.call(message, "samlRequest")) if (!$util.isString(message.samlRequest)) return "samlRequest: string expected"; - if (message.samlRequestType != null && message.hasOwnProperty("samlRequestType")) + if (message.samlRequestType != null && Object.hasOwnProperty.call(message, "samlRequestType")) if (!$util.isString(message.samlRequestType)) return "samlRequestType: string expected"; - if (message.ssoDomainName != null && message.hasOwnProperty("ssoDomainName")) + if (message.ssoDomainName != null && Object.hasOwnProperty.call(message, "ssoDomainName")) if (!$util.isString(message.ssoDomainName)) return "ssoDomainName: string expected"; - if (message.loginUrl != null && message.hasOwnProperty("loginUrl")) + if (message.loginUrl != null && Object.hasOwnProperty.call(message, "loginUrl")) if (!$util.isString(message.loginUrl)) return "loginUrl: string expected"; - if (message.logoutUrl != null && message.hasOwnProperty("logoutUrl")) + if (message.logoutUrl != null && Object.hasOwnProperty.call(message, "logoutUrl")) if (!$util.isString(message.logoutUrl)) return "logoutUrl: string expected"; return null; @@ -7120,6 +7154,8 @@ export const Authentication = $root.Authentication = (() => { SsoUserInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SsoUserInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SsoUserInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7165,17 +7201,17 @@ export const Authentication = $root.Authentication = (() => { object.loginUrl = ""; object.logoutUrl = ""; } - if (message.companyName != null && message.hasOwnProperty("companyName")) + if (message.companyName != null && Object.hasOwnProperty.call(message, "companyName")) object.companyName = message.companyName; - if (message.samlRequest != null && message.hasOwnProperty("samlRequest")) + if (message.samlRequest != null && Object.hasOwnProperty.call(message, "samlRequest")) object.samlRequest = message.samlRequest; - if (message.samlRequestType != null && message.hasOwnProperty("samlRequestType")) + if (message.samlRequestType != null && Object.hasOwnProperty.call(message, "samlRequestType")) object.samlRequestType = message.samlRequestType; - if (message.ssoDomainName != null && message.hasOwnProperty("ssoDomainName")) + if (message.ssoDomainName != null && Object.hasOwnProperty.call(message, "ssoDomainName")) object.ssoDomainName = message.ssoDomainName; - if (message.loginUrl != null && message.hasOwnProperty("loginUrl")) + if (message.loginUrl != null && Object.hasOwnProperty.call(message, "loginUrl")) object.loginUrl = message.loginUrl; - if (message.logoutUrl != null && message.hasOwnProperty("logoutUrl")) + if (message.logoutUrl != null && Object.hasOwnProperty.call(message, "logoutUrl")) object.logoutUrl = message.logoutUrl; return object; }; @@ -7321,7 +7357,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PreLoginResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7407,7 +7443,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) switch (message.deviceStatus) { default: return "deviceStatus: enum value expected"; @@ -7417,7 +7453,7 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.salt != null && message.hasOwnProperty("salt")) { + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) { if (!Array.isArray(message.salt)) return "salt: array expected"; for (let i = 0; i < message.salt.length; ++i) { @@ -7426,7 +7462,7 @@ export const Authentication = $root.Authentication = (() => { return "salt." + error; } } - if (message.OBSOLETE_FIELD != null && message.hasOwnProperty("OBSOLETE_FIELD")) { + if (message.OBSOLETE_FIELD != null && Object.hasOwnProperty.call(message, "OBSOLETE_FIELD")) { if (!Array.isArray(message.OBSOLETE_FIELD)) return "OBSOLETE_FIELD: array expected"; for (let i = 0; i < message.OBSOLETE_FIELD.length; ++i) { @@ -7435,7 +7471,7 @@ export const Authentication = $root.Authentication = (() => { return "OBSOLETE_FIELD." + error; } } - if (message.ssoUserInfo != null && message.hasOwnProperty("ssoUserInfo")) { + if (message.ssoUserInfo != null && Object.hasOwnProperty.call(message, "ssoUserInfo")) { let error = $root.Authentication.SsoUserInfo.verify(message.ssoUserInfo, long + 1); if (error) return "ssoUserInfo." + error; @@ -7454,6 +7490,8 @@ export const Authentication = $root.Authentication = (() => { PreLoginResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PreLoginResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PreLoginResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7488,7 +7526,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.PreLoginResponse.salt: array expected"); message.salt = []; for (let i = 0; i < object.salt.length; ++i) { - if (typeof object.salt[i] !== "object") + if (!$util.isObject(object.salt[i])) throw TypeError(".Authentication.PreLoginResponse.salt: object expected"); message.salt[i] = $root.Authentication.Salt.fromObject(object.salt[i], long + 1); } @@ -7498,13 +7536,13 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.PreLoginResponse.OBSOLETE_FIELD: array expected"); message.OBSOLETE_FIELD = []; for (let i = 0; i < object.OBSOLETE_FIELD.length; ++i) { - if (typeof object.OBSOLETE_FIELD[i] !== "object") + if (!$util.isObject(object.OBSOLETE_FIELD[i])) throw TypeError(".Authentication.PreLoginResponse.OBSOLETE_FIELD: object expected"); message.OBSOLETE_FIELD[i] = $root.Authentication.TwoFactorChannel.fromObject(object.OBSOLETE_FIELD[i], long + 1); } } if (object.ssoUserInfo != null) { - if (typeof object.ssoUserInfo !== "object") + if (!$util.isObject(object.ssoUserInfo)) throw TypeError(".Authentication.PreLoginResponse.ssoUserInfo: object expected"); message.ssoUserInfo = $root.Authentication.SsoUserInfo.fromObject(object.ssoUserInfo, long + 1); } @@ -7536,7 +7574,7 @@ export const Authentication = $root.Authentication = (() => { object.deviceStatus = options.enums === String ? "DEVICE_NEEDS_APPROVAL" : 0; object.ssoUserInfo = null; } - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) object.deviceStatus = options.enums === String ? $root.Authentication.DeviceStatus[message.deviceStatus] === undefined ? message.deviceStatus : $root.Authentication.DeviceStatus[message.deviceStatus] : message.deviceStatus; if (message.salt && message.salt.length) { object.salt = []; @@ -7548,7 +7586,7 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.OBSOLETE_FIELD.length; ++j) object.OBSOLETE_FIELD[j] = $root.Authentication.TwoFactorChannel.toObject(message.OBSOLETE_FIELD[j], options, q + 1); } - if (message.ssoUserInfo != null && message.hasOwnProperty("ssoUserInfo")) + if (message.ssoUserInfo != null && Object.hasOwnProperty.call(message, "ssoUserInfo")) object.ssoUserInfo = $root.Authentication.SsoUserInfo.toObject(message.ssoUserInfo, options, q + 1); return object; }; @@ -7657,7 +7695,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ LoginAsUserRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7727,7 +7765,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -7744,6 +7782,8 @@ export const Authentication = $root.Authentication = (() => { LoginAsUserRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.LoginAsUserRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.LoginAsUserRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7773,7 +7813,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -7893,7 +7933,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ LoginAsUserResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7967,10 +8007,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.encryptedSharedAccountKey != null && message.hasOwnProperty("encryptedSharedAccountKey")) + if (message.encryptedSharedAccountKey != null && Object.hasOwnProperty.call(message, "encryptedSharedAccountKey")) if (!(message.encryptedSharedAccountKey && typeof message.encryptedSharedAccountKey.length === "number" || $util.isString(message.encryptedSharedAccountKey))) return "encryptedSharedAccountKey: buffer expected"; return null; @@ -7987,6 +8027,8 @@ export const Authentication = $root.Authentication = (() => { LoginAsUserResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.LoginAsUserResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.LoginAsUserResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8038,9 +8080,9 @@ export const Authentication = $root.Authentication = (() => { object.encryptedSharedAccountKey = $util.newBuffer(object.encryptedSharedAccountKey); } } - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; - if (message.encryptedSharedAccountKey != null && message.hasOwnProperty("encryptedSharedAccountKey")) + if (message.encryptedSharedAccountKey != null && Object.hasOwnProperty.call(message, "encryptedSharedAccountKey")) object.encryptedSharedAccountKey = options.bytes === String ? $util.base64.encode(message.encryptedSharedAccountKey, 0, message.encryptedSharedAccountKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSharedAccountKey) : message.encryptedSharedAccountKey; return object; }; @@ -8185,7 +8227,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ValidateAuthHashRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8263,7 +8305,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.passwordMethod != null && message.hasOwnProperty("passwordMethod")) + if (message.passwordMethod != null && Object.hasOwnProperty.call(message, "passwordMethod")) switch (message.passwordMethod) { default: return "passwordMethod: enum value expected"; @@ -8271,10 +8313,10 @@ export const Authentication = $root.Authentication = (() => { case 1: break; } - if (message.authResponse != null && message.hasOwnProperty("authResponse")) + if (message.authResponse != null && Object.hasOwnProperty.call(message, "authResponse")) if (!(message.authResponse && typeof message.authResponse.length === "number" || $util.isString(message.authResponse))) return "authResponse: buffer expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; return null; @@ -8291,6 +8333,8 @@ export const Authentication = $root.Authentication = (() => { ValidateAuthHashRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ValidateAuthHashRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ValidateAuthHashRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8359,11 +8403,11 @@ export const Authentication = $root.Authentication = (() => { object.encryptedLoginToken = $util.newBuffer(object.encryptedLoginToken); } } - if (message.passwordMethod != null && message.hasOwnProperty("passwordMethod")) + if (message.passwordMethod != null && Object.hasOwnProperty.call(message, "passwordMethod")) object.passwordMethod = options.enums === String ? $root.Authentication.PasswordMethod[message.passwordMethod] === undefined ? message.passwordMethod : $root.Authentication.PasswordMethod[message.passwordMethod] : message.passwordMethod; - if (message.authResponse != null && message.hasOwnProperty("authResponse")) + if (message.authResponse != null && Object.hasOwnProperty.call(message, "authResponse")) object.authResponse = options.bytes === String ? $util.base64.encode(message.authResponse, 0, message.authResponse.length) : options.bytes === Array ? Array.prototype.slice.call(message.authResponse) : message.authResponse; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; return object; }; @@ -8642,7 +8686,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorChannelInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8746,7 +8790,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.channelType != null && message.hasOwnProperty("channelType")) + if (message.channelType != null && Object.hasOwnProperty.call(message, "channelType")) switch (message.channelType) { default: return "channelType: enum value expected"; @@ -8762,26 +8806,26 @@ export const Authentication = $root.Authentication = (() => { case 9: break; } - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) if (!(message.channelUid && typeof message.channelUid.length === "number" || $util.isString(message.channelUid))) return "channelUid: buffer expected"; - if (message.channelName != null && message.hasOwnProperty("channelName")) + if (message.channelName != null && Object.hasOwnProperty.call(message, "channelName")) if (!$util.isString(message.channelName)) return "channelName: string expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) if (!$util.isString(message.challenge)) return "challenge: string expected"; - if (message.capabilities != null && message.hasOwnProperty("capabilities")) { + if (message.capabilities != null && Object.hasOwnProperty.call(message, "capabilities")) { if (!Array.isArray(message.capabilities)) return "capabilities: array expected"; for (let i = 0; i < message.capabilities.length; ++i) if (!$util.isString(message.capabilities[i])) return "capabilities: string[] expected"; } - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) if (!$util.isString(message.phoneNumber)) return "phoneNumber: string expected"; - if (message.maxExpiration != null && message.hasOwnProperty("maxExpiration")) + if (message.maxExpiration != null && Object.hasOwnProperty.call(message, "maxExpiration")) switch (message.maxExpiration) { default: return "maxExpiration: enum value expected"; @@ -8793,10 +8837,10 @@ export const Authentication = $root.Authentication = (() => { case 5: break; } - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (!$util.isInteger(message.createdOn) && !(message.createdOn && $util.isInteger(message.createdOn.low) && $util.isInteger(message.createdOn.high))) return "createdOn: integer|Long expected"; - if (message.lastFrequency != null && message.hasOwnProperty("lastFrequency")) + if (message.lastFrequency != null && Object.hasOwnProperty.call(message, "lastFrequency")) switch (message.lastFrequency) { default: return "lastFrequency: enum value expected"; @@ -8822,6 +8866,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorChannelInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorChannelInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorChannelInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9008,31 +9054,31 @@ export const Authentication = $root.Authentication = (() => { object.createdOn = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.lastFrequency = options.enums === String ? "TWO_FA_EXP_IMMEDIATELY" : 0; } - if (message.channelType != null && message.hasOwnProperty("channelType")) + if (message.channelType != null && Object.hasOwnProperty.call(message, "channelType")) object.channelType = options.enums === String ? $root.Authentication.TwoFactorChannelType[message.channelType] === undefined ? message.channelType : $root.Authentication.TwoFactorChannelType[message.channelType] : message.channelType; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) object.channelUid = options.bytes === String ? $util.base64.encode(message.channelUid, 0, message.channelUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.channelUid) : message.channelUid; - if (message.channelName != null && message.hasOwnProperty("channelName")) + if (message.channelName != null && Object.hasOwnProperty.call(message, "channelName")) object.channelName = message.channelName; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) object.challenge = message.challenge; if (message.capabilities && message.capabilities.length) { object.capabilities = []; for (let j = 0; j < message.capabilities.length; ++j) object.capabilities[j] = message.capabilities[j]; } - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) object.phoneNumber = message.phoneNumber; - if (message.maxExpiration != null && message.hasOwnProperty("maxExpiration")) + if (message.maxExpiration != null && Object.hasOwnProperty.call(message, "maxExpiration")) object.maxExpiration = options.enums === String ? $root.Authentication.TwoFactorExpiration[message.maxExpiration] === undefined ? message.maxExpiration : $root.Authentication.TwoFactorExpiration[message.maxExpiration] : message.maxExpiration; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.createdOn = typeof message.createdOn === "number" ? BigInt(message.createdOn) : $util.Long.fromBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0, false).toBigInt(); else if (typeof message.createdOn === "number") object.createdOn = options.longs === String ? String(message.createdOn) : message.createdOn; else object.createdOn = options.longs === String ? $util.Long.prototype.toString.call(message.createdOn) : options.longs === Number ? new $util.LongBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0).toNumber() : message.createdOn; - if (message.lastFrequency != null && message.hasOwnProperty("lastFrequency")) + if (message.lastFrequency != null && Object.hasOwnProperty.call(message, "lastFrequency")) object.lastFrequency = options.enums === String ? $root.Authentication.TwoFactorExpiration[message.lastFrequency] === undefined ? message.lastFrequency : $root.Authentication.TwoFactorExpiration[message.lastFrequency] : message.lastFrequency; return object; }; @@ -9198,7 +9244,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorDuoStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9282,20 +9328,20 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.capabilities != null && message.hasOwnProperty("capabilities")) { + if (message.capabilities != null && Object.hasOwnProperty.call(message, "capabilities")) { if (!Array.isArray(message.capabilities)) return "capabilities: array expected"; for (let i = 0; i < message.capabilities.length; ++i) if (!$util.isString(message.capabilities[i])) return "capabilities: string[] expected"; } - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) if (!$util.isString(message.phoneNumber)) return "phoneNumber: string expected"; - if (message.enrollUrl != null && message.hasOwnProperty("enrollUrl")) + if (message.enrollUrl != null && Object.hasOwnProperty.call(message, "enrollUrl")) if (!$util.isString(message.enrollUrl)) return "enrollUrl: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -9312,6 +9358,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorDuoStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorDuoStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorDuoStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9362,11 +9410,11 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.capabilities.length; ++j) object.capabilities[j] = message.capabilities[j]; } - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) object.phoneNumber = message.phoneNumber; - if (message.enrollUrl != null && message.hasOwnProperty("enrollUrl")) + if (message.enrollUrl != null && Object.hasOwnProperty.call(message, "enrollUrl")) object.enrollUrl = message.enrollUrl; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -9519,7 +9567,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9605,7 +9653,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.channelType != null && message.hasOwnProperty("channelType")) + if (message.channelType != null && Object.hasOwnProperty.call(message, "channelType")) switch (message.channelType) { default: return "channelType: enum value expected"; @@ -9621,16 +9669,16 @@ export const Authentication = $root.Authentication = (() => { case 9: break; } - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) if (!(message.channelUid && typeof message.channelUid.length === "number" || $util.isString(message.channelUid))) return "channelUid: buffer expected"; - if (message.channelName != null && message.hasOwnProperty("channelName")) + if (message.channelName != null && Object.hasOwnProperty.call(message, "channelName")) if (!$util.isString(message.channelName)) return "channelName: string expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) if (!$util.isString(message.phoneNumber)) return "phoneNumber: string expected"; - if (message.duoPushType != null && message.hasOwnProperty("duoPushType")) + if (message.duoPushType != null && Object.hasOwnProperty.call(message, "duoPushType")) switch (message.duoPushType) { default: return "duoPushType: enum value expected"; @@ -9657,6 +9705,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9788,15 +9838,15 @@ export const Authentication = $root.Authentication = (() => { object.phoneNumber = ""; object.duoPushType = options.enums === String ? "TWO_FA_PUSH_NONE" : 0; } - if (message.channelType != null && message.hasOwnProperty("channelType")) + if (message.channelType != null && Object.hasOwnProperty.call(message, "channelType")) object.channelType = options.enums === String ? $root.Authentication.TwoFactorChannelType[message.channelType] === undefined ? message.channelType : $root.Authentication.TwoFactorChannelType[message.channelType] : message.channelType; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) object.channelUid = options.bytes === String ? $util.base64.encode(message.channelUid, 0, message.channelUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.channelUid) : message.channelUid; - if (message.channelName != null && message.hasOwnProperty("channelName")) + if (message.channelName != null && Object.hasOwnProperty.call(message, "channelName")) object.channelName = message.channelName; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) object.phoneNumber = message.phoneNumber; - if (message.duoPushType != null && message.hasOwnProperty("duoPushType")) + if (message.duoPushType != null && Object.hasOwnProperty.call(message, "duoPushType")) object.duoPushType = options.enums === String ? $root.Authentication.TwoFactorPushType[message.duoPushType] === undefined ? message.duoPushType : $root.Authentication.TwoFactorPushType[message.duoPushType] : message.duoPushType; return object; }; @@ -9916,7 +9966,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorRenameRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9990,10 +10040,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) if (!(message.channelUid && typeof message.channelUid.length === "number" || $util.isString(message.channelUid))) return "channelUid: buffer expected"; - if (message.channelName != null && message.hasOwnProperty("channelName")) + if (message.channelName != null && Object.hasOwnProperty.call(message, "channelName")) if (!$util.isString(message.channelName)) return "channelName: string expected"; return null; @@ -10010,6 +10060,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorRenameRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorRenameRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorRenameRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10052,9 +10104,9 @@ export const Authentication = $root.Authentication = (() => { } object.channelName = ""; } - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) object.channelUid = options.bytes === String ? $util.base64.encode(message.channelUid, 0, message.channelUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.channelUid) : message.channelUid; - if (message.channelName != null && message.hasOwnProperty("channelName")) + if (message.channelName != null && Object.hasOwnProperty.call(message, "channelName")) object.channelName = message.channelName; return object; }; @@ -10176,7 +10228,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorAddResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10252,10 +10304,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) if (!$util.isString(message.challenge)) return "challenge: string expected"; - if (message.backupKeys != null && message.hasOwnProperty("backupKeys")) { + if (message.backupKeys != null && Object.hasOwnProperty.call(message, "backupKeys")) { if (!Array.isArray(message.backupKeys)) return "backupKeys: array expected"; for (let i = 0; i < message.backupKeys.length; ++i) @@ -10276,6 +10328,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorAddResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorAddResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorAddResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10314,7 +10368,7 @@ export const Authentication = $root.Authentication = (() => { object.backupKeys = []; if (options.defaults) object.challenge = ""; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) object.challenge = message.challenge; if (message.backupKeys && message.backupKeys.length) { object.backupKeys = []; @@ -10428,7 +10482,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorDeleteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10498,7 +10552,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) if (!(message.channelUid && typeof message.channelUid.length === "number" || $util.isString(message.channelUid))) return "channelUid: buffer expected"; return null; @@ -10515,6 +10569,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorDeleteRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorDeleteRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorDeleteRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10553,7 +10609,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.channelUid = $util.newBuffer(object.channelUid); } - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) object.channelUid = options.bytes === String ? $util.base64.encode(message.channelUid, 0, message.channelUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.channelUid) : message.channelUid; return object; }; @@ -10675,7 +10731,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10751,7 +10807,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.channels != null && message.hasOwnProperty("channels")) { + if (message.channels != null && Object.hasOwnProperty.call(message, "channels")) { if (!Array.isArray(message.channels)) return "channels: array expected"; for (let i = 0; i < message.channels.length; ++i) { @@ -10760,7 +10816,7 @@ export const Authentication = $root.Authentication = (() => { return "channels." + error; } } - if (message.expireOn != null && message.hasOwnProperty("expireOn")) + if (message.expireOn != null && Object.hasOwnProperty.call(message, "expireOn")) if (!$util.isInteger(message.expireOn) && !(message.expireOn && $util.isInteger(message.expireOn.low) && $util.isInteger(message.expireOn.high))) return "expireOn: integer|Long expected"; return null; @@ -10777,6 +10833,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorListResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorListResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorListResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10787,7 +10845,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.TwoFactorListResponse.channels: array expected"); message.channels = []; for (let i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") + if (!$util.isObject(object.channels[i])) throw TypeError(".Authentication.TwoFactorListResponse.channels: object expected"); message.channels[i] = $root.Authentication.TwoFactorChannelInfo.fromObject(object.channels[i], long + 1); } @@ -10834,7 +10892,7 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.channels.length; ++j) object.channels[j] = $root.Authentication.TwoFactorChannelInfo.toObject(message.channels[j], options, q + 1); } - if (message.expireOn != null && message.hasOwnProperty("expireOn")) + if (message.expireOn != null && Object.hasOwnProperty.call(message, "expireOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expireOn = typeof message.expireOn === "number" ? BigInt(message.expireOn) : $util.Long.fromBits(message.expireOn.low >>> 0, message.expireOn.high >>> 0, false).toBigInt(); else if (typeof message.expireOn === "number") @@ -10948,7 +11006,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorUpdateExpirationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11018,7 +11076,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.expireIn != null && message.hasOwnProperty("expireIn")) + if (message.expireIn != null && Object.hasOwnProperty.call(message, "expireIn")) switch (message.expireIn) { default: return "expireIn: enum value expected"; @@ -11044,6 +11102,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorUpdateExpirationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorUpdateExpirationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorUpdateExpirationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11103,7 +11163,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.expireIn = options.enums === String ? "TWO_FA_EXP_IMMEDIATELY" : 0; - if (message.expireIn != null && message.hasOwnProperty("expireIn")) + if (message.expireIn != null && Object.hasOwnProperty.call(message, "expireIn")) object.expireIn = options.enums === String ? $root.Authentication.TwoFactorExpiration[message.expireIn] === undefined ? message.expireIn : $root.Authentication.TwoFactorExpiration[message.expireIn] : message.expireIn; return object; }; @@ -11256,7 +11316,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorValidateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11342,10 +11402,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) switch (message.valueType) { default: return "valueType: enum value expected"; @@ -11359,13 +11419,13 @@ export const Authentication = $root.Authentication = (() => { case 7: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) if (!(message.channelUid && typeof message.channelUid.length === "number" || $util.isString(message.channelUid))) return "channelUid: buffer expected"; - if (message.expireIn != null && message.hasOwnProperty("expireIn")) + if (message.expireIn != null && Object.hasOwnProperty.call(message, "expireIn")) switch (message.expireIn) { default: return "expireIn: enum value expected"; @@ -11391,6 +11451,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorValidateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorValidateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorValidateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11519,15 +11581,15 @@ export const Authentication = $root.Authentication = (() => { } object.expireIn = options.enums === String ? "TWO_FA_EXP_IMMEDIATELY" : 0; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.valueType != null && message.hasOwnProperty("valueType")) + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) object.valueType = options.enums === String ? $root.Authentication.TwoFactorValueType[message.valueType] === undefined ? message.valueType : $root.Authentication.TwoFactorValueType[message.valueType] : message.valueType; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) object.channelUid = options.bytes === String ? $util.base64.encode(message.channelUid, 0, message.channelUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.channelUid) : message.channelUid; - if (message.expireIn != null && message.hasOwnProperty("expireIn")) + if (message.expireIn != null && Object.hasOwnProperty.call(message, "expireIn")) object.expireIn = options.enums === String ? $root.Authentication.TwoFactorExpiration[message.expireIn] === undefined ? message.expireIn : $root.Authentication.TwoFactorExpiration[message.expireIn] : message.expireIn; return object; }; @@ -11636,7 +11698,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorValidateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11706,7 +11768,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; return null; @@ -11723,6 +11785,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorValidateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorValidateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorValidateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11761,7 +11825,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedLoginToken = $util.newBuffer(object.encryptedLoginToken); } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; return object; }; @@ -11903,7 +11967,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorSendPushRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11985,10 +12049,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.pushType != null && message.hasOwnProperty("pushType")) + if (message.pushType != null && Object.hasOwnProperty.call(message, "pushType")) switch (message.pushType) { default: return "pushType: enum value expected"; @@ -12001,10 +12065,10 @@ export const Authentication = $root.Authentication = (() => { case 6: break; } - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) if (!(message.channelUid && typeof message.channelUid.length === "number" || $util.isString(message.channelUid))) return "channelUid: buffer expected"; - if (message.expireIn != null && message.hasOwnProperty("expireIn")) + if (message.expireIn != null && Object.hasOwnProperty.call(message, "expireIn")) switch (message.expireIn) { default: return "expireIn: enum value expected"; @@ -12030,6 +12094,8 @@ export const Authentication = $root.Authentication = (() => { TwoFactorSendPushRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TwoFactorSendPushRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TwoFactorSendPushRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12151,13 +12217,13 @@ export const Authentication = $root.Authentication = (() => { } object.expireIn = options.enums === String ? "TWO_FA_EXP_IMMEDIATELY" : 0; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.pushType != null && message.hasOwnProperty("pushType")) + if (message.pushType != null && Object.hasOwnProperty.call(message, "pushType")) object.pushType = options.enums === String ? $root.Authentication.TwoFactorPushType[message.pushType] === undefined ? message.pushType : $root.Authentication.TwoFactorPushType[message.pushType] : message.pushType; - if (message.channelUid != null && message.hasOwnProperty("channelUid")) + if (message.channelUid != null && Object.hasOwnProperty.call(message, "channelUid")) object.channelUid = options.bytes === String ? $util.base64.encode(message.channelUid, 0, message.channelUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.channelUid) : message.channelUid; - if (message.expireIn != null && message.hasOwnProperty("expireIn")) + if (message.expireIn != null && Object.hasOwnProperty.call(message, "expireIn")) object.expireIn = options.enums === String ? $root.Authentication.TwoFactorExpiration[message.expireIn] === undefined ? message.expireIn : $root.Authentication.TwoFactorExpiration[message.expireIn] : message.expireIn; return object; }; @@ -12310,7 +12376,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ License.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12396,13 +12462,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.licenseStatus != null && message.hasOwnProperty("licenseStatus")) + if (message.licenseStatus != null && Object.hasOwnProperty.call(message, "licenseStatus")) switch (message.licenseStatus) { default: return "licenseStatus: enum value expected"; @@ -12412,10 +12478,10 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.paid != null && message.hasOwnProperty("paid")) + if (message.paid != null && Object.hasOwnProperty.call(message, "paid")) if (typeof message.paid !== "boolean") return "paid: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -12432,6 +12498,8 @@ export const Authentication = $root.Authentication = (() => { License.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.License) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.License: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12518,25 +12586,25 @@ export const Authentication = $root.Authentication = (() => { object.paid = false; object.message = ""; } - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.licenseStatus != null && message.hasOwnProperty("licenseStatus")) + if (message.licenseStatus != null && Object.hasOwnProperty.call(message, "licenseStatus")) object.licenseStatus = options.enums === String ? $root.Authentication.LicenseStatus[message.licenseStatus] === undefined ? message.licenseStatus : $root.Authentication.LicenseStatus[message.licenseStatus] : message.licenseStatus; - if (message.paid != null && message.hasOwnProperty("paid")) + if (message.paid != null && Object.hasOwnProperty.call(message, "paid")) object.paid = message.paid; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -12685,7 +12753,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ OwnerlessRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12763,13 +12831,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; return null; @@ -12786,6 +12854,8 @@ export const Authentication = $root.Authentication = (() => { OwnerlessRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.OwnerlessRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.OwnerlessRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12840,11 +12910,11 @@ export const Authentication = $root.Authentication = (() => { } object.status = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -12955,7 +13025,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ OwnerlessRecords.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13027,7 +13097,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ownerlessRecord != null && message.hasOwnProperty("ownerlessRecord")) { + if (message.ownerlessRecord != null && Object.hasOwnProperty.call(message, "ownerlessRecord")) { if (!Array.isArray(message.ownerlessRecord)) return "ownerlessRecord: array expected"; for (let i = 0; i < message.ownerlessRecord.length; ++i) { @@ -13050,6 +13120,8 @@ export const Authentication = $root.Authentication = (() => { OwnerlessRecords.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.OwnerlessRecords) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.OwnerlessRecords: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13060,7 +13132,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.OwnerlessRecords.ownerlessRecord: array expected"); message.ownerlessRecord = []; for (let i = 0; i < object.ownerlessRecord.length; ++i) { - if (typeof object.ownerlessRecord[i] !== "object") + if (!$util.isObject(object.ownerlessRecord[i])) throw TypeError(".Authentication.OwnerlessRecords.ownerlessRecord: object expected"); message.ownerlessRecord[i] = $root.Authentication.OwnerlessRecord.fromObject(object.ownerlessRecord[i], long + 1); } @@ -13287,7 +13359,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserAuthRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13389,25 +13461,25 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) if (!(message.salt && typeof message.salt.length === "number" || $util.isString(message.salt))) return "salt: buffer expected"; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) if (!$util.isInteger(message.iterations)) return "iterations: integer expected"; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) if (!(message.encryptedClientKey && typeof message.encryptedClientKey.length === "number" || $util.isString(message.encryptedClientKey))) return "encryptedClientKey: buffer expected"; - if (message.authHash != null && message.hasOwnProperty("authHash")) + if (message.authHash != null && Object.hasOwnProperty.call(message, "authHash")) if (!(message.authHash && typeof message.authHash.length === "number" || $util.isString(message.authHash))) return "authHash: buffer expected"; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) if (!(message.encryptedDataKey && typeof message.encryptedDataKey.length === "number" || $util.isString(message.encryptedDataKey))) return "encryptedDataKey: buffer expected"; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) switch (message.loginType) { default: return "loginType: enum value expected"; @@ -13420,10 +13492,10 @@ export const Authentication = $root.Authentication = (() => { case 6: break; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.algorithm != null && message.hasOwnProperty("algorithm")) + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) if (!$util.isInteger(message.algorithm)) return "algorithm: integer expected"; return null; @@ -13440,6 +13512,8 @@ export const Authentication = $root.Authentication = (() => { UserAuthRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserAuthRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserAuthRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13573,23 +13647,23 @@ export const Authentication = $root.Authentication = (() => { object.name = ""; object.algorithm = 0; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) object.salt = options.bytes === String ? $util.base64.encode(message.salt, 0, message.salt.length) : options.bytes === Array ? Array.prototype.slice.call(message.salt) : message.salt; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) object.iterations = message.iterations; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) object.encryptedClientKey = options.bytes === String ? $util.base64.encode(message.encryptedClientKey, 0, message.encryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedClientKey) : message.encryptedClientKey; - if (message.authHash != null && message.hasOwnProperty("authHash")) + if (message.authHash != null && Object.hasOwnProperty.call(message, "authHash")) object.authHash = options.bytes === String ? $util.base64.encode(message.authHash, 0, message.authHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.authHash) : message.authHash; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) object.encryptedDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDataKey, 0, message.encryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDataKey) : message.encryptedDataKey; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) object.loginType = options.enums === String ? $root.Authentication.LoginType[message.loginType] === undefined ? message.loginType : $root.Authentication.LoginType[message.loginType] : message.loginType; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.algorithm != null && message.hasOwnProperty("algorithm")) + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) object.algorithm = message.algorithm; return object; }; @@ -13700,7 +13774,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UidRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13772,7 +13846,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) { + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) { if (!Array.isArray(message.uid)) return "uid: array expected"; for (let i = 0; i < message.uid.length; ++i) @@ -13793,6 +13867,8 @@ export const Authentication = $root.Authentication = (() => { UidRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UidRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UidRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -14008,7 +14084,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14102,19 +14178,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) switch (message.deviceStatus) { default: return "deviceStatus: enum value expected"; @@ -14124,10 +14200,10 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) if (!$util.isString(message.devicePlatform)) return "devicePlatform: string expected"; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) switch (message.clientFormFactor) { default: return "clientFormFactor: enum value expected"; @@ -14151,6 +14227,8 @@ export const Authentication = $root.Authentication = (() => { DeviceUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -14261,19 +14339,19 @@ export const Authentication = $root.Authentication = (() => { object.devicePlatform = ""; object.clientFormFactor = options.enums === String ? "FF_EMPTY" : 0; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) object.deviceStatus = options.enums === String ? $root.Authentication.DeviceStatus[message.deviceStatus] === undefined ? message.deviceStatus : $root.Authentication.DeviceStatus[message.deviceStatus] : message.deviceStatus; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) object.devicePlatform = message.devicePlatform; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) object.clientFormFactor = options.enums === String ? $root.Authentication.ClientFormFactor[message.clientFormFactor] === undefined ? message.clientFormFactor : $root.Authentication.ClientFormFactor[message.clientFormFactor] : message.clientFormFactor; return object; }; @@ -14448,7 +14526,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14542,19 +14620,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) switch (message.deviceStatus) { default: return "deviceStatus: enum value expected"; @@ -14564,10 +14642,10 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) if (!$util.isString(message.devicePlatform)) return "devicePlatform: string expected"; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) switch (message.clientFormFactor) { default: return "clientFormFactor: enum value expected"; @@ -14591,6 +14669,8 @@ export const Authentication = $root.Authentication = (() => { DeviceUpdateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceUpdateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceUpdateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -14701,19 +14781,19 @@ export const Authentication = $root.Authentication = (() => { object.devicePlatform = ""; object.clientFormFactor = options.enums === String ? "FF_EMPTY" : 0; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) object.deviceStatus = options.enums === String ? $root.Authentication.DeviceStatus[message.deviceStatus] === undefined ? message.deviceStatus : $root.Authentication.DeviceStatus[message.deviceStatus] : message.deviceStatus; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) object.devicePlatform = message.devicePlatform; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) object.clientFormFactor = options.enums === String ? $root.Authentication.ClientFormFactor[message.clientFormFactor] === undefined ? message.clientFormFactor : $root.Authentication.ClientFormFactor[message.clientFormFactor] : message.clientFormFactor; return object; }; @@ -14877,7 +14957,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RegisterDeviceInRegionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14967,22 +15047,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) if (!$util.isString(message.devicePlatform)) return "devicePlatform: string expected"; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) switch (message.clientFormFactor) { default: return "clientFormFactor: enum value expected"; @@ -15006,6 +15086,8 @@ export const Authentication = $root.Authentication = (() => { RegisterDeviceInRegionRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RegisterDeviceInRegionRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RegisterDeviceInRegionRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15091,17 +15173,17 @@ export const Authentication = $root.Authentication = (() => { object.devicePlatform = ""; object.clientFormFactor = options.enums === String ? "FF_EMPTY" : 0; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) object.devicePlatform = message.devicePlatform; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) object.clientFormFactor = options.enums === String ? $root.Authentication.ClientFormFactor[message.clientFormFactor] === undefined ? message.clientFormFactor : $root.Authentication.ClientFormFactor[message.clientFormFactor] : message.clientFormFactor; return object; }; @@ -15309,7 +15391,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RegistrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15415,38 +15497,38 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authRequest != null && message.hasOwnProperty("authRequest")) { + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) { let error = $root.Authentication.AuthRequest.verify(message.authRequest, long + 1); if (error) return "authRequest." + error; } - if (message.userAuthRequest != null && message.hasOwnProperty("userAuthRequest")) { + if (message.userAuthRequest != null && Object.hasOwnProperty.call(message, "userAuthRequest")) { let error = $root.Authentication.UserAuthRequest.verify(message.userAuthRequest, long + 1); if (error) return "userAuthRequest." + error; } - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) if (!(message.encryptedClientKey && typeof message.encryptedClientKey.length === "number" || $util.isString(message.encryptedClientKey))) return "encryptedClientKey: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; - if (message.deprecatedAuthHashHash != null && message.hasOwnProperty("deprecatedAuthHashHash")) + if (message.deprecatedAuthHashHash != null && Object.hasOwnProperty.call(message, "deprecatedAuthHashHash")) if (!(message.deprecatedAuthHashHash && typeof message.deprecatedAuthHashHash.length === "number" || $util.isString(message.deprecatedAuthHashHash))) return "deprecatedAuthHashHash: buffer expected"; - if (message.deprecatedEncryptedClientKey != null && message.hasOwnProperty("deprecatedEncryptedClientKey")) + if (message.deprecatedEncryptedClientKey != null && Object.hasOwnProperty.call(message, "deprecatedEncryptedClientKey")) if (!(message.deprecatedEncryptedClientKey && typeof message.deprecatedEncryptedClientKey.length === "number" || $util.isString(message.deprecatedEncryptedClientKey))) return "deprecatedEncryptedClientKey: buffer expected"; - if (message.deprecatedEncryptedPrivateKey != null && message.hasOwnProperty("deprecatedEncryptedPrivateKey")) + if (message.deprecatedEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "deprecatedEncryptedPrivateKey")) if (!(message.deprecatedEncryptedPrivateKey && typeof message.deprecatedEncryptedPrivateKey.length === "number" || $util.isString(message.deprecatedEncryptedPrivateKey))) return "deprecatedEncryptedPrivateKey: buffer expected"; - if (message.deprecatedEncryptionParams != null && message.hasOwnProperty("deprecatedEncryptionParams")) + if (message.deprecatedEncryptionParams != null && Object.hasOwnProperty.call(message, "deprecatedEncryptionParams")) if (!(message.deprecatedEncryptionParams && typeof message.deprecatedEncryptionParams.length === "number" || $util.isString(message.deprecatedEncryptionParams))) return "deprecatedEncryptionParams: buffer expected"; return null; @@ -15463,18 +15545,20 @@ export const Authentication = $root.Authentication = (() => { RegistrationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RegistrationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RegistrationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Authentication.RegistrationRequest(); if (object.authRequest != null) { - if (typeof object.authRequest !== "object") + if (!$util.isObject(object.authRequest)) throw TypeError(".Authentication.RegistrationRequest.authRequest: object expected"); message.authRequest = $root.Authentication.AuthRequest.fromObject(object.authRequest, long + 1); } if (object.userAuthRequest != null) { - if (typeof object.userAuthRequest !== "object") + if (!$util.isObject(object.userAuthRequest)) throw TypeError(".Authentication.RegistrationRequest.userAuthRequest: object expected"); message.userAuthRequest = $root.Authentication.UserAuthRequest.fromObject(object.userAuthRequest, long + 1); } @@ -15589,25 +15673,25 @@ export const Authentication = $root.Authentication = (() => { object.deprecatedEncryptionParams = $util.newBuffer(object.deprecatedEncryptionParams); } } - if (message.authRequest != null && message.hasOwnProperty("authRequest")) + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) object.authRequest = $root.Authentication.AuthRequest.toObject(message.authRequest, options, q + 1); - if (message.userAuthRequest != null && message.hasOwnProperty("userAuthRequest")) + if (message.userAuthRequest != null && Object.hasOwnProperty.call(message, "userAuthRequest")) object.userAuthRequest = $root.Authentication.UserAuthRequest.toObject(message.userAuthRequest, options, q + 1); - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) object.encryptedClientKey = options.bytes === String ? $util.base64.encode(message.encryptedClientKey, 0, message.encryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedClientKey) : message.encryptedClientKey; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; - if (message.deprecatedAuthHashHash != null && message.hasOwnProperty("deprecatedAuthHashHash")) + if (message.deprecatedAuthHashHash != null && Object.hasOwnProperty.call(message, "deprecatedAuthHashHash")) object.deprecatedAuthHashHash = options.bytes === String ? $util.base64.encode(message.deprecatedAuthHashHash, 0, message.deprecatedAuthHashHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.deprecatedAuthHashHash) : message.deprecatedAuthHashHash; - if (message.deprecatedEncryptedClientKey != null && message.hasOwnProperty("deprecatedEncryptedClientKey")) + if (message.deprecatedEncryptedClientKey != null && Object.hasOwnProperty.call(message, "deprecatedEncryptedClientKey")) object.deprecatedEncryptedClientKey = options.bytes === String ? $util.base64.encode(message.deprecatedEncryptedClientKey, 0, message.deprecatedEncryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.deprecatedEncryptedClientKey) : message.deprecatedEncryptedClientKey; - if (message.deprecatedEncryptedPrivateKey != null && message.hasOwnProperty("deprecatedEncryptedPrivateKey")) + if (message.deprecatedEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "deprecatedEncryptedPrivateKey")) object.deprecatedEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.deprecatedEncryptedPrivateKey, 0, message.deprecatedEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.deprecatedEncryptedPrivateKey) : message.deprecatedEncryptedPrivateKey; - if (message.deprecatedEncryptionParams != null && message.hasOwnProperty("deprecatedEncryptionParams")) + if (message.deprecatedEncryptionParams != null && Object.hasOwnProperty.call(message, "deprecatedEncryptionParams")) object.deprecatedEncryptionParams = options.bytes === String ? $util.base64.encode(message.deprecatedEncryptionParams, 0, message.deprecatedEncryptionParams.length) : options.bytes === Array ? Array.prototype.slice.call(message.deprecatedEncryptionParams) : message.deprecatedEncryptionParams; return object; }; @@ -15760,7 +15844,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ConvertUserToV3Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15846,23 +15930,23 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authRequest != null && message.hasOwnProperty("authRequest")) { + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) { let error = $root.Authentication.AuthRequest.verify(message.authRequest, long + 1); if (error) return "authRequest." + error; } - if (message.userAuthRequest != null && message.hasOwnProperty("userAuthRequest")) { + if (message.userAuthRequest != null && Object.hasOwnProperty.call(message, "userAuthRequest")) { let error = $root.Authentication.UserAuthRequest.verify(message.userAuthRequest, long + 1); if (error) return "userAuthRequest." + error; } - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) if (!(message.encryptedClientKey && typeof message.encryptedClientKey.length === "number" || $util.isString(message.encryptedClientKey))) return "encryptedClientKey: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; return null; @@ -15879,18 +15963,20 @@ export const Authentication = $root.Authentication = (() => { ConvertUserToV3Request.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ConvertUserToV3Request) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ConvertUserToV3Request: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Authentication.ConvertUserToV3Request(); if (object.authRequest != null) { - if (typeof object.authRequest !== "object") + if (!$util.isObject(object.authRequest)) throw TypeError(".Authentication.ConvertUserToV3Request.authRequest: object expected"); message.authRequest = $root.Authentication.AuthRequest.fromObject(object.authRequest, long + 1); } if (object.userAuthRequest != null) { - if (typeof object.userAuthRequest !== "object") + if (!$util.isObject(object.userAuthRequest)) throw TypeError(".Authentication.ConvertUserToV3Request.userAuthRequest: object expected"); message.userAuthRequest = $root.Authentication.UserAuthRequest.fromObject(object.userAuthRequest, long + 1); } @@ -15954,15 +16040,15 @@ export const Authentication = $root.Authentication = (() => { object.publicKey = $util.newBuffer(object.publicKey); } } - if (message.authRequest != null && message.hasOwnProperty("authRequest")) + if (message.authRequest != null && Object.hasOwnProperty.call(message, "authRequest")) object.authRequest = $root.Authentication.AuthRequest.toObject(message.authRequest, options, q + 1); - if (message.userAuthRequest != null && message.hasOwnProperty("userAuthRequest")) + if (message.userAuthRequest != null && Object.hasOwnProperty.call(message, "userAuthRequest")) object.userAuthRequest = $root.Authentication.UserAuthRequest.toObject(message.userAuthRequest, options, q + 1); - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) object.encryptedClientKey = options.bytes === String ? $util.base64.encode(message.encryptedClientKey, 0, message.encryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedClientKey) : message.encryptedClientKey; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; return object; }; @@ -16071,7 +16157,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RevisionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16141,7 +16227,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -16158,6 +16244,8 @@ export const Authentication = $root.Authentication = (() => { RevisionResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RevisionResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RevisionResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16198,7 +16286,7 @@ export const Authentication = $root.Authentication = (() => { object.revision = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -16312,7 +16400,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeEmailRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16382,7 +16470,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.newEmail != null && message.hasOwnProperty("newEmail")) + if (message.newEmail != null && Object.hasOwnProperty.call(message, "newEmail")) if (!$util.isString(message.newEmail)) return "newEmail: string expected"; return null; @@ -16399,6 +16487,8 @@ export const Authentication = $root.Authentication = (() => { ChangeEmailRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeEmailRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeEmailRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16428,7 +16518,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.newEmail = ""; - if (message.newEmail != null && message.hasOwnProperty("newEmail")) + if (message.newEmail != null && Object.hasOwnProperty.call(message, "newEmail")) object.newEmail = message.newEmail; return object; }; @@ -16537,7 +16627,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeEmailResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16607,7 +16697,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedChangeEmailToken != null && message.hasOwnProperty("encryptedChangeEmailToken")) + if (message.encryptedChangeEmailToken != null && Object.hasOwnProperty.call(message, "encryptedChangeEmailToken")) if (!(message.encryptedChangeEmailToken && typeof message.encryptedChangeEmailToken.length === "number" || $util.isString(message.encryptedChangeEmailToken))) return "encryptedChangeEmailToken: buffer expected"; return null; @@ -16624,6 +16714,8 @@ export const Authentication = $root.Authentication = (() => { ChangeEmailResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeEmailResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeEmailResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16662,7 +16754,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedChangeEmailToken = $util.newBuffer(object.encryptedChangeEmailToken); } - if (message.encryptedChangeEmailToken != null && message.hasOwnProperty("encryptedChangeEmailToken")) + if (message.encryptedChangeEmailToken != null && Object.hasOwnProperty.call(message, "encryptedChangeEmailToken")) object.encryptedChangeEmailToken = options.bytes === String ? $util.base64.encode(message.encryptedChangeEmailToken, 0, message.encryptedChangeEmailToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedChangeEmailToken) : message.encryptedChangeEmailToken; return object; }; @@ -16771,7 +16863,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EmailVerificationLinkResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16841,7 +16933,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.emailVerified != null && message.hasOwnProperty("emailVerified")) + if (message.emailVerified != null && Object.hasOwnProperty.call(message, "emailVerified")) if (typeof message.emailVerified !== "boolean") return "emailVerified: boolean expected"; return null; @@ -16858,6 +16950,8 @@ export const Authentication = $root.Authentication = (() => { EmailVerificationLinkResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EmailVerificationLinkResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EmailVerificationLinkResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16887,7 +16981,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.emailVerified = false; - if (message.emailVerified != null && message.hasOwnProperty("emailVerified")) + if (message.emailVerified != null && Object.hasOwnProperty.call(message, "emailVerified")) object.emailVerified = message.emailVerified; return object; }; @@ -17007,7 +17101,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17081,10 +17175,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -17101,6 +17195,8 @@ export const Authentication = $root.Authentication = (() => { SecurityData.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityData) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17152,9 +17248,9 @@ export const Authentication = $root.Authentication = (() => { object.data = $util.newBuffer(object.data); } } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -17285,7 +17381,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityScoreData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17363,13 +17459,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -17386,6 +17482,8 @@ export const Authentication = $root.Authentication = (() => { SecurityScoreData.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityScoreData) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityScoreData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17451,11 +17549,11 @@ export const Authentication = $root.Authentication = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -17608,7 +17706,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17696,7 +17794,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordSecurityData != null && message.hasOwnProperty("recordSecurityData")) { + if (message.recordSecurityData != null && Object.hasOwnProperty.call(message, "recordSecurityData")) { if (!Array.isArray(message.recordSecurityData)) return "recordSecurityData: array expected"; for (let i = 0; i < message.recordSecurityData.length; ++i) { @@ -17705,7 +17803,7 @@ export const Authentication = $root.Authentication = (() => { return "recordSecurityData." + error; } } - if (message.masterPasswordSecurityData != null && message.hasOwnProperty("masterPasswordSecurityData")) { + if (message.masterPasswordSecurityData != null && Object.hasOwnProperty.call(message, "masterPasswordSecurityData")) { if (!Array.isArray(message.masterPasswordSecurityData)) return "masterPasswordSecurityData: array expected"; for (let i = 0; i < message.masterPasswordSecurityData.length; ++i) { @@ -17714,7 +17812,7 @@ export const Authentication = $root.Authentication = (() => { return "masterPasswordSecurityData." + error; } } - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) switch (message.encryptionType) { default: return "encryptionType: enum value expected"; @@ -17725,7 +17823,7 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.recordSecurityScoreData != null && message.hasOwnProperty("recordSecurityScoreData")) { + if (message.recordSecurityScoreData != null && Object.hasOwnProperty.call(message, "recordSecurityScoreData")) { if (!Array.isArray(message.recordSecurityScoreData)) return "recordSecurityScoreData: array expected"; for (let i = 0; i < message.recordSecurityScoreData.length; ++i) { @@ -17748,6 +17846,8 @@ export const Authentication = $root.Authentication = (() => { SecurityDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17758,7 +17858,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SecurityDataRequest.recordSecurityData: array expected"); message.recordSecurityData = []; for (let i = 0; i < object.recordSecurityData.length; ++i) { - if (typeof object.recordSecurityData[i] !== "object") + if (!$util.isObject(object.recordSecurityData[i])) throw TypeError(".Authentication.SecurityDataRequest.recordSecurityData: object expected"); message.recordSecurityData[i] = $root.Authentication.SecurityData.fromObject(object.recordSecurityData[i], long + 1); } @@ -17768,7 +17868,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SecurityDataRequest.masterPasswordSecurityData: array expected"); message.masterPasswordSecurityData = []; for (let i = 0; i < object.masterPasswordSecurityData.length; ++i) { - if (typeof object.masterPasswordSecurityData[i] !== "object") + if (!$util.isObject(object.masterPasswordSecurityData[i])) throw TypeError(".Authentication.SecurityDataRequest.masterPasswordSecurityData: object expected"); message.masterPasswordSecurityData[i] = $root.Authentication.SecurityData.fromObject(object.masterPasswordSecurityData[i], long + 1); } @@ -17806,7 +17906,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SecurityDataRequest.recordSecurityScoreData: array expected"); message.recordSecurityScoreData = []; for (let i = 0; i < object.recordSecurityScoreData.length; ++i) { - if (typeof object.recordSecurityScoreData[i] !== "object") + if (!$util.isObject(object.recordSecurityScoreData[i])) throw TypeError(".Authentication.SecurityDataRequest.recordSecurityScoreData: object expected"); message.recordSecurityScoreData[i] = $root.Authentication.SecurityScoreData.fromObject(object.recordSecurityScoreData[i], long + 1); } @@ -17848,7 +17948,7 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.masterPasswordSecurityData.length; ++j) object.masterPasswordSecurityData[j] = $root.Authentication.SecurityData.toObject(message.masterPasswordSecurityData[j], options, q + 1); } - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) object.encryptionType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptionType] === undefined ? message.encryptionType : $root.Enterprise.EncryptedKeyType[message.encryptionType] : message.encryptionType; if (message.recordSecurityScoreData && message.recordSecurityScoreData.length) { object.recordSecurityScoreData = []; @@ -18039,7 +18139,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityReportIncrementalData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -18137,22 +18237,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.currentSecurityData != null && message.hasOwnProperty("currentSecurityData")) + if (message.currentSecurityData != null && Object.hasOwnProperty.call(message, "currentSecurityData")) if (!(message.currentSecurityData && typeof message.currentSecurityData.length === "number" || $util.isString(message.currentSecurityData))) return "currentSecurityData: buffer expected"; - if (message.currentSecurityDataRevision != null && message.hasOwnProperty("currentSecurityDataRevision")) + if (message.currentSecurityDataRevision != null && Object.hasOwnProperty.call(message, "currentSecurityDataRevision")) if (!$util.isInteger(message.currentSecurityDataRevision) && !(message.currentSecurityDataRevision && $util.isInteger(message.currentSecurityDataRevision.low) && $util.isInteger(message.currentSecurityDataRevision.high))) return "currentSecurityDataRevision: integer|Long expected"; - if (message.oldSecurityData != null && message.hasOwnProperty("oldSecurityData")) + if (message.oldSecurityData != null && Object.hasOwnProperty.call(message, "oldSecurityData")) if (!(message.oldSecurityData && typeof message.oldSecurityData.length === "number" || $util.isString(message.oldSecurityData))) return "oldSecurityData: buffer expected"; - if (message.oldSecurityDataRevision != null && message.hasOwnProperty("oldSecurityDataRevision")) + if (message.oldSecurityDataRevision != null && Object.hasOwnProperty.call(message, "oldSecurityDataRevision")) if (!$util.isInteger(message.oldSecurityDataRevision) && !(message.oldSecurityDataRevision && $util.isInteger(message.oldSecurityDataRevision.low) && $util.isInteger(message.oldSecurityDataRevision.high))) return "oldSecurityDataRevision: integer|Long expected"; - if (message.currentDataEncryptionType != null && message.hasOwnProperty("currentDataEncryptionType")) + if (message.currentDataEncryptionType != null && Object.hasOwnProperty.call(message, "currentDataEncryptionType")) switch (message.currentDataEncryptionType) { default: return "currentDataEncryptionType: enum value expected"; @@ -18163,7 +18263,7 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.oldDataEncryptionType != null && message.hasOwnProperty("oldDataEncryptionType")) + if (message.oldDataEncryptionType != null && Object.hasOwnProperty.call(message, "oldDataEncryptionType")) switch (message.oldDataEncryptionType) { default: return "oldDataEncryptionType: enum value expected"; @@ -18174,7 +18274,7 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; return null; @@ -18191,6 +18291,8 @@ export const Authentication = $root.Authentication = (() => { SecurityReportIncrementalData.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityReportIncrementalData) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityReportIncrementalData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -18354,36 +18456,36 @@ export const Authentication = $root.Authentication = (() => { object.recordUid = $util.newBuffer(object.recordUid); } } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.currentSecurityData != null && message.hasOwnProperty("currentSecurityData")) + if (message.currentSecurityData != null && Object.hasOwnProperty.call(message, "currentSecurityData")) object.currentSecurityData = options.bytes === String ? $util.base64.encode(message.currentSecurityData, 0, message.currentSecurityData.length) : options.bytes === Array ? Array.prototype.slice.call(message.currentSecurityData) : message.currentSecurityData; - if (message.currentSecurityDataRevision != null && message.hasOwnProperty("currentSecurityDataRevision")) + if (message.currentSecurityDataRevision != null && Object.hasOwnProperty.call(message, "currentSecurityDataRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.currentSecurityDataRevision = typeof message.currentSecurityDataRevision === "number" ? BigInt(message.currentSecurityDataRevision) : $util.Long.fromBits(message.currentSecurityDataRevision.low >>> 0, message.currentSecurityDataRevision.high >>> 0, false).toBigInt(); else if (typeof message.currentSecurityDataRevision === "number") object.currentSecurityDataRevision = options.longs === String ? String(message.currentSecurityDataRevision) : message.currentSecurityDataRevision; else object.currentSecurityDataRevision = options.longs === String ? $util.Long.prototype.toString.call(message.currentSecurityDataRevision) : options.longs === Number ? new $util.LongBits(message.currentSecurityDataRevision.low >>> 0, message.currentSecurityDataRevision.high >>> 0).toNumber() : message.currentSecurityDataRevision; - if (message.oldSecurityData != null && message.hasOwnProperty("oldSecurityData")) + if (message.oldSecurityData != null && Object.hasOwnProperty.call(message, "oldSecurityData")) object.oldSecurityData = options.bytes === String ? $util.base64.encode(message.oldSecurityData, 0, message.oldSecurityData.length) : options.bytes === Array ? Array.prototype.slice.call(message.oldSecurityData) : message.oldSecurityData; - if (message.oldSecurityDataRevision != null && message.hasOwnProperty("oldSecurityDataRevision")) + if (message.oldSecurityDataRevision != null && Object.hasOwnProperty.call(message, "oldSecurityDataRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.oldSecurityDataRevision = typeof message.oldSecurityDataRevision === "number" ? BigInt(message.oldSecurityDataRevision) : $util.Long.fromBits(message.oldSecurityDataRevision.low >>> 0, message.oldSecurityDataRevision.high >>> 0, false).toBigInt(); else if (typeof message.oldSecurityDataRevision === "number") object.oldSecurityDataRevision = options.longs === String ? String(message.oldSecurityDataRevision) : message.oldSecurityDataRevision; else object.oldSecurityDataRevision = options.longs === String ? $util.Long.prototype.toString.call(message.oldSecurityDataRevision) : options.longs === Number ? new $util.LongBits(message.oldSecurityDataRevision.low >>> 0, message.oldSecurityDataRevision.high >>> 0).toNumber() : message.oldSecurityDataRevision; - if (message.currentDataEncryptionType != null && message.hasOwnProperty("currentDataEncryptionType")) + if (message.currentDataEncryptionType != null && Object.hasOwnProperty.call(message, "currentDataEncryptionType")) object.currentDataEncryptionType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.currentDataEncryptionType] === undefined ? message.currentDataEncryptionType : $root.Enterprise.EncryptedKeyType[message.currentDataEncryptionType] : message.currentDataEncryptionType; - if (message.oldDataEncryptionType != null && message.hasOwnProperty("oldDataEncryptionType")) + if (message.oldDataEncryptionType != null && Object.hasOwnProperty.call(message, "oldDataEncryptionType")) object.oldDataEncryptionType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.oldDataEncryptionType] === undefined ? message.oldDataEncryptionType : $root.Enterprise.EncryptedKeyType[message.oldDataEncryptionType] : message.oldDataEncryptionType; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; return object; }; @@ -18582,7 +18684,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -18686,25 +18788,25 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedReportData != null && message.hasOwnProperty("encryptedReportData")) + if (message.encryptedReportData != null && Object.hasOwnProperty.call(message, "encryptedReportData")) if (!(message.encryptedReportData && typeof message.encryptedReportData.length === "number" || $util.isString(message.encryptedReportData))) return "encryptedReportData: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.twoFactor != null && message.hasOwnProperty("twoFactor")) + if (message.twoFactor != null && Object.hasOwnProperty.call(message, "twoFactor")) if (!$util.isString(message.twoFactor)) return "twoFactor: string expected"; - if (message.lastLogin != null && message.hasOwnProperty("lastLogin")) + if (message.lastLogin != null && Object.hasOwnProperty.call(message, "lastLogin")) if (!$util.isInteger(message.lastLogin) && !(message.lastLogin && $util.isInteger(message.lastLogin.low) && $util.isInteger(message.lastLogin.high))) return "lastLogin: integer|Long expected"; - if (message.numberOfReusedPassword != null && message.hasOwnProperty("numberOfReusedPassword")) + if (message.numberOfReusedPassword != null && Object.hasOwnProperty.call(message, "numberOfReusedPassword")) if (!$util.isInteger(message.numberOfReusedPassword)) return "numberOfReusedPassword: integer expected"; - if (message.securityReportIncrementalData != null && message.hasOwnProperty("securityReportIncrementalData")) { + if (message.securityReportIncrementalData != null && Object.hasOwnProperty.call(message, "securityReportIncrementalData")) { if (!Array.isArray(message.securityReportIncrementalData)) return "securityReportIncrementalData: array expected"; for (let i = 0; i < message.securityReportIncrementalData.length; ++i) { @@ -18713,10 +18815,10 @@ export const Authentication = $root.Authentication = (() => { return "securityReportIncrementalData." + error; } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.hasOldEncryption != null && message.hasOwnProperty("hasOldEncryption")) + if (message.hasOldEncryption != null && Object.hasOwnProperty.call(message, "hasOldEncryption")) if (typeof message.hasOldEncryption !== "boolean") return "hasOldEncryption: boolean expected"; return null; @@ -18733,6 +18835,8 @@ export const Authentication = $root.Authentication = (() => { SecurityReport.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityReport) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityReport: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -18779,7 +18883,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SecurityReport.securityReportIncrementalData: array expected"); message.securityReportIncrementalData = []; for (let i = 0; i < object.securityReportIncrementalData.length; ++i) { - if (typeof object.securityReportIncrementalData[i] !== "object") + if (!$util.isObject(object.securityReportIncrementalData[i])) throw TypeError(".Authentication.SecurityReport.securityReportIncrementalData: object expected"); message.securityReportIncrementalData[i] = $root.Authentication.SecurityReportIncrementalData.fromObject(object.securityReportIncrementalData[i], long + 1); } @@ -18838,41 +18942,41 @@ export const Authentication = $root.Authentication = (() => { object.userId = 0; object.hasOldEncryption = false; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedReportData != null && message.hasOwnProperty("encryptedReportData")) + if (message.encryptedReportData != null && Object.hasOwnProperty.call(message, "encryptedReportData")) object.encryptedReportData = options.bytes === String ? $util.base64.encode(message.encryptedReportData, 0, message.encryptedReportData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedReportData) : message.encryptedReportData; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.twoFactor != null && message.hasOwnProperty("twoFactor")) + if (message.twoFactor != null && Object.hasOwnProperty.call(message, "twoFactor")) object.twoFactor = message.twoFactor; - if (message.lastLogin != null && message.hasOwnProperty("lastLogin")) + if (message.lastLogin != null && Object.hasOwnProperty.call(message, "lastLogin")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastLogin = typeof message.lastLogin === "number" ? BigInt(message.lastLogin) : $util.Long.fromBits(message.lastLogin.low >>> 0, message.lastLogin.high >>> 0, false).toBigInt(); else if (typeof message.lastLogin === "number") object.lastLogin = options.longs === String ? String(message.lastLogin) : message.lastLogin; else object.lastLogin = options.longs === String ? $util.Long.prototype.toString.call(message.lastLogin) : options.longs === Number ? new $util.LongBits(message.lastLogin.low >>> 0, message.lastLogin.high >>> 0).toNumber() : message.lastLogin; - if (message.numberOfReusedPassword != null && message.hasOwnProperty("numberOfReusedPassword")) + if (message.numberOfReusedPassword != null && Object.hasOwnProperty.call(message, "numberOfReusedPassword")) object.numberOfReusedPassword = message.numberOfReusedPassword; if (message.securityReportIncrementalData && message.securityReportIncrementalData.length) { object.securityReportIncrementalData = []; for (let j = 0; j < message.securityReportIncrementalData.length; ++j) object.securityReportIncrementalData[j] = $root.Authentication.SecurityReportIncrementalData.toObject(message.securityReportIncrementalData[j], options, q + 1); } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.hasOldEncryption != null && message.hasOwnProperty("hasOldEncryption")) + if (message.hasOldEncryption != null && Object.hasOwnProperty.call(message, "hasOldEncryption")) object.hasOldEncryption = message.hasOldEncryption; return object; }; @@ -18994,7 +19098,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityReportSaveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19070,7 +19174,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.securityReport != null && message.hasOwnProperty("securityReport")) { + if (message.securityReport != null && Object.hasOwnProperty.call(message, "securityReport")) { if (!Array.isArray(message.securityReport)) return "securityReport: array expected"; for (let i = 0; i < message.securityReport.length; ++i) { @@ -19079,7 +19183,7 @@ export const Authentication = $root.Authentication = (() => { return "securityReport." + error; } } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; return null; @@ -19096,6 +19200,8 @@ export const Authentication = $root.Authentication = (() => { SecurityReportSaveRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityReportSaveRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityReportSaveRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19106,7 +19212,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SecurityReportSaveRequest.securityReport: array expected"); message.securityReport = []; for (let i = 0; i < object.securityReport.length; ++i) { - if (typeof object.securityReport[i] !== "object") + if (!$util.isObject(object.securityReport[i])) throw TypeError(".Authentication.SecurityReportSaveRequest.securityReport: object expected"); message.securityReport[i] = $root.Authentication.SecurityReport.fromObject(object.securityReport[i], long + 1); } @@ -19151,7 +19257,7 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.securityReport.length; ++j) object.securityReport[j] = $root.Authentication.SecurityReport.toObject(message.securityReport[j], options, q + 1); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; return object; }; @@ -19260,7 +19366,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19330,7 +19436,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fromPage != null && message.hasOwnProperty("fromPage")) + if (message.fromPage != null && Object.hasOwnProperty.call(message, "fromPage")) if (!$util.isInteger(message.fromPage) && !(message.fromPage && $util.isInteger(message.fromPage.low) && $util.isInteger(message.fromPage.high))) return "fromPage: integer|Long expected"; return null; @@ -19347,6 +19453,8 @@ export const Authentication = $root.Authentication = (() => { SecurityReportRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityReportRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityReportRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19387,7 +19495,7 @@ export const Authentication = $root.Authentication = (() => { object.fromPage = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.fromPage = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.fromPage != null && message.hasOwnProperty("fromPage")) + if (message.fromPage != null && Object.hasOwnProperty.call(message, "fromPage")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fromPage = typeof message.fromPage === "number" ? BigInt(message.fromPage) : $util.Long.fromBits(message.fromPage.low >>> 0, message.fromPage.high >>> 0, false).toBigInt(); else if (typeof message.fromPage === "number") @@ -19580,7 +19688,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SecurityReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19680,10 +19788,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterprisePrivateKey != null && message.hasOwnProperty("enterprisePrivateKey")) + if (message.enterprisePrivateKey != null && Object.hasOwnProperty.call(message, "enterprisePrivateKey")) if (!(message.enterprisePrivateKey && typeof message.enterprisePrivateKey.length === "number" || $util.isString(message.enterprisePrivateKey))) return "enterprisePrivateKey: buffer expected"; - if (message.securityReport != null && message.hasOwnProperty("securityReport")) { + if (message.securityReport != null && Object.hasOwnProperty.call(message, "securityReport")) { if (!Array.isArray(message.securityReport)) return "securityReport: array expected"; for (let i = 0; i < message.securityReport.length; ++i) { @@ -19692,22 +19800,22 @@ export const Authentication = $root.Authentication = (() => { return "securityReport." + error; } } - if (message.asOfRevision != null && message.hasOwnProperty("asOfRevision")) + if (message.asOfRevision != null && Object.hasOwnProperty.call(message, "asOfRevision")) if (!$util.isInteger(message.asOfRevision) && !(message.asOfRevision && $util.isInteger(message.asOfRevision.low) && $util.isInteger(message.asOfRevision.high))) return "asOfRevision: integer|Long expected"; - if (message.fromPage != null && message.hasOwnProperty("fromPage")) + if (message.fromPage != null && Object.hasOwnProperty.call(message, "fromPage")) if (!$util.isInteger(message.fromPage) && !(message.fromPage && $util.isInteger(message.fromPage.low) && $util.isInteger(message.fromPage.high))) return "fromPage: integer|Long expected"; - if (message.toPage != null && message.hasOwnProperty("toPage")) + if (message.toPage != null && Object.hasOwnProperty.call(message, "toPage")) if (!$util.isInteger(message.toPage) && !(message.toPage && $util.isInteger(message.toPage.low) && $util.isInteger(message.toPage.high))) return "toPage: integer|Long expected"; - if (message.complete != null && message.hasOwnProperty("complete")) + if (message.complete != null && Object.hasOwnProperty.call(message, "complete")) if (typeof message.complete !== "boolean") return "complete: boolean expected"; - if (message.enterpriseEccPrivateKey != null && message.hasOwnProperty("enterpriseEccPrivateKey")) + if (message.enterpriseEccPrivateKey != null && Object.hasOwnProperty.call(message, "enterpriseEccPrivateKey")) if (!(message.enterpriseEccPrivateKey && typeof message.enterpriseEccPrivateKey.length === "number" || $util.isString(message.enterpriseEccPrivateKey))) return "enterpriseEccPrivateKey: buffer expected"; - if (message.hasIncrementalData != null && message.hasOwnProperty("hasIncrementalData")) + if (message.hasIncrementalData != null && Object.hasOwnProperty.call(message, "hasIncrementalData")) if (typeof message.hasIncrementalData !== "boolean") return "hasIncrementalData: boolean expected"; return null; @@ -19724,6 +19832,8 @@ export const Authentication = $root.Authentication = (() => { SecurityReportResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SecurityReportResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SecurityReportResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19739,7 +19849,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SecurityReportResponse.securityReport: array expected"); message.securityReport = []; for (let i = 0; i < object.securityReport.length; ++i) { - if (typeof object.securityReport[i] !== "object") + if (!$util.isObject(object.securityReport[i])) throw TypeError(".Authentication.SecurityReportResponse.securityReport: object expected"); message.securityReport[i] = $root.Authentication.SecurityReport.fromObject(object.securityReport[i], long + 1); } @@ -19835,39 +19945,39 @@ export const Authentication = $root.Authentication = (() => { } object.hasIncrementalData = false; } - if (message.enterprisePrivateKey != null && message.hasOwnProperty("enterprisePrivateKey")) + if (message.enterprisePrivateKey != null && Object.hasOwnProperty.call(message, "enterprisePrivateKey")) object.enterprisePrivateKey = options.bytes === String ? $util.base64.encode(message.enterprisePrivateKey, 0, message.enterprisePrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterprisePrivateKey) : message.enterprisePrivateKey; if (message.securityReport && message.securityReport.length) { object.securityReport = []; for (let j = 0; j < message.securityReport.length; ++j) object.securityReport[j] = $root.Authentication.SecurityReport.toObject(message.securityReport[j], options, q + 1); } - if (message.asOfRevision != null && message.hasOwnProperty("asOfRevision")) + if (message.asOfRevision != null && Object.hasOwnProperty.call(message, "asOfRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.asOfRevision = typeof message.asOfRevision === "number" ? BigInt(message.asOfRevision) : $util.Long.fromBits(message.asOfRevision.low >>> 0, message.asOfRevision.high >>> 0, false).toBigInt(); else if (typeof message.asOfRevision === "number") object.asOfRevision = options.longs === String ? String(message.asOfRevision) : message.asOfRevision; else object.asOfRevision = options.longs === String ? $util.Long.prototype.toString.call(message.asOfRevision) : options.longs === Number ? new $util.LongBits(message.asOfRevision.low >>> 0, message.asOfRevision.high >>> 0).toNumber() : message.asOfRevision; - if (message.fromPage != null && message.hasOwnProperty("fromPage")) + if (message.fromPage != null && Object.hasOwnProperty.call(message, "fromPage")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fromPage = typeof message.fromPage === "number" ? BigInt(message.fromPage) : $util.Long.fromBits(message.fromPage.low >>> 0, message.fromPage.high >>> 0, false).toBigInt(); else if (typeof message.fromPage === "number") object.fromPage = options.longs === String ? String(message.fromPage) : message.fromPage; else object.fromPage = options.longs === String ? $util.Long.prototype.toString.call(message.fromPage) : options.longs === Number ? new $util.LongBits(message.fromPage.low >>> 0, message.fromPage.high >>> 0).toNumber() : message.fromPage; - if (message.toPage != null && message.hasOwnProperty("toPage")) + if (message.toPage != null && Object.hasOwnProperty.call(message, "toPage")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.toPage = typeof message.toPage === "number" ? BigInt(message.toPage) : $util.Long.fromBits(message.toPage.low >>> 0, message.toPage.high >>> 0, false).toBigInt(); else if (typeof message.toPage === "number") object.toPage = options.longs === String ? String(message.toPage) : message.toPage; else object.toPage = options.longs === String ? $util.Long.prototype.toString.call(message.toPage) : options.longs === Number ? new $util.LongBits(message.toPage.low >>> 0, message.toPage.high >>> 0).toNumber() : message.toPage; - if (message.complete != null && message.hasOwnProperty("complete")) + if (message.complete != null && Object.hasOwnProperty.call(message, "complete")) object.complete = message.complete; - if (message.enterpriseEccPrivateKey != null && message.hasOwnProperty("enterpriseEccPrivateKey")) + if (message.enterpriseEccPrivateKey != null && Object.hasOwnProperty.call(message, "enterpriseEccPrivateKey")) object.enterpriseEccPrivateKey = options.bytes === String ? $util.base64.encode(message.enterpriseEccPrivateKey, 0, message.enterpriseEccPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterpriseEccPrivateKey) : message.enterpriseEccPrivateKey; - if (message.hasIncrementalData != null && message.hasOwnProperty("hasIncrementalData")) + if (message.hasIncrementalData != null && Object.hasOwnProperty.call(message, "hasIncrementalData")) object.hasIncrementalData = message.hasIncrementalData; return object; }; @@ -19976,7 +20086,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ IncrementalSecurityDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20046,7 +20156,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; return null; @@ -20063,6 +20173,8 @@ export const Authentication = $root.Authentication = (() => { IncrementalSecurityDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.IncrementalSecurityDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.IncrementalSecurityDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20101,7 +20213,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.continuationToken = $util.newBuffer(object.continuationToken); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; return object; }; @@ -20223,7 +20335,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ IncrementalSecurityDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20299,7 +20411,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.securityReportIncrementalData != null && message.hasOwnProperty("securityReportIncrementalData")) { + if (message.securityReportIncrementalData != null && Object.hasOwnProperty.call(message, "securityReportIncrementalData")) { if (!Array.isArray(message.securityReportIncrementalData)) return "securityReportIncrementalData: array expected"; for (let i = 0; i < message.securityReportIncrementalData.length; ++i) { @@ -20308,7 +20420,7 @@ export const Authentication = $root.Authentication = (() => { return "securityReportIncrementalData." + error; } } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; return null; @@ -20325,6 +20437,8 @@ export const Authentication = $root.Authentication = (() => { IncrementalSecurityDataResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.IncrementalSecurityDataResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.IncrementalSecurityDataResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20335,7 +20449,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.IncrementalSecurityDataResponse.securityReportIncrementalData: array expected"); message.securityReportIncrementalData = []; for (let i = 0; i < object.securityReportIncrementalData.length; ++i) { - if (typeof object.securityReportIncrementalData[i] !== "object") + if (!$util.isObject(object.securityReportIncrementalData[i])) throw TypeError(".Authentication.IncrementalSecurityDataResponse.securityReportIncrementalData: object expected"); message.securityReportIncrementalData[i] = $root.Authentication.SecurityReportIncrementalData.fromObject(object.securityReportIncrementalData[i], long + 1); } @@ -20380,7 +20494,7 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.securityReportIncrementalData.length; ++j) object.securityReportIncrementalData[j] = $root.Authentication.SecurityReportIncrementalData.toObject(message.securityReportIncrementalData[j], options, q + 1); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; return object; }; @@ -20489,7 +20603,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ReusedPasswordsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20559,7 +20673,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) if (!$util.isInteger(message.count)) return "count: integer expected"; return null; @@ -20576,6 +20690,8 @@ export const Authentication = $root.Authentication = (() => { ReusedPasswordsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ReusedPasswordsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ReusedPasswordsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20605,7 +20721,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.count = 0; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) object.count = message.count; return object; }; @@ -20725,7 +20841,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SummaryConsoleReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20799,10 +20915,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reportType != null && message.hasOwnProperty("reportType")) + if (message.reportType != null && Object.hasOwnProperty.call(message, "reportType")) if (!$util.isInteger(message.reportType)) return "reportType: integer expected"; - if (message.reportData != null && message.hasOwnProperty("reportData")) + if (message.reportData != null && Object.hasOwnProperty.call(message, "reportData")) if (!(message.reportData && typeof message.reportData.length === "number" || $util.isString(message.reportData))) return "reportData: buffer expected"; return null; @@ -20819,6 +20935,8 @@ export const Authentication = $root.Authentication = (() => { SummaryConsoleReport.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SummaryConsoleReport) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SummaryConsoleReport: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20861,9 +20979,9 @@ export const Authentication = $root.Authentication = (() => { object.reportData = $util.newBuffer(object.reportData); } } - if (message.reportType != null && message.hasOwnProperty("reportType")) + if (message.reportType != null && Object.hasOwnProperty.call(message, "reportType")) object.reportType = message.reportType; - if (message.reportData != null && message.hasOwnProperty("reportData")) + if (message.reportData != null && Object.hasOwnProperty.call(message, "reportData")) object.reportData = options.bytes === String ? $util.base64.encode(message.reportData, 0, message.reportData.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportData) : message.reportData; return object; }; @@ -21025,7 +21143,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeToKeyTypeOne.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21107,7 +21225,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) switch (message.objectType) { default: return "objectType: enum value expected"; @@ -21118,13 +21236,13 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.primaryUid != null && message.hasOwnProperty("primaryUid")) + if (message.primaryUid != null && Object.hasOwnProperty.call(message, "primaryUid")) if (!(message.primaryUid && typeof message.primaryUid.length === "number" || $util.isString(message.primaryUid))) return "primaryUid: buffer expected"; - if (message.secondaryUid != null && message.hasOwnProperty("secondaryUid")) + if (message.secondaryUid != null && Object.hasOwnProperty.call(message, "secondaryUid")) if (!(message.secondaryUid && typeof message.secondaryUid.length === "number" || $util.isString(message.secondaryUid))) return "secondaryUid: buffer expected"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; return null; @@ -21141,6 +21259,8 @@ export const Authentication = $root.Authentication = (() => { ChangeToKeyTypeOne.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeToKeyTypeOne) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeToKeyTypeOne: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21233,13 +21353,13 @@ export const Authentication = $root.Authentication = (() => { object.key = $util.newBuffer(object.key); } } - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) object.objectType = options.enums === String ? $root.Authentication.ObjectTypes[message.objectType] === undefined ? message.objectType : $root.Authentication.ObjectTypes[message.objectType] : message.objectType; - if (message.primaryUid != null && message.hasOwnProperty("primaryUid")) + if (message.primaryUid != null && Object.hasOwnProperty.call(message, "primaryUid")) object.primaryUid = options.bytes === String ? $util.base64.encode(message.primaryUid, 0, message.primaryUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.primaryUid) : message.primaryUid; - if (message.secondaryUid != null && message.hasOwnProperty("secondaryUid")) + if (message.secondaryUid != null && Object.hasOwnProperty.call(message, "secondaryUid")) object.secondaryUid = options.bytes === String ? $util.base64.encode(message.secondaryUid, 0, message.secondaryUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.secondaryUid) : message.secondaryUid; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; return object; }; @@ -21350,7 +21470,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeToKeyTypeOneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21422,7 +21542,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.changeToKeyTypeOne != null && message.hasOwnProperty("changeToKeyTypeOne")) { + if (message.changeToKeyTypeOne != null && Object.hasOwnProperty.call(message, "changeToKeyTypeOne")) { if (!Array.isArray(message.changeToKeyTypeOne)) return "changeToKeyTypeOne: array expected"; for (let i = 0; i < message.changeToKeyTypeOne.length; ++i) { @@ -21445,6 +21565,8 @@ export const Authentication = $root.Authentication = (() => { ChangeToKeyTypeOneRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeToKeyTypeOneRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeToKeyTypeOneRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21455,7 +21577,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.ChangeToKeyTypeOneRequest.changeToKeyTypeOne: array expected"); message.changeToKeyTypeOne = []; for (let i = 0; i < object.changeToKeyTypeOne.length; ++i) { - if (typeof object.changeToKeyTypeOne[i] !== "object") + if (!$util.isObject(object.changeToKeyTypeOne[i])) throw TypeError(".Authentication.ChangeToKeyTypeOneRequest.changeToKeyTypeOne: object expected"); message.changeToKeyTypeOne[i] = $root.Authentication.ChangeToKeyTypeOne.fromObject(object.changeToKeyTypeOne[i], long + 1); } @@ -21627,7 +21749,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeToKeyTypeOneStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21709,16 +21831,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) if (!$util.isString(message.reason)) return "reason: string expected"; return null; @@ -21735,6 +21857,8 @@ export const Authentication = $root.Authentication = (() => { ChangeToKeyTypeOneStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeToKeyTypeOneStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeToKeyTypeOneStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21783,13 +21907,13 @@ export const Authentication = $root.Authentication = (() => { object.status = ""; object.reason = ""; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) object.reason = message.reason; return object; }; @@ -21900,7 +22024,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeToKeyTypeOneResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21972,7 +22096,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.changeToKeyTypeOneStatus != null && message.hasOwnProperty("changeToKeyTypeOneStatus")) { + if (message.changeToKeyTypeOneStatus != null && Object.hasOwnProperty.call(message, "changeToKeyTypeOneStatus")) { if (!Array.isArray(message.changeToKeyTypeOneStatus)) return "changeToKeyTypeOneStatus: array expected"; for (let i = 0; i < message.changeToKeyTypeOneStatus.length; ++i) { @@ -21995,6 +22119,8 @@ export const Authentication = $root.Authentication = (() => { ChangeToKeyTypeOneResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeToKeyTypeOneResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeToKeyTypeOneResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22005,7 +22131,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.ChangeToKeyTypeOneResponse.changeToKeyTypeOneStatus: array expected"); message.changeToKeyTypeOneStatus = []; for (let i = 0; i < object.changeToKeyTypeOneStatus.length; ++i) { - if (typeof object.changeToKeyTypeOneStatus[i] !== "object") + if (!$util.isObject(object.changeToKeyTypeOneStatus[i])) throw TypeError(".Authentication.ChangeToKeyTypeOneResponse.changeToKeyTypeOneStatus: object expected"); message.changeToKeyTypeOneStatus[i] = $root.Authentication.ChangeToKeyTypeOneStatus.fromObject(object.changeToKeyTypeOneStatus[i], long + 1); } @@ -22223,7 +22349,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetChangeKeyTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22316,7 +22442,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.onlyTheseObjects != null && message.hasOwnProperty("onlyTheseObjects")) { + if (message.onlyTheseObjects != null && Object.hasOwnProperty.call(message, "onlyTheseObjects")) { if (!Array.isArray(message.onlyTheseObjects)) return "onlyTheseObjects: array expected"; for (let i = 0; i < message.onlyTheseObjects.length; ++i) @@ -22336,16 +22462,16 @@ export const Authentication = $root.Authentication = (() => { break; } } - if (message.limit != null && message.hasOwnProperty("limit")) + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) if (!$util.isInteger(message.limit)) return "limit: integer expected"; - if (message.includeRecommended != null && message.hasOwnProperty("includeRecommended")) + if (message.includeRecommended != null && Object.hasOwnProperty.call(message, "includeRecommended")) if (typeof message.includeRecommended !== "boolean") return "includeRecommended: boolean expected"; - if (message.includeKeys != null && message.hasOwnProperty("includeKeys")) + if (message.includeKeys != null && Object.hasOwnProperty.call(message, "includeKeys")) if (typeof message.includeKeys !== "boolean") return "includeKeys: boolean expected"; - if (message.includeAllowedKeyTypes != null && message.hasOwnProperty("includeAllowedKeyTypes")) + if (message.includeAllowedKeyTypes != null && Object.hasOwnProperty.call(message, "includeAllowedKeyTypes")) if (typeof message.includeAllowedKeyTypes !== "boolean") return "includeAllowedKeyTypes: boolean expected"; return null; @@ -22362,6 +22488,8 @@ export const Authentication = $root.Authentication = (() => { GetChangeKeyTypesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetChangeKeyTypesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetChangeKeyTypesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22461,13 +22589,13 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.onlyTheseObjects.length; ++j) object.onlyTheseObjects[j] = options.enums === String ? $root.Authentication.EncryptedObjectType[message.onlyTheseObjects[j]] === undefined ? message.onlyTheseObjects[j] : $root.Authentication.EncryptedObjectType[message.onlyTheseObjects[j]] : message.onlyTheseObjects[j]; } - if (message.limit != null && message.hasOwnProperty("limit")) + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) object.limit = message.limit; - if (message.includeRecommended != null && message.hasOwnProperty("includeRecommended")) + if (message.includeRecommended != null && Object.hasOwnProperty.call(message, "includeRecommended")) object.includeRecommended = message.includeRecommended; - if (message.includeKeys != null && message.hasOwnProperty("includeKeys")) + if (message.includeKeys != null && Object.hasOwnProperty.call(message, "includeKeys")) object.includeKeys = message.includeKeys; - if (message.includeAllowedKeyTypes != null && message.hasOwnProperty("includeAllowedKeyTypes")) + if (message.includeAllowedKeyTypes != null && Object.hasOwnProperty.call(message, "includeAllowedKeyTypes")) object.includeAllowedKeyTypes = message.includeAllowedKeyTypes; return object; }; @@ -22591,7 +22719,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetChangeKeyTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22669,7 +22797,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keys != null && message.hasOwnProperty("keys")) { + if (message.keys != null && Object.hasOwnProperty.call(message, "keys")) { if (!Array.isArray(message.keys)) return "keys: array expected"; for (let i = 0; i < message.keys.length; ++i) { @@ -22678,7 +22806,7 @@ export const Authentication = $root.Authentication = (() => { return "keys." + error; } } - if (message.allowedKeyTypes != null && message.hasOwnProperty("allowedKeyTypes")) { + if (message.allowedKeyTypes != null && Object.hasOwnProperty.call(message, "allowedKeyTypes")) { if (!Array.isArray(message.allowedKeyTypes)) return "allowedKeyTypes: array expected"; for (let i = 0; i < message.allowedKeyTypes.length; ++i) { @@ -22701,6 +22829,8 @@ export const Authentication = $root.Authentication = (() => { GetChangeKeyTypesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetChangeKeyTypesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetChangeKeyTypesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22711,7 +22841,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetChangeKeyTypesResponse.keys: array expected"); message.keys = []; for (let i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") + if (!$util.isObject(object.keys[i])) throw TypeError(".Authentication.GetChangeKeyTypesResponse.keys: object expected"); message.keys[i] = $root.Authentication.ChangeKeyType.fromObject(object.keys[i], long + 1); } @@ -22721,7 +22851,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetChangeKeyTypesResponse.allowedKeyTypes: array expected"); message.allowedKeyTypes = []; for (let i = 0; i < object.allowedKeyTypes.length; ++i) { - if (typeof object.allowedKeyTypes[i] !== "object") + if (!$util.isObject(object.allowedKeyTypes[i])) throw TypeError(".Authentication.GetChangeKeyTypesResponse.allowedKeyTypes: object expected"); message.allowedKeyTypes[i] = $root.Authentication.AllowedKeyTypes.fromObject(object.allowedKeyTypes[i], long + 1); } @@ -22883,7 +23013,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AllowedKeyTypes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22964,7 +23094,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) switch (message.objectType) { default: return "objectType: enum value expected"; @@ -22980,7 +23110,7 @@ export const Authentication = $root.Authentication = (() => { case 9: break; } - if (message.allowedKeyTypes != null && message.hasOwnProperty("allowedKeyTypes")) { + if (message.allowedKeyTypes != null && Object.hasOwnProperty.call(message, "allowedKeyTypes")) { if (!Array.isArray(message.allowedKeyTypes)) return "allowedKeyTypes: array expected"; for (let i = 0; i < message.allowedKeyTypes.length; ++i) @@ -23009,6 +23139,8 @@ export const Authentication = $root.Authentication = (() => { AllowedKeyTypes.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AllowedKeyTypes) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AllowedKeyTypes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23119,7 +23251,7 @@ export const Authentication = $root.Authentication = (() => { object.allowedKeyTypes = []; if (options.defaults) object.objectType = options.enums === String ? "EOT_UNSPECIFIED" : 0; - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) object.objectType = options.enums === String ? $root.Authentication.EncryptedObjectType[message.objectType] === undefined ? message.objectType : $root.Authentication.EncryptedObjectType[message.objectType] : message.objectType; if (message.allowedKeyTypes && message.allowedKeyTypes.length) { object.allowedKeyTypes = []; @@ -23235,7 +23367,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeKeyTypes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23307,7 +23439,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keys != null && message.hasOwnProperty("keys")) { + if (message.keys != null && Object.hasOwnProperty.call(message, "keys")) { if (!Array.isArray(message.keys)) return "keys: array expected"; for (let i = 0; i < message.keys.length; ++i) { @@ -23330,6 +23462,8 @@ export const Authentication = $root.Authentication = (() => { ChangeKeyTypes.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeKeyTypes) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeKeyTypes: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23340,7 +23474,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.ChangeKeyTypes.keys: array expected"); message.keys = []; for (let i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") + if (!$util.isObject(object.keys[i])) throw TypeError(".Authentication.ChangeKeyTypes.keys: object expected"); message.keys[i] = $root.Authentication.ChangeKeyType.fromObject(object.keys[i], long + 1); } @@ -23534,7 +23668,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeKeyType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23624,7 +23758,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) switch (message.objectType) { default: return "objectType: enum value expected"; @@ -23640,16 +23774,16 @@ export const Authentication = $root.Authentication = (() => { case 9: break; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.secondaryUid != null && message.hasOwnProperty("secondaryUid")) + if (message.secondaryUid != null && Object.hasOwnProperty.call(message, "secondaryUid")) if (!(message.secondaryUid && typeof message.secondaryUid.length === "number" || $util.isString(message.secondaryUid))) return "secondaryUid: buffer expected"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -23660,7 +23794,7 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -23685,6 +23819,8 @@ export const Authentication = $root.Authentication = (() => { ChangeKeyType.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeKeyType) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeKeyType: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23855,17 +23991,17 @@ export const Authentication = $root.Authentication = (() => { object.keyType = options.enums === String ? "KT_NO_KEY" : 0; object.status = options.enums === String ? "SUCCESS" : 0; } - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) object.objectType = options.enums === String ? $root.Authentication.EncryptedObjectType[message.objectType] === undefined ? message.objectType : $root.Authentication.EncryptedObjectType[message.objectType] : message.objectType; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.secondaryUid != null && message.hasOwnProperty("secondaryUid")) + if (message.secondaryUid != null && Object.hasOwnProperty.call(message, "secondaryUid")) object.secondaryUid = options.bytes === String ? $util.base64.encode(message.secondaryUid, 0, message.secondaryUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.secondaryUid) : message.secondaryUid; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Authentication.GenericStatus[message.status] === undefined ? message.status : $root.Authentication.GenericStatus[message.status] : message.status; return object; }; @@ -23985,7 +24121,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SetKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24059,10 +24195,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; return null; @@ -24079,6 +24215,8 @@ export const Authentication = $root.Authentication = (() => { SetKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SetKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SetKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24132,14 +24270,14 @@ export const Authentication = $root.Authentication = (() => { object.key = $util.newBuffer(object.key); } } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id = typeof message.id === "number" ? BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, false).toBigInt(); else if (typeof message.id === "number") object.id = options.longs === String ? String(message.id) : message.id; else object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; return object; }; @@ -24250,7 +24388,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SetKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24322,7 +24460,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keys != null && message.hasOwnProperty("keys")) { + if (message.keys != null && Object.hasOwnProperty.call(message, "keys")) { if (!Array.isArray(message.keys)) return "keys: array expected"; for (let i = 0; i < message.keys.length; ++i) { @@ -24345,6 +24483,8 @@ export const Authentication = $root.Authentication = (() => { SetKeyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SetKeyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SetKeyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24355,7 +24495,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SetKeyRequest.keys: array expected"); message.keys = []; for (let i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") + if (!$util.isObject(object.keys[i])) throw TypeError(".Authentication.SetKeyRequest.keys: object expected"); message.keys[i] = $root.Authentication.SetKey.fromObject(object.keys[i], long + 1); } @@ -24758,7 +24898,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ CreateUserRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24924,81 +25064,81 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.authVerifier != null && message.hasOwnProperty("authVerifier")) + if (message.authVerifier != null && Object.hasOwnProperty.call(message, "authVerifier")) if (!(message.authVerifier && typeof message.authVerifier.length === "number" || $util.isString(message.authVerifier))) return "authVerifier: buffer expected"; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) if (!(message.encryptionParams && typeof message.encryptionParams.length === "number" || $util.isString(message.encryptionParams))) return "encryptionParams: buffer expected"; - if (message.rsaPublicKey != null && message.hasOwnProperty("rsaPublicKey")) + if (message.rsaPublicKey != null && Object.hasOwnProperty.call(message, "rsaPublicKey")) if (!(message.rsaPublicKey && typeof message.rsaPublicKey.length === "number" || $util.isString(message.rsaPublicKey))) return "rsaPublicKey: buffer expected"; - if (message.rsaEncryptedPrivateKey != null && message.hasOwnProperty("rsaEncryptedPrivateKey")) + if (message.rsaEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedPrivateKey")) if (!(message.rsaEncryptedPrivateKey && typeof message.rsaEncryptedPrivateKey.length === "number" || $util.isString(message.rsaEncryptedPrivateKey))) return "rsaEncryptedPrivateKey: buffer expected"; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) if (!(message.eccPublicKey && typeof message.eccPublicKey.length === "number" || $util.isString(message.eccPublicKey))) return "eccPublicKey: buffer expected"; - if (message.eccEncryptedPrivateKey != null && message.hasOwnProperty("eccEncryptedPrivateKey")) + if (message.eccEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "eccEncryptedPrivateKey")) if (!(message.eccEncryptedPrivateKey && typeof message.eccEncryptedPrivateKey.length === "number" || $util.isString(message.eccEncryptedPrivateKey))) return "eccEncryptedPrivateKey: buffer expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) if (!(message.encryptedClientKey && typeof message.encryptedClientKey.length === "number" || $util.isString(message.encryptedClientKey))) return "encryptedClientKey: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) if (!(message.encryptedDeviceDataKey && typeof message.encryptedDeviceDataKey.length === "number" || $util.isString(message.encryptedDeviceDataKey))) return "encryptedDeviceDataKey: buffer expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.installReferrer != null && message.hasOwnProperty("installReferrer")) + if (message.installReferrer != null && Object.hasOwnProperty.call(message, "installReferrer")) if (!$util.isString(message.installReferrer)) return "installReferrer: string expected"; - if (message.mccMNC != null && message.hasOwnProperty("mccMNC")) + if (message.mccMNC != null && Object.hasOwnProperty.call(message, "mccMNC")) if (!$util.isInteger(message.mccMNC)) return "mccMNC: integer expected"; - if (message.mfg != null && message.hasOwnProperty("mfg")) + if (message.mfg != null && Object.hasOwnProperty.call(message, "mfg")) if (!$util.isString(message.mfg)) return "mfg: string expected"; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.brand != null && message.hasOwnProperty("brand")) + if (message.brand != null && Object.hasOwnProperty.call(message, "brand")) if (!$util.isString(message.brand)) return "brand: string expected"; - if (message.product != null && message.hasOwnProperty("product")) + if (message.product != null && Object.hasOwnProperty.call(message, "product")) if (!$util.isString(message.product)) return "product: string expected"; - if (message.device != null && message.hasOwnProperty("device")) + if (message.device != null && Object.hasOwnProperty.call(message, "device")) if (!$util.isString(message.device)) return "device: string expected"; - if (message.carrier != null && message.hasOwnProperty("carrier")) + if (message.carrier != null && Object.hasOwnProperty.call(message, "carrier")) if (!$util.isString(message.carrier)) return "carrier: string expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; - if (message.enterpriseRegistration != null && message.hasOwnProperty("enterpriseRegistration")) { + if (message.enterpriseRegistration != null && Object.hasOwnProperty.call(message, "enterpriseRegistration")) { let error = $root.Enterprise.EnterpriseRegistration.verify(message.enterpriseRegistration, long + 1); if (error) return "enterpriseRegistration." + error; } - if (message.encryptedVerificationToken != null && message.hasOwnProperty("encryptedVerificationToken")) + if (message.encryptedVerificationToken != null && Object.hasOwnProperty.call(message, "encryptedVerificationToken")) if (!(message.encryptedVerificationToken && typeof message.encryptedVerificationToken.length === "number" || $util.isString(message.encryptedVerificationToken))) return "encryptedVerificationToken: buffer expected"; - if (message.enterpriseUsersDataKey != null && message.hasOwnProperty("enterpriseUsersDataKey")) + if (message.enterpriseUsersDataKey != null && Object.hasOwnProperty.call(message, "enterpriseUsersDataKey")) if (!(message.enterpriseUsersDataKey && typeof message.enterpriseUsersDataKey.length === "number" || $util.isString(message.enterpriseUsersDataKey))) return "enterpriseUsersDataKey: buffer expected"; return null; @@ -25015,6 +25155,8 @@ export const Authentication = $root.Authentication = (() => { CreateUserRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.CreateUserRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.CreateUserRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25098,7 +25240,7 @@ export const Authentication = $root.Authentication = (() => { if (object.verificationCode != null) message.verificationCode = String(object.verificationCode); if (object.enterpriseRegistration != null) { - if (typeof object.enterpriseRegistration !== "object") + if (!$util.isObject(object.enterpriseRegistration)) throw TypeError(".Authentication.CreateUserRequest.enterpriseRegistration: object expected"); message.enterpriseRegistration = $root.Enterprise.EnterpriseRegistration.fromObject(object.enterpriseRegistration, long + 1); } @@ -25237,55 +25379,55 @@ export const Authentication = $root.Authentication = (() => { object.enterpriseUsersDataKey = $util.newBuffer(object.enterpriseUsersDataKey); } } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.authVerifier != null && message.hasOwnProperty("authVerifier")) + if (message.authVerifier != null && Object.hasOwnProperty.call(message, "authVerifier")) object.authVerifier = options.bytes === String ? $util.base64.encode(message.authVerifier, 0, message.authVerifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.authVerifier) : message.authVerifier; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) object.encryptionParams = options.bytes === String ? $util.base64.encode(message.encryptionParams, 0, message.encryptionParams.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptionParams) : message.encryptionParams; - if (message.rsaPublicKey != null && message.hasOwnProperty("rsaPublicKey")) + if (message.rsaPublicKey != null && Object.hasOwnProperty.call(message, "rsaPublicKey")) object.rsaPublicKey = options.bytes === String ? $util.base64.encode(message.rsaPublicKey, 0, message.rsaPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaPublicKey) : message.rsaPublicKey; - if (message.rsaEncryptedPrivateKey != null && message.hasOwnProperty("rsaEncryptedPrivateKey")) + if (message.rsaEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedPrivateKey")) object.rsaEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.rsaEncryptedPrivateKey, 0, message.rsaEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaEncryptedPrivateKey) : message.rsaEncryptedPrivateKey; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) object.eccPublicKey = options.bytes === String ? $util.base64.encode(message.eccPublicKey, 0, message.eccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccPublicKey) : message.eccPublicKey; - if (message.eccEncryptedPrivateKey != null && message.hasOwnProperty("eccEncryptedPrivateKey")) + if (message.eccEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "eccEncryptedPrivateKey")) object.eccEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.eccEncryptedPrivateKey, 0, message.eccEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccEncryptedPrivateKey) : message.eccEncryptedPrivateKey; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) object.encryptedClientKey = options.bytes === String ? $util.base64.encode(message.encryptedClientKey, 0, message.encryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedClientKey) : message.encryptedClientKey; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) object.encryptedDeviceDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDeviceDataKey, 0, message.encryptedDeviceDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceDataKey) : message.encryptedDeviceDataKey; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.installReferrer != null && message.hasOwnProperty("installReferrer")) + if (message.installReferrer != null && Object.hasOwnProperty.call(message, "installReferrer")) object.installReferrer = message.installReferrer; - if (message.mccMNC != null && message.hasOwnProperty("mccMNC")) + if (message.mccMNC != null && Object.hasOwnProperty.call(message, "mccMNC")) object.mccMNC = message.mccMNC; - if (message.mfg != null && message.hasOwnProperty("mfg")) + if (message.mfg != null && Object.hasOwnProperty.call(message, "mfg")) object.mfg = message.mfg; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) object.model = message.model; - if (message.brand != null && message.hasOwnProperty("brand")) + if (message.brand != null && Object.hasOwnProperty.call(message, "brand")) object.brand = message.brand; - if (message.product != null && message.hasOwnProperty("product")) + if (message.product != null && Object.hasOwnProperty.call(message, "product")) object.product = message.product; - if (message.device != null && message.hasOwnProperty("device")) + if (message.device != null && Object.hasOwnProperty.call(message, "device")) object.device = message.device; - if (message.carrier != null && message.hasOwnProperty("carrier")) + if (message.carrier != null && Object.hasOwnProperty.call(message, "carrier")) object.carrier = message.carrier; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; - if (message.enterpriseRegistration != null && message.hasOwnProperty("enterpriseRegistration")) + if (message.enterpriseRegistration != null && Object.hasOwnProperty.call(message, "enterpriseRegistration")) object.enterpriseRegistration = $root.Enterprise.EnterpriseRegistration.toObject(message.enterpriseRegistration, options, q + 1); - if (message.encryptedVerificationToken != null && message.hasOwnProperty("encryptedVerificationToken")) + if (message.encryptedVerificationToken != null && Object.hasOwnProperty.call(message, "encryptedVerificationToken")) object.encryptedVerificationToken = options.bytes === String ? $util.base64.encode(message.encryptedVerificationToken, 0, message.encryptedVerificationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedVerificationToken) : message.encryptedVerificationToken; - if (message.enterpriseUsersDataKey != null && message.hasOwnProperty("enterpriseUsersDataKey")) + if (message.enterpriseUsersDataKey != null && Object.hasOwnProperty.call(message, "enterpriseUsersDataKey")) object.enterpriseUsersDataKey = options.bytes === String ? $util.base64.encode(message.enterpriseUsersDataKey, 0, message.enterpriseUsersDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterpriseUsersDataKey) : message.enterpriseUsersDataKey; return object; }; @@ -25416,7 +25558,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ NodeEnforcementAddOrUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25494,13 +25636,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.enforcement != null && message.hasOwnProperty("enforcement")) + if (message.enforcement != null && Object.hasOwnProperty.call(message, "enforcement")) if (!$util.isString(message.enforcement)) return "enforcement: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -25517,6 +25659,8 @@ export const Authentication = $root.Authentication = (() => { NodeEnforcementAddOrUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.NodeEnforcementAddOrUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.NodeEnforcementAddOrUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25564,16 +25708,16 @@ export const Authentication = $root.Authentication = (() => { object.enforcement = ""; object.value = ""; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.enforcement != null && message.hasOwnProperty("enforcement")) + if (message.enforcement != null && Object.hasOwnProperty.call(message, "enforcement")) object.enforcement = message.enforcement; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -25693,7 +25837,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ NodeEnforcementRemoveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25767,10 +25911,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.enforcement != null && message.hasOwnProperty("enforcement")) + if (message.enforcement != null && Object.hasOwnProperty.call(message, "enforcement")) if (!$util.isString(message.enforcement)) return "enforcement: string expected"; return null; @@ -25787,6 +25931,8 @@ export const Authentication = $root.Authentication = (() => { NodeEnforcementRemoveRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.NodeEnforcementRemoveRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.NodeEnforcementRemoveRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25831,14 +25977,14 @@ export const Authentication = $root.Authentication = (() => { object.nodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.enforcement = ""; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.enforcement != null && message.hasOwnProperty("enforcement")) + if (message.enforcement != null && Object.hasOwnProperty.call(message, "enforcement")) object.enforcement = message.enforcement; return object; }; @@ -26013,7 +26159,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ApiRequestByKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -26107,19 +26253,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) if (!$util.isInteger(message.keyId)) return "keyId: integer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -26148,10 +26294,10 @@ export const Authentication = $root.Authentication = (() => { case 22: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isInteger(message.type)) return "type: integer expected"; - if (message.parentThreadId != null && message.hasOwnProperty("parentThreadId")) + if (message.parentThreadId != null && Object.hasOwnProperty.call(message, "parentThreadId")) if (!$util.isString(message.parentThreadId)) return "parentThreadId: string expected"; return null; @@ -26168,6 +26314,8 @@ export const Authentication = $root.Authentication = (() => { ApiRequestByKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ApiRequestByKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ApiRequestByKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26323,19 +26471,19 @@ export const Authentication = $root.Authentication = (() => { object.type = 0; object.parentThreadId = ""; } - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) object.keyId = message.keyId; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.parentThreadId != null && message.hasOwnProperty("parentThreadId")) + if (message.parentThreadId != null && Object.hasOwnProperty.call(message, "parentThreadId")) object.parentThreadId = message.parentThreadId; return object; }; @@ -26477,7 +26625,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ApiRequestByKAtoKAKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -26559,7 +26707,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sourceRegion != null && message.hasOwnProperty("sourceRegion")) + if (message.sourceRegion != null && Object.hasOwnProperty.call(message, "sourceRegion")) switch (message.sourceRegion) { default: return "sourceRegion: enum value expected"; @@ -26572,10 +26720,10 @@ export const Authentication = $root.Authentication = (() => { case 6: break; } - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -26604,7 +26752,7 @@ export const Authentication = $root.Authentication = (() => { case 22: break; } - if (message.destinationRegion != null && message.hasOwnProperty("destinationRegion")) + if (message.destinationRegion != null && Object.hasOwnProperty.call(message, "destinationRegion")) switch (message.destinationRegion) { default: return "destinationRegion: enum value expected"; @@ -26631,6 +26779,8 @@ export const Authentication = $root.Authentication = (() => { ApiRequestByKAtoKAKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ApiRequestByKAtoKAKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ApiRequestByKAtoKAKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26845,13 +26995,13 @@ export const Authentication = $root.Authentication = (() => { object.supportedLanguage = options.enums === String ? "ENGLISH" : 0; object.destinationRegion = options.enums === String ? "UNKNOWN" : 0; } - if (message.sourceRegion != null && message.hasOwnProperty("sourceRegion")) + if (message.sourceRegion != null && Object.hasOwnProperty.call(message, "sourceRegion")) object.sourceRegion = options.enums === String ? $root.Authentication.Region[message.sourceRegion] === undefined ? message.sourceRegion : $root.Authentication.Region[message.sourceRegion] : message.sourceRegion; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.destinationRegion != null && message.hasOwnProperty("destinationRegion")) + if (message.destinationRegion != null && Object.hasOwnProperty.call(message, "destinationRegion")) object.destinationRegion = options.enums === String ? $root.Authentication.Region[message.destinationRegion] === undefined ? message.destinationRegion : $root.Authentication.Region[message.destinationRegion] : message.destinationRegion; return object; }; @@ -26971,7 +27121,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ MemcacheRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27045,10 +27195,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; return null; @@ -27065,6 +27215,8 @@ export const Authentication = $root.Authentication = (() => { MemcacheRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.MemcacheRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.MemcacheRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27098,9 +27250,9 @@ export const Authentication = $root.Authentication = (() => { object.key = ""; object.userId = 0; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; return object; }; @@ -27220,7 +27372,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ MemcacheResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27294,10 +27446,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -27314,6 +27466,8 @@ export const Authentication = $root.Authentication = (() => { MemcacheResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.MemcacheResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.MemcacheResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27347,9 +27501,9 @@ export const Authentication = $root.Authentication = (() => { object.key = ""; object.value = ""; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -27469,7 +27623,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ MasterPasswordReentryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27543,10 +27697,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.pbkdf2Password != null && message.hasOwnProperty("pbkdf2Password")) + if (message.pbkdf2Password != null && Object.hasOwnProperty.call(message, "pbkdf2Password")) if (!$util.isString(message.pbkdf2Password)) return "pbkdf2Password: string expected"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) switch (message.action) { default: return "action: enum value expected"; @@ -27568,6 +27722,8 @@ export const Authentication = $root.Authentication = (() => { MasterPasswordReentryRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.MasterPasswordReentryRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.MasterPasswordReentryRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27615,9 +27771,9 @@ export const Authentication = $root.Authentication = (() => { object.pbkdf2Password = ""; object.action = options.enums === String ? "UNMASK" : 0; } - if (message.pbkdf2Password != null && message.hasOwnProperty("pbkdf2Password")) + if (message.pbkdf2Password != null && Object.hasOwnProperty.call(message, "pbkdf2Password")) object.pbkdf2Password = message.pbkdf2Password; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) object.action = options.enums === String ? $root.Authentication.MasterPasswordReentryActionType[message.action] === undefined ? message.action : $root.Authentication.MasterPasswordReentryActionType[message.action] : message.action; return object; }; @@ -27742,7 +27898,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ MasterPasswordReentryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27812,7 +27968,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -27835,6 +27991,8 @@ export const Authentication = $root.Authentication = (() => { MasterPasswordReentryResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.MasterPasswordReentryResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.MasterPasswordReentryResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -27882,7 +28040,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.status = options.enums === String ? "MP_UNKNOWN" : 0; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Authentication.MasterPasswordReentryStatus[message.status] === undefined ? message.status : $root.Authentication.MasterPasswordReentryStatus[message.status] : message.status; return object; }; @@ -28046,7 +28204,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceRegistrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28136,19 +28294,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) if (!$util.isString(message.devicePlatform)) return "devicePlatform: string expected"; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) switch (message.clientFormFactor) { default: return "clientFormFactor: enum value expected"; @@ -28158,7 +28316,7 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -28175,6 +28333,8 @@ export const Authentication = $root.Authentication = (() => { DeviceRegistrationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceRegistrationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceRegistrationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28251,17 +28411,17 @@ export const Authentication = $root.Authentication = (() => { object.clientFormFactor = options.enums === String ? "FF_EMPTY" : 0; object.username = ""; } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) object.devicePlatform = message.devicePlatform; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) object.clientFormFactor = options.enums === String ? $root.Authentication.ClientFormFactor[message.clientFormFactor] === undefined ? message.clientFormFactor : $root.Authentication.ClientFormFactor[message.clientFormFactor] : message.clientFormFactor; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -28414,7 +28574,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceVerificationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28500,19 +28660,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.verificationChannel != null && message.hasOwnProperty("verificationChannel")) + if (message.verificationChannel != null && Object.hasOwnProperty.call(message, "verificationChannel")) if (!$util.isString(message.verificationChannel)) return "verificationChannel: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; return null; @@ -28529,6 +28689,8 @@ export const Authentication = $root.Authentication = (() => { DeviceVerificationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceVerificationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceVerificationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28589,15 +28751,15 @@ export const Authentication = $root.Authentication = (() => { } object.clientVersion = ""; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.verificationChannel != null && message.hasOwnProperty("verificationChannel")) + if (message.verificationChannel != null && Object.hasOwnProperty.call(message, "verificationChannel")) object.verificationChannel = message.verificationChannel; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; return object; }; @@ -28750,7 +28912,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceVerificationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28836,19 +28998,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) switch (message.deviceStatus) { default: return "deviceStatus: enum value expected"; @@ -28872,6 +29034,8 @@ export const Authentication = $root.Authentication = (() => { DeviceVerificationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceVerificationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceVerificationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28954,15 +29118,15 @@ export const Authentication = $root.Authentication = (() => { object.clientVersion = ""; object.deviceStatus = options.enums === String ? "DEVICE_NEEDS_APPROVAL" : 0; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) object.deviceStatus = options.enums === String ? $root.Authentication.DeviceStatus[message.deviceStatus] === undefined ? message.deviceStatus : $root.Authentication.DeviceStatus[message.deviceStatus] : message.deviceStatus; return object; }; @@ -29148,7 +29312,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceApprovalRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29246,28 +29410,28 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.twoFactorChannel != null && message.hasOwnProperty("twoFactorChannel")) + if (message.twoFactorChannel != null && Object.hasOwnProperty.call(message, "twoFactorChannel")) if (!$util.isString(message.twoFactorChannel)) return "twoFactorChannel: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.totpCode != null && message.hasOwnProperty("totpCode")) + if (message.totpCode != null && Object.hasOwnProperty.call(message, "totpCode")) if (!$util.isString(message.totpCode)) return "totpCode: string expected"; - if (message.deviceIp != null && message.hasOwnProperty("deviceIp")) + if (message.deviceIp != null && Object.hasOwnProperty.call(message, "deviceIp")) if (!$util.isString(message.deviceIp)) return "deviceIp: string expected"; - if (message.deviceTokenExpireDays != null && message.hasOwnProperty("deviceTokenExpireDays")) + if (message.deviceTokenExpireDays != null && Object.hasOwnProperty.call(message, "deviceTokenExpireDays")) if (!$util.isString(message.deviceTokenExpireDays)) return "deviceTokenExpireDays: string expected"; return null; @@ -29284,6 +29448,8 @@ export const Authentication = $root.Authentication = (() => { DeviceApprovalRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceApprovalRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceApprovalRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29344,21 +29510,21 @@ export const Authentication = $root.Authentication = (() => { object.deviceIp = ""; object.deviceTokenExpireDays = ""; } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.twoFactorChannel != null && message.hasOwnProperty("twoFactorChannel")) + if (message.twoFactorChannel != null && Object.hasOwnProperty.call(message, "twoFactorChannel")) object.twoFactorChannel = message.twoFactorChannel; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.totpCode != null && message.hasOwnProperty("totpCode")) + if (message.totpCode != null && Object.hasOwnProperty.call(message, "totpCode")) object.totpCode = message.totpCode; - if (message.deviceIp != null && message.hasOwnProperty("deviceIp")) + if (message.deviceIp != null && Object.hasOwnProperty.call(message, "deviceIp")) object.deviceIp = message.deviceIp; - if (message.deviceTokenExpireDays != null && message.hasOwnProperty("deviceTokenExpireDays")) + if (message.deviceTokenExpireDays != null && Object.hasOwnProperty.call(message, "deviceTokenExpireDays")) object.deviceTokenExpireDays = message.deviceTokenExpireDays; return object; }; @@ -29467,7 +29633,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceApprovalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29537,7 +29703,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedTwoFactorToken != null && message.hasOwnProperty("encryptedTwoFactorToken")) + if (message.encryptedTwoFactorToken != null && Object.hasOwnProperty.call(message, "encryptedTwoFactorToken")) if (!(message.encryptedTwoFactorToken && typeof message.encryptedTwoFactorToken.length === "number" || $util.isString(message.encryptedTwoFactorToken))) return "encryptedTwoFactorToken: buffer expected"; return null; @@ -29554,6 +29720,8 @@ export const Authentication = $root.Authentication = (() => { DeviceApprovalResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceApprovalResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceApprovalResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29592,7 +29760,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedTwoFactorToken = $util.newBuffer(object.encryptedTwoFactorToken); } - if (message.encryptedTwoFactorToken != null && message.hasOwnProperty("encryptedTwoFactorToken")) + if (message.encryptedTwoFactorToken != null && Object.hasOwnProperty.call(message, "encryptedTwoFactorToken")) object.encryptedTwoFactorToken = options.bytes === String ? $util.base64.encode(message.encryptedTwoFactorToken, 0, message.encryptedTwoFactorToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTwoFactorToken) : message.encryptedTwoFactorToken; return object; }; @@ -29734,7 +29902,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ApproveDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29816,16 +29984,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) if (!(message.encryptedDeviceDataKey && typeof message.encryptedDeviceDataKey.length === "number" || $util.isString(message.encryptedDeviceDataKey))) return "encryptedDeviceDataKey: buffer expected"; - if (message.denyApproval != null && message.hasOwnProperty("denyApproval")) + if (message.denyApproval != null && Object.hasOwnProperty.call(message, "denyApproval")) if (typeof message.denyApproval !== "boolean") return "denyApproval: boolean expected"; - if (message.linkDevice != null && message.hasOwnProperty("linkDevice")) + if (message.linkDevice != null && Object.hasOwnProperty.call(message, "linkDevice")) if (typeof message.linkDevice !== "boolean") return "linkDevice: boolean expected"; return null; @@ -29842,6 +30010,8 @@ export const Authentication = $root.Authentication = (() => { ApproveDeviceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ApproveDeviceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ApproveDeviceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29899,13 +30069,13 @@ export const Authentication = $root.Authentication = (() => { object.denyApproval = false; object.linkDevice = false; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) object.encryptedDeviceDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDeviceDataKey, 0, message.encryptedDeviceDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceDataKey) : message.encryptedDeviceDataKey; - if (message.denyApproval != null && message.hasOwnProperty("denyApproval")) + if (message.denyApproval != null && Object.hasOwnProperty.call(message, "denyApproval")) object.denyApproval = message.denyApproval; - if (message.linkDevice != null && message.hasOwnProperty("linkDevice")) + if (message.linkDevice != null && Object.hasOwnProperty.call(message, "linkDevice")) object.linkDevice = message.linkDevice; return object; }; @@ -30025,7 +30195,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30099,10 +30269,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) if (!$util.isString(message.alias)) return "alias: string expected"; return null; @@ -30119,6 +30289,8 @@ export const Authentication = $root.Authentication = (() => { EnterpriseUserAliasRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EnterpriseUserAliasRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EnterpriseUserAliasRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30163,14 +30335,14 @@ export const Authentication = $root.Authentication = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.alias = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) object.alias = message.alias; return object; }; @@ -30301,7 +30473,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserAddAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30379,13 +30551,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) if (!$util.isString(message.alias)) return "alias: string expected"; - if (message.primary != null && message.hasOwnProperty("primary")) + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) if (typeof message.primary !== "boolean") return "primary: boolean expected"; return null; @@ -30402,6 +30574,8 @@ export const Authentication = $root.Authentication = (() => { EnterpriseUserAddAliasRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EnterpriseUserAddAliasRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EnterpriseUserAddAliasRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30449,16 +30623,16 @@ export const Authentication = $root.Authentication = (() => { object.alias = ""; object.primary = false; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) object.alias = message.alias; - if (message.primary != null && message.hasOwnProperty("primary")) + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) object.primary = message.primary; return object; }; @@ -30569,7 +30743,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserAddAliasRequestV2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30641,7 +30815,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserAddAliasRequest != null && message.hasOwnProperty("enterpriseUserAddAliasRequest")) { + if (message.enterpriseUserAddAliasRequest != null && Object.hasOwnProperty.call(message, "enterpriseUserAddAliasRequest")) { if (!Array.isArray(message.enterpriseUserAddAliasRequest)) return "enterpriseUserAddAliasRequest: array expected"; for (let i = 0; i < message.enterpriseUserAddAliasRequest.length; ++i) { @@ -30664,6 +30838,8 @@ export const Authentication = $root.Authentication = (() => { EnterpriseUserAddAliasRequestV2.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EnterpriseUserAddAliasRequestV2) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EnterpriseUserAddAliasRequestV2: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30674,7 +30850,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.EnterpriseUserAddAliasRequestV2.enterpriseUserAddAliasRequest: array expected"); message.enterpriseUserAddAliasRequest = []; for (let i = 0; i < object.enterpriseUserAddAliasRequest.length; ++i) { - if (typeof object.enterpriseUserAddAliasRequest[i] !== "object") + if (!$util.isObject(object.enterpriseUserAddAliasRequest[i])) throw TypeError(".Authentication.EnterpriseUserAddAliasRequestV2.enterpriseUserAddAliasRequest: object expected"); message.enterpriseUserAddAliasRequest[i] = $root.Authentication.EnterpriseUserAddAliasRequest.fromObject(object.enterpriseUserAddAliasRequest[i], long + 1); } @@ -30824,7 +31000,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserAddAliasStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30898,10 +31074,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -30918,6 +31094,8 @@ export const Authentication = $root.Authentication = (() => { EnterpriseUserAddAliasStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EnterpriseUserAddAliasStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EnterpriseUserAddAliasStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30962,14 +31140,14 @@ export const Authentication = $root.Authentication = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -31080,7 +31258,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserAddAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31152,7 +31330,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.status != null && message.hasOwnProperty("status")) { + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { if (!Array.isArray(message.status)) return "status: array expected"; for (let i = 0; i < message.status.length; ++i) { @@ -31175,6 +31353,8 @@ export const Authentication = $root.Authentication = (() => { EnterpriseUserAddAliasResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EnterpriseUserAddAliasResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EnterpriseUserAddAliasResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31185,7 +31365,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.EnterpriseUserAddAliasResponse.status: array expected"); message.status = []; for (let i = 0; i < object.status.length; ++i) { - if (typeof object.status[i] !== "object") + if (!$util.isObject(object.status[i])) throw TypeError(".Authentication.EnterpriseUserAddAliasResponse.status: object expected"); message.status[i] = $root.Authentication.EnterpriseUserAddAliasStatus.fromObject(object.status[i], long + 1); } @@ -31324,7 +31504,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ Device.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31394,7 +31574,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; return null; @@ -31411,6 +31591,8 @@ export const Authentication = $root.Authentication = (() => { Device.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.Device) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.Device: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31449,7 +31631,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedDeviceToken = $util.newBuffer(object.encryptedDeviceToken); } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; return object; }; @@ -31569,7 +31751,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RegisterDeviceDataKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31643,10 +31825,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) if (!(message.encryptedDeviceDataKey && typeof message.encryptedDeviceDataKey.length === "number" || $util.isString(message.encryptedDeviceDataKey))) return "encryptedDeviceDataKey: buffer expected"; return null; @@ -31663,6 +31845,8 @@ export const Authentication = $root.Authentication = (() => { RegisterDeviceDataKeyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RegisterDeviceDataKeyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RegisterDeviceDataKeyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31714,9 +31898,9 @@ export const Authentication = $root.Authentication = (() => { object.encryptedDeviceDataKey = $util.newBuffer(object.encryptedDeviceDataKey); } } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) object.encryptedDeviceDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDeviceDataKey, 0, message.encryptedDeviceDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceDataKey) : message.encryptedDeviceDataKey; return object; }; @@ -31847,7 +32031,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ValidateCreateUserVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31925,13 +32109,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; return null; @@ -31948,6 +32132,8 @@ export const Authentication = $root.Authentication = (() => { ValidateCreateUserVerificationCodeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ValidateCreateUserVerificationCodeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ValidateCreateUserVerificationCodeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31984,11 +32170,11 @@ export const Authentication = $root.Authentication = (() => { object.clientVersion = ""; object.verificationCode = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; return object; }; @@ -32141,7 +32327,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ValidateDeviceVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32227,19 +32413,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; return null; @@ -32256,6 +32442,8 @@ export const Authentication = $root.Authentication = (() => { ValidateDeviceVerificationCodeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ValidateDeviceVerificationCodeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ValidateDeviceVerificationCodeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32316,15 +32504,15 @@ export const Authentication = $root.Authentication = (() => { object.encryptedDeviceToken = $util.newBuffer(object.encryptedDeviceToken); } } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; return object; }; @@ -32455,7 +32643,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SendSessionMessageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32533,13 +32721,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.command != null && message.hasOwnProperty("command")) + if (message.command != null && Object.hasOwnProperty.call(message, "command")) if (!$util.isString(message.command)) return "command: string expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -32556,6 +32744,8 @@ export const Authentication = $root.Authentication = (() => { SendSessionMessageRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SendSessionMessageRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SendSessionMessageRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32601,11 +32791,11 @@ export const Authentication = $root.Authentication = (() => { object.command = ""; object.username = ""; } - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.command != null && message.hasOwnProperty("command")) + if (message.command != null && Object.hasOwnProperty.call(message, "command")) object.command = message.command; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -32736,7 +32926,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GlobalUserAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32814,13 +33004,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.regionName != null && message.hasOwnProperty("regionName")) + if (message.regionName != null && Object.hasOwnProperty.call(message, "regionName")) if (!$util.isString(message.regionName)) return "regionName: string expected"; return null; @@ -32837,6 +33027,8 @@ export const Authentication = $root.Authentication = (() => { GlobalUserAccount.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GlobalUserAccount) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GlobalUserAccount: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32882,11 +33074,11 @@ export const Authentication = $root.Authentication = (() => { } object.regionName = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.regionName != null && message.hasOwnProperty("regionName")) + if (message.regionName != null && Object.hasOwnProperty.call(message, "regionName")) object.regionName = message.regionName; return object; }; @@ -33006,7 +33198,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AccountUsername.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33080,10 +33272,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.dateActive != null && message.hasOwnProperty("dateActive")) + if (message.dateActive != null && Object.hasOwnProperty.call(message, "dateActive")) if (!$util.isString(message.dateActive)) return "dateActive: string expected"; return null; @@ -33100,6 +33292,8 @@ export const Authentication = $root.Authentication = (() => { AccountUsername.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AccountUsername) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AccountUsername: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33133,9 +33327,9 @@ export const Authentication = $root.Authentication = (() => { object.username = ""; object.dateActive = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.dateActive != null && message.hasOwnProperty("dateActive")) + if (message.dateActive != null && Object.hasOwnProperty.call(message, "dateActive")) object.dateActive = message.dateActive; return object; }; @@ -33266,7 +33460,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SsoServiceProviderRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33344,13 +33538,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; return null; @@ -33367,6 +33561,8 @@ export const Authentication = $root.Authentication = (() => { SsoServiceProviderRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SsoServiceProviderRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SsoServiceProviderRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33403,11 +33599,11 @@ export const Authentication = $root.Authentication = (() => { object.clientVersion = ""; object.locale = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; return object; }; @@ -33549,7 +33745,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SsoServiceProviderResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33631,16 +33827,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.spUrl != null && message.hasOwnProperty("spUrl")) + if (message.spUrl != null && Object.hasOwnProperty.call(message, "spUrl")) if (!$util.isString(message.spUrl)) return "spUrl: string expected"; - if (message.isCloud != null && message.hasOwnProperty("isCloud")) + if (message.isCloud != null && Object.hasOwnProperty.call(message, "isCloud")) if (typeof message.isCloud !== "boolean") return "isCloud: boolean expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; return null; @@ -33657,6 +33853,8 @@ export const Authentication = $root.Authentication = (() => { SsoServiceProviderResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SsoServiceProviderResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SsoServiceProviderResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33696,13 +33894,13 @@ export const Authentication = $root.Authentication = (() => { object.isCloud = false; object.clientVersion = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.spUrl != null && message.hasOwnProperty("spUrl")) + if (message.spUrl != null && Object.hasOwnProperty.call(message, "spUrl")) object.spUrl = message.spUrl; - if (message.isCloud != null && message.hasOwnProperty("isCloud")) + if (message.isCloud != null && Object.hasOwnProperty.call(message, "isCloud")) object.isCloud = message.isCloud; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; return object; }; @@ -33822,7 +34020,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserSettingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33896,10 +34094,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.setting != null && message.hasOwnProperty("setting")) + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) if (!$util.isString(message.setting)) return "setting: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -33916,6 +34114,8 @@ export const Authentication = $root.Authentication = (() => { UserSettingRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserSettingRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserSettingRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33949,9 +34149,9 @@ export const Authentication = $root.Authentication = (() => { object.setting = ""; object.value = ""; } - if (message.setting != null && message.hasOwnProperty("setting")) + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) object.setting = message.setting; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -34135,7 +34335,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ThrottleState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34217,7 +34417,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -34231,13 +34431,13 @@ export const Authentication = $root.Authentication = (() => { case 7: break; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) if (typeof message.state !== "boolean") return "state: boolean expected"; return null; @@ -34254,6 +34454,8 @@ export const Authentication = $root.Authentication = (() => { ThrottleState.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ThrottleState) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ThrottleState: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34331,13 +34533,13 @@ export const Authentication = $root.Authentication = (() => { object.value = ""; object.state = false; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.Authentication.ThrottleType[message.type] === undefined ? message.type : $root.Authentication.ThrottleType[message.type] : message.type; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = message.state; return object; }; @@ -34523,7 +34725,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ThrottleState2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34621,28 +34823,28 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.keyDescription != null && message.hasOwnProperty("keyDescription")) + if (message.keyDescription != null && Object.hasOwnProperty.call(message, "keyDescription")) if (!$util.isString(message.keyDescription)) return "keyDescription: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.valueDescription != null && message.hasOwnProperty("valueDescription")) + if (message.valueDescription != null && Object.hasOwnProperty.call(message, "valueDescription")) if (!$util.isString(message.valueDescription)) return "valueDescription: string expected"; - if (message.identifier != null && message.hasOwnProperty("identifier")) + if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier")) if (!$util.isString(message.identifier)) return "identifier: string expected"; - if (message.locked != null && message.hasOwnProperty("locked")) + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) if (typeof message.locked !== "boolean") return "locked: boolean expected"; - if (message.includedInAllClear != null && message.hasOwnProperty("includedInAllClear")) + if (message.includedInAllClear != null && Object.hasOwnProperty.call(message, "includedInAllClear")) if (typeof message.includedInAllClear !== "boolean") return "includedInAllClear: boolean expected"; - if (message.expireSeconds != null && message.hasOwnProperty("expireSeconds")) + if (message.expireSeconds != null && Object.hasOwnProperty.call(message, "expireSeconds")) if (!$util.isInteger(message.expireSeconds)) return "expireSeconds: integer expected"; return null; @@ -34659,6 +34861,8 @@ export const Authentication = $root.Authentication = (() => { ThrottleState2.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ThrottleState2) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ThrottleState2: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34710,21 +34914,21 @@ export const Authentication = $root.Authentication = (() => { object.includedInAllClear = false; object.expireSeconds = 0; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.keyDescription != null && message.hasOwnProperty("keyDescription")) + if (message.keyDescription != null && Object.hasOwnProperty.call(message, "keyDescription")) object.keyDescription = message.keyDescription; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.valueDescription != null && message.hasOwnProperty("valueDescription")) + if (message.valueDescription != null && Object.hasOwnProperty.call(message, "valueDescription")) object.valueDescription = message.valueDescription; - if (message.identifier != null && message.hasOwnProperty("identifier")) + if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier")) object.identifier = message.identifier; - if (message.locked != null && message.hasOwnProperty("locked")) + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) object.locked = message.locked; - if (message.includedInAllClear != null && message.hasOwnProperty("includedInAllClear")) + if (message.includedInAllClear != null && Object.hasOwnProperty.call(message, "includedInAllClear")) object.includedInAllClear = message.includedInAllClear; - if (message.expireSeconds != null && message.hasOwnProperty("expireSeconds")) + if (message.expireSeconds != null && Object.hasOwnProperty.call(message, "expireSeconds")) object.expireSeconds = message.expireSeconds; return object; }; @@ -34877,7 +35081,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeviceInformation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34963,19 +35167,19 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.lastLogin != null && message.hasOwnProperty("lastLogin")) + if (message.lastLogin != null && Object.hasOwnProperty.call(message, "lastLogin")) if (!$util.isInteger(message.lastLogin) && !(message.lastLogin && $util.isInteger(message.lastLogin.low) && $util.isInteger(message.lastLogin.high))) return "lastLogin: integer|Long expected"; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) switch (message.deviceStatus) { default: return "deviceStatus: enum value expected"; @@ -34999,6 +35203,8 @@ export const Authentication = $root.Authentication = (() => { DeviceInformation.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeviceInformation) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeviceInformation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35085,25 +35291,25 @@ export const Authentication = $root.Authentication = (() => { object.lastLogin = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.deviceStatus = options.enums === String ? "DEVICE_NEEDS_APPROVAL" : 0; } - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.lastLogin != null && message.hasOwnProperty("lastLogin")) + if (message.lastLogin != null && Object.hasOwnProperty.call(message, "lastLogin")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastLogin = typeof message.lastLogin === "number" ? BigInt(message.lastLogin) : $util.Long.fromBits(message.lastLogin.low >>> 0, message.lastLogin.high >>> 0, false).toBigInt(); else if (typeof message.lastLogin === "number") object.lastLogin = options.longs === String ? String(message.lastLogin) : message.lastLogin; else object.lastLogin = options.longs === String ? $util.Long.prototype.toString.call(message.lastLogin) : options.longs === Number ? new $util.LongBits(message.lastLogin.low >>> 0, message.lastLogin.high >>> 0).toNumber() : message.lastLogin; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) object.deviceStatus = options.enums === String ? $root.Authentication.DeviceStatus[message.deviceStatus] === undefined ? message.deviceStatus : $root.Authentication.DeviceStatus[message.deviceStatus] : message.deviceStatus; return object; }; @@ -35223,7 +35429,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserSetting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35297,10 +35503,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "boolean") return "value: boolean expected"; return null; @@ -35317,6 +35523,8 @@ export const Authentication = $root.Authentication = (() => { UserSetting.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserSetting) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserSetting: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35350,9 +35558,9 @@ export const Authentication = $root.Authentication = (() => { object.name = ""; object.value = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -35466,7 +35674,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserDataKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35543,7 +35751,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) { + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) { if (!Array.isArray(message.enterpriseUserId)) return "enterpriseUserId: array expected"; for (let i = 0; i < message.enterpriseUserId.length; ++i) @@ -35564,6 +35772,8 @@ export const Authentication = $root.Authentication = (() => { UserDataKeyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserDataKeyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserDataKeyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35727,7 +35937,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserDataKeyByNodeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35804,7 +36014,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeIds != null && message.hasOwnProperty("nodeIds")) { + if (message.nodeIds != null && Object.hasOwnProperty.call(message, "nodeIds")) { if (!Array.isArray(message.nodeIds)) return "nodeIds: array expected"; for (let i = 0; i < message.nodeIds.length; ++i) @@ -35825,6 +36035,8 @@ export const Authentication = $root.Authentication = (() => { UserDataKeyByNodeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserDataKeyByNodeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserDataKeyByNodeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36005,7 +36217,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserIdDataKeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36083,13 +36295,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) if (!(message.encryptedDataKey && typeof message.encryptedDataKey.length === "number" || $util.isString(message.encryptedDataKey))) return "encryptedDataKey: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -36114,6 +36326,8 @@ export const Authentication = $root.Authentication = (() => { EnterpriseUserIdDataKeyPair.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EnterpriseUserIdDataKeyPair) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EnterpriseUserIdDataKeyPair: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36196,16 +36410,16 @@ export const Authentication = $root.Authentication = (() => { } object.keyType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) object.encryptedDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDataKey, 0, message.encryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDataKey) : message.encryptedDataKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; return object; }; @@ -36349,7 +36563,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserDataKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36433,16 +36647,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.roleKey != null && message.hasOwnProperty("roleKey")) + if (message.roleKey != null && Object.hasOwnProperty.call(message, "roleKey")) if (!(message.roleKey && typeof message.roleKey.length === "number" || $util.isString(message.roleKey))) return "roleKey: buffer expected"; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) if (!$util.isString(message.privateKey)) return "privateKey: string expected"; - if (message.enterpriseUserIdDataKeyPairs != null && message.hasOwnProperty("enterpriseUserIdDataKeyPairs")) { + if (message.enterpriseUserIdDataKeyPairs != null && Object.hasOwnProperty.call(message, "enterpriseUserIdDataKeyPairs")) { if (!Array.isArray(message.enterpriseUserIdDataKeyPairs)) return "enterpriseUserIdDataKeyPairs: array expected"; for (let i = 0; i < message.enterpriseUserIdDataKeyPairs.length; ++i) { @@ -36465,6 +36679,8 @@ export const Authentication = $root.Authentication = (() => { UserDataKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserDataKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserDataKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36491,7 +36707,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.UserDataKey.enterpriseUserIdDataKeyPairs: array expected"); message.enterpriseUserIdDataKeyPairs = []; for (let i = 0; i < object.enterpriseUserIdDataKeyPairs.length; ++i) { - if (typeof object.enterpriseUserIdDataKeyPairs[i] !== "object") + if (!$util.isObject(object.enterpriseUserIdDataKeyPairs[i])) throw TypeError(".Authentication.UserDataKey.enterpriseUserIdDataKeyPairs: object expected"); message.enterpriseUserIdDataKeyPairs[i] = $root.Authentication.EnterpriseUserIdDataKeyPair.fromObject(object.enterpriseUserIdDataKeyPairs[i], long + 1); } @@ -36533,16 +36749,16 @@ export const Authentication = $root.Authentication = (() => { } object.privateKey = ""; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.roleKey != null && message.hasOwnProperty("roleKey")) + if (message.roleKey != null && Object.hasOwnProperty.call(message, "roleKey")) object.roleKey = options.bytes === String ? $util.base64.encode(message.roleKey, 0, message.roleKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.roleKey) : message.roleKey; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) object.privateKey = message.privateKey; if (message.enterpriseUserIdDataKeyPairs && message.enterpriseUserIdDataKeyPairs.length) { object.enterpriseUserIdDataKeyPairs = []; @@ -36690,7 +36906,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserDataKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36784,7 +37000,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userDataKeys != null && message.hasOwnProperty("userDataKeys")) { + if (message.userDataKeys != null && Object.hasOwnProperty.call(message, "userDataKeys")) { if (!Array.isArray(message.userDataKeys)) return "userDataKeys: array expected"; for (let i = 0; i < message.userDataKeys.length; ++i) { @@ -36793,14 +37009,14 @@ export const Authentication = $root.Authentication = (() => { return "userDataKeys." + error; } } - if (message.accessDenied != null && message.hasOwnProperty("accessDenied")) { + if (message.accessDenied != null && Object.hasOwnProperty.call(message, "accessDenied")) { if (!Array.isArray(message.accessDenied)) return "accessDenied: array expected"; for (let i = 0; i < message.accessDenied.length; ++i) if (!$util.isInteger(message.accessDenied[i]) && !(message.accessDenied[i] && $util.isInteger(message.accessDenied[i].low) && $util.isInteger(message.accessDenied[i].high))) return "accessDenied: integer|Long[] expected"; } - if (message.noEncryptedDataKey != null && message.hasOwnProperty("noEncryptedDataKey")) { + if (message.noEncryptedDataKey != null && Object.hasOwnProperty.call(message, "noEncryptedDataKey")) { if (!Array.isArray(message.noEncryptedDataKey)) return "noEncryptedDataKey: array expected"; for (let i = 0; i < message.noEncryptedDataKey.length; ++i) @@ -36821,6 +37037,8 @@ export const Authentication = $root.Authentication = (() => { UserDataKeyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserDataKeyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserDataKeyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36831,7 +37049,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.UserDataKeyResponse.userDataKeys: array expected"); message.userDataKeys = []; for (let i = 0; i < object.userDataKeys.length; ++i) { - if (typeof object.userDataKeys[i] !== "object") + if (!$util.isObject(object.userDataKeys[i])) throw TypeError(".Authentication.UserDataKeyResponse.userDataKeys: object expected"); message.userDataKeys[i] = $root.Authentication.UserDataKey.fromObject(object.userDataKeys[i], long + 1); } @@ -37021,7 +37239,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ MasterPasswordRecoveryVerificationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37091,7 +37309,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; return null; @@ -37108,6 +37326,8 @@ export const Authentication = $root.Authentication = (() => { MasterPasswordRecoveryVerificationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.MasterPasswordRecoveryVerificationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.MasterPasswordRecoveryVerificationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37146,7 +37366,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedLoginToken = $util.newBuffer(object.encryptedLoginToken); } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; return object; }; @@ -37266,7 +37486,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetSecurityQuestionV3Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37340,10 +37560,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; return null; @@ -37360,6 +37580,8 @@ export const Authentication = $root.Authentication = (() => { GetSecurityQuestionV3Request.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetSecurityQuestionV3Request) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetSecurityQuestionV3Request: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37402,9 +37624,9 @@ export const Authentication = $root.Authentication = (() => { } object.verificationCode = ""; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; return object; }; @@ -37546,7 +37768,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetSecurityQuestionV3Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37628,16 +37850,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.securityQuestion != null && message.hasOwnProperty("securityQuestion")) + if (message.securityQuestion != null && Object.hasOwnProperty.call(message, "securityQuestion")) if (!$util.isString(message.securityQuestion)) return "securityQuestion: string expected"; - if (message.backupKeyDate != null && message.hasOwnProperty("backupKeyDate")) + if (message.backupKeyDate != null && Object.hasOwnProperty.call(message, "backupKeyDate")) if (!$util.isInteger(message.backupKeyDate) && !(message.backupKeyDate && $util.isInteger(message.backupKeyDate.low) && $util.isInteger(message.backupKeyDate.high))) return "backupKeyDate: integer|Long expected"; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) if (!(message.salt && typeof message.salt.length === "number" || $util.isString(message.salt))) return "salt: buffer expected"; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) if (!$util.isInteger(message.iterations)) return "iterations: integer expected"; return null; @@ -37654,6 +37876,8 @@ export const Authentication = $root.Authentication = (() => { GetSecurityQuestionV3Response.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetSecurityQuestionV3Response) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetSecurityQuestionV3Response: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37713,18 +37937,18 @@ export const Authentication = $root.Authentication = (() => { } object.iterations = 0; } - if (message.securityQuestion != null && message.hasOwnProperty("securityQuestion")) + if (message.securityQuestion != null && Object.hasOwnProperty.call(message, "securityQuestion")) object.securityQuestion = message.securityQuestion; - if (message.backupKeyDate != null && message.hasOwnProperty("backupKeyDate")) + if (message.backupKeyDate != null && Object.hasOwnProperty.call(message, "backupKeyDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.backupKeyDate = typeof message.backupKeyDate === "number" ? BigInt(message.backupKeyDate) : $util.Long.fromBits(message.backupKeyDate.low >>> 0, message.backupKeyDate.high >>> 0, false).toBigInt(); else if (typeof message.backupKeyDate === "number") object.backupKeyDate = options.longs === String ? String(message.backupKeyDate) : message.backupKeyDate; else object.backupKeyDate = options.longs === String ? $util.Long.prototype.toString.call(message.backupKeyDate) : options.longs === Number ? new $util.LongBits(message.backupKeyDate.low >>> 0, message.backupKeyDate.high >>> 0).toNumber() : message.backupKeyDate; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) object.salt = options.bytes === String ? $util.base64.encode(message.salt, 0, message.salt.length) : options.bytes === Array ? Array.prototype.slice.call(message.salt) : message.salt; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) object.iterations = message.iterations; return object; }; @@ -37855,7 +38079,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetDataKeyBackupV3Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37933,13 +38157,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; - if (message.securityAnswerHash != null && message.hasOwnProperty("securityAnswerHash")) + if (message.securityAnswerHash != null && Object.hasOwnProperty.call(message, "securityAnswerHash")) if (!(message.securityAnswerHash && typeof message.securityAnswerHash.length === "number" || $util.isString(message.securityAnswerHash))) return "securityAnswerHash: buffer expected"; return null; @@ -37956,6 +38180,8 @@ export const Authentication = $root.Authentication = (() => { GetDataKeyBackupV3Request.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetDataKeyBackupV3Request) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetDataKeyBackupV3Request: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38010,11 +38236,11 @@ export const Authentication = $root.Authentication = (() => { object.securityAnswerHash = $util.newBuffer(object.securityAnswerHash); } } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; - if (message.securityAnswerHash != null && message.hasOwnProperty("securityAnswerHash")) + if (message.securityAnswerHash != null && Object.hasOwnProperty.call(message, "securityAnswerHash")) object.securityAnswerHash = options.bytes === String ? $util.base64.encode(message.securityAnswerHash, 0, message.securityAnswerHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.securityAnswerHash) : message.securityAnswerHash; return object; }; @@ -38178,7 +38404,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasswordRules.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38268,22 +38494,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ruleType != null && message.hasOwnProperty("ruleType")) + if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) if (!$util.isString(message.ruleType)) return "ruleType: string expected"; - if (message.match != null && message.hasOwnProperty("match")) + if (message.match != null && Object.hasOwnProperty.call(message, "match")) if (typeof message.match !== "boolean") return "match: boolean expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) if (!$util.isString(message.pattern)) return "pattern: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.minimum != null && message.hasOwnProperty("minimum")) + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) if (!$util.isInteger(message.minimum)) return "minimum: integer expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -38300,6 +38526,8 @@ export const Authentication = $root.Authentication = (() => { PasswordRules.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasswordRules) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasswordRules: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38345,17 +38573,17 @@ export const Authentication = $root.Authentication = (() => { object.minimum = 0; object.value = ""; } - if (message.ruleType != null && message.hasOwnProperty("ruleType")) + if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) object.ruleType = message.ruleType; - if (message.match != null && message.hasOwnProperty("match")) + if (message.match != null && Object.hasOwnProperty.call(message, "match")) object.match = message.match; - if (message.pattern != null && message.hasOwnProperty("pattern")) + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) object.pattern = message.pattern; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; - if (message.minimum != null && message.hasOwnProperty("minimum")) + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) object.minimum = message.minimum; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -38565,7 +38793,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetDataKeyBackupV3Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38673,25 +38901,25 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.dataKeyBackup != null && message.hasOwnProperty("dataKeyBackup")) + if (message.dataKeyBackup != null && Object.hasOwnProperty.call(message, "dataKeyBackup")) if (!(message.dataKeyBackup && typeof message.dataKeyBackup.length === "number" || $util.isString(message.dataKeyBackup))) return "dataKeyBackup: buffer expected"; - if (message.dataKeyBackupDate != null && message.hasOwnProperty("dataKeyBackupDate")) + if (message.dataKeyBackupDate != null && Object.hasOwnProperty.call(message, "dataKeyBackupDate")) if (!$util.isInteger(message.dataKeyBackupDate) && !(message.dataKeyBackupDate && $util.isInteger(message.dataKeyBackupDate.low) && $util.isInteger(message.dataKeyBackupDate.high))) return "dataKeyBackupDate: integer|Long expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) if (!(message.clientKey && typeof message.clientKey.length === "number" || $util.isString(message.clientKey))) return "clientKey: buffer expected"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.passwordRules != null && message.hasOwnProperty("passwordRules")) { + if (message.passwordRules != null && Object.hasOwnProperty.call(message, "passwordRules")) { if (!Array.isArray(message.passwordRules)) return "passwordRules: array expected"; for (let i = 0; i < message.passwordRules.length; ++i) { @@ -38700,13 +38928,13 @@ export const Authentication = $root.Authentication = (() => { return "passwordRules." + error; } } - if (message.passwordRulesIntro != null && message.hasOwnProperty("passwordRulesIntro")) + if (message.passwordRulesIntro != null && Object.hasOwnProperty.call(message, "passwordRulesIntro")) if (!$util.isString(message.passwordRulesIntro)) return "passwordRulesIntro: string expected"; - if (message.minimumPbkdf2Iterations != null && message.hasOwnProperty("minimumPbkdf2Iterations")) + if (message.minimumPbkdf2Iterations != null && Object.hasOwnProperty.call(message, "minimumPbkdf2Iterations")) if (!$util.isInteger(message.minimumPbkdf2Iterations)) return "minimumPbkdf2Iterations: integer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -38728,6 +38956,8 @@ export const Authentication = $root.Authentication = (() => { GetDataKeyBackupV3Response.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetDataKeyBackupV3Response) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetDataKeyBackupV3Response: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38772,7 +39002,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetDataKeyBackupV3Response.passwordRules: array expected"); message.passwordRules = []; for (let i = 0; i < object.passwordRules.length; ++i) { - if (typeof object.passwordRules[i] !== "object") + if (!$util.isObject(object.passwordRules[i])) throw TypeError(".Authentication.GetDataKeyBackupV3Response.passwordRules: object expected"); message.passwordRules[i] = $root.Authentication.PasswordRules.fromObject(object.passwordRules[i], long + 1); } @@ -38864,33 +39094,33 @@ export const Authentication = $root.Authentication = (() => { object.minimumPbkdf2Iterations = 0; object.keyType = options.enums === String ? "RSA" : 0; } - if (message.dataKeyBackup != null && message.hasOwnProperty("dataKeyBackup")) + if (message.dataKeyBackup != null && Object.hasOwnProperty.call(message, "dataKeyBackup")) object.dataKeyBackup = options.bytes === String ? $util.base64.encode(message.dataKeyBackup, 0, message.dataKeyBackup.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataKeyBackup) : message.dataKeyBackup; - if (message.dataKeyBackupDate != null && message.hasOwnProperty("dataKeyBackupDate")) + if (message.dataKeyBackupDate != null && Object.hasOwnProperty.call(message, "dataKeyBackupDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dataKeyBackupDate = typeof message.dataKeyBackupDate === "number" ? BigInt(message.dataKeyBackupDate) : $util.Long.fromBits(message.dataKeyBackupDate.low >>> 0, message.dataKeyBackupDate.high >>> 0, false).toBigInt(); else if (typeof message.dataKeyBackupDate === "number") object.dataKeyBackupDate = options.longs === String ? String(message.dataKeyBackupDate) : message.dataKeyBackupDate; else object.dataKeyBackupDate = options.longs === String ? $util.Long.prototype.toString.call(message.dataKeyBackupDate) : options.longs === Number ? new $util.LongBits(message.dataKeyBackupDate.low >>> 0, message.dataKeyBackupDate.high >>> 0).toNumber() : message.dataKeyBackupDate; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) object.clientKey = options.bytes === String ? $util.base64.encode(message.clientKey, 0, message.clientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientKey) : message.clientKey; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; if (message.passwordRules && message.passwordRules.length) { object.passwordRules = []; for (let j = 0; j < message.passwordRules.length; ++j) object.passwordRules[j] = $root.Authentication.PasswordRules.toObject(message.passwordRules[j], options, q + 1); } - if (message.passwordRulesIntro != null && message.hasOwnProperty("passwordRulesIntro")) + if (message.passwordRulesIntro != null && Object.hasOwnProperty.call(message, "passwordRulesIntro")) object.passwordRulesIntro = message.passwordRulesIntro; - if (message.minimumPbkdf2Iterations != null && message.hasOwnProperty("minimumPbkdf2Iterations")) + if (message.minimumPbkdf2Iterations != null && Object.hasOwnProperty.call(message, "minimumPbkdf2Iterations")) object.minimumPbkdf2Iterations = message.minimumPbkdf2Iterations; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.KeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.KeyType[message.keyType] : message.keyType; return object; }; @@ -39001,7 +39231,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetPublicKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39073,7 +39303,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.usernames != null && message.hasOwnProperty("usernames")) { + if (message.usernames != null && Object.hasOwnProperty.call(message, "usernames")) { if (!Array.isArray(message.usernames)) return "usernames: array expected"; for (let i = 0; i < message.usernames.length; ++i) @@ -39094,6 +39324,8 @@ export const Authentication = $root.Authentication = (() => { GetPublicKeysRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetPublicKeysRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetPublicKeysRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -39295,7 +39527,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39385,22 +39617,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.publicEccKey != null && message.hasOwnProperty("publicEccKey")) + if (message.publicEccKey != null && Object.hasOwnProperty.call(message, "publicEccKey")) if (!(message.publicEccKey && typeof message.publicEccKey.length === "number" || $util.isString(message.publicEccKey))) return "publicEccKey: buffer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) if (!$util.isString(message.errorCode)) return "errorCode: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; return null; @@ -39417,6 +39649,8 @@ export const Authentication = $root.Authentication = (() => { PublicKeyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PublicKeyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PublicKeyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -39489,17 +39723,17 @@ export const Authentication = $root.Authentication = (() => { object.accountUid = $util.newBuffer(object.accountUid); } } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.publicEccKey != null && message.hasOwnProperty("publicEccKey")) + if (message.publicEccKey != null && Object.hasOwnProperty.call(message, "publicEccKey")) object.publicEccKey = options.bytes === String ? $util.base64.encode(message.publicEccKey, 0, message.publicEccKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicEccKey) : message.publicEccKey; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) object.errorCode = message.errorCode; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; return object; }; @@ -39610,7 +39844,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetPublicKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39682,7 +39916,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keyResponses != null && message.hasOwnProperty("keyResponses")) { + if (message.keyResponses != null && Object.hasOwnProperty.call(message, "keyResponses")) { if (!Array.isArray(message.keyResponses)) return "keyResponses: array expected"; for (let i = 0; i < message.keyResponses.length; ++i) { @@ -39705,6 +39939,8 @@ export const Authentication = $root.Authentication = (() => { GetPublicKeysResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetPublicKeysResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetPublicKeysResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -39715,7 +39951,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetPublicKeysResponse.keyResponses: array expected"); message.keyResponses = []; for (let i = 0; i < object.keyResponses.length; ++i) { - if (typeof object.keyResponses[i] !== "object") + if (!$util.isObject(object.keyResponses[i])) throw TypeError(".Authentication.GetPublicKeysResponse.keyResponses: object expected"); message.keyResponses[i] = $root.Authentication.PublicKeyResponse.fromObject(object.keyResponses[i], long + 1); } @@ -39865,7 +40101,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SetEccKeyPairRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39939,10 +40175,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; return null; @@ -39959,6 +40195,8 @@ export const Authentication = $root.Authentication = (() => { SetEccKeyPairRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SetEccKeyPairRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SetEccKeyPairRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40010,9 +40248,9 @@ export const Authentication = $root.Authentication = (() => { object.encryptedPrivateKey = $util.newBuffer(object.encryptedPrivateKey); } } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; return object; }; @@ -40123,7 +40361,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SetEccKeyPairsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40195,7 +40433,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamKeys != null && message.hasOwnProperty("teamKeys")) { + if (message.teamKeys != null && Object.hasOwnProperty.call(message, "teamKeys")) { if (!Array.isArray(message.teamKeys)) return "teamKeys: array expected"; for (let i = 0; i < message.teamKeys.length; ++i) { @@ -40218,6 +40456,8 @@ export const Authentication = $root.Authentication = (() => { SetEccKeyPairsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SetEccKeyPairsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SetEccKeyPairsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40228,7 +40468,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SetEccKeyPairsRequest.teamKeys: array expected"); message.teamKeys = []; for (let i = 0; i < object.teamKeys.length; ++i) { - if (typeof object.teamKeys[i] !== "object") + if (!$util.isObject(object.teamKeys[i])) throw TypeError(".Authentication.SetEccKeyPairsRequest.teamKeys: object expected"); message.teamKeys[i] = $root.Authentication.TeamEccKeyPair.fromObject(object.teamKeys[i], long + 1); } @@ -40369,7 +40609,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SetEccKeyPairsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40441,7 +40681,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamKeys != null && message.hasOwnProperty("teamKeys")) { + if (message.teamKeys != null && Object.hasOwnProperty.call(message, "teamKeys")) { if (!Array.isArray(message.teamKeys)) return "teamKeys: array expected"; for (let i = 0; i < message.teamKeys.length; ++i) { @@ -40464,6 +40704,8 @@ export const Authentication = $root.Authentication = (() => { SetEccKeyPairsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SetEccKeyPairsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SetEccKeyPairsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40474,7 +40716,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.SetEccKeyPairsResponse.teamKeys: array expected"); message.teamKeys = []; for (let i = 0; i < object.teamKeys.length; ++i) { - if (typeof object.teamKeys[i] !== "object") + if (!$util.isObject(object.teamKeys[i])) throw TypeError(".Authentication.SetEccKeyPairsResponse.teamKeys: object expected"); message.teamKeys[i] = $root.Authentication.TeamEccKeyPairResponse.fromObject(object.teamKeys[i], long + 1); } @@ -40635,7 +40877,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TeamEccKeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40713,13 +40955,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; return null; @@ -40736,6 +40978,8 @@ export const Authentication = $root.Authentication = (() => { TeamEccKeyPair.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TeamEccKeyPair) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TeamEccKeyPair: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40799,11 +41043,11 @@ export const Authentication = $root.Authentication = (() => { object.encryptedPrivateKey = $util.newBuffer(object.encryptedPrivateKey); } } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; return object; }; @@ -40923,7 +41167,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TeamEccKeyPairResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40997,10 +41241,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -41025,6 +41269,8 @@ export const Authentication = $root.Authentication = (() => { TeamEccKeyPairResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TeamEccKeyPairResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TeamEccKeyPairResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41093,9 +41339,9 @@ export const Authentication = $root.Authentication = (() => { } object.status = options.enums === String ? "SUCCESS" : 0; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Authentication.GenericStatus[message.status] === undefined ? message.status : $root.Authentication.GenericStatus[message.status] : message.status; return object; }; @@ -41219,7 +41465,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetKsmPublicKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41297,14 +41543,14 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientIds != null && message.hasOwnProperty("clientIds")) { + if (message.clientIds != null && Object.hasOwnProperty.call(message, "clientIds")) { if (!Array.isArray(message.clientIds)) return "clientIds: array expected"; for (let i = 0; i < message.clientIds.length; ++i) if (!(message.clientIds[i] && typeof message.clientIds[i].length === "number" || $util.isString(message.clientIds[i]))) return "clientIds: buffer[] expected"; } - if (message.controllerUids != null && message.hasOwnProperty("controllerUids")) { + if (message.controllerUids != null && Object.hasOwnProperty.call(message, "controllerUids")) { if (!Array.isArray(message.controllerUids)) return "controllerUids: array expected"; for (let i = 0; i < message.controllerUids.length; ++i) @@ -41325,6 +41571,8 @@ export const Authentication = $root.Authentication = (() => { GetKsmPublicKeysRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetKsmPublicKeysRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetKsmPublicKeysRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41513,7 +41761,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DevicePublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41591,13 +41839,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) if (!(message.clientId && typeof message.clientId.length === "number" || $util.isString(message.clientId))) return "clientId: buffer expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; return null; @@ -41614,6 +41862,8 @@ export const Authentication = $root.Authentication = (() => { DevicePublicKeyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DevicePublicKeyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DevicePublicKeyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41677,11 +41927,11 @@ export const Authentication = $root.Authentication = (() => { object.controllerUid = $util.newBuffer(object.controllerUid); } } - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) object.clientId = options.bytes === String ? $util.base64.encode(message.clientId, 0, message.clientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientId) : message.clientId; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; return object; }; @@ -41792,7 +42042,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetKsmPublicKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41864,7 +42114,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keyResponses != null && message.hasOwnProperty("keyResponses")) { + if (message.keyResponses != null && Object.hasOwnProperty.call(message, "keyResponses")) { if (!Array.isArray(message.keyResponses)) return "keyResponses: array expected"; for (let i = 0; i < message.keyResponses.length; ++i) { @@ -41887,6 +42137,8 @@ export const Authentication = $root.Authentication = (() => { GetKsmPublicKeysResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetKsmPublicKeysResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetKsmPublicKeysResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41897,7 +42149,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetKsmPublicKeysResponse.keyResponses: array expected"); message.keyResponses = []; for (let i = 0; i < object.keyResponses.length; ++i) { - if (typeof object.keyResponses[i] !== "object") + if (!$util.isObject(object.keyResponses[i])) throw TypeError(".Authentication.GetKsmPublicKeysResponse.keyResponses: object expected"); message.keyResponses[i] = $root.Authentication.DevicePublicKeyResponse.fromObject(object.keyResponses[i], long + 1); } @@ -42087,7 +42339,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AddAppSharesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42163,10 +42415,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.shares != null && message.hasOwnProperty("shares")) { + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) { if (!Array.isArray(message.shares)) return "shares: array expected"; for (let i = 0; i < message.shares.length; ++i) { @@ -42189,6 +42441,8 @@ export const Authentication = $root.Authentication = (() => { AddAppSharesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AddAppSharesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AddAppSharesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42204,7 +42458,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.AddAppSharesRequest.shares: array expected"); message.shares = []; for (let i = 0; i < object.shares.length; ++i) { - if (typeof object.shares[i] !== "object") + if (!$util.isObject(object.shares[i])) throw TypeError(".Authentication.AddAppSharesRequest.shares: object expected"); message.shares[i] = $root.Authentication.AppShareAdd.fromObject(object.shares[i], long + 1); } @@ -42239,7 +42493,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.appRecordUid = $util.newBuffer(object.appRecordUid); } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; if (message.shares && message.shares.length) { object.shares = []; @@ -42366,7 +42620,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RemoveAppSharesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42442,10 +42696,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.shares != null && message.hasOwnProperty("shares")) { + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) { if (!Array.isArray(message.shares)) return "shares: array expected"; for (let i = 0; i < message.shares.length; ++i) @@ -42466,6 +42720,8 @@ export const Authentication = $root.Authentication = (() => { RemoveAppSharesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RemoveAppSharesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RemoveAppSharesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42516,7 +42772,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.appRecordUid = $util.newBuffer(object.appRecordUid); } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; if (message.shares && message.shares.length) { object.shares = []; @@ -42663,7 +42919,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AppShareAdd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42745,10 +43001,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.secretUid != null && message.hasOwnProperty("secretUid")) + if (message.secretUid != null && Object.hasOwnProperty.call(message, "secretUid")) if (!(message.secretUid && typeof message.secretUid.length === "number" || $util.isString(message.secretUid))) return "secretUid: buffer expected"; - if (message.shareType != null && message.hasOwnProperty("shareType")) + if (message.shareType != null && Object.hasOwnProperty.call(message, "shareType")) switch (message.shareType) { default: return "shareType: enum value expected"; @@ -42756,10 +43012,10 @@ export const Authentication = $root.Authentication = (() => { case 1: break; } - if (message.encryptedSecretKey != null && message.hasOwnProperty("encryptedSecretKey")) + if (message.encryptedSecretKey != null && Object.hasOwnProperty.call(message, "encryptedSecretKey")) if (!(message.encryptedSecretKey && typeof message.encryptedSecretKey.length === "number" || $util.isString(message.encryptedSecretKey))) return "encryptedSecretKey: buffer expected"; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) if (typeof message.editable !== "boolean") return "editable: boolean expected"; return null; @@ -42776,6 +43032,8 @@ export const Authentication = $root.Authentication = (() => { AppShareAdd.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AppShareAdd) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AppShareAdd: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42847,13 +43105,13 @@ export const Authentication = $root.Authentication = (() => { } object.editable = false; } - if (message.secretUid != null && message.hasOwnProperty("secretUid")) + if (message.secretUid != null && Object.hasOwnProperty.call(message, "secretUid")) object.secretUid = options.bytes === String ? $util.base64.encode(message.secretUid, 0, message.secretUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.secretUid) : message.secretUid; - if (message.shareType != null && message.hasOwnProperty("shareType")) + if (message.shareType != null && Object.hasOwnProperty.call(message, "shareType")) object.shareType = options.enums === String ? $root.Authentication.ApplicationShareType[message.shareType] === undefined ? message.shareType : $root.Authentication.ApplicationShareType[message.shareType] : message.shareType; - if (message.encryptedSecretKey != null && message.hasOwnProperty("encryptedSecretKey")) + if (message.encryptedSecretKey != null && Object.hasOwnProperty.call(message, "encryptedSecretKey")) object.encryptedSecretKey = options.bytes === String ? $util.base64.encode(message.encryptedSecretKey, 0, message.encryptedSecretKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSecretKey) : message.encryptedSecretKey; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) object.editable = message.editable; return object; }; @@ -43006,7 +43264,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AppShare.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43092,10 +43350,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.secretUid != null && message.hasOwnProperty("secretUid")) + if (message.secretUid != null && Object.hasOwnProperty.call(message, "secretUid")) if (!(message.secretUid && typeof message.secretUid.length === "number" || $util.isString(message.secretUid))) return "secretUid: buffer expected"; - if (message.shareType != null && message.hasOwnProperty("shareType")) + if (message.shareType != null && Object.hasOwnProperty.call(message, "shareType")) switch (message.shareType) { default: return "shareType: enum value expected"; @@ -43103,13 +43361,13 @@ export const Authentication = $root.Authentication = (() => { case 1: break; } - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) if (typeof message.editable !== "boolean") return "editable: boolean expected"; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (!$util.isInteger(message.createdOn) && !(message.createdOn && $util.isInteger(message.createdOn.low) && $util.isInteger(message.createdOn.high))) return "createdOn: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -43126,6 +43384,8 @@ export const Authentication = $root.Authentication = (() => { AppShare.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AppShare) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AppShare: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43211,20 +43471,20 @@ export const Authentication = $root.Authentication = (() => { object.data = $util.newBuffer(object.data); } } - if (message.secretUid != null && message.hasOwnProperty("secretUid")) + if (message.secretUid != null && Object.hasOwnProperty.call(message, "secretUid")) object.secretUid = options.bytes === String ? $util.base64.encode(message.secretUid, 0, message.secretUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.secretUid) : message.secretUid; - if (message.shareType != null && message.hasOwnProperty("shareType")) + if (message.shareType != null && Object.hasOwnProperty.call(message, "shareType")) object.shareType = options.enums === String ? $root.Authentication.ApplicationShareType[message.shareType] === undefined ? message.shareType : $root.Authentication.ApplicationShareType[message.shareType] : message.shareType; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) object.editable = message.editable; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.createdOn = typeof message.createdOn === "number" ? BigInt(message.createdOn) : $util.Long.fromBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0, false).toBigInt(); else if (typeof message.createdOn === "number") object.createdOn = options.longs === String ? String(message.createdOn) : message.createdOn; else object.createdOn = options.longs === String ? $util.Long.prototype.toString.call(message.createdOn) : options.longs === Number ? new $util.LongBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0).toNumber() : message.createdOn; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -43410,7 +43670,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AddAppClientRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43508,28 +43768,28 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.encryptedAppKey != null && message.hasOwnProperty("encryptedAppKey")) + if (message.encryptedAppKey != null && Object.hasOwnProperty.call(message, "encryptedAppKey")) if (!(message.encryptedAppKey && typeof message.encryptedAppKey.length === "number" || $util.isString(message.encryptedAppKey))) return "encryptedAppKey: buffer expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) if (!(message.clientId && typeof message.clientId.length === "number" || $util.isString(message.clientId))) return "clientId: buffer expected"; - if (message.lockIp != null && message.hasOwnProperty("lockIp")) + if (message.lockIp != null && Object.hasOwnProperty.call(message, "lockIp")) if (typeof message.lockIp !== "boolean") return "lockIp: boolean expected"; - if (message.firstAccessExpireOn != null && message.hasOwnProperty("firstAccessExpireOn")) + if (message.firstAccessExpireOn != null && Object.hasOwnProperty.call(message, "firstAccessExpireOn")) if (!$util.isInteger(message.firstAccessExpireOn) && !(message.firstAccessExpireOn && $util.isInteger(message.firstAccessExpireOn.low) && $util.isInteger(message.firstAccessExpireOn.high))) return "firstAccessExpireOn: integer|Long expected"; - if (message.accessExpireOn != null && message.hasOwnProperty("accessExpireOn")) + if (message.accessExpireOn != null && Object.hasOwnProperty.call(message, "accessExpireOn")) if (!$util.isInteger(message.accessExpireOn) && !(message.accessExpireOn && $util.isInteger(message.accessExpireOn.low) && $util.isInteger(message.accessExpireOn.high))) return "accessExpireOn: integer|Long expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) switch (message.appClientType) { default: return "appClientType: enum value expected"; @@ -43554,6 +43814,8 @@ export const Authentication = $root.Authentication = (() => { AddAppClientRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AddAppClientRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AddAppClientRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43680,31 +43942,31 @@ export const Authentication = $root.Authentication = (() => { object.id = ""; object.appClientType = options.enums === String ? "NOT_USED" : 0; } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; - if (message.encryptedAppKey != null && message.hasOwnProperty("encryptedAppKey")) + if (message.encryptedAppKey != null && Object.hasOwnProperty.call(message, "encryptedAppKey")) object.encryptedAppKey = options.bytes === String ? $util.base64.encode(message.encryptedAppKey, 0, message.encryptedAppKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedAppKey) : message.encryptedAppKey; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) object.clientId = options.bytes === String ? $util.base64.encode(message.clientId, 0, message.clientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientId) : message.clientId; - if (message.lockIp != null && message.hasOwnProperty("lockIp")) + if (message.lockIp != null && Object.hasOwnProperty.call(message, "lockIp")) object.lockIp = message.lockIp; - if (message.firstAccessExpireOn != null && message.hasOwnProperty("firstAccessExpireOn")) + if (message.firstAccessExpireOn != null && Object.hasOwnProperty.call(message, "firstAccessExpireOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.firstAccessExpireOn = typeof message.firstAccessExpireOn === "number" ? BigInt(message.firstAccessExpireOn) : $util.Long.fromBits(message.firstAccessExpireOn.low >>> 0, message.firstAccessExpireOn.high >>> 0, false).toBigInt(); else if (typeof message.firstAccessExpireOn === "number") object.firstAccessExpireOn = options.longs === String ? String(message.firstAccessExpireOn) : message.firstAccessExpireOn; else object.firstAccessExpireOn = options.longs === String ? $util.Long.prototype.toString.call(message.firstAccessExpireOn) : options.longs === Number ? new $util.LongBits(message.firstAccessExpireOn.low >>> 0, message.firstAccessExpireOn.high >>> 0).toNumber() : message.firstAccessExpireOn; - if (message.accessExpireOn != null && message.hasOwnProperty("accessExpireOn")) + if (message.accessExpireOn != null && Object.hasOwnProperty.call(message, "accessExpireOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.accessExpireOn = typeof message.accessExpireOn === "number" ? BigInt(message.accessExpireOn) : $util.Long.fromBits(message.accessExpireOn.low >>> 0, message.accessExpireOn.high >>> 0, false).toBigInt(); else if (typeof message.accessExpireOn === "number") object.accessExpireOn = options.longs === String ? String(message.accessExpireOn) : message.accessExpireOn; else object.accessExpireOn = options.longs === String ? $util.Long.prototype.toString.call(message.accessExpireOn) : options.longs === Number ? new $util.LongBits(message.accessExpireOn.low >>> 0, message.accessExpireOn.high >>> 0).toNumber() : message.accessExpireOn; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) object.appClientType = options.enums === String ? $root.Enterprise.AppClientType[message.appClientType] === undefined ? message.appClientType : $root.Enterprise.AppClientType[message.appClientType] : message.appClientType; return object; }; @@ -43826,7 +44088,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RemoveAppClientsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43902,10 +44164,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.clients != null && message.hasOwnProperty("clients")) { + if (message.clients != null && Object.hasOwnProperty.call(message, "clients")) { if (!Array.isArray(message.clients)) return "clients: array expected"; for (let i = 0; i < message.clients.length; ++i) @@ -43926,6 +44188,8 @@ export const Authentication = $root.Authentication = (() => { RemoveAppClientsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RemoveAppClientsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RemoveAppClientsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43976,7 +44240,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.appRecordUid = $util.newBuffer(object.appRecordUid); } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; if (message.clients && message.clients.length) { object.clients = []; @@ -44156,7 +44420,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AddExternalShareRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44250,25 +44514,25 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) if (!(message.encryptedRecordKey && typeof message.encryptedRecordKey.length === "number" || $util.isString(message.encryptedRecordKey))) return "encryptedRecordKey: buffer expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) if (!(message.clientId && typeof message.clientId.length === "number" || $util.isString(message.clientId))) return "clientId: buffer expected"; - if (message.accessExpireOn != null && message.hasOwnProperty("accessExpireOn")) + if (message.accessExpireOn != null && Object.hasOwnProperty.call(message, "accessExpireOn")) if (!$util.isInteger(message.accessExpireOn) && !(message.accessExpireOn && $util.isInteger(message.accessExpireOn.low) && $util.isInteger(message.accessExpireOn.high))) return "accessExpireOn: integer|Long expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.isSelfDestruct != null && message.hasOwnProperty("isSelfDestruct")) + if (message.isSelfDestruct != null && Object.hasOwnProperty.call(message, "isSelfDestruct")) if (typeof message.isSelfDestruct !== "boolean") return "isSelfDestruct: boolean expected"; - if (message.isEditable != null && message.hasOwnProperty("isEditable")) + if (message.isEditable != null && Object.hasOwnProperty.call(message, "isEditable")) if (typeof message.isEditable !== "boolean") return "isEditable: boolean expected"; return null; @@ -44285,6 +44549,8 @@ export const Authentication = $root.Authentication = (() => { AddExternalShareRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AddExternalShareRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AddExternalShareRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44371,24 +44637,24 @@ export const Authentication = $root.Authentication = (() => { object.isSelfDestruct = false; object.isEditable = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) object.encryptedRecordKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordKey, 0, message.encryptedRecordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordKey) : message.encryptedRecordKey; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) object.clientId = options.bytes === String ? $util.base64.encode(message.clientId, 0, message.clientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientId) : message.clientId; - if (message.accessExpireOn != null && message.hasOwnProperty("accessExpireOn")) + if (message.accessExpireOn != null && Object.hasOwnProperty.call(message, "accessExpireOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.accessExpireOn = typeof message.accessExpireOn === "number" ? BigInt(message.accessExpireOn) : $util.Long.fromBits(message.accessExpireOn.low >>> 0, message.accessExpireOn.high >>> 0, false).toBigInt(); else if (typeof message.accessExpireOn === "number") object.accessExpireOn = options.longs === String ? String(message.accessExpireOn) : message.accessExpireOn; else object.accessExpireOn = options.longs === String ? $util.Long.prototype.toString.call(message.accessExpireOn) : options.longs === Number ? new $util.LongBits(message.accessExpireOn.low >>> 0, message.accessExpireOn.high >>> 0).toNumber() : message.accessExpireOn; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.isSelfDestruct != null && message.hasOwnProperty("isSelfDestruct")) + if (message.isSelfDestruct != null && Object.hasOwnProperty.call(message, "isSelfDestruct")) object.isSelfDestruct = message.isSelfDestruct; - if (message.isEditable != null && message.hasOwnProperty("isEditable")) + if (message.isEditable != null && Object.hasOwnProperty.call(message, "isEditable")) object.isEditable = message.isEditable; return object; }; @@ -44618,7 +44884,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AppClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44732,37 +44998,37 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) if (!(message.clientId && typeof message.clientId.length === "number" || $util.isString(message.clientId))) return "clientId: buffer expected"; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (!$util.isInteger(message.createdOn) && !(message.createdOn && $util.isInteger(message.createdOn.low) && $util.isInteger(message.createdOn.high))) return "createdOn: integer|Long expected"; - if (message.firstAccess != null && message.hasOwnProperty("firstAccess")) + if (message.firstAccess != null && Object.hasOwnProperty.call(message, "firstAccess")) if (!$util.isInteger(message.firstAccess) && !(message.firstAccess && $util.isInteger(message.firstAccess.low) && $util.isInteger(message.firstAccess.high))) return "firstAccess: integer|Long expected"; - if (message.lastAccess != null && message.hasOwnProperty("lastAccess")) + if (message.lastAccess != null && Object.hasOwnProperty.call(message, "lastAccess")) if (!$util.isInteger(message.lastAccess) && !(message.lastAccess && $util.isInteger(message.lastAccess.low) && $util.isInteger(message.lastAccess.high))) return "lastAccess: integer|Long expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.lockIp != null && message.hasOwnProperty("lockIp")) + if (message.lockIp != null && Object.hasOwnProperty.call(message, "lockIp")) if (typeof message.lockIp !== "boolean") return "lockIp: boolean expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.firstAccessExpireOn != null && message.hasOwnProperty("firstAccessExpireOn")) + if (message.firstAccessExpireOn != null && Object.hasOwnProperty.call(message, "firstAccessExpireOn")) if (!$util.isInteger(message.firstAccessExpireOn) && !(message.firstAccessExpireOn && $util.isInteger(message.firstAccessExpireOn.low) && $util.isInteger(message.firstAccessExpireOn.high))) return "firstAccessExpireOn: integer|Long expected"; - if (message.accessExpireOn != null && message.hasOwnProperty("accessExpireOn")) + if (message.accessExpireOn != null && Object.hasOwnProperty.call(message, "accessExpireOn")) if (!$util.isInteger(message.accessExpireOn) && !(message.accessExpireOn && $util.isInteger(message.accessExpireOn.low) && $util.isInteger(message.accessExpireOn.high))) return "accessExpireOn: integer|Long expected"; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) switch (message.appClientType) { default: return "appClientType: enum value expected"; @@ -44773,7 +45039,7 @@ export const Authentication = $root.Authentication = (() => { case 4: break; } - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; return null; @@ -44790,6 +45056,8 @@ export const Authentication = $root.Authentication = (() => { AppClient.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AppClient) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AppClient: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44952,54 +45220,54 @@ export const Authentication = $root.Authentication = (() => { object.appClientType = options.enums === String ? "NOT_USED" : 0; object.canEdit = false; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) object.clientId = options.bytes === String ? $util.base64.encode(message.clientId, 0, message.clientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientId) : message.clientId; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.createdOn = typeof message.createdOn === "number" ? BigInt(message.createdOn) : $util.Long.fromBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0, false).toBigInt(); else if (typeof message.createdOn === "number") object.createdOn = options.longs === String ? String(message.createdOn) : message.createdOn; else object.createdOn = options.longs === String ? $util.Long.prototype.toString.call(message.createdOn) : options.longs === Number ? new $util.LongBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0).toNumber() : message.createdOn; - if (message.firstAccess != null && message.hasOwnProperty("firstAccess")) + if (message.firstAccess != null && Object.hasOwnProperty.call(message, "firstAccess")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.firstAccess = typeof message.firstAccess === "number" ? BigInt(message.firstAccess) : $util.Long.fromBits(message.firstAccess.low >>> 0, message.firstAccess.high >>> 0, false).toBigInt(); else if (typeof message.firstAccess === "number") object.firstAccess = options.longs === String ? String(message.firstAccess) : message.firstAccess; else object.firstAccess = options.longs === String ? $util.Long.prototype.toString.call(message.firstAccess) : options.longs === Number ? new $util.LongBits(message.firstAccess.low >>> 0, message.firstAccess.high >>> 0).toNumber() : message.firstAccess; - if (message.lastAccess != null && message.hasOwnProperty("lastAccess")) + if (message.lastAccess != null && Object.hasOwnProperty.call(message, "lastAccess")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastAccess = typeof message.lastAccess === "number" ? BigInt(message.lastAccess) : $util.Long.fromBits(message.lastAccess.low >>> 0, message.lastAccess.high >>> 0, false).toBigInt(); else if (typeof message.lastAccess === "number") object.lastAccess = options.longs === String ? String(message.lastAccess) : message.lastAccess; else object.lastAccess = options.longs === String ? $util.Long.prototype.toString.call(message.lastAccess) : options.longs === Number ? new $util.LongBits(message.lastAccess.low >>> 0, message.lastAccess.high >>> 0).toNumber() : message.lastAccess; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.lockIp != null && message.hasOwnProperty("lockIp")) + if (message.lockIp != null && Object.hasOwnProperty.call(message, "lockIp")) object.lockIp = message.lockIp; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.firstAccessExpireOn != null && message.hasOwnProperty("firstAccessExpireOn")) + if (message.firstAccessExpireOn != null && Object.hasOwnProperty.call(message, "firstAccessExpireOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.firstAccessExpireOn = typeof message.firstAccessExpireOn === "number" ? BigInt(message.firstAccessExpireOn) : $util.Long.fromBits(message.firstAccessExpireOn.low >>> 0, message.firstAccessExpireOn.high >>> 0, false).toBigInt(); else if (typeof message.firstAccessExpireOn === "number") object.firstAccessExpireOn = options.longs === String ? String(message.firstAccessExpireOn) : message.firstAccessExpireOn; else object.firstAccessExpireOn = options.longs === String ? $util.Long.prototype.toString.call(message.firstAccessExpireOn) : options.longs === Number ? new $util.LongBits(message.firstAccessExpireOn.low >>> 0, message.firstAccessExpireOn.high >>> 0).toNumber() : message.firstAccessExpireOn; - if (message.accessExpireOn != null && message.hasOwnProperty("accessExpireOn")) + if (message.accessExpireOn != null && Object.hasOwnProperty.call(message, "accessExpireOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.accessExpireOn = typeof message.accessExpireOn === "number" ? BigInt(message.accessExpireOn) : $util.Long.fromBits(message.accessExpireOn.low >>> 0, message.accessExpireOn.high >>> 0, false).toBigInt(); else if (typeof message.accessExpireOn === "number") object.accessExpireOn = options.longs === String ? String(message.accessExpireOn) : message.accessExpireOn; else object.accessExpireOn = options.longs === String ? $util.Long.prototype.toString.call(message.accessExpireOn) : options.longs === Number ? new $util.LongBits(message.accessExpireOn.low >>> 0, message.accessExpireOn.high >>> 0).toNumber() : message.accessExpireOn; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) object.appClientType = options.enums === String ? $root.Enterprise.AppClientType[message.appClientType] === undefined ? message.appClientType : $root.Enterprise.AppClientType[message.appClientType] : message.appClientType; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; return object; }; @@ -45110,7 +45378,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetAppInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45182,7 +45450,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) { + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) { if (!Array.isArray(message.appRecordUid)) return "appRecordUid: array expected"; for (let i = 0; i < message.appRecordUid.length; ++i) @@ -45203,6 +45471,8 @@ export const Authentication = $root.Authentication = (() => { GetAppInfoRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetAppInfoRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetAppInfoRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45389,7 +45659,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AppInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45475,10 +45745,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.shares != null && message.hasOwnProperty("shares")) { + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) { if (!Array.isArray(message.shares)) return "shares: array expected"; for (let i = 0; i < message.shares.length; ++i) { @@ -45487,7 +45757,7 @@ export const Authentication = $root.Authentication = (() => { return "shares." + error; } } - if (message.clients != null && message.hasOwnProperty("clients")) { + if (message.clients != null && Object.hasOwnProperty.call(message, "clients")) { if (!Array.isArray(message.clients)) return "clients: array expected"; for (let i = 0; i < message.clients.length; ++i) { @@ -45496,7 +45766,7 @@ export const Authentication = $root.Authentication = (() => { return "clients." + error; } } - if (message.isExternalShare != null && message.hasOwnProperty("isExternalShare")) + if (message.isExternalShare != null && Object.hasOwnProperty.call(message, "isExternalShare")) if (typeof message.isExternalShare !== "boolean") return "isExternalShare: boolean expected"; return null; @@ -45513,6 +45783,8 @@ export const Authentication = $root.Authentication = (() => { AppInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AppInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AppInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45528,7 +45800,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.AppInfo.shares: array expected"); message.shares = []; for (let i = 0; i < object.shares.length; ++i) { - if (typeof object.shares[i] !== "object") + if (!$util.isObject(object.shares[i])) throw TypeError(".Authentication.AppInfo.shares: object expected"); message.shares[i] = $root.Authentication.AppShare.fromObject(object.shares[i], long + 1); } @@ -45538,7 +45810,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.AppInfo.clients: array expected"); message.clients = []; for (let i = 0; i < object.clients.length; ++i) { - if (typeof object.clients[i] !== "object") + if (!$util.isObject(object.clients[i])) throw TypeError(".Authentication.AppInfo.clients: object expected"); message.clients[i] = $root.Authentication.AppClient.fromObject(object.clients[i], long + 1); } @@ -45579,7 +45851,7 @@ export const Authentication = $root.Authentication = (() => { } object.isExternalShare = false; } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; if (message.shares && message.shares.length) { object.shares = []; @@ -45591,7 +45863,7 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.clients.length; ++j) object.clients[j] = $root.Authentication.AppClient.toObject(message.clients[j], options, q + 1); } - if (message.isExternalShare != null && message.hasOwnProperty("isExternalShare")) + if (message.isExternalShare != null && Object.hasOwnProperty.call(message, "isExternalShare")) object.isExternalShare = message.isExternalShare; return object; }; @@ -45702,7 +45974,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetAppInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45774,7 +46046,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appInfo != null && message.hasOwnProperty("appInfo")) { + if (message.appInfo != null && Object.hasOwnProperty.call(message, "appInfo")) { if (!Array.isArray(message.appInfo)) return "appInfo: array expected"; for (let i = 0; i < message.appInfo.length; ++i) { @@ -45797,6 +46069,8 @@ export const Authentication = $root.Authentication = (() => { GetAppInfoResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetAppInfoResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetAppInfoResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45807,7 +46081,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetAppInfoResponse.appInfo: array expected"); message.appInfo = []; for (let i = 0; i < object.appInfo.length; ++i) { - if (typeof object.appInfo[i] !== "object") + if (!$util.isObject(object.appInfo[i])) throw TypeError(".Authentication.GetAppInfoResponse.appInfo: object expected"); message.appInfo[i] = $root.Authentication.AppInfo.fromObject(object.appInfo[i], long + 1); } @@ -46034,7 +46308,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ApplicationSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46136,31 +46410,31 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.lastAccess != null && message.hasOwnProperty("lastAccess")) + if (message.lastAccess != null && Object.hasOwnProperty.call(message, "lastAccess")) if (!$util.isInteger(message.lastAccess) && !(message.lastAccess && $util.isInteger(message.lastAccess.low) && $util.isInteger(message.lastAccess.high))) return "lastAccess: integer|Long expected"; - if (message.recordShares != null && message.hasOwnProperty("recordShares")) + if (message.recordShares != null && Object.hasOwnProperty.call(message, "recordShares")) if (!$util.isInteger(message.recordShares)) return "recordShares: integer expected"; - if (message.folderShares != null && message.hasOwnProperty("folderShares")) + if (message.folderShares != null && Object.hasOwnProperty.call(message, "folderShares")) if (!$util.isInteger(message.folderShares)) return "folderShares: integer expected"; - if (message.folderRecords != null && message.hasOwnProperty("folderRecords")) + if (message.folderRecords != null && Object.hasOwnProperty.call(message, "folderRecords")) if (!$util.isInteger(message.folderRecords)) return "folderRecords: integer expected"; - if (message.clientCount != null && message.hasOwnProperty("clientCount")) + if (message.clientCount != null && Object.hasOwnProperty.call(message, "clientCount")) if (!$util.isInteger(message.clientCount)) return "clientCount: integer expected"; - if (message.expiredClientCount != null && message.hasOwnProperty("expiredClientCount")) + if (message.expiredClientCount != null && Object.hasOwnProperty.call(message, "expiredClientCount")) if (!$util.isInteger(message.expiredClientCount)) return "expiredClientCount: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.appData != null && message.hasOwnProperty("appData")) + if (message.appData != null && Object.hasOwnProperty.call(message, "appData")) if (!(message.appData && typeof message.appData.length === "number" || $util.isString(message.appData))) return "appData: buffer expected"; return null; @@ -46177,6 +46451,8 @@ export const Authentication = $root.Authentication = (() => { ApplicationSummary.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ApplicationSummary) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ApplicationSummary: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46260,28 +46536,28 @@ export const Authentication = $root.Authentication = (() => { object.appData = $util.newBuffer(object.appData); } } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; - if (message.lastAccess != null && message.hasOwnProperty("lastAccess")) + if (message.lastAccess != null && Object.hasOwnProperty.call(message, "lastAccess")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastAccess = typeof message.lastAccess === "number" ? BigInt(message.lastAccess) : $util.Long.fromBits(message.lastAccess.low >>> 0, message.lastAccess.high >>> 0, false).toBigInt(); else if (typeof message.lastAccess === "number") object.lastAccess = options.longs === String ? String(message.lastAccess) : message.lastAccess; else object.lastAccess = options.longs === String ? $util.Long.prototype.toString.call(message.lastAccess) : options.longs === Number ? new $util.LongBits(message.lastAccess.low >>> 0, message.lastAccess.high >>> 0).toNumber() : message.lastAccess; - if (message.recordShares != null && message.hasOwnProperty("recordShares")) + if (message.recordShares != null && Object.hasOwnProperty.call(message, "recordShares")) object.recordShares = message.recordShares; - if (message.folderShares != null && message.hasOwnProperty("folderShares")) + if (message.folderShares != null && Object.hasOwnProperty.call(message, "folderShares")) object.folderShares = message.folderShares; - if (message.folderRecords != null && message.hasOwnProperty("folderRecords")) + if (message.folderRecords != null && Object.hasOwnProperty.call(message, "folderRecords")) object.folderRecords = message.folderRecords; - if (message.clientCount != null && message.hasOwnProperty("clientCount")) + if (message.clientCount != null && Object.hasOwnProperty.call(message, "clientCount")) object.clientCount = message.clientCount; - if (message.expiredClientCount != null && message.hasOwnProperty("expiredClientCount")) + if (message.expiredClientCount != null && Object.hasOwnProperty.call(message, "expiredClientCount")) object.expiredClientCount = message.expiredClientCount; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.appData != null && message.hasOwnProperty("appData")) + if (message.appData != null && Object.hasOwnProperty.call(message, "appData")) object.appData = options.bytes === String ? $util.base64.encode(message.appData, 0, message.appData.length) : options.bytes === Array ? Array.prototype.slice.call(message.appData) : message.appData; return object; }; @@ -46392,7 +46668,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetApplicationsSummaryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46464,7 +46740,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.applicationSummary != null && message.hasOwnProperty("applicationSummary")) { + if (message.applicationSummary != null && Object.hasOwnProperty.call(message, "applicationSummary")) { if (!Array.isArray(message.applicationSummary)) return "applicationSummary: array expected"; for (let i = 0; i < message.applicationSummary.length; ++i) { @@ -46487,6 +46763,8 @@ export const Authentication = $root.Authentication = (() => { GetApplicationsSummaryResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetApplicationsSummaryResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetApplicationsSummaryResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46497,7 +46775,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.GetApplicationsSummaryResponse.applicationSummary: array expected"); message.applicationSummary = []; for (let i = 0; i < object.applicationSummary.length; ++i) { - if (typeof object.applicationSummary[i] !== "object") + if (!$util.isObject(object.applicationSummary[i])) throw TypeError(".Authentication.GetApplicationsSummaryResponse.applicationSummary: object expected"); message.applicationSummary[i] = $root.Authentication.ApplicationSummary.fromObject(object.applicationSummary[i], long + 1); } @@ -46636,7 +46914,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetVerificationTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46706,7 +46984,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -46723,6 +47001,8 @@ export const Authentication = $root.Authentication = (() => { GetVerificationTokenRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetVerificationTokenRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetVerificationTokenRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46752,7 +47032,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -46861,7 +47141,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GetVerificationTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46931,7 +47211,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedVerificationToken != null && message.hasOwnProperty("encryptedVerificationToken")) + if (message.encryptedVerificationToken != null && Object.hasOwnProperty.call(message, "encryptedVerificationToken")) if (!(message.encryptedVerificationToken && typeof message.encryptedVerificationToken.length === "number" || $util.isString(message.encryptedVerificationToken))) return "encryptedVerificationToken: buffer expected"; return null; @@ -46948,6 +47228,8 @@ export const Authentication = $root.Authentication = (() => { GetVerificationTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GetVerificationTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GetVerificationTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46986,7 +47268,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedVerificationToken = $util.newBuffer(object.encryptedVerificationToken); } - if (message.encryptedVerificationToken != null && message.hasOwnProperty("encryptedVerificationToken")) + if (message.encryptedVerificationToken != null && Object.hasOwnProperty.call(message, "encryptedVerificationToken")) object.encryptedVerificationToken = options.bytes === String ? $util.base64.encode(message.encryptedVerificationToken, 0, message.encryptedVerificationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedVerificationToken) : message.encryptedVerificationToken; return object; }; @@ -47095,7 +47377,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ SendShareInviteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47165,7 +47447,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; return null; @@ -47182,6 +47464,8 @@ export const Authentication = $root.Authentication = (() => { SendShareInviteRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.SendShareInviteRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.SendShareInviteRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47211,7 +47495,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.email = ""; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; return object; }; @@ -47399,7 +47683,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TimeLimitedAccessRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47495,31 +47779,31 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) { + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) { if (!Array.isArray(message.accountUid)) return "accountUid: array expected"; for (let i = 0; i < message.accountUid.length; ++i) if (!(message.accountUid[i] && typeof message.accountUid[i].length === "number" || $util.isString(message.accountUid[i]))) return "accountUid: buffer[] expected"; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) { + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) { if (!Array.isArray(message.teamUid)) return "teamUid: array expected"; for (let i = 0; i < message.teamUid.length; ++i) if (!(message.teamUid[i] && typeof message.teamUid[i].length === "number" || $util.isString(message.teamUid[i]))) return "teamUid: buffer[] expected"; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) { + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) { if (!Array.isArray(message.recordUid)) return "recordUid: array expected"; for (let i = 0; i < message.recordUid.length; ++i) if (!(message.recordUid[i] && typeof message.recordUid[i].length === "number" || $util.isString(message.recordUid[i]))) return "recordUid: buffer[] expected"; } - if (message.sharedObjectUid != null && message.hasOwnProperty("sharedObjectUid")) + if (message.sharedObjectUid != null && Object.hasOwnProperty.call(message, "sharedObjectUid")) if (!(message.sharedObjectUid && typeof message.sharedObjectUid.length === "number" || $util.isString(message.sharedObjectUid))) return "sharedObjectUid: buffer expected"; - if (message.timeLimitedAccessType != null && message.hasOwnProperty("timeLimitedAccessType")) + if (message.timeLimitedAccessType != null && Object.hasOwnProperty.call(message, "timeLimitedAccessType")) switch (message.timeLimitedAccessType) { default: return "timeLimitedAccessType: enum value expected"; @@ -47529,7 +47813,7 @@ export const Authentication = $root.Authentication = (() => { case 3: break; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; return null; @@ -47546,6 +47830,8 @@ export const Authentication = $root.Authentication = (() => { TimeLimitedAccessRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TimeLimitedAccessRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TimeLimitedAccessRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47674,11 +47960,11 @@ export const Authentication = $root.Authentication = (() => { for (let j = 0; j < message.recordUid.length; ++j) object.recordUid[j] = options.bytes === String ? $util.base64.encode(message.recordUid[j], 0, message.recordUid[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid[j]) : message.recordUid[j]; } - if (message.sharedObjectUid != null && message.hasOwnProperty("sharedObjectUid")) + if (message.sharedObjectUid != null && Object.hasOwnProperty.call(message, "sharedObjectUid")) object.sharedObjectUid = options.bytes === String ? $util.base64.encode(message.sharedObjectUid, 0, message.sharedObjectUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedObjectUid) : message.sharedObjectUid; - if (message.timeLimitedAccessType != null && message.hasOwnProperty("timeLimitedAccessType")) + if (message.timeLimitedAccessType != null && Object.hasOwnProperty.call(message, "timeLimitedAccessType")) object.timeLimitedAccessType = options.enums === String ? $root.Authentication.TimeLimitedAccessType[message.timeLimitedAccessType] === undefined ? message.timeLimitedAccessType : $root.Authentication.TimeLimitedAccessType[message.timeLimitedAccessType] : message.timeLimitedAccessType; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") @@ -47803,7 +48089,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TimeLimitedAccessStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47877,10 +48163,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -47897,6 +48183,8 @@ export const Authentication = $root.Authentication = (() => { TimeLimitedAccessStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TimeLimitedAccessStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TimeLimitedAccessStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47939,9 +48227,9 @@ export const Authentication = $root.Authentication = (() => { } object.message = ""; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -48089,7 +48377,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TimeLimitedAccessResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48177,10 +48465,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.userAccessStatus != null && message.hasOwnProperty("userAccessStatus")) { + if (message.userAccessStatus != null && Object.hasOwnProperty.call(message, "userAccessStatus")) { if (!Array.isArray(message.userAccessStatus)) return "userAccessStatus: array expected"; for (let i = 0; i < message.userAccessStatus.length; ++i) { @@ -48189,7 +48477,7 @@ export const Authentication = $root.Authentication = (() => { return "userAccessStatus." + error; } } - if (message.teamAccessStatus != null && message.hasOwnProperty("teamAccessStatus")) { + if (message.teamAccessStatus != null && Object.hasOwnProperty.call(message, "teamAccessStatus")) { if (!Array.isArray(message.teamAccessStatus)) return "teamAccessStatus: array expected"; for (let i = 0; i < message.teamAccessStatus.length; ++i) { @@ -48198,7 +48486,7 @@ export const Authentication = $root.Authentication = (() => { return "teamAccessStatus." + error; } } - if (message.recordAccessStatus != null && message.hasOwnProperty("recordAccessStatus")) { + if (message.recordAccessStatus != null && Object.hasOwnProperty.call(message, "recordAccessStatus")) { if (!Array.isArray(message.recordAccessStatus)) return "recordAccessStatus: array expected"; for (let i = 0; i < message.recordAccessStatus.length; ++i) { @@ -48221,6 +48509,8 @@ export const Authentication = $root.Authentication = (() => { TimeLimitedAccessResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TimeLimitedAccessResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TimeLimitedAccessResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48240,7 +48530,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.TimeLimitedAccessResponse.userAccessStatus: array expected"); message.userAccessStatus = []; for (let i = 0; i < object.userAccessStatus.length; ++i) { - if (typeof object.userAccessStatus[i] !== "object") + if (!$util.isObject(object.userAccessStatus[i])) throw TypeError(".Authentication.TimeLimitedAccessResponse.userAccessStatus: object expected"); message.userAccessStatus[i] = $root.Authentication.TimeLimitedAccessStatus.fromObject(object.userAccessStatus[i], long + 1); } @@ -48250,7 +48540,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.TimeLimitedAccessResponse.teamAccessStatus: array expected"); message.teamAccessStatus = []; for (let i = 0; i < object.teamAccessStatus.length; ++i) { - if (typeof object.teamAccessStatus[i] !== "object") + if (!$util.isObject(object.teamAccessStatus[i])) throw TypeError(".Authentication.TimeLimitedAccessResponse.teamAccessStatus: object expected"); message.teamAccessStatus[i] = $root.Authentication.TimeLimitedAccessStatus.fromObject(object.teamAccessStatus[i], long + 1); } @@ -48260,7 +48550,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.TimeLimitedAccessResponse.recordAccessStatus: array expected"); message.recordAccessStatus = []; for (let i = 0; i < object.recordAccessStatus.length; ++i) { - if (typeof object.recordAccessStatus[i] !== "object") + if (!$util.isObject(object.recordAccessStatus[i])) throw TypeError(".Authentication.TimeLimitedAccessResponse.recordAccessStatus: object expected"); message.recordAccessStatus[i] = $root.Authentication.TimeLimitedAccessStatus.fromObject(object.recordAccessStatus[i], long + 1); } @@ -48296,7 +48586,7 @@ export const Authentication = $root.Authentication = (() => { object.revision = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -48427,7 +48717,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RequestDownloadRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48499,7 +48789,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fileNames != null && message.hasOwnProperty("fileNames")) { + if (message.fileNames != null && Object.hasOwnProperty.call(message, "fileNames")) { if (!Array.isArray(message.fileNames)) return "fileNames: array expected"; for (let i = 0; i < message.fileNames.length; ++i) @@ -48520,6 +48810,8 @@ export const Authentication = $root.Authentication = (() => { RequestDownloadRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RequestDownloadRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RequestDownloadRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48690,7 +48982,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ RequestDownloadResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48770,13 +49062,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) if (!$util.isString(message.result)) return "result: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.downloads != null && message.hasOwnProperty("downloads")) { + if (message.downloads != null && Object.hasOwnProperty.call(message, "downloads")) { if (!Array.isArray(message.downloads)) return "downloads: array expected"; for (let i = 0; i < message.downloads.length; ++i) { @@ -48799,6 +49091,8 @@ export const Authentication = $root.Authentication = (() => { RequestDownloadResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.RequestDownloadResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.RequestDownloadResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48813,7 +49107,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.RequestDownloadResponse.downloads: array expected"); message.downloads = []; for (let i = 0; i < object.downloads.length; ++i) { - if (typeof object.downloads[i] !== "object") + if (!$util.isObject(object.downloads[i])) throw TypeError(".Authentication.RequestDownloadResponse.downloads: object expected"); message.downloads[i] = $root.Authentication.Download.fromObject(object.downloads[i], long + 1); } @@ -48844,9 +49138,9 @@ export const Authentication = $root.Authentication = (() => { object.result = ""; object.message = ""; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.downloads && message.downloads.length) { object.downloads = []; @@ -48982,7 +49276,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ Download.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49060,13 +49354,13 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) if (!$util.isString(message.fileName)) return "fileName: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.successStatusCode != null && message.hasOwnProperty("successStatusCode")) + if (message.successStatusCode != null && Object.hasOwnProperty.call(message, "successStatusCode")) if (!$util.isInteger(message.successStatusCode)) return "successStatusCode: integer expected"; return null; @@ -49083,6 +49377,8 @@ export const Authentication = $root.Authentication = (() => { Download.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.Download) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.Download: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49119,11 +49415,11 @@ export const Authentication = $root.Authentication = (() => { object.url = ""; object.successStatusCode = 0; } - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) object.fileName = message.fileName; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; - if (message.successStatusCode != null && message.hasOwnProperty("successStatusCode")) + if (message.successStatusCode != null && Object.hasOwnProperty.call(message, "successStatusCode")) object.successStatusCode = message.successStatusCode; return object; }; @@ -49232,7 +49528,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ DeleteUserRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49302,7 +49598,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) if (!$util.isString(message.reason)) return "reason: string expected"; return null; @@ -49319,6 +49615,8 @@ export const Authentication = $root.Authentication = (() => { DeleteUserRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.DeleteUserRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.DeleteUserRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49348,7 +49646,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.reason = ""; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) object.reason = message.reason; return object; }; @@ -49490,7 +49788,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeMasterPasswordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49572,16 +49870,16 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authVerifier != null && message.hasOwnProperty("authVerifier")) + if (message.authVerifier != null && Object.hasOwnProperty.call(message, "authVerifier")) if (!(message.authVerifier && typeof message.authVerifier.length === "number" || $util.isString(message.authVerifier))) return "authVerifier: buffer expected"; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) if (!(message.encryptionParams && typeof message.encryptionParams.length === "number" || $util.isString(message.encryptionParams))) return "encryptionParams: buffer expected"; - if (message.fromServiceProvider != null && message.hasOwnProperty("fromServiceProvider")) + if (message.fromServiceProvider != null && Object.hasOwnProperty.call(message, "fromServiceProvider")) if (typeof message.fromServiceProvider !== "boolean") return "fromServiceProvider: boolean expected"; - if (message.iterationsChange != null && message.hasOwnProperty("iterationsChange")) + if (message.iterationsChange != null && Object.hasOwnProperty.call(message, "iterationsChange")) if (typeof message.iterationsChange !== "boolean") return "iterationsChange: boolean expected"; return null; @@ -49598,6 +49896,8 @@ export const Authentication = $root.Authentication = (() => { ChangeMasterPasswordRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeMasterPasswordRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeMasterPasswordRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49655,13 +49955,13 @@ export const Authentication = $root.Authentication = (() => { object.fromServiceProvider = false; object.iterationsChange = false; } - if (message.authVerifier != null && message.hasOwnProperty("authVerifier")) + if (message.authVerifier != null && Object.hasOwnProperty.call(message, "authVerifier")) object.authVerifier = options.bytes === String ? $util.base64.encode(message.authVerifier, 0, message.authVerifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.authVerifier) : message.authVerifier; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) object.encryptionParams = options.bytes === String ? $util.base64.encode(message.encryptionParams, 0, message.encryptionParams.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptionParams) : message.encryptionParams; - if (message.fromServiceProvider != null && message.hasOwnProperty("fromServiceProvider")) + if (message.fromServiceProvider != null && Object.hasOwnProperty.call(message, "fromServiceProvider")) object.fromServiceProvider = message.fromServiceProvider; - if (message.iterationsChange != null && message.hasOwnProperty("iterationsChange")) + if (message.iterationsChange != null && Object.hasOwnProperty.call(message, "iterationsChange")) object.iterationsChange = message.iterationsChange; return object; }; @@ -49770,7 +50070,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ ChangeMasterPasswordResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49840,7 +50140,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; return null; @@ -49857,6 +50157,8 @@ export const Authentication = $root.Authentication = (() => { ChangeMasterPasswordResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.ChangeMasterPasswordResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.ChangeMasterPasswordResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49895,7 +50197,7 @@ export const Authentication = $root.Authentication = (() => { if (options.bytes !== Array) object.encryptedSessionToken = $util.newBuffer(object.encryptedSessionToken); } - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; return object; }; @@ -50015,7 +50317,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AccountRecoverySetupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50089,10 +50391,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recoveryEncryptedDataKey != null && message.hasOwnProperty("recoveryEncryptedDataKey")) + if (message.recoveryEncryptedDataKey != null && Object.hasOwnProperty.call(message, "recoveryEncryptedDataKey")) if (!(message.recoveryEncryptedDataKey && typeof message.recoveryEncryptedDataKey.length === "number" || $util.isString(message.recoveryEncryptedDataKey))) return "recoveryEncryptedDataKey: buffer expected"; - if (message.recoveryAuthHash != null && message.hasOwnProperty("recoveryAuthHash")) + if (message.recoveryAuthHash != null && Object.hasOwnProperty.call(message, "recoveryAuthHash")) if (!(message.recoveryAuthHash && typeof message.recoveryAuthHash.length === "number" || $util.isString(message.recoveryAuthHash))) return "recoveryAuthHash: buffer expected"; return null; @@ -50109,6 +50411,8 @@ export const Authentication = $root.Authentication = (() => { AccountRecoverySetupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AccountRecoverySetupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AccountRecoverySetupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50160,9 +50464,9 @@ export const Authentication = $root.Authentication = (() => { object.recoveryAuthHash = $util.newBuffer(object.recoveryAuthHash); } } - if (message.recoveryEncryptedDataKey != null && message.hasOwnProperty("recoveryEncryptedDataKey")) + if (message.recoveryEncryptedDataKey != null && Object.hasOwnProperty.call(message, "recoveryEncryptedDataKey")) object.recoveryEncryptedDataKey = options.bytes === String ? $util.base64.encode(message.recoveryEncryptedDataKey, 0, message.recoveryEncryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recoveryEncryptedDataKey) : message.recoveryEncryptedDataKey; - if (message.recoveryAuthHash != null && message.hasOwnProperty("recoveryAuthHash")) + if (message.recoveryAuthHash != null && Object.hasOwnProperty.call(message, "recoveryAuthHash")) object.recoveryAuthHash = options.bytes === String ? $util.base64.encode(message.recoveryAuthHash, 0, message.recoveryAuthHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.recoveryAuthHash) : message.recoveryAuthHash; return object; }; @@ -50329,7 +50633,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ AccountRecoveryVerifyCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50415,7 +50719,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.backupKeyType != null && message.hasOwnProperty("backupKeyType")) + if (message.backupKeyType != null && Object.hasOwnProperty.call(message, "backupKeyType")) switch (message.backupKeyType) { default: return "backupKeyType: enum value expected"; @@ -50423,16 +50727,16 @@ export const Authentication = $root.Authentication = (() => { case 1: break; } - if (message.backupKeyDate != null && message.hasOwnProperty("backupKeyDate")) + if (message.backupKeyDate != null && Object.hasOwnProperty.call(message, "backupKeyDate")) if (!$util.isInteger(message.backupKeyDate) && !(message.backupKeyDate && $util.isInteger(message.backupKeyDate.low) && $util.isInteger(message.backupKeyDate.high))) return "backupKeyDate: integer|Long expected"; - if (message.securityQuestion != null && message.hasOwnProperty("securityQuestion")) + if (message.securityQuestion != null && Object.hasOwnProperty.call(message, "securityQuestion")) if (!$util.isString(message.securityQuestion)) return "securityQuestion: string expected"; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) if (!(message.salt && typeof message.salt.length === "number" || $util.isString(message.salt))) return "salt: buffer expected"; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) if (!$util.isInteger(message.iterations)) return "iterations: integer expected"; return null; @@ -50449,6 +50753,8 @@ export const Authentication = $root.Authentication = (() => { AccountRecoveryVerifyCodeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.AccountRecoveryVerifyCodeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.AccountRecoveryVerifyCodeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50525,20 +50831,20 @@ export const Authentication = $root.Authentication = (() => { } object.iterations = 0; } - if (message.backupKeyType != null && message.hasOwnProperty("backupKeyType")) + if (message.backupKeyType != null && Object.hasOwnProperty.call(message, "backupKeyType")) object.backupKeyType = options.enums === String ? $root.Authentication.BackupKeyType[message.backupKeyType] === undefined ? message.backupKeyType : $root.Authentication.BackupKeyType[message.backupKeyType] : message.backupKeyType; - if (message.backupKeyDate != null && message.hasOwnProperty("backupKeyDate")) + if (message.backupKeyDate != null && Object.hasOwnProperty.call(message, "backupKeyDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.backupKeyDate = typeof message.backupKeyDate === "number" ? BigInt(message.backupKeyDate) : $util.Long.fromBits(message.backupKeyDate.low >>> 0, message.backupKeyDate.high >>> 0, false).toBigInt(); else if (typeof message.backupKeyDate === "number") object.backupKeyDate = options.longs === String ? String(message.backupKeyDate) : message.backupKeyDate; else object.backupKeyDate = options.longs === String ? $util.Long.prototype.toString.call(message.backupKeyDate) : options.longs === Number ? new $util.LongBits(message.backupKeyDate.low >>> 0, message.backupKeyDate.high >>> 0).toNumber() : message.backupKeyDate; - if (message.securityQuestion != null && message.hasOwnProperty("securityQuestion")) + if (message.securityQuestion != null && Object.hasOwnProperty.call(message, "securityQuestion")) object.securityQuestion = message.securityQuestion; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) object.salt = options.bytes === String ? $util.base64.encode(message.salt, 0, message.salt.length) : options.bytes === Array ? Array.prototype.slice.call(message.salt) : message.salt; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) object.iterations = message.iterations; return object; }; @@ -50647,7 +50953,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EmergencyAccessLoginRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50717,7 +51023,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (!$util.isString(message.owner)) return "owner: string expected"; return null; @@ -50734,6 +51040,8 @@ export const Authentication = $root.Authentication = (() => { EmergencyAccessLoginRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EmergencyAccessLoginRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EmergencyAccessLoginRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50763,7 +51071,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.owner = ""; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; return object; }; @@ -50905,7 +51213,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ EmergencyAccessLoginResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50987,20 +51295,20 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) if (!(message.sessionToken && typeof message.sessionToken.length === "number" || $util.isString(message.sessionToken))) return "sessionToken: buffer expected"; - if (message.dataKey != null && message.hasOwnProperty("dataKey")) { + if (message.dataKey != null && Object.hasOwnProperty.call(message, "dataKey")) { let error = $root.Enterprise.TypedKey.verify(message.dataKey, long + 1); if (error) return "dataKey." + error; } - if (message.rsaPrivateKey != null && message.hasOwnProperty("rsaPrivateKey")) { + if (message.rsaPrivateKey != null && Object.hasOwnProperty.call(message, "rsaPrivateKey")) { let error = $root.Enterprise.TypedKey.verify(message.rsaPrivateKey, long + 1); if (error) return "rsaPrivateKey." + error; } - if (message.eccPrivateKey != null && message.hasOwnProperty("eccPrivateKey")) { + if (message.eccPrivateKey != null && Object.hasOwnProperty.call(message, "eccPrivateKey")) { let error = $root.Enterprise.TypedKey.verify(message.eccPrivateKey, long + 1); if (error) return "eccPrivateKey." + error; @@ -51019,6 +51327,8 @@ export const Authentication = $root.Authentication = (() => { EmergencyAccessLoginResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.EmergencyAccessLoginResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.EmergencyAccessLoginResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51030,17 +51340,17 @@ export const Authentication = $root.Authentication = (() => { else if (object.sessionToken.length >= 0) message.sessionToken = object.sessionToken; if (object.dataKey != null) { - if (typeof object.dataKey !== "object") + if (!$util.isObject(object.dataKey)) throw TypeError(".Authentication.EmergencyAccessLoginResponse.dataKey: object expected"); message.dataKey = $root.Enterprise.TypedKey.fromObject(object.dataKey, long + 1); } if (object.rsaPrivateKey != null) { - if (typeof object.rsaPrivateKey !== "object") + if (!$util.isObject(object.rsaPrivateKey)) throw TypeError(".Authentication.EmergencyAccessLoginResponse.rsaPrivateKey: object expected"); message.rsaPrivateKey = $root.Enterprise.TypedKey.fromObject(object.rsaPrivateKey, long + 1); } if (object.eccPrivateKey != null) { - if (typeof object.eccPrivateKey !== "object") + if (!$util.isObject(object.eccPrivateKey)) throw TypeError(".Authentication.EmergencyAccessLoginResponse.eccPrivateKey: object expected"); message.eccPrivateKey = $root.Enterprise.TypedKey.fromObject(object.eccPrivateKey, long + 1); } @@ -51076,13 +51386,13 @@ export const Authentication = $root.Authentication = (() => { object.rsaPrivateKey = null; object.eccPrivateKey = null; } - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) object.sessionToken = options.bytes === String ? $util.base64.encode(message.sessionToken, 0, message.sessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.sessionToken) : message.sessionToken; - if (message.dataKey != null && message.hasOwnProperty("dataKey")) + if (message.dataKey != null && Object.hasOwnProperty.call(message, "dataKey")) object.dataKey = $root.Enterprise.TypedKey.toObject(message.dataKey, options, q + 1); - if (message.rsaPrivateKey != null && message.hasOwnProperty("rsaPrivateKey")) + if (message.rsaPrivateKey != null && Object.hasOwnProperty.call(message, "rsaPrivateKey")) object.rsaPrivateKey = $root.Enterprise.TypedKey.toObject(message.rsaPrivateKey, options, q + 1); - if (message.eccPrivateKey != null && message.hasOwnProperty("eccPrivateKey")) + if (message.eccPrivateKey != null && Object.hasOwnProperty.call(message, "eccPrivateKey")) object.eccPrivateKey = $root.Enterprise.TypedKey.toObject(message.eccPrivateKey, options, q + 1); return object; }; @@ -51266,7 +51576,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UserTeamKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51356,22 +51666,22 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedTeamKeyRSA != null && message.hasOwnProperty("encryptedTeamKeyRSA")) + if (message.encryptedTeamKeyRSA != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyRSA")) if (!(message.encryptedTeamKeyRSA && typeof message.encryptedTeamKeyRSA.length === "number" || $util.isString(message.encryptedTeamKeyRSA))) return "encryptedTeamKeyRSA: buffer expected"; - if (message.encryptedTeamKeyEC != null && message.hasOwnProperty("encryptedTeamKeyEC")) + if (message.encryptedTeamKeyEC != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyEC")) if (!(message.encryptedTeamKeyEC && typeof message.encryptedTeamKeyEC.length === "number" || $util.isString(message.encryptedTeamKeyEC))) return "encryptedTeamKeyEC: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -51396,6 +51706,8 @@ export const Authentication = $root.Authentication = (() => { UserTeamKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UserTeamKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UserTeamKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51505,22 +51817,22 @@ export const Authentication = $root.Authentication = (() => { } object.status = options.enums === String ? "SUCCESS" : 0; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedTeamKeyRSA != null && message.hasOwnProperty("encryptedTeamKeyRSA")) + if (message.encryptedTeamKeyRSA != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyRSA")) object.encryptedTeamKeyRSA = options.bytes === String ? $util.base64.encode(message.encryptedTeamKeyRSA, 0, message.encryptedTeamKeyRSA.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamKeyRSA) : message.encryptedTeamKeyRSA; - if (message.encryptedTeamKeyEC != null && message.hasOwnProperty("encryptedTeamKeyEC")) + if (message.encryptedTeamKeyEC != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyEC")) object.encryptedTeamKeyEC = options.bytes === String ? $util.base64.encode(message.encryptedTeamKeyEC, 0, message.encryptedTeamKeyEC.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamKeyEC) : message.encryptedTeamKeyEC; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Authentication.GenericStatus[message.status] === undefined ? message.status : $root.Authentication.GenericStatus[message.status] : message.status; return object; }; @@ -51631,7 +51943,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ GenericRequestResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51703,7 +52015,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.request != null && message.hasOwnProperty("request")) { + if (message.request != null && Object.hasOwnProperty.call(message, "request")) { if (!Array.isArray(message.request)) return "request: array expected"; for (let i = 0; i < message.request.length; ++i) @@ -51724,6 +52036,8 @@ export const Authentication = $root.Authentication = (() => { GenericRequestResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.GenericRequestResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.GenericRequestResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51889,7 +52203,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyRegistrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51959,7 +52273,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.authenticatorAttachment != null && message.hasOwnProperty("authenticatorAttachment")) + if (message.authenticatorAttachment != null && Object.hasOwnProperty.call(message, "authenticatorAttachment")) switch (message.authenticatorAttachment) { default: return "authenticatorAttachment: enum value expected"; @@ -51982,6 +52296,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyRegistrationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyRegistrationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyRegistrationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52029,7 +52345,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.authenticatorAttachment = options.enums === String ? "CROSS_PLATFORM" : 0; - if (message.authenticatorAttachment != null && message.hasOwnProperty("authenticatorAttachment")) + if (message.authenticatorAttachment != null && Object.hasOwnProperty.call(message, "authenticatorAttachment")) object.authenticatorAttachment = options.enums === String ? $root.Authentication.AuthenticatorAttachment[message.authenticatorAttachment] === undefined ? message.authenticatorAttachment : $root.Authentication.AuthenticatorAttachment[message.authenticatorAttachment] : message.authenticatorAttachment; return object; }; @@ -52149,7 +52465,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyRegistrationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52223,10 +52539,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) if (!(message.challengeToken && typeof message.challengeToken.length === "number" || $util.isString(message.challengeToken))) return "challengeToken: buffer expected"; - if (message.pkCreationOptions != null && message.hasOwnProperty("pkCreationOptions")) + if (message.pkCreationOptions != null && Object.hasOwnProperty.call(message, "pkCreationOptions")) if (!$util.isString(message.pkCreationOptions)) return "pkCreationOptions: string expected"; return null; @@ -52243,6 +52559,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyRegistrationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyRegistrationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyRegistrationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52285,9 +52603,9 @@ export const Authentication = $root.Authentication = (() => { } object.pkCreationOptions = ""; } - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) object.challengeToken = options.bytes === String ? $util.base64.encode(message.challengeToken, 0, message.challengeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.challengeToken) : message.challengeToken; - if (message.pkCreationOptions != null && message.hasOwnProperty("pkCreationOptions")) + if (message.pkCreationOptions != null && Object.hasOwnProperty.call(message, "pkCreationOptions")) object.pkCreationOptions = message.pkCreationOptions; return object; }; @@ -52427,7 +52745,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyRegistrationFinalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52506,13 +52824,13 @@ export const Authentication = $root.Authentication = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) if (!(message.challengeToken && typeof message.challengeToken.length === "number" || $util.isString(message.challengeToken))) return "challengeToken: buffer expected"; - if (message.authenticatorResponse != null && message.hasOwnProperty("authenticatorResponse")) + if (message.authenticatorResponse != null && Object.hasOwnProperty.call(message, "authenticatorResponse")) if (!$util.isString(message.authenticatorResponse)) return "authenticatorResponse: string expected"; - if (message.friendlyName != null && message.hasOwnProperty("friendlyName")) { + if (message.friendlyName != null && Object.hasOwnProperty.call(message, "friendlyName")) { properties._friendlyName = 1; if (!$util.isString(message.friendlyName)) return "friendlyName: string expected"; @@ -52531,6 +52849,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyRegistrationFinalization.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyRegistrationFinalization) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyRegistrationFinalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52575,11 +52895,11 @@ export const Authentication = $root.Authentication = (() => { } object.authenticatorResponse = ""; } - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) object.challengeToken = options.bytes === String ? $util.base64.encode(message.challengeToken, 0, message.challengeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.challengeToken) : message.challengeToken; - if (message.authenticatorResponse != null && message.hasOwnProperty("authenticatorResponse")) + if (message.authenticatorResponse != null && Object.hasOwnProperty.call(message, "authenticatorResponse")) object.authenticatorResponse = message.authenticatorResponse; - if (message.friendlyName != null && message.hasOwnProperty("friendlyName")) { + if (message.friendlyName != null && Object.hasOwnProperty.call(message, "friendlyName")) { object.friendlyName = message.friendlyName; if (options.oneofs) object._friendlyName = "friendlyName"; @@ -52775,7 +53095,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyAuthenticationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52866,7 +53186,7 @@ export const Authentication = $root.Authentication = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.authenticatorAttachment != null && message.hasOwnProperty("authenticatorAttachment")) + if (message.authenticatorAttachment != null && Object.hasOwnProperty.call(message, "authenticatorAttachment")) switch (message.authenticatorAttachment) { default: return "authenticatorAttachment: enum value expected"; @@ -52875,7 +53195,7 @@ export const Authentication = $root.Authentication = (() => { case 2: break; } - if (message.passkeyPurpose != null && message.hasOwnProperty("passkeyPurpose")) + if (message.passkeyPurpose != null && Object.hasOwnProperty.call(message, "passkeyPurpose")) switch (message.passkeyPurpose) { default: return "passkeyPurpose: enum value expected"; @@ -52883,18 +53203,18 @@ export const Authentication = $root.Authentication = (() => { case 1: break; } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) { + if (message.username != null && Object.hasOwnProperty.call(message, "username")) { properties._username = 1; if (!$util.isString(message.username)) return "username: string expected"; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) { + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) { properties._encryptedLoginToken = 1; if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; @@ -52913,6 +53233,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyAuthenticationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyAuthenticationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyAuthenticationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53000,20 +53322,20 @@ export const Authentication = $root.Authentication = (() => { object.encryptedDeviceToken = $util.newBuffer(object.encryptedDeviceToken); } } - if (message.authenticatorAttachment != null && message.hasOwnProperty("authenticatorAttachment")) + if (message.authenticatorAttachment != null && Object.hasOwnProperty.call(message, "authenticatorAttachment")) object.authenticatorAttachment = options.enums === String ? $root.Authentication.AuthenticatorAttachment[message.authenticatorAttachment] === undefined ? message.authenticatorAttachment : $root.Authentication.AuthenticatorAttachment[message.authenticatorAttachment] : message.authenticatorAttachment; - if (message.passkeyPurpose != null && message.hasOwnProperty("passkeyPurpose")) + if (message.passkeyPurpose != null && Object.hasOwnProperty.call(message, "passkeyPurpose")) object.passkeyPurpose = options.enums === String ? $root.Authentication.PasskeyPurpose[message.passkeyPurpose] === undefined ? message.passkeyPurpose : $root.Authentication.PasskeyPurpose[message.passkeyPurpose] : message.passkeyPurpose; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.username != null && message.hasOwnProperty("username")) { + if (message.username != null && Object.hasOwnProperty.call(message, "username")) { object.username = message.username; if (options.oneofs) object._username = "username"; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) { + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) { object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; if (options.oneofs) object._encryptedLoginToken = "encryptedLoginToken"; @@ -53156,7 +53478,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyAuthenticationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53235,13 +53557,13 @@ export const Authentication = $root.Authentication = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.pkRequestOptions != null && message.hasOwnProperty("pkRequestOptions")) + if (message.pkRequestOptions != null && Object.hasOwnProperty.call(message, "pkRequestOptions")) if (!$util.isString(message.pkRequestOptions)) return "pkRequestOptions: string expected"; - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) if (!(message.challengeToken && typeof message.challengeToken.length === "number" || $util.isString(message.challengeToken))) return "challengeToken: buffer expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) { + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) { properties._encryptedLoginToken = 1; if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; @@ -53260,6 +53582,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyAuthenticationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyAuthenticationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyAuthenticationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53307,11 +53631,11 @@ export const Authentication = $root.Authentication = (() => { object.challengeToken = $util.newBuffer(object.challengeToken); } } - if (message.pkRequestOptions != null && message.hasOwnProperty("pkRequestOptions")) + if (message.pkRequestOptions != null && Object.hasOwnProperty.call(message, "pkRequestOptions")) object.pkRequestOptions = message.pkRequestOptions; - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) object.challengeToken = options.bytes === String ? $util.base64.encode(message.challengeToken, 0, message.challengeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.challengeToken) : message.challengeToken; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) { + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) { object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; if (options.oneofs) object._encryptedLoginToken = "encryptedLoginToken"; @@ -53465,7 +53789,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyValidationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53548,13 +53872,13 @@ export const Authentication = $root.Authentication = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) if (!(message.challengeToken && typeof message.challengeToken.length === "number" || $util.isString(message.challengeToken))) return "challengeToken: buffer expected"; - if (message.assertionResponse != null && message.hasOwnProperty("assertionResponse")) + if (message.assertionResponse != null && Object.hasOwnProperty.call(message, "assertionResponse")) if (!(message.assertionResponse && typeof message.assertionResponse.length === "number" || $util.isString(message.assertionResponse))) return "assertionResponse: buffer expected"; - if (message.passkeyPurpose != null && message.hasOwnProperty("passkeyPurpose")) + if (message.passkeyPurpose != null && Object.hasOwnProperty.call(message, "passkeyPurpose")) switch (message.passkeyPurpose) { default: return "passkeyPurpose: enum value expected"; @@ -53562,7 +53886,7 @@ export const Authentication = $root.Authentication = (() => { case 1: break; } - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) { + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) { properties._encryptedLoginToken = 1; if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; @@ -53581,6 +53905,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyValidationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyValidationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyValidationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53654,13 +53980,13 @@ export const Authentication = $root.Authentication = (() => { } object.passkeyPurpose = options.enums === String ? "PK_LOGIN" : 0; } - if (message.challengeToken != null && message.hasOwnProperty("challengeToken")) + if (message.challengeToken != null && Object.hasOwnProperty.call(message, "challengeToken")) object.challengeToken = options.bytes === String ? $util.base64.encode(message.challengeToken, 0, message.challengeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.challengeToken) : message.challengeToken; - if (message.assertionResponse != null && message.hasOwnProperty("assertionResponse")) + if (message.assertionResponse != null && Object.hasOwnProperty.call(message, "assertionResponse")) object.assertionResponse = options.bytes === String ? $util.base64.encode(message.assertionResponse, 0, message.assertionResponse.length) : options.bytes === Array ? Array.prototype.slice.call(message.assertionResponse) : message.assertionResponse; - if (message.passkeyPurpose != null && message.hasOwnProperty("passkeyPurpose")) + if (message.passkeyPurpose != null && Object.hasOwnProperty.call(message, "passkeyPurpose")) object.passkeyPurpose = options.enums === String ? $root.Authentication.PasskeyPurpose[message.passkeyPurpose] === undefined ? message.passkeyPurpose : $root.Authentication.PasskeyPurpose[message.passkeyPurpose] : message.passkeyPurpose; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) { + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) { object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; if (options.oneofs) object._encryptedLoginToken = "encryptedLoginToken"; @@ -53783,7 +54109,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyValidationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53857,10 +54183,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.isValid != null && message.hasOwnProperty("isValid")) + if (message.isValid != null && Object.hasOwnProperty.call(message, "isValid")) if (typeof message.isValid !== "boolean") return "isValid: boolean expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; return null; @@ -53877,6 +54203,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyValidationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyValidationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyValidationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53919,9 +54247,9 @@ export const Authentication = $root.Authentication = (() => { object.encryptedLoginToken = $util.newBuffer(object.encryptedLoginToken); } } - if (message.isValid != null && message.hasOwnProperty("isValid")) + if (message.isValid != null && Object.hasOwnProperty.call(message, "isValid")) object.isValid = message.isValid; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; return object; }; @@ -54061,7 +54389,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ UpdatePasskeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54140,13 +54468,13 @@ export const Authentication = $root.Authentication = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.credentialId != null && message.hasOwnProperty("credentialId")) + if (message.credentialId != null && Object.hasOwnProperty.call(message, "credentialId")) if (!(message.credentialId && typeof message.credentialId.length === "number" || $util.isString(message.credentialId))) return "credentialId: buffer expected"; - if (message.friendlyName != null && message.hasOwnProperty("friendlyName")) { + if (message.friendlyName != null && Object.hasOwnProperty.call(message, "friendlyName")) { properties._friendlyName = 1; if (!$util.isString(message.friendlyName)) return "friendlyName: string expected"; @@ -54165,6 +54493,8 @@ export const Authentication = $root.Authentication = (() => { UpdatePasskeyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.UpdatePasskeyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.UpdatePasskeyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -54209,11 +54539,11 @@ export const Authentication = $root.Authentication = (() => { object.credentialId = $util.newBuffer(object.credentialId); } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.credentialId != null && message.hasOwnProperty("credentialId")) + if (message.credentialId != null && Object.hasOwnProperty.call(message, "credentialId")) object.credentialId = options.bytes === String ? $util.base64.encode(message.credentialId, 0, message.credentialId.length) : options.bytes === Array ? Array.prototype.slice.call(message.credentialId) : message.credentialId; - if (message.friendlyName != null && message.hasOwnProperty("friendlyName")) { + if (message.friendlyName != null && Object.hasOwnProperty.call(message, "friendlyName")) { object.friendlyName = message.friendlyName; if (options.oneofs) object._friendlyName = "friendlyName"; @@ -54325,7 +54655,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54395,7 +54725,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.includeDisabled != null && message.hasOwnProperty("includeDisabled")) + if (message.includeDisabled != null && Object.hasOwnProperty.call(message, "includeDisabled")) if (typeof message.includeDisabled !== "boolean") return "includeDisabled: boolean expected"; return null; @@ -54412,6 +54742,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyListRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyListRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyListRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -54441,7 +54773,7 @@ export const Authentication = $root.Authentication = (() => { let object = {}; if (options.defaults) object.includeDisabled = false; - if (message.includeDisabled != null && message.hasOwnProperty("includeDisabled")) + if (message.includeDisabled != null && Object.hasOwnProperty.call(message, "includeDisabled")) object.includeDisabled = message.includeDisabled; return object; }; @@ -54616,7 +54948,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54710,25 +55042,25 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.credentialId != null && message.hasOwnProperty("credentialId")) + if (message.credentialId != null && Object.hasOwnProperty.call(message, "credentialId")) if (!(message.credentialId && typeof message.credentialId.length === "number" || $util.isString(message.credentialId))) return "credentialId: buffer expected"; - if (message.friendlyName != null && message.hasOwnProperty("friendlyName")) + if (message.friendlyName != null && Object.hasOwnProperty.call(message, "friendlyName")) if (!$util.isString(message.friendlyName)) return "friendlyName: string expected"; - if (message.AAGUID != null && message.hasOwnProperty("AAGUID")) + if (message.AAGUID != null && Object.hasOwnProperty.call(message, "AAGUID")) if (!$util.isString(message.AAGUID)) return "AAGUID: string expected"; - if (message.createdAtMillis != null && message.hasOwnProperty("createdAtMillis")) + if (message.createdAtMillis != null && Object.hasOwnProperty.call(message, "createdAtMillis")) if (!$util.isInteger(message.createdAtMillis) && !(message.createdAtMillis && $util.isInteger(message.createdAtMillis.low) && $util.isInteger(message.createdAtMillis.high))) return "createdAtMillis: integer|Long expected"; - if (message.lastUsedMillis != null && message.hasOwnProperty("lastUsedMillis")) + if (message.lastUsedMillis != null && Object.hasOwnProperty.call(message, "lastUsedMillis")) if (!$util.isInteger(message.lastUsedMillis) && !(message.lastUsedMillis && $util.isInteger(message.lastUsedMillis.low) && $util.isInteger(message.lastUsedMillis.high))) return "lastUsedMillis: integer|Long expected"; - if (message.disabledAtMillis != null && message.hasOwnProperty("disabledAtMillis")) + if (message.disabledAtMillis != null && Object.hasOwnProperty.call(message, "disabledAtMillis")) if (!$util.isInteger(message.disabledAtMillis) && !(message.disabledAtMillis && $util.isInteger(message.disabledAtMillis.low) && $util.isInteger(message.disabledAtMillis.high))) return "disabledAtMillis: integer|Long expected"; return null; @@ -54745,6 +55077,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -54835,29 +55169,29 @@ export const Authentication = $root.Authentication = (() => { } else object.disabledAtMillis = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.credentialId != null && message.hasOwnProperty("credentialId")) + if (message.credentialId != null && Object.hasOwnProperty.call(message, "credentialId")) object.credentialId = options.bytes === String ? $util.base64.encode(message.credentialId, 0, message.credentialId.length) : options.bytes === Array ? Array.prototype.slice.call(message.credentialId) : message.credentialId; - if (message.friendlyName != null && message.hasOwnProperty("friendlyName")) + if (message.friendlyName != null && Object.hasOwnProperty.call(message, "friendlyName")) object.friendlyName = message.friendlyName; - if (message.AAGUID != null && message.hasOwnProperty("AAGUID")) + if (message.AAGUID != null && Object.hasOwnProperty.call(message, "AAGUID")) object.AAGUID = message.AAGUID; - if (message.createdAtMillis != null && message.hasOwnProperty("createdAtMillis")) + if (message.createdAtMillis != null && Object.hasOwnProperty.call(message, "createdAtMillis")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.createdAtMillis = typeof message.createdAtMillis === "number" ? BigInt(message.createdAtMillis) : $util.Long.fromBits(message.createdAtMillis.low >>> 0, message.createdAtMillis.high >>> 0, false).toBigInt(); else if (typeof message.createdAtMillis === "number") object.createdAtMillis = options.longs === String ? String(message.createdAtMillis) : message.createdAtMillis; else object.createdAtMillis = options.longs === String ? $util.Long.prototype.toString.call(message.createdAtMillis) : options.longs === Number ? new $util.LongBits(message.createdAtMillis.low >>> 0, message.createdAtMillis.high >>> 0).toNumber() : message.createdAtMillis; - if (message.lastUsedMillis != null && message.hasOwnProperty("lastUsedMillis")) + if (message.lastUsedMillis != null && Object.hasOwnProperty.call(message, "lastUsedMillis")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastUsedMillis = typeof message.lastUsedMillis === "number" ? BigInt(message.lastUsedMillis) : $util.Long.fromBits(message.lastUsedMillis.low >>> 0, message.lastUsedMillis.high >>> 0, false).toBigInt(); else if (typeof message.lastUsedMillis === "number") object.lastUsedMillis = options.longs === String ? String(message.lastUsedMillis) : message.lastUsedMillis; else object.lastUsedMillis = options.longs === String ? $util.Long.prototype.toString.call(message.lastUsedMillis) : options.longs === Number ? new $util.LongBits(message.lastUsedMillis.low >>> 0, message.lastUsedMillis.high >>> 0).toNumber() : message.lastUsedMillis; - if (message.disabledAtMillis != null && message.hasOwnProperty("disabledAtMillis")) + if (message.disabledAtMillis != null && Object.hasOwnProperty.call(message, "disabledAtMillis")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.disabledAtMillis = typeof message.disabledAtMillis === "number" ? BigInt(message.disabledAtMillis) : $util.Long.fromBits(message.disabledAtMillis.low >>> 0, message.disabledAtMillis.high >>> 0, false).toBigInt(); else if (typeof message.disabledAtMillis === "number") @@ -54973,7 +55307,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55045,7 +55379,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.passkeyInfo != null && message.hasOwnProperty("passkeyInfo")) { + if (message.passkeyInfo != null && Object.hasOwnProperty.call(message, "passkeyInfo")) { if (!Array.isArray(message.passkeyInfo)) return "passkeyInfo: array expected"; for (let i = 0; i < message.passkeyInfo.length; ++i) { @@ -55068,6 +55402,8 @@ export const Authentication = $root.Authentication = (() => { PasskeyListResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.PasskeyListResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.PasskeyListResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55078,7 +55414,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.PasskeyListResponse.passkeyInfo: array expected"); message.passkeyInfo = []; for (let i = 0; i < object.passkeyInfo.length; ++i) { - if (typeof object.passkeyInfo[i] !== "object") + if (!$util.isObject(object.passkeyInfo[i])) throw TypeError(".Authentication.PasskeyListResponse.passkeyInfo: object expected"); message.passkeyInfo[i] = $root.Authentication.PasskeyInfo.fromObject(object.passkeyInfo[i], long + 1); } @@ -55246,7 +55582,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TranslationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55320,10 +55656,10 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.translationKey != null && message.hasOwnProperty("translationKey")) + if (message.translationKey != null && Object.hasOwnProperty.call(message, "translationKey")) if (!$util.isString(message.translationKey)) return "translationKey: string expected"; - if (message.translationValue != null && message.hasOwnProperty("translationValue")) + if (message.translationValue != null && Object.hasOwnProperty.call(message, "translationValue")) if (!$util.isString(message.translationValue)) return "translationValue: string expected"; return null; @@ -55340,6 +55676,8 @@ export const Authentication = $root.Authentication = (() => { TranslationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TranslationInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TranslationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55373,9 +55711,9 @@ export const Authentication = $root.Authentication = (() => { object.translationKey = ""; object.translationValue = ""; } - if (message.translationKey != null && message.hasOwnProperty("translationKey")) + if (message.translationKey != null && Object.hasOwnProperty.call(message, "translationKey")) object.translationKey = message.translationKey; - if (message.translationValue != null && message.hasOwnProperty("translationValue")) + if (message.translationValue != null && Object.hasOwnProperty.call(message, "translationValue")) object.translationValue = message.translationValue; return object; }; @@ -55486,7 +55824,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TranslationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55558,7 +55896,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.translationKey != null && message.hasOwnProperty("translationKey")) { + if (message.translationKey != null && Object.hasOwnProperty.call(message, "translationKey")) { if (!Array.isArray(message.translationKey)) return "translationKey: array expected"; for (let i = 0; i < message.translationKey.length; ++i) @@ -55579,6 +55917,8 @@ export const Authentication = $root.Authentication = (() => { TranslationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TranslationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TranslationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55727,7 +56067,7 @@ export const Authentication = $root.Authentication = (() => { * @returns {$protobuf.Writer} Writer */ TranslationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55799,7 +56139,7 @@ export const Authentication = $root.Authentication = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.translationInfo != null && message.hasOwnProperty("translationInfo")) { + if (message.translationInfo != null && Object.hasOwnProperty.call(message, "translationInfo")) { if (!Array.isArray(message.translationInfo)) return "translationInfo: array expected"; for (let i = 0; i < message.translationInfo.length; ++i) { @@ -55822,6 +56162,8 @@ export const Authentication = $root.Authentication = (() => { TranslationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Authentication.TranslationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Authentication.TranslationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55832,7 +56174,7 @@ export const Authentication = $root.Authentication = (() => { throw TypeError(".Authentication.TranslationResponse.translationInfo: array expected"); message.translationInfo = []; for (let i = 0; i < object.translationInfo.length; ++i) { - if (typeof object.translationInfo[i] !== "object") + if (!$util.isObject(object.translationInfo[i])) throw TypeError(".Authentication.TranslationResponse.translationInfo: object expected"); message.translationInfo[i] = $root.Authentication.TranslationInfo.fromObject(object.translationInfo[i], long + 1); } @@ -56019,7 +56361,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseKeyPairRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56097,13 +56439,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterprisePublicKey != null && message.hasOwnProperty("enterprisePublicKey")) + if (message.enterprisePublicKey != null && Object.hasOwnProperty.call(message, "enterprisePublicKey")) if (!(message.enterprisePublicKey && typeof message.enterprisePublicKey.length === "number" || $util.isString(message.enterprisePublicKey))) return "enterprisePublicKey: buffer expected"; - if (message.encryptedEnterprisePrivateKey != null && message.hasOwnProperty("encryptedEnterprisePrivateKey")) + if (message.encryptedEnterprisePrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEnterprisePrivateKey")) if (!(message.encryptedEnterprisePrivateKey && typeof message.encryptedEnterprisePrivateKey.length === "number" || $util.isString(message.encryptedEnterprisePrivateKey))) return "encryptedEnterprisePrivateKey: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -56125,6 +56467,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseKeyPairRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseKeyPairRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseKeyPairRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56193,11 +56537,11 @@ export const Enterprise = $root.Enterprise = (() => { } object.keyType = options.enums === String ? "RSA" : 0; } - if (message.enterprisePublicKey != null && message.hasOwnProperty("enterprisePublicKey")) + if (message.enterprisePublicKey != null && Object.hasOwnProperty.call(message, "enterprisePublicKey")) object.enterprisePublicKey = options.bytes === String ? $util.base64.encode(message.enterprisePublicKey, 0, message.enterprisePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterprisePublicKey) : message.enterprisePublicKey; - if (message.encryptedEnterprisePrivateKey != null && message.hasOwnProperty("encryptedEnterprisePrivateKey")) + if (message.encryptedEnterprisePrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEnterprisePrivateKey")) object.encryptedEnterprisePrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedEnterprisePrivateKey, 0, message.encryptedEnterprisePrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedEnterprisePrivateKey) : message.encryptedEnterprisePrivateKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.KeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.KeyType[message.keyType] : message.keyType; return object; }; @@ -56306,7 +56650,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetTeamMemberRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56376,7 +56720,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; return null; @@ -56393,6 +56737,8 @@ export const Enterprise = $root.Enterprise = (() => { GetTeamMemberRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetTeamMemberRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetTeamMemberRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56431,7 +56777,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.teamUid = $util.newBuffer(object.teamUid); } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; return object; }; @@ -56584,7 +56930,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56670,19 +57016,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.enterpriseUsername != null && message.hasOwnProperty("enterpriseUsername")) + if (message.enterpriseUsername != null && Object.hasOwnProperty.call(message, "enterpriseUsername")) if (!$util.isString(message.enterpriseUsername)) return "enterpriseUsername: string expected"; - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) if (typeof message.isShareAdmin !== "boolean") return "isShareAdmin: boolean expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -56699,6 +57045,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56752,20 +57100,20 @@ export const Enterprise = $root.Enterprise = (() => { object.isShareAdmin = false; object.username = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.enterpriseUsername != null && message.hasOwnProperty("enterpriseUsername")) + if (message.enterpriseUsername != null && Object.hasOwnProperty.call(message, "enterpriseUsername")) object.enterpriseUsername = message.enterpriseUsername; - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) object.isShareAdmin = message.isShareAdmin; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -56876,7 +57224,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetTeamMemberResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56948,7 +57296,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUser != null && message.hasOwnProperty("enterpriseUser")) { + if (message.enterpriseUser != null && Object.hasOwnProperty.call(message, "enterpriseUser")) { if (!Array.isArray(message.enterpriseUser)) return "enterpriseUser: array expected"; for (let i = 0; i < message.enterpriseUser.length; ++i) { @@ -56971,6 +57319,8 @@ export const Enterprise = $root.Enterprise = (() => { GetTeamMemberResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetTeamMemberResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetTeamMemberResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56981,7 +57331,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.GetTeamMemberResponse.enterpriseUser: array expected"); message.enterpriseUser = []; for (let i = 0; i < object.enterpriseUser.length; ++i) { - if (typeof object.enterpriseUser[i] !== "object") + if (!$util.isObject(object.enterpriseUser[i])) throw TypeError(".Enterprise.GetTeamMemberResponse.enterpriseUser: object expected"); message.enterpriseUser[i] = $root.Enterprise.EnterpriseUser.fromObject(object.enterpriseUser[i], long + 1); } @@ -57125,7 +57475,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserIds.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57202,7 +57552,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) { + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) { if (!Array.isArray(message.enterpriseUserId)) return "enterpriseUserId: array expected"; for (let i = 0; i < message.enterpriseUserId.length; ++i) @@ -57223,6 +57573,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUserIds.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUserIds) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUserIds: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57392,7 +57744,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterprisePersonalAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57466,10 +57818,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.OBSOLETE_FIELD != null && message.hasOwnProperty("OBSOLETE_FIELD")) + if (message.OBSOLETE_FIELD != null && Object.hasOwnProperty.call(message, "OBSOLETE_FIELD")) if (!(message.OBSOLETE_FIELD && typeof message.OBSOLETE_FIELD.length === "number" || $util.isString(message.OBSOLETE_FIELD))) return "OBSOLETE_FIELD: buffer expected"; return null; @@ -57486,6 +57838,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterprisePersonalAccount.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterprisePersonalAccount) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterprisePersonalAccount: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57528,9 +57882,9 @@ export const Enterprise = $root.Enterprise = (() => { object.OBSOLETE_FIELD = $util.newBuffer(object.OBSOLETE_FIELD); } } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.OBSOLETE_FIELD != null && message.hasOwnProperty("OBSOLETE_FIELD")) + if (message.OBSOLETE_FIELD != null && Object.hasOwnProperty.call(message, "OBSOLETE_FIELD")) object.OBSOLETE_FIELD = options.bytes === String ? $util.base64.encode(message.OBSOLETE_FIELD, 0, message.OBSOLETE_FIELD.length) : options.bytes === Array ? Array.prototype.slice.call(message.OBSOLETE_FIELD) : message.OBSOLETE_FIELD; return object; }; @@ -57661,7 +58015,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EncryptedTeamKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57739,13 +58093,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.encryptedTeamKey != null && message.hasOwnProperty("encryptedTeamKey")) + if (message.encryptedTeamKey != null && Object.hasOwnProperty.call(message, "encryptedTeamKey")) if (!(message.encryptedTeamKey && typeof message.encryptedTeamKey.length === "number" || $util.isString(message.encryptedTeamKey))) return "encryptedTeamKey: buffer expected"; - if (message.force != null && message.hasOwnProperty("force")) + if (message.force != null && Object.hasOwnProperty.call(message, "force")) if (typeof message.force !== "boolean") return "force: boolean expected"; return null; @@ -57762,6 +58116,8 @@ export const Enterprise = $root.Enterprise = (() => { EncryptedTeamKeyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EncryptedTeamKeyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EncryptedTeamKeyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57816,11 +58172,11 @@ export const Enterprise = $root.Enterprise = (() => { } object.force = false; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.encryptedTeamKey != null && message.hasOwnProperty("encryptedTeamKey")) + if (message.encryptedTeamKey != null && Object.hasOwnProperty.call(message, "encryptedTeamKey")) object.encryptedTeamKey = options.bytes === String ? $util.base64.encode(message.encryptedTeamKey, 0, message.encryptedTeamKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamKey) : message.encryptedTeamKey; - if (message.force != null && message.hasOwnProperty("force")) + if (message.force != null && Object.hasOwnProperty.call(message, "force")) object.force = message.force; return object; }; @@ -57940,7 +58296,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ReEncryptedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58014,10 +58370,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!$util.isString(message.data)) return "data: string expected"; return null; @@ -58034,6 +58390,8 @@ export const Enterprise = $root.Enterprise = (() => { ReEncryptedData.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ReEncryptedData) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ReEncryptedData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58078,14 +58436,14 @@ export const Enterprise = $root.Enterprise = (() => { object.id = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.data = ""; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id = typeof message.id === "number" ? BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, false).toBigInt(); else if (typeof message.id === "number") object.id = options.longs === String ? String(message.id) : message.id; else object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = message.data; return object; }; @@ -58205,7 +58563,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ReEncryptedRoleKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58279,10 +58637,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.encryptedRoleKey != null && message.hasOwnProperty("encryptedRoleKey")) + if (message.encryptedRoleKey != null && Object.hasOwnProperty.call(message, "encryptedRoleKey")) if (!(message.encryptedRoleKey && typeof message.encryptedRoleKey.length === "number" || $util.isString(message.encryptedRoleKey))) return "encryptedRoleKey: buffer expected"; return null; @@ -58299,6 +58657,8 @@ export const Enterprise = $root.Enterprise = (() => { ReEncryptedRoleKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ReEncryptedRoleKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ReEncryptedRoleKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58352,14 +58712,14 @@ export const Enterprise = $root.Enterprise = (() => { object.encryptedRoleKey = $util.newBuffer(object.encryptedRoleKey); } } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.encryptedRoleKey != null && message.hasOwnProperty("encryptedRoleKey")) + if (message.encryptedRoleKey != null && Object.hasOwnProperty.call(message, "encryptedRoleKey")) object.encryptedRoleKey = options.bytes === String ? $util.base64.encode(message.encryptedRoleKey, 0, message.encryptedRoleKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRoleKey) : message.encryptedRoleKey; return object; }; @@ -58479,7 +58839,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ReEncryptedUserDataKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58553,10 +58913,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) if (!(message.userEncryptedDataKey && typeof message.userEncryptedDataKey.length === "number" || $util.isString(message.userEncryptedDataKey))) return "userEncryptedDataKey: buffer expected"; return null; @@ -58573,6 +58933,8 @@ export const Enterprise = $root.Enterprise = (() => { ReEncryptedUserDataKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ReEncryptedUserDataKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ReEncryptedUserDataKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58626,14 +58988,14 @@ export const Enterprise = $root.Enterprise = (() => { object.userEncryptedDataKey = $util.newBuffer(object.userEncryptedDataKey); } } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) object.userEncryptedDataKey = options.bytes === String ? $util.base64.encode(message.userEncryptedDataKey, 0, message.userEncryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEncryptedDataKey) : message.userEncryptedDataKey; return object; }; @@ -58820,7 +59182,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ NodeToManagedCompanyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58926,10 +59288,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.companyId != null && message.hasOwnProperty("companyId")) + if (message.companyId != null && Object.hasOwnProperty.call(message, "companyId")) if (!$util.isInteger(message.companyId)) return "companyId: integer expected"; - if (message.nodes != null && message.hasOwnProperty("nodes")) { + if (message.nodes != null && Object.hasOwnProperty.call(message, "nodes")) { if (!Array.isArray(message.nodes)) return "nodes: array expected"; for (let i = 0; i < message.nodes.length; ++i) { @@ -58938,7 +59300,7 @@ export const Enterprise = $root.Enterprise = (() => { return "nodes." + error; } } - if (message.roles != null && message.hasOwnProperty("roles")) { + if (message.roles != null && Object.hasOwnProperty.call(message, "roles")) { if (!Array.isArray(message.roles)) return "roles: array expected"; for (let i = 0; i < message.roles.length; ++i) { @@ -58947,7 +59309,7 @@ export const Enterprise = $root.Enterprise = (() => { return "roles." + error; } } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -58956,7 +59318,7 @@ export const Enterprise = $root.Enterprise = (() => { return "users." + error; } } - if (message.roleKeys != null && message.hasOwnProperty("roleKeys")) { + if (message.roleKeys != null && Object.hasOwnProperty.call(message, "roleKeys")) { if (!Array.isArray(message.roleKeys)) return "roleKeys: array expected"; for (let i = 0; i < message.roleKeys.length; ++i) { @@ -58965,7 +59327,7 @@ export const Enterprise = $root.Enterprise = (() => { return "roleKeys." + error; } } - if (message.teamKeys != null && message.hasOwnProperty("teamKeys")) { + if (message.teamKeys != null && Object.hasOwnProperty.call(message, "teamKeys")) { if (!Array.isArray(message.teamKeys)) return "teamKeys: array expected"; for (let i = 0; i < message.teamKeys.length; ++i) { @@ -58974,7 +59336,7 @@ export const Enterprise = $root.Enterprise = (() => { return "teamKeys." + error; } } - if (message.usersDataKeys != null && message.hasOwnProperty("usersDataKeys")) { + if (message.usersDataKeys != null && Object.hasOwnProperty.call(message, "usersDataKeys")) { if (!Array.isArray(message.usersDataKeys)) return "usersDataKeys: array expected"; for (let i = 0; i < message.usersDataKeys.length; ++i) { @@ -58997,6 +59359,8 @@ export const Enterprise = $root.Enterprise = (() => { NodeToManagedCompanyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.NodeToManagedCompanyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.NodeToManagedCompanyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59009,7 +59373,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.NodeToManagedCompanyRequest.nodes: array expected"); message.nodes = []; for (let i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== "object") + if (!$util.isObject(object.nodes[i])) throw TypeError(".Enterprise.NodeToManagedCompanyRequest.nodes: object expected"); message.nodes[i] = $root.Enterprise.ReEncryptedData.fromObject(object.nodes[i], long + 1); } @@ -59019,7 +59383,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.NodeToManagedCompanyRequest.roles: array expected"); message.roles = []; for (let i = 0; i < object.roles.length; ++i) { - if (typeof object.roles[i] !== "object") + if (!$util.isObject(object.roles[i])) throw TypeError(".Enterprise.NodeToManagedCompanyRequest.roles: object expected"); message.roles[i] = $root.Enterprise.ReEncryptedData.fromObject(object.roles[i], long + 1); } @@ -59029,7 +59393,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.NodeToManagedCompanyRequest.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.NodeToManagedCompanyRequest.users: object expected"); message.users[i] = $root.Enterprise.ReEncryptedData.fromObject(object.users[i], long + 1); } @@ -59039,7 +59403,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.NodeToManagedCompanyRequest.roleKeys: array expected"); message.roleKeys = []; for (let i = 0; i < object.roleKeys.length; ++i) { - if (typeof object.roleKeys[i] !== "object") + if (!$util.isObject(object.roleKeys[i])) throw TypeError(".Enterprise.NodeToManagedCompanyRequest.roleKeys: object expected"); message.roleKeys[i] = $root.Enterprise.ReEncryptedRoleKey.fromObject(object.roleKeys[i], long + 1); } @@ -59049,7 +59413,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.NodeToManagedCompanyRequest.teamKeys: array expected"); message.teamKeys = []; for (let i = 0; i < object.teamKeys.length; ++i) { - if (typeof object.teamKeys[i] !== "object") + if (!$util.isObject(object.teamKeys[i])) throw TypeError(".Enterprise.NodeToManagedCompanyRequest.teamKeys: object expected"); message.teamKeys[i] = $root.Enterprise.EncryptedTeamKeyRequest.fromObject(object.teamKeys[i], long + 1); } @@ -59059,7 +59423,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.NodeToManagedCompanyRequest.usersDataKeys: array expected"); message.usersDataKeys = []; for (let i = 0; i < object.usersDataKeys.length; ++i) { - if (typeof object.usersDataKeys[i] !== "object") + if (!$util.isObject(object.usersDataKeys[i])) throw TypeError(".Enterprise.NodeToManagedCompanyRequest.usersDataKeys: object expected"); message.usersDataKeys[i] = $root.Enterprise.ReEncryptedUserDataKey.fromObject(object.usersDataKeys[i], long + 1); } @@ -59094,7 +59458,7 @@ export const Enterprise = $root.Enterprise = (() => { } if (options.defaults) object.companyId = 0; - if (message.companyId != null && message.hasOwnProperty("companyId")) + if (message.companyId != null && Object.hasOwnProperty.call(message, "companyId")) object.companyId = message.companyId; if (message.nodes && message.nodes.length) { object.nodes = []; @@ -59244,7 +59608,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59318,10 +59682,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; return null; @@ -59338,6 +59702,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59391,14 +59757,14 @@ export const Enterprise = $root.Enterprise = (() => { object.teamUid = $util.newBuffer(object.teamUid); } } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; return object; }; @@ -59509,7 +59875,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleTeams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59581,7 +59947,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleTeam != null && message.hasOwnProperty("roleTeam")) { + if (message.roleTeam != null && Object.hasOwnProperty.call(message, "roleTeam")) { if (!Array.isArray(message.roleTeam)) return "roleTeam: array expected"; for (let i = 0; i < message.roleTeam.length; ++i) { @@ -59604,6 +59970,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleTeams.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleTeams) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleTeams: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59614,7 +59982,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.RoleTeams.roleTeam: array expected"); message.roleTeam = []; for (let i = 0; i < object.roleTeam.length; ++i) { - if (typeof object.roleTeam[i] !== "object") + if (!$util.isObject(object.roleTeam[i])) throw TypeError(".Enterprise.RoleTeams.roleTeam: object expected"); message.roleTeam[i] = $root.Enterprise.RoleTeam.fromObject(object.roleTeam[i], long + 1); } @@ -59766,7 +60134,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsByRole.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59842,10 +60210,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) { + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) { if (!Array.isArray(message.teamUid)) return "teamUid: array expected"; for (let i = 0; i < message.teamUid.length; ++i) @@ -59866,6 +60234,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsByRole.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsByRole) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsByRole: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59918,7 +60288,7 @@ export const Enterprise = $root.Enterprise = (() => { object.roleId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") @@ -60053,7 +60423,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ManagedNodesByRole.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60134,10 +60504,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) { + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) { if (!Array.isArray(message.managedNodeId)) return "managedNodeId: array expected"; for (let i = 0; i < message.managedNodeId.length; ++i) @@ -60158,6 +60528,8 @@ export const Enterprise = $root.Enterprise = (() => { ManagedNodesByRole.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ManagedNodesByRole) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ManagedNodesByRole: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60214,7 +60586,7 @@ export const Enterprise = $root.Enterprise = (() => { object.roleId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") @@ -60371,7 +60743,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUserAddKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60453,16 +60825,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) if (!$util.isString(message.treeKey)) return "treeKey: string expected"; - if (message.roleAdminKey != null && message.hasOwnProperty("roleAdminKey")) + if (message.roleAdminKey != null && Object.hasOwnProperty.call(message, "roleAdminKey")) if (!$util.isString(message.roleAdminKey)) return "roleAdminKey: string expected"; - if (message.typedTreeKey != null && message.hasOwnProperty("typedTreeKey")) { + if (message.typedTreeKey != null && Object.hasOwnProperty.call(message, "typedTreeKey")) { let error = $root.Enterprise.TypedKey.verify(message.typedTreeKey, long + 1); if (error) return "typedTreeKey." + error; @@ -60481,6 +60853,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUserAddKeys.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUserAddKeys) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUserAddKeys: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60500,7 +60874,7 @@ export const Enterprise = $root.Enterprise = (() => { if (object.roleAdminKey != null) message.roleAdminKey = String(object.roleAdminKey); if (object.typedTreeKey != null) { - if (typeof object.typedTreeKey !== "object") + if (!$util.isObject(object.typedTreeKey)) throw TypeError(".Enterprise.RoleUserAddKeys.typedTreeKey: object expected"); message.typedTreeKey = $root.Enterprise.TypedKey.fromObject(object.typedTreeKey, long + 1); } @@ -60534,18 +60908,18 @@ export const Enterprise = $root.Enterprise = (() => { object.roleAdminKey = ""; object.typedTreeKey = null; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) object.treeKey = message.treeKey; - if (message.roleAdminKey != null && message.hasOwnProperty("roleAdminKey")) + if (message.roleAdminKey != null && Object.hasOwnProperty.call(message, "roleAdminKey")) object.roleAdminKey = message.roleAdminKey; - if (message.typedTreeKey != null && message.hasOwnProperty("typedTreeKey")) + if (message.typedTreeKey != null && Object.hasOwnProperty.call(message, "typedTreeKey")) object.typedTreeKey = $root.Enterprise.TypedKey.toObject(message.typedTreeKey, options, q + 1); return object; }; @@ -60667,7 +61041,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUserAdd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60743,10 +61117,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.roleUserAddKeys != null && message.hasOwnProperty("roleUserAddKeys")) { + if (message.roleUserAddKeys != null && Object.hasOwnProperty.call(message, "roleUserAddKeys")) { if (!Array.isArray(message.roleUserAddKeys)) return "roleUserAddKeys: array expected"; for (let i = 0; i < message.roleUserAddKeys.length; ++i) { @@ -60769,6 +61143,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUserAdd.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUserAdd) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUserAdd: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60788,7 +61164,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.RoleUserAdd.roleUserAddKeys: array expected"); message.roleUserAddKeys = []; for (let i = 0; i < object.roleUserAddKeys.length; ++i) { - if (typeof object.roleUserAddKeys[i] !== "object") + if (!$util.isObject(object.roleUserAddKeys[i])) throw TypeError(".Enterprise.RoleUserAdd.roleUserAddKeys: object expected"); message.roleUserAddKeys[i] = $root.Enterprise.RoleUserAddKeys.fromObject(object.roleUserAddKeys[i], long + 1); } @@ -60821,7 +61197,7 @@ export const Enterprise = $root.Enterprise = (() => { object.roleId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") @@ -60942,7 +61318,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUsersAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61014,7 +61390,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleUserAdds != null && message.hasOwnProperty("roleUserAdds")) { + if (message.roleUserAdds != null && Object.hasOwnProperty.call(message, "roleUserAdds")) { if (!Array.isArray(message.roleUserAdds)) return "roleUserAdds: array expected"; for (let i = 0; i < message.roleUserAdds.length; ++i) { @@ -61037,6 +61413,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUsersAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUsersAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUsersAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61047,7 +61425,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.RoleUsersAddRequest.roleUserAdds: array expected"); message.roleUserAdds = []; for (let i = 0; i < object.roleUserAdds.length; ++i) { - if (typeof object.roleUserAdds[i] !== "object") + if (!$util.isObject(object.roleUserAdds[i])) throw TypeError(".Enterprise.RoleUsersAddRequest.roleUserAdds: object expected"); message.roleUserAdds[i] = $root.Enterprise.RoleUserAdd.fromObject(object.roleUserAdds[i], long + 1); } @@ -61249,7 +61627,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUserAddResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61331,13 +61709,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -61353,7 +61731,7 @@ export const Enterprise = $root.Enterprise = (() => { case 9: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -61370,6 +61748,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUserAddResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUserAddResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUserAddResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61477,23 +61857,23 @@ export const Enterprise = $root.Enterprise = (() => { object.status = options.enums === String ? "ROLE_EXISTS" : 0; object.message = ""; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Enterprise.RoleUserModifyStatus[message.status] === undefined ? message.status : $root.Enterprise.RoleUserModifyStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -61604,7 +61984,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUsersAddResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61676,7 +62056,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -61699,6 +62079,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUsersAddResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUsersAddResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUsersAddResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61709,7 +62091,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.RoleUsersAddResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".Enterprise.RoleUsersAddResponse.results: object expected"); message.results[i] = $root.Enterprise.RoleUserAddResult.fromObject(object.results[i], long + 1); } @@ -61864,7 +62246,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUserRemove.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61945,10 +62327,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) @@ -61969,6 +62351,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUserRemove.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUserRemove) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUserRemove: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62025,7 +62409,7 @@ export const Enterprise = $root.Enterprise = (() => { object.roleId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") @@ -62151,7 +62535,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUsersRemoveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62223,7 +62607,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleUserRemoves != null && message.hasOwnProperty("roleUserRemoves")) { + if (message.roleUserRemoves != null && Object.hasOwnProperty.call(message, "roleUserRemoves")) { if (!Array.isArray(message.roleUserRemoves)) return "roleUserRemoves: array expected"; for (let i = 0; i < message.roleUserRemoves.length; ++i) { @@ -62246,6 +62630,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUsersRemoveRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUsersRemoveRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUsersRemoveRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62256,7 +62642,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.RoleUsersRemoveRequest.roleUserRemoves: array expected"); message.roleUserRemoves = []; for (let i = 0; i < object.roleUserRemoves.length; ++i) { - if (typeof object.roleUserRemoves[i] !== "object") + if (!$util.isObject(object.roleUserRemoves[i])) throw TypeError(".Enterprise.RoleUsersRemoveRequest.roleUserRemoves: object expected"); message.roleUserRemoves[i] = $root.Enterprise.RoleUserRemove.fromObject(object.roleUserRemoves[i], long + 1); } @@ -62428,7 +62814,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUserRemoveResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62510,13 +62896,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -62532,7 +62918,7 @@ export const Enterprise = $root.Enterprise = (() => { case 9: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -62549,6 +62935,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUserRemoveResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUserRemoveResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUserRemoveResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62656,23 +63044,23 @@ export const Enterprise = $root.Enterprise = (() => { object.status = options.enums === String ? "ROLE_EXISTS" : 0; object.message = ""; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Enterprise.RoleUserModifyStatus[message.status] === undefined ? message.status : $root.Enterprise.RoleUserModifyStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -62783,7 +63171,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUsersRemoveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62855,7 +63243,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -62878,6 +63266,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUsersRemoveResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUsersRemoveResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUsersRemoveResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62888,7 +63278,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.RoleUsersRemoveResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".Enterprise.RoleUsersRemoveResponse.results: object expected"); message.results[i] = $root.Enterprise.RoleUserRemoveResult.fromObject(object.results[i], long + 1); } @@ -63206,7 +63596,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseRegistration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63336,33 +63726,33 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) if (!(message.encryptedTreeKey && typeof message.encryptedTreeKey.length === "number" || $util.isString(message.encryptedTreeKey))) return "encryptedTreeKey: buffer expected"; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) if (!$util.isString(message.enterpriseName)) return "enterpriseName: string expected"; - if (message.rootNodeData != null && message.hasOwnProperty("rootNodeData")) + if (message.rootNodeData != null && Object.hasOwnProperty.call(message, "rootNodeData")) if (!(message.rootNodeData && typeof message.rootNodeData.length === "number" || $util.isString(message.rootNodeData))) return "rootNodeData: buffer expected"; - if (message.adminUserData != null && message.hasOwnProperty("adminUserData")) + if (message.adminUserData != null && Object.hasOwnProperty.call(message, "adminUserData")) if (!(message.adminUserData && typeof message.adminUserData.length === "number" || $util.isString(message.adminUserData))) return "adminUserData: buffer expected"; - if (message.adminName != null && message.hasOwnProperty("adminName")) + if (message.adminName != null && Object.hasOwnProperty.call(message, "adminName")) if (!$util.isString(message.adminName)) return "adminName: string expected"; - if (message.roleData != null && message.hasOwnProperty("roleData")) + if (message.roleData != null && Object.hasOwnProperty.call(message, "roleData")) if (!(message.roleData && typeof message.roleData.length === "number" || $util.isString(message.roleData))) return "roleData: buffer expected"; - if (message.rsaKeyPair != null && message.hasOwnProperty("rsaKeyPair")) { + if (message.rsaKeyPair != null && Object.hasOwnProperty.call(message, "rsaKeyPair")) { let error = $root.Enterprise.EnterpriseKeyPairRequest.verify(message.rsaKeyPair, long + 1); if (error) return "rsaKeyPair." + error; } - if (message.numberSeats != null && message.hasOwnProperty("numberSeats")) + if (message.numberSeats != null && Object.hasOwnProperty.call(message, "numberSeats")) if (!$util.isInteger(message.numberSeats)) return "numberSeats: integer expected"; - if (message.enterpriseType != null && message.hasOwnProperty("enterpriseType")) + if (message.enterpriseType != null && Object.hasOwnProperty.call(message, "enterpriseType")) switch (message.enterpriseType) { default: return "enterpriseType: enum value expected"; @@ -63370,27 +63760,27 @@ export const Enterprise = $root.Enterprise = (() => { case 1: break; } - if (message.rolePublicKey != null && message.hasOwnProperty("rolePublicKey")) + if (message.rolePublicKey != null && Object.hasOwnProperty.call(message, "rolePublicKey")) if (!(message.rolePublicKey && typeof message.rolePublicKey.length === "number" || $util.isString(message.rolePublicKey))) return "rolePublicKey: buffer expected"; - if (message.rolePrivateKeyEncryptedWithRoleKey != null && message.hasOwnProperty("rolePrivateKeyEncryptedWithRoleKey")) + if (message.rolePrivateKeyEncryptedWithRoleKey != null && Object.hasOwnProperty.call(message, "rolePrivateKeyEncryptedWithRoleKey")) if (!(message.rolePrivateKeyEncryptedWithRoleKey && typeof message.rolePrivateKeyEncryptedWithRoleKey.length === "number" || $util.isString(message.rolePrivateKeyEncryptedWithRoleKey))) return "rolePrivateKeyEncryptedWithRoleKey: buffer expected"; - if (message.roleKeyEncryptedWithTreeKey != null && message.hasOwnProperty("roleKeyEncryptedWithTreeKey")) + if (message.roleKeyEncryptedWithTreeKey != null && Object.hasOwnProperty.call(message, "roleKeyEncryptedWithTreeKey")) if (!(message.roleKeyEncryptedWithTreeKey && typeof message.roleKeyEncryptedWithTreeKey.length === "number" || $util.isString(message.roleKeyEncryptedWithTreeKey))) return "roleKeyEncryptedWithTreeKey: buffer expected"; - if (message.eccKeyPair != null && message.hasOwnProperty("eccKeyPair")) { + if (message.eccKeyPair != null && Object.hasOwnProperty.call(message, "eccKeyPair")) { let error = $root.Enterprise.EnterpriseKeyPairRequest.verify(message.eccKeyPair, long + 1); if (error) return "eccKeyPair." + error; } - if (message.allUsersRoleData != null && message.hasOwnProperty("allUsersRoleData")) + if (message.allUsersRoleData != null && Object.hasOwnProperty.call(message, "allUsersRoleData")) if (!(message.allUsersRoleData && typeof message.allUsersRoleData.length === "number" || $util.isString(message.allUsersRoleData))) return "allUsersRoleData: buffer expected"; - if (message.roleKeyEncryptedWithUserPublicKey != null && message.hasOwnProperty("roleKeyEncryptedWithUserPublicKey")) + if (message.roleKeyEncryptedWithUserPublicKey != null && Object.hasOwnProperty.call(message, "roleKeyEncryptedWithUserPublicKey")) if (!(message.roleKeyEncryptedWithUserPublicKey && typeof message.roleKeyEncryptedWithUserPublicKey.length === "number" || $util.isString(message.roleKeyEncryptedWithUserPublicKey))) return "roleKeyEncryptedWithUserPublicKey: buffer expected"; - if (message.approverRoleData != null && message.hasOwnProperty("approverRoleData")) + if (message.approverRoleData != null && Object.hasOwnProperty.call(message, "approverRoleData")) if (!(message.approverRoleData && typeof message.approverRoleData.length === "number" || $util.isString(message.approverRoleData))) return "approverRoleData: buffer expected"; return null; @@ -63407,6 +63797,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseRegistration.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseRegistration) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseRegistration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63437,7 +63829,7 @@ export const Enterprise = $root.Enterprise = (() => { else if (object.roleData.length >= 0) message.roleData = object.roleData; if (object.rsaKeyPair != null) { - if (typeof object.rsaKeyPair !== "object") + if (!$util.isObject(object.rsaKeyPair)) throw TypeError(".Enterprise.EnterpriseRegistration.rsaKeyPair: object expected"); message.rsaKeyPair = $root.Enterprise.EnterpriseKeyPairRequest.fromObject(object.rsaKeyPair, long + 1); } @@ -63475,7 +63867,7 @@ export const Enterprise = $root.Enterprise = (() => { else if (object.roleKeyEncryptedWithTreeKey.length >= 0) message.roleKeyEncryptedWithTreeKey = object.roleKeyEncryptedWithTreeKey; if (object.eccKeyPair != null) { - if (typeof object.eccKeyPair !== "object") + if (!$util.isObject(object.eccKeyPair)) throw TypeError(".Enterprise.EnterpriseRegistration.eccKeyPair: object expected"); message.eccKeyPair = $root.Enterprise.EnterpriseKeyPairRequest.fromObject(object.eccKeyPair, long + 1); } @@ -63592,37 +63984,37 @@ export const Enterprise = $root.Enterprise = (() => { object.approverRoleData = $util.newBuffer(object.approverRoleData); } } - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) object.encryptedTreeKey = options.bytes === String ? $util.base64.encode(message.encryptedTreeKey, 0, message.encryptedTreeKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTreeKey) : message.encryptedTreeKey; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) object.enterpriseName = message.enterpriseName; - if (message.rootNodeData != null && message.hasOwnProperty("rootNodeData")) + if (message.rootNodeData != null && Object.hasOwnProperty.call(message, "rootNodeData")) object.rootNodeData = options.bytes === String ? $util.base64.encode(message.rootNodeData, 0, message.rootNodeData.length) : options.bytes === Array ? Array.prototype.slice.call(message.rootNodeData) : message.rootNodeData; - if (message.adminUserData != null && message.hasOwnProperty("adminUserData")) + if (message.adminUserData != null && Object.hasOwnProperty.call(message, "adminUserData")) object.adminUserData = options.bytes === String ? $util.base64.encode(message.adminUserData, 0, message.adminUserData.length) : options.bytes === Array ? Array.prototype.slice.call(message.adminUserData) : message.adminUserData; - if (message.adminName != null && message.hasOwnProperty("adminName")) + if (message.adminName != null && Object.hasOwnProperty.call(message, "adminName")) object.adminName = message.adminName; - if (message.roleData != null && message.hasOwnProperty("roleData")) + if (message.roleData != null && Object.hasOwnProperty.call(message, "roleData")) object.roleData = options.bytes === String ? $util.base64.encode(message.roleData, 0, message.roleData.length) : options.bytes === Array ? Array.prototype.slice.call(message.roleData) : message.roleData; - if (message.rsaKeyPair != null && message.hasOwnProperty("rsaKeyPair")) + if (message.rsaKeyPair != null && Object.hasOwnProperty.call(message, "rsaKeyPair")) object.rsaKeyPair = $root.Enterprise.EnterpriseKeyPairRequest.toObject(message.rsaKeyPair, options, q + 1); - if (message.numberSeats != null && message.hasOwnProperty("numberSeats")) + if (message.numberSeats != null && Object.hasOwnProperty.call(message, "numberSeats")) object.numberSeats = message.numberSeats; - if (message.enterpriseType != null && message.hasOwnProperty("enterpriseType")) + if (message.enterpriseType != null && Object.hasOwnProperty.call(message, "enterpriseType")) object.enterpriseType = options.enums === String ? $root.Enterprise.EnterpriseType[message.enterpriseType] === undefined ? message.enterpriseType : $root.Enterprise.EnterpriseType[message.enterpriseType] : message.enterpriseType; - if (message.rolePublicKey != null && message.hasOwnProperty("rolePublicKey")) + if (message.rolePublicKey != null && Object.hasOwnProperty.call(message, "rolePublicKey")) object.rolePublicKey = options.bytes === String ? $util.base64.encode(message.rolePublicKey, 0, message.rolePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rolePublicKey) : message.rolePublicKey; - if (message.rolePrivateKeyEncryptedWithRoleKey != null && message.hasOwnProperty("rolePrivateKeyEncryptedWithRoleKey")) + if (message.rolePrivateKeyEncryptedWithRoleKey != null && Object.hasOwnProperty.call(message, "rolePrivateKeyEncryptedWithRoleKey")) object.rolePrivateKeyEncryptedWithRoleKey = options.bytes === String ? $util.base64.encode(message.rolePrivateKeyEncryptedWithRoleKey, 0, message.rolePrivateKeyEncryptedWithRoleKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rolePrivateKeyEncryptedWithRoleKey) : message.rolePrivateKeyEncryptedWithRoleKey; - if (message.roleKeyEncryptedWithTreeKey != null && message.hasOwnProperty("roleKeyEncryptedWithTreeKey")) + if (message.roleKeyEncryptedWithTreeKey != null && Object.hasOwnProperty.call(message, "roleKeyEncryptedWithTreeKey")) object.roleKeyEncryptedWithTreeKey = options.bytes === String ? $util.base64.encode(message.roleKeyEncryptedWithTreeKey, 0, message.roleKeyEncryptedWithTreeKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.roleKeyEncryptedWithTreeKey) : message.roleKeyEncryptedWithTreeKey; - if (message.eccKeyPair != null && message.hasOwnProperty("eccKeyPair")) + if (message.eccKeyPair != null && Object.hasOwnProperty.call(message, "eccKeyPair")) object.eccKeyPair = $root.Enterprise.EnterpriseKeyPairRequest.toObject(message.eccKeyPair, options, q + 1); - if (message.allUsersRoleData != null && message.hasOwnProperty("allUsersRoleData")) + if (message.allUsersRoleData != null && Object.hasOwnProperty.call(message, "allUsersRoleData")) object.allUsersRoleData = options.bytes === String ? $util.base64.encode(message.allUsersRoleData, 0, message.allUsersRoleData.length) : options.bytes === Array ? Array.prototype.slice.call(message.allUsersRoleData) : message.allUsersRoleData; - if (message.roleKeyEncryptedWithUserPublicKey != null && message.hasOwnProperty("roleKeyEncryptedWithUserPublicKey")) + if (message.roleKeyEncryptedWithUserPublicKey != null && Object.hasOwnProperty.call(message, "roleKeyEncryptedWithUserPublicKey")) object.roleKeyEncryptedWithUserPublicKey = options.bytes === String ? $util.base64.encode(message.roleKeyEncryptedWithUserPublicKey, 0, message.roleKeyEncryptedWithUserPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.roleKeyEncryptedWithUserPublicKey) : message.roleKeyEncryptedWithUserPublicKey; - if (message.approverRoleData != null && message.hasOwnProperty("approverRoleData")) + if (message.approverRoleData != null && Object.hasOwnProperty.call(message, "approverRoleData")) object.approverRoleData = options.bytes === String ? $util.base64.encode(message.approverRoleData, 0, message.approverRoleData.length) : options.bytes === Array ? Array.prototype.slice.call(message.approverRoleData) : message.approverRoleData; return object; }; @@ -63742,7 +64134,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DomainPasswordRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63816,10 +64208,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; return null; @@ -63836,6 +64228,8 @@ export const Enterprise = $root.Enterprise = (() => { DomainPasswordRulesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DomainPasswordRulesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DomainPasswordRulesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63869,9 +64263,9 @@ export const Enterprise = $root.Enterprise = (() => { object.username = ""; object.verificationCode = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; return object; }; @@ -64013,7 +64407,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DomainPasswordRulesFields.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64095,16 +64489,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.minimum != null && message.hasOwnProperty("minimum")) + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) if (!$util.isInteger(message.minimum)) return "minimum: integer expected"; - if (message.maximum != null && message.hasOwnProperty("maximum")) + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) if (!$util.isInteger(message.maximum)) return "maximum: integer expected"; - if (message.allowed != null && message.hasOwnProperty("allowed")) + if (message.allowed != null && Object.hasOwnProperty.call(message, "allowed")) if (typeof message.allowed !== "boolean") return "allowed: boolean expected"; return null; @@ -64121,6 +64515,8 @@ export const Enterprise = $root.Enterprise = (() => { DomainPasswordRulesFields.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DomainPasswordRulesFields) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DomainPasswordRulesFields: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64160,13 +64556,13 @@ export const Enterprise = $root.Enterprise = (() => { object.maximum = 0; object.allowed = false; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.minimum != null && message.hasOwnProperty("minimum")) + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) object.minimum = message.minimum; - if (message.maximum != null && message.hasOwnProperty("maximum")) + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) object.maximum = message.maximum; - if (message.allowed != null && message.hasOwnProperty("allowed")) + if (message.allowed != null && Object.hasOwnProperty.call(message, "allowed")) object.allowed = message.allowed; return object; }; @@ -64286,7 +64682,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LoginToMcRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64360,10 +64756,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; return null; @@ -64380,6 +64776,8 @@ export const Enterprise = $root.Enterprise = (() => { LoginToMcRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LoginToMcRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LoginToMcRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64422,9 +64820,9 @@ export const Enterprise = $root.Enterprise = (() => { object.messageSessionUid = $util.newBuffer(object.messageSessionUid); } } - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; return object; }; @@ -64566,7 +64964,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LoginToMcResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64648,16 +65046,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) if (!$util.isString(message.encryptedTreeKey)) return "encryptedTreeKey: string expected"; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) if (!$util.isInteger(message.keyTypeId)) return "keyTypeId: integer expected"; - if (message.forbidKeyType2 != null && message.hasOwnProperty("forbidKeyType2")) + if (message.forbidKeyType2 != null && Object.hasOwnProperty.call(message, "forbidKeyType2")) if (typeof message.forbidKeyType2 !== "boolean") return "forbidKeyType2: boolean expected"; return null; @@ -64674,6 +65072,8 @@ export const Enterprise = $root.Enterprise = (() => { LoginToMcResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LoginToMcResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LoginToMcResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64722,13 +65122,13 @@ export const Enterprise = $root.Enterprise = (() => { object.keyTypeId = 0; object.forbidKeyType2 = false; } - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) object.encryptedTreeKey = message.encryptedTreeKey; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) object.keyTypeId = message.keyTypeId; - if (message.forbidKeyType2 != null && message.hasOwnProperty("forbidKeyType2")) + if (message.forbidKeyType2 != null && Object.hasOwnProperty.call(message, "forbidKeyType2")) object.forbidKeyType2 = message.forbidKeyType2; return object; }; @@ -64839,7 +65239,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DomainPasswordRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64911,7 +65311,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.domainPasswordRulesFields != null && message.hasOwnProperty("domainPasswordRulesFields")) { + if (message.domainPasswordRulesFields != null && Object.hasOwnProperty.call(message, "domainPasswordRulesFields")) { if (!Array.isArray(message.domainPasswordRulesFields)) return "domainPasswordRulesFields: array expected"; for (let i = 0; i < message.domainPasswordRulesFields.length; ++i) { @@ -64934,6 +65334,8 @@ export const Enterprise = $root.Enterprise = (() => { DomainPasswordRulesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DomainPasswordRulesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DomainPasswordRulesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64944,7 +65346,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.DomainPasswordRulesResponse.domainPasswordRulesFields: array expected"); message.domainPasswordRulesFields = []; for (let i = 0; i < object.domainPasswordRulesFields.length; ++i) { - if (typeof object.domainPasswordRulesFields[i] !== "object") + if (!$util.isObject(object.domainPasswordRulesFields[i])) throw TypeError(".Enterprise.DomainPasswordRulesResponse.domainPasswordRulesFields: object expected"); message.domainPasswordRulesFields[i] = $root.Enterprise.DomainPasswordRulesFields.fromObject(object.domainPasswordRulesFields[i], long + 1); } @@ -65116,7 +65518,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ApproveUserDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65198,16 +65600,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) if (!(message.encryptedDeviceDataKey && typeof message.encryptedDeviceDataKey.length === "number" || $util.isString(message.encryptedDeviceDataKey))) return "encryptedDeviceDataKey: buffer expected"; - if (message.denyApproval != null && message.hasOwnProperty("denyApproval")) + if (message.denyApproval != null && Object.hasOwnProperty.call(message, "denyApproval")) if (typeof message.denyApproval !== "boolean") return "denyApproval: boolean expected"; return null; @@ -65224,6 +65626,8 @@ export const Enterprise = $root.Enterprise = (() => { ApproveUserDeviceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ApproveUserDeviceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ApproveUserDeviceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65292,18 +65696,18 @@ export const Enterprise = $root.Enterprise = (() => { } object.denyApproval = false; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.encryptedDeviceDataKey != null && message.hasOwnProperty("encryptedDeviceDataKey")) + if (message.encryptedDeviceDataKey != null && Object.hasOwnProperty.call(message, "encryptedDeviceDataKey")) object.encryptedDeviceDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDeviceDataKey, 0, message.encryptedDeviceDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceDataKey) : message.encryptedDeviceDataKey; - if (message.denyApproval != null && message.hasOwnProperty("denyApproval")) + if (message.denyApproval != null && Object.hasOwnProperty.call(message, "denyApproval")) object.denyApproval = message.denyApproval; return object; }; @@ -65445,7 +65849,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ApproveUserDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65527,16 +65931,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.failed != null && message.hasOwnProperty("failed")) + if (message.failed != null && Object.hasOwnProperty.call(message, "failed")) if (typeof message.failed !== "boolean") return "failed: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -65553,6 +65957,8 @@ export const Enterprise = $root.Enterprise = (() => { ApproveUserDeviceResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ApproveUserDeviceResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ApproveUserDeviceResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65612,18 +66018,18 @@ export const Enterprise = $root.Enterprise = (() => { object.failed = false; object.message = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.failed != null && message.hasOwnProperty("failed")) + if (message.failed != null && Object.hasOwnProperty.call(message, "failed")) object.failed = message.failed; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -65734,7 +66140,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ApproveUserDevicesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65806,7 +66212,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceRequests != null && message.hasOwnProperty("deviceRequests")) { + if (message.deviceRequests != null && Object.hasOwnProperty.call(message, "deviceRequests")) { if (!Array.isArray(message.deviceRequests)) return "deviceRequests: array expected"; for (let i = 0; i < message.deviceRequests.length; ++i) { @@ -65829,6 +66235,8 @@ export const Enterprise = $root.Enterprise = (() => { ApproveUserDevicesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ApproveUserDevicesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ApproveUserDevicesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65839,7 +66247,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ApproveUserDevicesRequest.deviceRequests: array expected"); message.deviceRequests = []; for (let i = 0; i < object.deviceRequests.length; ++i) { - if (typeof object.deviceRequests[i] !== "object") + if (!$util.isObject(object.deviceRequests[i])) throw TypeError(".Enterprise.ApproveUserDevicesRequest.deviceRequests: object expected"); message.deviceRequests[i] = $root.Enterprise.ApproveUserDeviceRequest.fromObject(object.deviceRequests[i], long + 1); } @@ -65980,7 +66388,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ApproveUserDevicesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66052,7 +66460,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceResponses != null && message.hasOwnProperty("deviceResponses")) { + if (message.deviceResponses != null && Object.hasOwnProperty.call(message, "deviceResponses")) { if (!Array.isArray(message.deviceResponses)) return "deviceResponses: array expected"; for (let i = 0; i < message.deviceResponses.length; ++i) { @@ -66075,6 +66483,8 @@ export const Enterprise = $root.Enterprise = (() => { ApproveUserDevicesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ApproveUserDevicesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ApproveUserDevicesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66085,7 +66495,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ApproveUserDevicesResponse.deviceResponses: array expected"); message.deviceResponses = []; for (let i = 0; i < object.deviceResponses.length; ++i) { - if (typeof object.deviceResponses[i] !== "object") + if (!$util.isObject(object.deviceResponses[i])) throw TypeError(".Enterprise.ApproveUserDevicesResponse.deviceResponses: object expected"); message.deviceResponses[i] = $root.Enterprise.ApproveUserDeviceResponse.fromObject(object.deviceResponses[i], long + 1); } @@ -66268,7 +66678,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserDataKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66354,19 +66764,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) if (!(message.userEncryptedDataKey && typeof message.userEncryptedDataKey.length === "number" || $util.isString(message.userEncryptedDataKey))) return "userEncryptedDataKey: buffer expected"; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) if (!$util.isInteger(message.keyTypeId)) return "keyTypeId: integer expected"; - if (message.roleKey != null && message.hasOwnProperty("roleKey")) + if (message.roleKey != null && Object.hasOwnProperty.call(message, "roleKey")) if (!(message.roleKey && typeof message.roleKey.length === "number" || $util.isString(message.roleKey))) return "roleKey: buffer expected"; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) return "privateKey: buffer expected"; return null; @@ -66383,6 +66793,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUserDataKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUserDataKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUserDataKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66463,20 +66875,20 @@ export const Enterprise = $root.Enterprise = (() => { object.privateKey = $util.newBuffer(object.privateKey); } } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) object.userEncryptedDataKey = options.bytes === String ? $util.base64.encode(message.userEncryptedDataKey, 0, message.userEncryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEncryptedDataKey) : message.userEncryptedDataKey; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) object.keyTypeId = message.keyTypeId; - if (message.roleKey != null && message.hasOwnProperty("roleKey")) + if (message.roleKey != null && Object.hasOwnProperty.call(message, "roleKey")) object.roleKey = options.bytes === String ? $util.base64.encode(message.roleKey, 0, message.roleKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.roleKey) : message.roleKey; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; return object; }; @@ -66587,7 +66999,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserDataKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66659,7 +67071,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keys != null && message.hasOwnProperty("keys")) { + if (message.keys != null && Object.hasOwnProperty.call(message, "keys")) { if (!Array.isArray(message.keys)) return "keys: array expected"; for (let i = 0; i < message.keys.length; ++i) { @@ -66682,6 +67094,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUserDataKeys.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUserDataKeys) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUserDataKeys: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66692,7 +67106,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUserDataKeys.keys: array expected"); message.keys = []; for (let i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") + if (!$util.isObject(object.keys[i])) throw TypeError(".Enterprise.EnterpriseUserDataKeys.keys: object expected"); message.keys[i] = $root.Enterprise.EnterpriseUserDataKey.fromObject(object.keys[i], long + 1); } @@ -66853,7 +67267,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserDataKeyLight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66931,13 +67345,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) if (!(message.userEncryptedDataKey && typeof message.userEncryptedDataKey.length === "number" || $util.isString(message.userEncryptedDataKey))) return "userEncryptedDataKey: buffer expected"; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) if (!$util.isInteger(message.keyTypeId)) return "keyTypeId: integer expected"; return null; @@ -66954,6 +67368,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUserDataKeyLight.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUserDataKeyLight) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUserDataKeyLight: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67010,16 +67426,16 @@ export const Enterprise = $root.Enterprise = (() => { } object.keyTypeId = 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) object.userEncryptedDataKey = options.bytes === String ? $util.base64.encode(message.userEncryptedDataKey, 0, message.userEncryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEncryptedDataKey) : message.userEncryptedDataKey; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) object.keyTypeId = message.keyTypeId; return object; }; @@ -67141,7 +67557,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserDataKeysByNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67217,10 +67633,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { + if (message.keys != null && Object.hasOwnProperty.call(message, "keys")) { if (!Array.isArray(message.keys)) return "keys: array expected"; for (let i = 0; i < message.keys.length; ++i) { @@ -67243,6 +67659,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUserDataKeysByNode.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUserDataKeysByNode) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUserDataKeysByNode: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67262,7 +67680,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUserDataKeysByNode.keys: array expected"); message.keys = []; for (let i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") + if (!$util.isObject(object.keys[i])) throw TypeError(".Enterprise.EnterpriseUserDataKeysByNode.keys: object expected"); message.keys[i] = $root.Enterprise.EnterpriseUserDataKeyLight.fromObject(object.keys[i], long + 1); } @@ -67295,7 +67713,7 @@ export const Enterprise = $root.Enterprise = (() => { object.nodeId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.nodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") @@ -67416,7 +67834,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUserDataKeysByNodeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67488,7 +67906,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keys != null && message.hasOwnProperty("keys")) { + if (message.keys != null && Object.hasOwnProperty.call(message, "keys")) { if (!Array.isArray(message.keys)) return "keys: array expected"; for (let i = 0; i < message.keys.length; ++i) { @@ -67511,6 +67929,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUserDataKeysByNodeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUserDataKeysByNodeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUserDataKeysByNodeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67521,7 +67941,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUserDataKeysByNodeResponse.keys: array expected"); message.keys = []; for (let i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") + if (!$util.isObject(object.keys[i])) throw TypeError(".Enterprise.EnterpriseUserDataKeysByNodeResponse.keys: object expected"); message.keys[i] = $root.Enterprise.EnterpriseUserDataKeysByNode.fromObject(object.keys[i], long + 1); } @@ -67660,7 +68080,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67730,7 +68150,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; return null; @@ -67747,6 +68167,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67785,7 +68207,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.continuationToken = $util.newBuffer(object.continuationToken); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; return object; }; @@ -67905,7 +68327,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SpecialProvisioning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67979,10 +68401,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -67999,6 +68421,8 @@ export const Enterprise = $root.Enterprise = (() => { SpecialProvisioning.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SpecialProvisioning) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SpecialProvisioning: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68032,9 +68456,9 @@ export const Enterprise = $root.Enterprise = (() => { object.url = ""; object.name = ""; } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -68209,7 +68633,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GeneralDataEntity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68303,29 +68727,29 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) if (!$util.isString(message.enterpriseName)) return "enterpriseName: string expected"; - if (message.restrictVisibility != null && message.hasOwnProperty("restrictVisibility")) + if (message.restrictVisibility != null && Object.hasOwnProperty.call(message, "restrictVisibility")) if (typeof message.restrictVisibility !== "boolean") return "restrictVisibility: boolean expected"; - if (message.specialProvisioning != null && message.hasOwnProperty("specialProvisioning")) { + if (message.specialProvisioning != null && Object.hasOwnProperty.call(message, "specialProvisioning")) { let error = $root.Enterprise.SpecialProvisioning.verify(message.specialProvisioning, long + 1); if (error) return "specialProvisioning." + error; } - if (message.userPrivilege != null && message.hasOwnProperty("userPrivilege")) { + if (message.userPrivilege != null && Object.hasOwnProperty.call(message, "userPrivilege")) { let error = $root.Enterprise.UserPrivilege.verify(message.userPrivilege, long + 1); if (error) return "userPrivilege." + error; } - if (message.distributor != null && message.hasOwnProperty("distributor")) + if (message.distributor != null && Object.hasOwnProperty.call(message, "distributor")) if (typeof message.distributor !== "boolean") return "distributor: boolean expected"; - if (message.forbidAccountTransfer != null && message.hasOwnProperty("forbidAccountTransfer")) + if (message.forbidAccountTransfer != null && Object.hasOwnProperty.call(message, "forbidAccountTransfer")) if (typeof message.forbidAccountTransfer !== "boolean") return "forbidAccountTransfer: boolean expected"; - if (message.showUserOnboard != null && message.hasOwnProperty("showUserOnboard")) + if (message.showUserOnboard != null && Object.hasOwnProperty.call(message, "showUserOnboard")) if (typeof message.showUserOnboard !== "boolean") return "showUserOnboard: boolean expected"; return null; @@ -68342,6 +68766,8 @@ export const Enterprise = $root.Enterprise = (() => { GeneralDataEntity.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GeneralDataEntity) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GeneralDataEntity: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68352,12 +68778,12 @@ export const Enterprise = $root.Enterprise = (() => { if (object.restrictVisibility != null) message.restrictVisibility = Boolean(object.restrictVisibility); if (object.specialProvisioning != null) { - if (typeof object.specialProvisioning !== "object") + if (!$util.isObject(object.specialProvisioning)) throw TypeError(".Enterprise.GeneralDataEntity.specialProvisioning: object expected"); message.specialProvisioning = $root.Enterprise.SpecialProvisioning.fromObject(object.specialProvisioning, long + 1); } if (object.userPrivilege != null) { - if (typeof object.userPrivilege !== "object") + if (!$util.isObject(object.userPrivilege)) throw TypeError(".Enterprise.GeneralDataEntity.userPrivilege: object expected"); message.userPrivilege = $root.Enterprise.UserPrivilege.fromObject(object.userPrivilege, long + 1); } @@ -68396,19 +68822,19 @@ export const Enterprise = $root.Enterprise = (() => { object.forbidAccountTransfer = false; object.showUserOnboard = false; } - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) object.enterpriseName = message.enterpriseName; - if (message.restrictVisibility != null && message.hasOwnProperty("restrictVisibility")) + if (message.restrictVisibility != null && Object.hasOwnProperty.call(message, "restrictVisibility")) object.restrictVisibility = message.restrictVisibility; - if (message.specialProvisioning != null && message.hasOwnProperty("specialProvisioning")) + if (message.specialProvisioning != null && Object.hasOwnProperty.call(message, "specialProvisioning")) object.specialProvisioning = $root.Enterprise.SpecialProvisioning.toObject(message.specialProvisioning, options, q + 1); - if (message.userPrivilege != null && message.hasOwnProperty("userPrivilege")) + if (message.userPrivilege != null && Object.hasOwnProperty.call(message, "userPrivilege")) object.userPrivilege = $root.Enterprise.UserPrivilege.toObject(message.userPrivilege, options, q + 1); - if (message.distributor != null && message.hasOwnProperty("distributor")) + if (message.distributor != null && Object.hasOwnProperty.call(message, "distributor")) object.distributor = message.distributor; - if (message.forbidAccountTransfer != null && message.hasOwnProperty("forbidAccountTransfer")) + if (message.forbidAccountTransfer != null && Object.hasOwnProperty.call(message, "forbidAccountTransfer")) object.forbidAccountTransfer = message.forbidAccountTransfer; - if (message.showUserOnboard != null && message.hasOwnProperty("showUserOnboard")) + if (message.showUserOnboard != null && Object.hasOwnProperty.call(message, "showUserOnboard")) object.showUserOnboard = message.showUserOnboard; return object; }; @@ -68632,7 +69058,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ Node.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68749,37 +69175,37 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.parentId != null && message.hasOwnProperty("parentId")) + if (message.parentId != null && Object.hasOwnProperty.call(message, "parentId")) if (!$util.isInteger(message.parentId) && !(message.parentId && $util.isInteger(message.parentId.low) && $util.isInteger(message.parentId.high))) return "parentId: integer|Long expected"; - if (message.bridgeId != null && message.hasOwnProperty("bridgeId")) + if (message.bridgeId != null && Object.hasOwnProperty.call(message, "bridgeId")) if (!$util.isInteger(message.bridgeId) && !(message.bridgeId && $util.isInteger(message.bridgeId.low) && $util.isInteger(message.bridgeId.high))) return "bridgeId: integer|Long expected"; - if (message.scimId != null && message.hasOwnProperty("scimId")) + if (message.scimId != null && Object.hasOwnProperty.call(message, "scimId")) if (!$util.isInteger(message.scimId) && !(message.scimId && $util.isInteger(message.scimId.low) && $util.isInteger(message.scimId.high))) return "scimId: integer|Long expected"; - if (message.licenseId != null && message.hasOwnProperty("licenseId")) + if (message.licenseId != null && Object.hasOwnProperty.call(message, "licenseId")) if (!$util.isInteger(message.licenseId) && !(message.licenseId && $util.isInteger(message.licenseId.low) && $util.isInteger(message.licenseId.high))) return "licenseId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; - if (message.duoEnabled != null && message.hasOwnProperty("duoEnabled")) + if (message.duoEnabled != null && Object.hasOwnProperty.call(message, "duoEnabled")) if (typeof message.duoEnabled !== "boolean") return "duoEnabled: boolean expected"; - if (message.rsaEnabled != null && message.hasOwnProperty("rsaEnabled")) + if (message.rsaEnabled != null && Object.hasOwnProperty.call(message, "rsaEnabled")) if (typeof message.rsaEnabled !== "boolean") return "rsaEnabled: boolean expected"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.restrictVisibility != null && message.hasOwnProperty("restrictVisibility")) + if (message.restrictVisibility != null && Object.hasOwnProperty.call(message, "restrictVisibility")) if (typeof message.restrictVisibility !== "boolean") return "restrictVisibility: boolean expected"; - if (message.ssoServiceProviderIds != null && message.hasOwnProperty("ssoServiceProviderIds")) { + if (message.ssoServiceProviderIds != null && Object.hasOwnProperty.call(message, "ssoServiceProviderIds")) { if (!Array.isArray(message.ssoServiceProviderIds)) return "ssoServiceProviderIds: array expected"; for (let i = 0; i < message.ssoServiceProviderIds.length; ++i) @@ -68800,6 +69226,8 @@ export const Enterprise = $root.Enterprise = (() => { Node.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.Node) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.Node: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68939,55 +69367,55 @@ export const Enterprise = $root.Enterprise = (() => { object.ssoServiceProviderId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.restrictVisibility = false; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.parentId != null && message.hasOwnProperty("parentId")) + if (message.parentId != null && Object.hasOwnProperty.call(message, "parentId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.parentId = typeof message.parentId === "number" ? BigInt(message.parentId) : $util.Long.fromBits(message.parentId.low >>> 0, message.parentId.high >>> 0, false).toBigInt(); else if (typeof message.parentId === "number") object.parentId = options.longs === String ? String(message.parentId) : message.parentId; else object.parentId = options.longs === String ? $util.Long.prototype.toString.call(message.parentId) : options.longs === Number ? new $util.LongBits(message.parentId.low >>> 0, message.parentId.high >>> 0).toNumber() : message.parentId; - if (message.bridgeId != null && message.hasOwnProperty("bridgeId")) + if (message.bridgeId != null && Object.hasOwnProperty.call(message, "bridgeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.bridgeId = typeof message.bridgeId === "number" ? BigInt(message.bridgeId) : $util.Long.fromBits(message.bridgeId.low >>> 0, message.bridgeId.high >>> 0, false).toBigInt(); else if (typeof message.bridgeId === "number") object.bridgeId = options.longs === String ? String(message.bridgeId) : message.bridgeId; else object.bridgeId = options.longs === String ? $util.Long.prototype.toString.call(message.bridgeId) : options.longs === Number ? new $util.LongBits(message.bridgeId.low >>> 0, message.bridgeId.high >>> 0).toNumber() : message.bridgeId; - if (message.scimId != null && message.hasOwnProperty("scimId")) + if (message.scimId != null && Object.hasOwnProperty.call(message, "scimId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.scimId = typeof message.scimId === "number" ? BigInt(message.scimId) : $util.Long.fromBits(message.scimId.low >>> 0, message.scimId.high >>> 0, false).toBigInt(); else if (typeof message.scimId === "number") object.scimId = options.longs === String ? String(message.scimId) : message.scimId; else object.scimId = options.longs === String ? $util.Long.prototype.toString.call(message.scimId) : options.longs === Number ? new $util.LongBits(message.scimId.low >>> 0, message.scimId.high >>> 0).toNumber() : message.scimId; - if (message.licenseId != null && message.hasOwnProperty("licenseId")) + if (message.licenseId != null && Object.hasOwnProperty.call(message, "licenseId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.licenseId = typeof message.licenseId === "number" ? BigInt(message.licenseId) : $util.Long.fromBits(message.licenseId.low >>> 0, message.licenseId.high >>> 0, false).toBigInt(); else if (typeof message.licenseId === "number") object.licenseId = options.longs === String ? String(message.licenseId) : message.licenseId; else object.licenseId = options.longs === String ? $util.Long.prototype.toString.call(message.licenseId) : options.longs === Number ? new $util.LongBits(message.licenseId.low >>> 0, message.licenseId.high >>> 0).toNumber() : message.licenseId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; - if (message.duoEnabled != null && message.hasOwnProperty("duoEnabled")) + if (message.duoEnabled != null && Object.hasOwnProperty.call(message, "duoEnabled")) object.duoEnabled = message.duoEnabled; - if (message.rsaEnabled != null && message.hasOwnProperty("rsaEnabled")) + if (message.rsaEnabled != null && Object.hasOwnProperty.call(message, "rsaEnabled")) object.rsaEnabled = message.rsaEnabled; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, false).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber() : message.ssoServiceProviderId; - if (message.restrictVisibility != null && message.hasOwnProperty("restrictVisibility")) + if (message.restrictVisibility != null && Object.hasOwnProperty.call(message, "restrictVisibility")) object.restrictVisibility = message.restrictVisibility; if (message.ssoServiceProviderIds && message.ssoServiceProviderIds.length) { object.ssoServiceProviderIds = []; @@ -69172,7 +69600,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ Role.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69266,25 +69694,25 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) if (!$util.isString(message.keyType)) return "keyType: string expected"; - if (message.visibleBelow != null && message.hasOwnProperty("visibleBelow")) + if (message.visibleBelow != null && Object.hasOwnProperty.call(message, "visibleBelow")) if (typeof message.visibleBelow !== "boolean") return "visibleBelow: boolean expected"; - if (message.newUserInherit != null && message.hasOwnProperty("newUserInherit")) + if (message.newUserInherit != null && Object.hasOwnProperty.call(message, "newUserInherit")) if (typeof message.newUserInherit !== "boolean") return "newUserInherit: boolean expected"; - if (message.roleType != null && message.hasOwnProperty("roleType")) + if (message.roleType != null && Object.hasOwnProperty.call(message, "roleType")) if (!$util.isString(message.roleType)) return "roleType: string expected"; return null; @@ -69301,6 +69729,8 @@ export const Enterprise = $root.Enterprise = (() => { Role.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.Role) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.Role: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69371,29 +69801,29 @@ export const Enterprise = $root.Enterprise = (() => { object.newUserInherit = false; object.roleType = ""; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = message.keyType; - if (message.visibleBelow != null && message.hasOwnProperty("visibleBelow")) + if (message.visibleBelow != null && Object.hasOwnProperty.call(message, "visibleBelow")) object.visibleBelow = message.visibleBelow; - if (message.newUserInherit != null && message.hasOwnProperty("newUserInherit")) + if (message.newUserInherit != null && Object.hasOwnProperty.call(message, "newUserInherit")) object.newUserInherit = message.newUserInherit; - if (message.roleType != null && message.hasOwnProperty("roleType")) + if (message.roleType != null && Object.hasOwnProperty.call(message, "roleType")) object.roleType = message.roleType; return object; }; @@ -69654,7 +70084,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ User.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69772,43 +70202,43 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) if (!$util.isString(message.keyType)) return "keyType: string expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; - if (message.lock != null && message.hasOwnProperty("lock")) + if (message.lock != null && Object.hasOwnProperty.call(message, "lock")) if (!$util.isInteger(message.lock)) return "lock: integer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.accountShareExpiration != null && message.hasOwnProperty("accountShareExpiration")) + if (message.accountShareExpiration != null && Object.hasOwnProperty.call(message, "accountShareExpiration")) if (!$util.isInteger(message.accountShareExpiration) && !(message.accountShareExpiration && $util.isInteger(message.accountShareExpiration.low) && $util.isInteger(message.accountShareExpiration.high))) return "accountShareExpiration: integer|Long expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.tfaEnabled != null && message.hasOwnProperty("tfaEnabled")) + if (message.tfaEnabled != null && Object.hasOwnProperty.call(message, "tfaEnabled")) if (typeof message.tfaEnabled !== "boolean") return "tfaEnabled: boolean expected"; - if (message.transferAcceptanceStatus != null && message.hasOwnProperty("transferAcceptanceStatus")) + if (message.transferAcceptanceStatus != null && Object.hasOwnProperty.call(message, "transferAcceptanceStatus")) switch (message.transferAcceptanceStatus) { default: return "transferAcceptanceStatus: enum value expected"; @@ -69833,6 +70263,8 @@ export const Enterprise = $root.Enterprise = (() => { User.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.User) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.User: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69958,46 +70390,46 @@ export const Enterprise = $root.Enterprise = (() => { object.tfaEnabled = false; object.transferAcceptanceStatus = options.enums === String ? "UNDEFINED" : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = message.keyType; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.lock != null && message.hasOwnProperty("lock")) + if (message.lock != null && Object.hasOwnProperty.call(message, "lock")) object.lock = message.lock; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.accountShareExpiration != null && message.hasOwnProperty("accountShareExpiration")) + if (message.accountShareExpiration != null && Object.hasOwnProperty.call(message, "accountShareExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.accountShareExpiration = typeof message.accountShareExpiration === "number" ? BigInt(message.accountShareExpiration) : $util.Long.fromBits(message.accountShareExpiration.low >>> 0, message.accountShareExpiration.high >>> 0, false).toBigInt(); else if (typeof message.accountShareExpiration === "number") object.accountShareExpiration = options.longs === String ? String(message.accountShareExpiration) : message.accountShareExpiration; else object.accountShareExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.accountShareExpiration) : options.longs === Number ? new $util.LongBits(message.accountShareExpiration.low >>> 0, message.accountShareExpiration.high >>> 0).toNumber() : message.accountShareExpiration; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.tfaEnabled != null && message.hasOwnProperty("tfaEnabled")) + if (message.tfaEnabled != null && Object.hasOwnProperty.call(message, "tfaEnabled")) object.tfaEnabled = message.tfaEnabled; - if (message.transferAcceptanceStatus != null && message.hasOwnProperty("transferAcceptanceStatus")) + if (message.transferAcceptanceStatus != null && Object.hasOwnProperty.call(message, "transferAcceptanceStatus")) object.transferAcceptanceStatus = options.enums === String ? $root.Enterprise.TransferAcceptanceStatus[message.transferAcceptanceStatus] === undefined ? message.transferAcceptanceStatus : $root.Enterprise.TransferAcceptanceStatus[message.transferAcceptanceStatus] : message.transferAcceptanceStatus; return object; }; @@ -70117,7 +70549,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserAlias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70191,10 +70623,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -70211,6 +70643,8 @@ export const Enterprise = $root.Enterprise = (() => { UserAlias.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserAlias) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserAlias: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70255,14 +70689,14 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.username = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -70437,7 +70871,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportMetaData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70531,25 +70965,25 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reportUid != null && message.hasOwnProperty("reportUid")) + if (message.reportUid != null && Object.hasOwnProperty.call(message, "reportUid")) if (!(message.reportUid && typeof message.reportUid.length === "number" || $util.isString(message.reportUid))) return "reportUid: buffer expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.reportName != null && message.hasOwnProperty("reportName")) + if (message.reportName != null && Object.hasOwnProperty.call(message, "reportName")) if (!$util.isString(message.reportName)) return "reportName: string expected"; - if (message.dateGenerated != null && message.hasOwnProperty("dateGenerated")) + if (message.dateGenerated != null && Object.hasOwnProperty.call(message, "dateGenerated")) if (!$util.isInteger(message.dateGenerated) && !(message.dateGenerated && $util.isInteger(message.dateGenerated.low) && $util.isInteger(message.dateGenerated.high))) return "dateGenerated: integer|Long expected"; - if (message.runByName != null && message.hasOwnProperty("runByName")) + if (message.runByName != null && Object.hasOwnProperty.call(message, "runByName")) if (!$util.isString(message.runByName)) return "runByName: string expected"; - if (message.numberOfOwners != null && message.hasOwnProperty("numberOfOwners")) + if (message.numberOfOwners != null && Object.hasOwnProperty.call(message, "numberOfOwners")) if (!$util.isInteger(message.numberOfOwners)) return "numberOfOwners: integer expected"; - if (message.numberOfRecords != null && message.hasOwnProperty("numberOfRecords")) + if (message.numberOfRecords != null && Object.hasOwnProperty.call(message, "numberOfRecords")) if (!$util.isInteger(message.numberOfRecords)) return "numberOfRecords: integer expected"; return null; @@ -70566,6 +71000,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportMetaData.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportMetaData) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportMetaData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70645,29 +71081,29 @@ export const Enterprise = $root.Enterprise = (() => { object.numberOfOwners = 0; object.numberOfRecords = 0; } - if (message.reportUid != null && message.hasOwnProperty("reportUid")) + if (message.reportUid != null && Object.hasOwnProperty.call(message, "reportUid")) object.reportUid = options.bytes === String ? $util.base64.encode(message.reportUid, 0, message.reportUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportUid) : message.reportUid; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.reportName != null && message.hasOwnProperty("reportName")) + if (message.reportName != null && Object.hasOwnProperty.call(message, "reportName")) object.reportName = message.reportName; - if (message.dateGenerated != null && message.hasOwnProperty("dateGenerated")) + if (message.dateGenerated != null && Object.hasOwnProperty.call(message, "dateGenerated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateGenerated = typeof message.dateGenerated === "number" ? BigInt(message.dateGenerated) : $util.Long.fromBits(message.dateGenerated.low >>> 0, message.dateGenerated.high >>> 0, false).toBigInt(); else if (typeof message.dateGenerated === "number") object.dateGenerated = options.longs === String ? String(message.dateGenerated) : message.dateGenerated; else object.dateGenerated = options.longs === String ? $util.Long.prototype.toString.call(message.dateGenerated) : options.longs === Number ? new $util.LongBits(message.dateGenerated.low >>> 0, message.dateGenerated.high >>> 0).toNumber() : message.dateGenerated; - if (message.runByName != null && message.hasOwnProperty("runByName")) + if (message.runByName != null && Object.hasOwnProperty.call(message, "runByName")) object.runByName = message.runByName; - if (message.numberOfOwners != null && message.hasOwnProperty("numberOfOwners")) + if (message.numberOfOwners != null && Object.hasOwnProperty.call(message, "numberOfOwners")) object.numberOfOwners = message.numberOfOwners; - if (message.numberOfRecords != null && message.hasOwnProperty("numberOfRecords")) + if (message.numberOfRecords != null && Object.hasOwnProperty.call(message, "numberOfRecords")) object.numberOfRecords = message.numberOfRecords; return object; }; @@ -70798,7 +71234,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ManagedNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70876,13 +71312,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) if (!$util.isInteger(message.managedNodeId) && !(message.managedNodeId && $util.isInteger(message.managedNodeId.low) && $util.isInteger(message.managedNodeId.high))) return "managedNodeId: integer|Long expected"; - if (message.cascadeNodeManagement != null && message.hasOwnProperty("cascadeNodeManagement")) + if (message.cascadeNodeManagement != null && Object.hasOwnProperty.call(message, "cascadeNodeManagement")) if (typeof message.cascadeNodeManagement !== "boolean") return "cascadeNodeManagement: boolean expected"; return null; @@ -70899,6 +71335,8 @@ export const Enterprise = $root.Enterprise = (() => { ManagedNode.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ManagedNode) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ManagedNode: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70957,21 +71395,21 @@ export const Enterprise = $root.Enterprise = (() => { object.managedNodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.cascadeNodeManagement = false; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.managedNodeId = typeof message.managedNodeId === "number" ? BigInt(message.managedNodeId) : $util.Long.fromBits(message.managedNodeId.low >>> 0, message.managedNodeId.high >>> 0, false).toBigInt(); else if (typeof message.managedNodeId === "number") object.managedNodeId = options.longs === String ? String(message.managedNodeId) : message.managedNodeId; else object.managedNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.managedNodeId) : options.longs === Number ? new $util.LongBits(message.managedNodeId.low >>> 0, message.managedNodeId.high >>> 0).toNumber() : message.managedNodeId; - if (message.cascadeNodeManagement != null && message.hasOwnProperty("cascadeNodeManagement")) + if (message.cascadeNodeManagement != null && Object.hasOwnProperty.call(message, "cascadeNodeManagement")) object.cascadeNodeManagement = message.cascadeNodeManagement; return object; }; @@ -71104,7 +71542,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserManagedNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71184,13 +71622,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.cascadeNodeManagement != null && message.hasOwnProperty("cascadeNodeManagement")) + if (message.cascadeNodeManagement != null && Object.hasOwnProperty.call(message, "cascadeNodeManagement")) if (typeof message.cascadeNodeManagement !== "boolean") return "cascadeNodeManagement: boolean expected"; - if (message.privileges != null && message.hasOwnProperty("privileges")) { + if (message.privileges != null && Object.hasOwnProperty.call(message, "privileges")) { if (!Array.isArray(message.privileges)) return "privileges: array expected"; for (let i = 0; i < message.privileges.length; ++i) @@ -71211,6 +71649,8 @@ export const Enterprise = $root.Enterprise = (() => { UserManagedNode.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserManagedNode) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserManagedNode: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71264,14 +71704,14 @@ export const Enterprise = $root.Enterprise = (() => { object.nodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.cascadeNodeManagement = false; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.cascadeNodeManagement != null && message.hasOwnProperty("cascadeNodeManagement")) + if (message.cascadeNodeManagement != null && Object.hasOwnProperty.call(message, "cascadeNodeManagement")) object.cascadeNodeManagement = message.cascadeNodeManagement; if (message.privileges && message.privileges.length) { object.privileges = []; @@ -71409,7 +71849,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserPrivilege.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71489,7 +71929,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userManagedNodes != null && message.hasOwnProperty("userManagedNodes")) { + if (message.userManagedNodes != null && Object.hasOwnProperty.call(message, "userManagedNodes")) { if (!Array.isArray(message.userManagedNodes)) return "userManagedNodes: array expected"; for (let i = 0; i < message.userManagedNodes.length; ++i) { @@ -71498,10 +71938,10 @@ export const Enterprise = $root.Enterprise = (() => { return "userManagedNodes." + error; } } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; return null; @@ -71518,6 +71958,8 @@ export const Enterprise = $root.Enterprise = (() => { UserPrivilege.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserPrivilege) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserPrivilege: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71528,7 +71970,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.UserPrivilege.userManagedNodes: array expected"); message.userManagedNodes = []; for (let i = 0; i < object.userManagedNodes.length; ++i) { - if (typeof object.userManagedNodes[i] !== "object") + if (!$util.isObject(object.userManagedNodes[i])) throw TypeError(".Enterprise.UserPrivilege.userManagedNodes: object expected"); message.userManagedNodes[i] = $root.Enterprise.UserManagedNode.fromObject(object.userManagedNodes[i], long + 1); } @@ -71579,14 +72021,14 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.userManagedNodes.length; ++j) object.userManagedNodes[j] = $root.Enterprise.UserManagedNode.toObject(message.userManagedNodes[j], options, q + 1); } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; return object; }; @@ -71706,7 +72148,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71780,10 +72222,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -71800,6 +72242,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71855,14 +72299,14 @@ export const Enterprise = $root.Enterprise = (() => { } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -71998,7 +72442,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RolePrivilege.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72076,13 +72520,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) if (!$util.isInteger(message.managedNodeId) && !(message.managedNodeId && $util.isInteger(message.managedNodeId.low) && $util.isInteger(message.managedNodeId.high))) return "managedNodeId: integer|Long expected"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.privilegeType != null && message.hasOwnProperty("privilegeType")) + if (message.privilegeType != null && Object.hasOwnProperty.call(message, "privilegeType")) if (!$util.isString(message.privilegeType)) return "privilegeType: string expected"; return null; @@ -72099,6 +72543,8 @@ export const Enterprise = $root.Enterprise = (() => { RolePrivilege.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RolePrivilege) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RolePrivilege: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72157,21 +72603,21 @@ export const Enterprise = $root.Enterprise = (() => { object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.privilegeType = ""; } - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.managedNodeId = typeof message.managedNodeId === "number" ? BigInt(message.managedNodeId) : $util.Long.fromBits(message.managedNodeId.low >>> 0, message.managedNodeId.high >>> 0, false).toBigInt(); else if (typeof message.managedNodeId === "number") object.managedNodeId = options.longs === String ? String(message.managedNodeId) : message.managedNodeId; else object.managedNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.managedNodeId) : options.longs === Number ? new $util.LongBits(message.managedNodeId.low >>> 0, message.managedNodeId.high >>> 0).toNumber() : message.managedNodeId; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.privilegeType != null && message.hasOwnProperty("privilegeType")) + if (message.privilegeType != null && Object.hasOwnProperty.call(message, "privilegeType")) object.privilegeType = message.privilegeType; return object; }; @@ -72304,7 +72750,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ PrivilegesByManagedNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72384,13 +72830,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) if (!$util.isInteger(message.managedNodeId) && !(message.managedNodeId && $util.isInteger(message.managedNodeId.low) && $util.isInteger(message.managedNodeId.high))) return "managedNodeId: integer|Long expected"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.privileges != null && message.hasOwnProperty("privileges")) { + if (message.privileges != null && Object.hasOwnProperty.call(message, "privileges")) { if (!Array.isArray(message.privileges)) return "privileges: array expected"; for (let i = 0; i < message.privileges.length; ++i) @@ -72411,6 +72857,8 @@ export const Enterprise = $root.Enterprise = (() => { PrivilegesByManagedNode.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.PrivilegesByManagedNode) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.PrivilegesByManagedNode: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72475,14 +72923,14 @@ export const Enterprise = $root.Enterprise = (() => { } else object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.managedNodeId != null && message.hasOwnProperty("managedNodeId")) + if (message.managedNodeId != null && Object.hasOwnProperty.call(message, "managedNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.managedNodeId = typeof message.managedNodeId === "number" ? BigInt(message.managedNodeId) : $util.Long.fromBits(message.managedNodeId.low >>> 0, message.managedNodeId.high >>> 0, false).toBigInt(); else if (typeof message.managedNodeId === "number") object.managedNodeId = options.longs === String ? String(message.managedNodeId) : message.managedNodeId; else object.managedNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.managedNodeId) : options.longs === Number ? new $util.LongBits(message.managedNodeId.low >>> 0, message.managedNodeId.high >>> 0).toNumber() : message.managedNodeId; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") @@ -72623,7 +73071,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleEnforcement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72701,13 +73149,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.enforcementType != null && message.hasOwnProperty("enforcementType")) + if (message.enforcementType != null && Object.hasOwnProperty.call(message, "enforcementType")) if (!$util.isString(message.enforcementType)) return "enforcementType: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -72724,6 +73172,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleEnforcement.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleEnforcement) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleEnforcement: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72771,16 +73221,16 @@ export const Enterprise = $root.Enterprise = (() => { object.enforcementType = ""; object.value = ""; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.enforcementType != null && message.hasOwnProperty("enforcementType")) + if (message.enforcementType != null && Object.hasOwnProperty.call(message, "enforcementType")) object.enforcementType = message.enforcementType; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -72966,7 +73416,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ Team.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73064,28 +73514,28 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.restrictEdit != null && message.hasOwnProperty("restrictEdit")) + if (message.restrictEdit != null && Object.hasOwnProperty.call(message, "restrictEdit")) if (typeof message.restrictEdit !== "boolean") return "restrictEdit: boolean expected"; - if (message.restrictShare != null && message.hasOwnProperty("restrictShare")) + if (message.restrictShare != null && Object.hasOwnProperty.call(message, "restrictShare")) if (typeof message.restrictShare !== "boolean") return "restrictShare: boolean expected"; - if (message.restrictView != null && message.hasOwnProperty("restrictView")) + if (message.restrictView != null && Object.hasOwnProperty.call(message, "restrictView")) if (typeof message.restrictView !== "boolean") return "restrictView: boolean expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; - if (message.encryptedTeamKey != null && message.hasOwnProperty("encryptedTeamKey")) + if (message.encryptedTeamKey != null && Object.hasOwnProperty.call(message, "encryptedTeamKey")) if (!$util.isString(message.encryptedTeamKey)) return "encryptedTeamKey: string expected"; return null; @@ -73102,6 +73552,8 @@ export const Enterprise = $root.Enterprise = (() => { Team.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.Team) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.Team: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73173,26 +73625,26 @@ export const Enterprise = $root.Enterprise = (() => { object.encryptedData = ""; object.encryptedTeamKey = ""; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.restrictEdit != null && message.hasOwnProperty("restrictEdit")) + if (message.restrictEdit != null && Object.hasOwnProperty.call(message, "restrictEdit")) object.restrictEdit = message.restrictEdit; - if (message.restrictShare != null && message.hasOwnProperty("restrictShare")) + if (message.restrictShare != null && Object.hasOwnProperty.call(message, "restrictShare")) object.restrictShare = message.restrictShare; - if (message.restrictView != null && message.hasOwnProperty("restrictView")) + if (message.restrictView != null && Object.hasOwnProperty.call(message, "restrictView")) object.restrictView = message.restrictView; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; - if (message.encryptedTeamKey != null && message.hasOwnProperty("encryptedTeamKey")) + if (message.encryptedTeamKey != null && Object.hasOwnProperty.call(message, "encryptedTeamKey")) object.encryptedTeamKey = message.encryptedTeamKey; return object; }; @@ -73323,7 +73775,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73401,13 +73853,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.userType != null && message.hasOwnProperty("userType")) + if (message.userType != null && Object.hasOwnProperty.call(message, "userType")) if (!$util.isString(message.userType)) return "userType: string expected"; return null; @@ -73424,6 +73876,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73480,16 +73934,16 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.userType = ""; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.userType != null && message.hasOwnProperty("userType")) + if (message.userType != null && Object.hasOwnProperty.call(message, "userType")) object.userType = message.userType; return object; }; @@ -73600,7 +74054,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetDistributorInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73672,7 +74126,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.distributors != null && message.hasOwnProperty("distributors")) { + if (message.distributors != null && Object.hasOwnProperty.call(message, "distributors")) { if (!Array.isArray(message.distributors)) return "distributors: array expected"; for (let i = 0; i < message.distributors.length; ++i) { @@ -73695,6 +74149,8 @@ export const Enterprise = $root.Enterprise = (() => { GetDistributorInfoResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetDistributorInfoResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetDistributorInfoResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73705,7 +74161,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.GetDistributorInfoResponse.distributors: array expected"); message.distributors = []; for (let i = 0; i < object.distributors.length; ++i) { - if (typeof object.distributors[i] !== "object") + if (!$util.isObject(object.distributors[i])) throw TypeError(".Enterprise.GetDistributorInfoResponse.distributors: object expected"); message.distributors[i] = $root.Enterprise.Distributor.fromObject(object.distributors[i], long + 1); } @@ -73857,7 +74313,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ Distributor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73933,10 +74389,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.mspInfos != null && message.hasOwnProperty("mspInfos")) { + if (message.mspInfos != null && Object.hasOwnProperty.call(message, "mspInfos")) { if (!Array.isArray(message.mspInfos)) return "mspInfos: array expected"; for (let i = 0; i < message.mspInfos.length; ++i) { @@ -73959,6 +74415,8 @@ export const Enterprise = $root.Enterprise = (() => { Distributor.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.Distributor) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.Distributor: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73971,7 +74429,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.Distributor.mspInfos: array expected"); message.mspInfos = []; for (let i = 0; i < object.mspInfos.length; ++i) { - if (typeof object.mspInfos[i] !== "object") + if (!$util.isObject(object.mspInfos[i])) throw TypeError(".Enterprise.Distributor.mspInfos: object expected"); message.mspInfos[i] = $root.Enterprise.MspInfo.fromObject(object.mspInfos[i], long + 1); } @@ -74000,7 +74458,7 @@ export const Enterprise = $root.Enterprise = (() => { object.mspInfos = []; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.mspInfos && message.mspInfos.length) { object.mspInfos = []; @@ -74210,7 +74668,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ MspInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74320,33 +74778,33 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) if (!$util.isString(message.enterpriseName)) return "enterpriseName: string expected"; - if (message.allocatedLicenses != null && message.hasOwnProperty("allocatedLicenses")) + if (message.allocatedLicenses != null && Object.hasOwnProperty.call(message, "allocatedLicenses")) if (!$util.isInteger(message.allocatedLicenses)) return "allocatedLicenses: integer expected"; - if (message.allowedMcProducts != null && message.hasOwnProperty("allowedMcProducts")) { + if (message.allowedMcProducts != null && Object.hasOwnProperty.call(message, "allowedMcProducts")) { if (!Array.isArray(message.allowedMcProducts)) return "allowedMcProducts: array expected"; for (let i = 0; i < message.allowedMcProducts.length; ++i) if (!$util.isString(message.allowedMcProducts[i])) return "allowedMcProducts: string[] expected"; } - if (message.allowedAddOns != null && message.hasOwnProperty("allowedAddOns")) { + if (message.allowedAddOns != null && Object.hasOwnProperty.call(message, "allowedAddOns")) { if (!Array.isArray(message.allowedAddOns)) return "allowedAddOns: array expected"; for (let i = 0; i < message.allowedAddOns.length; ++i) if (!$util.isString(message.allowedAddOns[i])) return "allowedAddOns: string[] expected"; } - if (message.maxFilePlanType != null && message.hasOwnProperty("maxFilePlanType")) + if (message.maxFilePlanType != null && Object.hasOwnProperty.call(message, "maxFilePlanType")) if (!$util.isString(message.maxFilePlanType)) return "maxFilePlanType: string expected"; - if (message.managedCompanies != null && message.hasOwnProperty("managedCompanies")) { + if (message.managedCompanies != null && Object.hasOwnProperty.call(message, "managedCompanies")) { if (!Array.isArray(message.managedCompanies)) return "managedCompanies: array expected"; for (let i = 0; i < message.managedCompanies.length; ++i) { @@ -74355,10 +74813,10 @@ export const Enterprise = $root.Enterprise = (() => { return "managedCompanies." + error; } } - if (message.allowUnlimitedLicenses != null && message.hasOwnProperty("allowUnlimitedLicenses")) + if (message.allowUnlimitedLicenses != null && Object.hasOwnProperty.call(message, "allowUnlimitedLicenses")) if (typeof message.allowUnlimitedLicenses !== "boolean") return "allowUnlimitedLicenses: boolean expected"; - if (message.addOns != null && message.hasOwnProperty("addOns")) { + if (message.addOns != null && Object.hasOwnProperty.call(message, "addOns")) { if (!Array.isArray(message.addOns)) return "addOns: array expected"; for (let i = 0; i < message.addOns.length; ++i) { @@ -74381,6 +74839,8 @@ export const Enterprise = $root.Enterprise = (() => { MspInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.MspInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.MspInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74413,7 +74873,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.MspInfo.managedCompanies: array expected"); message.managedCompanies = []; for (let i = 0; i < object.managedCompanies.length; ++i) { - if (typeof object.managedCompanies[i] !== "object") + if (!$util.isObject(object.managedCompanies[i])) throw TypeError(".Enterprise.MspInfo.managedCompanies: object expected"); message.managedCompanies[i] = $root.Enterprise.ManagedCompany.fromObject(object.managedCompanies[i], long + 1); } @@ -74425,7 +74885,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.MspInfo.addOns: array expected"); message.addOns = []; for (let i = 0; i < object.addOns.length; ++i) { - if (typeof object.addOns[i] !== "object") + if (!$util.isObject(object.addOns[i])) throw TypeError(".Enterprise.MspInfo.addOns: object expected"); message.addOns[i] = $root.Enterprise.LicenseAddOn.fromObject(object.addOns[i], long + 1); } @@ -74463,11 +74923,11 @@ export const Enterprise = $root.Enterprise = (() => { object.maxFilePlanType = ""; object.allowUnlimitedLicenses = false; } - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) object.enterpriseName = message.enterpriseName; - if (message.allocatedLicenses != null && message.hasOwnProperty("allocatedLicenses")) + if (message.allocatedLicenses != null && Object.hasOwnProperty.call(message, "allocatedLicenses")) object.allocatedLicenses = message.allocatedLicenses; if (message.allowedMcProducts && message.allowedMcProducts.length) { object.allowedMcProducts = []; @@ -74479,14 +74939,14 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.allowedAddOns.length; ++j) object.allowedAddOns[j] = message.allowedAddOns[j]; } - if (message.maxFilePlanType != null && message.hasOwnProperty("maxFilePlanType")) + if (message.maxFilePlanType != null && Object.hasOwnProperty.call(message, "maxFilePlanType")) object.maxFilePlanType = message.maxFilePlanType; if (message.managedCompanies && message.managedCompanies.length) { object.managedCompanies = []; for (let j = 0; j < message.managedCompanies.length; ++j) object.managedCompanies[j] = $root.Enterprise.ManagedCompany.toObject(message.managedCompanies[j], options, q + 1); } - if (message.allowUnlimitedLicenses != null && message.hasOwnProperty("allowUnlimitedLicenses")) + if (message.allowUnlimitedLicenses != null && Object.hasOwnProperty.call(message, "allowUnlimitedLicenses")) object.allowUnlimitedLicenses = message.allowUnlimitedLicenses; if (message.addOns && message.addOns.length) { object.addOns = []; @@ -74723,7 +75183,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ManagedCompany.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74839,37 +75299,37 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; - if (message.mcEnterpriseName != null && message.hasOwnProperty("mcEnterpriseName")) + if (message.mcEnterpriseName != null && Object.hasOwnProperty.call(message, "mcEnterpriseName")) if (!$util.isString(message.mcEnterpriseName)) return "mcEnterpriseName: string expected"; - if (message.mspNodeId != null && message.hasOwnProperty("mspNodeId")) + if (message.mspNodeId != null && Object.hasOwnProperty.call(message, "mspNodeId")) if (!$util.isInteger(message.mspNodeId) && !(message.mspNodeId && $util.isInteger(message.mspNodeId.low) && $util.isInteger(message.mspNodeId.high))) return "mspNodeId: integer|Long expected"; - if (message.numberOfSeats != null && message.hasOwnProperty("numberOfSeats")) + if (message.numberOfSeats != null && Object.hasOwnProperty.call(message, "numberOfSeats")) if (!$util.isInteger(message.numberOfSeats)) return "numberOfSeats: integer expected"; - if (message.numberOfUsers != null && message.hasOwnProperty("numberOfUsers")) + if (message.numberOfUsers != null && Object.hasOwnProperty.call(message, "numberOfUsers")) if (!$util.isInteger(message.numberOfUsers)) return "numberOfUsers: integer expected"; - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) if (!$util.isString(message.productId)) return "productId: string expected"; - if (message.isExpired != null && message.hasOwnProperty("isExpired")) + if (message.isExpired != null && Object.hasOwnProperty.call(message, "isExpired")) if (typeof message.isExpired !== "boolean") return "isExpired: boolean expected"; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) if (!$util.isString(message.treeKey)) return "treeKey: string expected"; - if (message.treeKeyRole != null && message.hasOwnProperty("treeKeyRole")) + if (message.treeKeyRole != null && Object.hasOwnProperty.call(message, "treeKeyRole")) if (!$util.isInteger(message.treeKeyRole) && !(message.treeKeyRole && $util.isInteger(message.treeKeyRole.low) && $util.isInteger(message.treeKeyRole.high))) return "treeKeyRole: integer|Long expected"; - if (message.filePlanType != null && message.hasOwnProperty("filePlanType")) + if (message.filePlanType != null && Object.hasOwnProperty.call(message, "filePlanType")) if (!$util.isString(message.filePlanType)) return "filePlanType: string expected"; - if (message.addOns != null && message.hasOwnProperty("addOns")) { + if (message.addOns != null && Object.hasOwnProperty.call(message, "addOns")) { if (!Array.isArray(message.addOns)) return "addOns: array expected"; for (let i = 0; i < message.addOns.length; ++i) { @@ -74878,7 +75338,7 @@ export const Enterprise = $root.Enterprise = (() => { return "addOns." + error; } } - if (message.treeKeyTypeId != null && message.hasOwnProperty("treeKeyTypeId")) + if (message.treeKeyTypeId != null && Object.hasOwnProperty.call(message, "treeKeyTypeId")) if (!$util.isInteger(message.treeKeyTypeId)) return "treeKeyTypeId: integer expected"; return null; @@ -74895,6 +75355,8 @@ export const Enterprise = $root.Enterprise = (() => { ManagedCompany.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ManagedCompany) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ManagedCompany: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74939,7 +75401,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ManagedCompany.addOns: array expected"); message.addOns = []; for (let i = 0; i < object.addOns.length; ++i) { - if (typeof object.addOns[i] !== "object") + if (!$util.isObject(object.addOns[i])) throw TypeError(".Enterprise.ManagedCompany.addOns: object expected"); message.addOns[i] = $root.Enterprise.LicenseAddOn.fromObject(object.addOns[i], long + 1); } @@ -74989,42 +75451,42 @@ export const Enterprise = $root.Enterprise = (() => { object.filePlanType = ""; object.treeKeyTypeId = 0; } - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; - if (message.mcEnterpriseName != null && message.hasOwnProperty("mcEnterpriseName")) + if (message.mcEnterpriseName != null && Object.hasOwnProperty.call(message, "mcEnterpriseName")) object.mcEnterpriseName = message.mcEnterpriseName; - if (message.mspNodeId != null && message.hasOwnProperty("mspNodeId")) + if (message.mspNodeId != null && Object.hasOwnProperty.call(message, "mspNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.mspNodeId = typeof message.mspNodeId === "number" ? BigInt(message.mspNodeId) : $util.Long.fromBits(message.mspNodeId.low >>> 0, message.mspNodeId.high >>> 0, false).toBigInt(); else if (typeof message.mspNodeId === "number") object.mspNodeId = options.longs === String ? String(message.mspNodeId) : message.mspNodeId; else object.mspNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.mspNodeId) : options.longs === Number ? new $util.LongBits(message.mspNodeId.low >>> 0, message.mspNodeId.high >>> 0).toNumber() : message.mspNodeId; - if (message.numberOfSeats != null && message.hasOwnProperty("numberOfSeats")) + if (message.numberOfSeats != null && Object.hasOwnProperty.call(message, "numberOfSeats")) object.numberOfSeats = message.numberOfSeats; - if (message.numberOfUsers != null && message.hasOwnProperty("numberOfUsers")) + if (message.numberOfUsers != null && Object.hasOwnProperty.call(message, "numberOfUsers")) object.numberOfUsers = message.numberOfUsers; - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) object.productId = message.productId; - if (message.isExpired != null && message.hasOwnProperty("isExpired")) + if (message.isExpired != null && Object.hasOwnProperty.call(message, "isExpired")) object.isExpired = message.isExpired; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) object.treeKey = message.treeKey; - if (message.treeKeyRole != null && message.hasOwnProperty("treeKeyRole")) + if (message.treeKeyRole != null && Object.hasOwnProperty.call(message, "treeKeyRole")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.treeKeyRole = typeof message.treeKeyRole === "number" ? BigInt(message.treeKeyRole) : $util.Long.fromBits(message.treeKeyRole.low >>> 0, message.treeKeyRole.high >>> 0, false).toBigInt(); else if (typeof message.treeKeyRole === "number") object.treeKeyRole = options.longs === String ? String(message.treeKeyRole) : message.treeKeyRole; else object.treeKeyRole = options.longs === String ? $util.Long.prototype.toString.call(message.treeKeyRole) : options.longs === Number ? new $util.LongBits(message.treeKeyRole.low >>> 0, message.treeKeyRole.high >>> 0).toNumber() : message.treeKeyRole; - if (message.filePlanType != null && message.hasOwnProperty("filePlanType")) + if (message.filePlanType != null && Object.hasOwnProperty.call(message, "filePlanType")) object.filePlanType = message.filePlanType; if (message.addOns && message.addOns.length) { object.addOns = []; for (let j = 0; j < message.addOns.length; ++j) object.addOns[j] = $root.Enterprise.LicenseAddOn.toObject(message.addOns[j], options, q + 1); } - if (message.treeKeyTypeId != null && message.hasOwnProperty("treeKeyTypeId")) + if (message.treeKeyTypeId != null && Object.hasOwnProperty.call(message, "treeKeyTypeId")) object.treeKeyTypeId = message.treeKeyTypeId; return object; }; @@ -75166,7 +75628,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ MSPPool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75248,16 +75710,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) if (!$util.isString(message.productId)) return "productId: string expected"; - if (message.seats != null && message.hasOwnProperty("seats")) + if (message.seats != null && Object.hasOwnProperty.call(message, "seats")) if (!$util.isInteger(message.seats)) return "seats: integer expected"; - if (message.availableSeats != null && message.hasOwnProperty("availableSeats")) + if (message.availableSeats != null && Object.hasOwnProperty.call(message, "availableSeats")) if (!$util.isInteger(message.availableSeats)) return "availableSeats: integer expected"; - if (message.stash != null && message.hasOwnProperty("stash")) + if (message.stash != null && Object.hasOwnProperty.call(message, "stash")) if (!$util.isInteger(message.stash)) return "stash: integer expected"; return null; @@ -75274,6 +75736,8 @@ export const Enterprise = $root.Enterprise = (() => { MSPPool.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.MSPPool) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.MSPPool: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75313,13 +75777,13 @@ export const Enterprise = $root.Enterprise = (() => { object.availableSeats = 0; object.stash = 0; } - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) object.productId = message.productId; - if (message.seats != null && message.hasOwnProperty("seats")) + if (message.seats != null && Object.hasOwnProperty.call(message, "seats")) object.seats = message.seats; - if (message.availableSeats != null && message.hasOwnProperty("availableSeats")) + if (message.availableSeats != null && Object.hasOwnProperty.call(message, "availableSeats")) object.availableSeats = message.availableSeats; - if (message.stash != null && message.hasOwnProperty("stash")) + if (message.stash != null && Object.hasOwnProperty.call(message, "stash")) object.stash = message.stash; return object; }; @@ -75439,7 +75903,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ MSPContact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75513,10 +75977,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) if (!$util.isString(message.enterpriseName)) return "enterpriseName: string expected"; return null; @@ -75533,6 +75997,8 @@ export const Enterprise = $root.Enterprise = (() => { MSPContact.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.MSPContact) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.MSPContact: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75566,9 +76032,9 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseId = 0; object.enterpriseName = ""; } - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.enterpriseName != null && message.hasOwnProperty("enterpriseName")) + if (message.enterpriseName != null && Object.hasOwnProperty.call(message, "enterpriseName")) object.enterpriseName = message.enterpriseName; return object; }; @@ -75798,7 +76264,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LicenseAddOn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75912,40 +76378,40 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; - if (message.isTrial != null && message.hasOwnProperty("isTrial")) + if (message.isTrial != null && Object.hasOwnProperty.call(message, "isTrial")) if (typeof message.isTrial !== "boolean") return "isTrial: boolean expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.seats != null && message.hasOwnProperty("seats")) + if (message.seats != null && Object.hasOwnProperty.call(message, "seats")) if (!$util.isInteger(message.seats)) return "seats: integer expected"; - if (message.activationTime != null && message.hasOwnProperty("activationTime")) + if (message.activationTime != null && Object.hasOwnProperty.call(message, "activationTime")) if (!$util.isInteger(message.activationTime) && !(message.activationTime && $util.isInteger(message.activationTime.low) && $util.isInteger(message.activationTime.high))) return "activationTime: integer|Long expected"; - if (message.includedInProduct != null && message.hasOwnProperty("includedInProduct")) + if (message.includedInProduct != null && Object.hasOwnProperty.call(message, "includedInProduct")) if (typeof message.includedInProduct !== "boolean") return "includedInProduct: boolean expected"; - if (message.apiCallCount != null && message.hasOwnProperty("apiCallCount")) + if (message.apiCallCount != null && Object.hasOwnProperty.call(message, "apiCallCount")) if (!$util.isInteger(message.apiCallCount)) return "apiCallCount: integer expected"; - if (message.tierDescription != null && message.hasOwnProperty("tierDescription")) + if (message.tierDescription != null && Object.hasOwnProperty.call(message, "tierDescription")) if (!$util.isString(message.tierDescription)) return "tierDescription: string expected"; - if (message.seatsAllocated != null && message.hasOwnProperty("seatsAllocated")) + if (message.seatsAllocated != null && Object.hasOwnProperty.call(message, "seatsAllocated")) if (!$util.isInteger(message.seatsAllocated)) return "seatsAllocated: integer expected"; - if (message.nhiTierAddOnId != null && message.hasOwnProperty("nhiTierAddOnId")) + if (message.nhiTierAddOnId != null && Object.hasOwnProperty.call(message, "nhiTierAddOnId")) if (!$util.isInteger(message.nhiTierAddOnId)) return "nhiTierAddOnId: integer expected"; return null; @@ -75962,6 +76428,8 @@ export const Enterprise = $root.Enterprise = (() => { LicenseAddOn.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LicenseAddOn) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LicenseAddOn: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76058,44 +76526,44 @@ export const Enterprise = $root.Enterprise = (() => { object.seatsAllocated = 0; object.nhiTierAddOnId = 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) object.enabled = message.enabled; - if (message.isTrial != null && message.hasOwnProperty("isTrial")) + if (message.isTrial != null && Object.hasOwnProperty.call(message, "isTrial")) object.isTrial = message.isTrial; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.seats != null && message.hasOwnProperty("seats")) + if (message.seats != null && Object.hasOwnProperty.call(message, "seats")) object.seats = message.seats; - if (message.activationTime != null && message.hasOwnProperty("activationTime")) + if (message.activationTime != null && Object.hasOwnProperty.call(message, "activationTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.activationTime = typeof message.activationTime === "number" ? BigInt(message.activationTime) : $util.Long.fromBits(message.activationTime.low >>> 0, message.activationTime.high >>> 0, false).toBigInt(); else if (typeof message.activationTime === "number") object.activationTime = options.longs === String ? String(message.activationTime) : message.activationTime; else object.activationTime = options.longs === String ? $util.Long.prototype.toString.call(message.activationTime) : options.longs === Number ? new $util.LongBits(message.activationTime.low >>> 0, message.activationTime.high >>> 0).toNumber() : message.activationTime; - if (message.includedInProduct != null && message.hasOwnProperty("includedInProduct")) + if (message.includedInProduct != null && Object.hasOwnProperty.call(message, "includedInProduct")) object.includedInProduct = message.includedInProduct; - if (message.apiCallCount != null && message.hasOwnProperty("apiCallCount")) + if (message.apiCallCount != null && Object.hasOwnProperty.call(message, "apiCallCount")) object.apiCallCount = message.apiCallCount; - if (message.tierDescription != null && message.hasOwnProperty("tierDescription")) + if (message.tierDescription != null && Object.hasOwnProperty.call(message, "tierDescription")) object.tierDescription = message.tierDescription; - if (message.seatsAllocated != null && message.hasOwnProperty("seatsAllocated")) + if (message.seatsAllocated != null && Object.hasOwnProperty.call(message, "seatsAllocated")) object.seatsAllocated = message.seatsAllocated; - if (message.nhiTierAddOnId != null && message.hasOwnProperty("nhiTierAddOnId")) + if (message.nhiTierAddOnId != null && Object.hasOwnProperty.call(message, "nhiTierAddOnId")) object.nhiTierAddOnId = message.nhiTierAddOnId; return object; }; @@ -76250,7 +76718,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ MCDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -76338,23 +76806,23 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.mcProduct != null && message.hasOwnProperty("mcProduct")) + if (message.mcProduct != null && Object.hasOwnProperty.call(message, "mcProduct")) if (!$util.isString(message.mcProduct)) return "mcProduct: string expected"; - if (message.addOns != null && message.hasOwnProperty("addOns")) { + if (message.addOns != null && Object.hasOwnProperty.call(message, "addOns")) { if (!Array.isArray(message.addOns)) return "addOns: array expected"; for (let i = 0; i < message.addOns.length; ++i) if (!$util.isString(message.addOns[i])) return "addOns: string[] expected"; } - if (message.filePlanType != null && message.hasOwnProperty("filePlanType")) + if (message.filePlanType != null && Object.hasOwnProperty.call(message, "filePlanType")) if (!$util.isString(message.filePlanType)) return "filePlanType: string expected"; - if (message.maxLicenses != null && message.hasOwnProperty("maxLicenses")) + if (message.maxLicenses != null && Object.hasOwnProperty.call(message, "maxLicenses")) if (!$util.isInteger(message.maxLicenses)) return "maxLicenses: integer expected"; - if (message.fixedMaxLicenses != null && message.hasOwnProperty("fixedMaxLicenses")) + if (message.fixedMaxLicenses != null && Object.hasOwnProperty.call(message, "fixedMaxLicenses")) if (typeof message.fixedMaxLicenses !== "boolean") return "fixedMaxLicenses: boolean expected"; return null; @@ -76371,6 +76839,8 @@ export const Enterprise = $root.Enterprise = (() => { MCDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.MCDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.MCDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76419,18 +76889,18 @@ export const Enterprise = $root.Enterprise = (() => { object.maxLicenses = 0; object.fixedMaxLicenses = false; } - if (message.mcProduct != null && message.hasOwnProperty("mcProduct")) + if (message.mcProduct != null && Object.hasOwnProperty.call(message, "mcProduct")) object.mcProduct = message.mcProduct; if (message.addOns && message.addOns.length) { object.addOns = []; for (let j = 0; j < message.addOns.length; ++j) object.addOns[j] = message.addOns[j]; } - if (message.filePlanType != null && message.hasOwnProperty("filePlanType")) + if (message.filePlanType != null && Object.hasOwnProperty.call(message, "filePlanType")) object.filePlanType = message.filePlanType; - if (message.maxLicenses != null && message.hasOwnProperty("maxLicenses")) + if (message.maxLicenses != null && Object.hasOwnProperty.call(message, "maxLicenses")) object.maxLicenses = message.maxLicenses; - if (message.fixedMaxLicenses != null && message.hasOwnProperty("fixedMaxLicenses")) + if (message.fixedMaxLicenses != null && Object.hasOwnProperty.call(message, "fixedMaxLicenses")) object.fixedMaxLicenses = message.fixedMaxLicenses; return object; }; @@ -76611,7 +77081,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ MSPPermits.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -76711,33 +77181,33 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.restricted != null && message.hasOwnProperty("restricted")) + if (message.restricted != null && Object.hasOwnProperty.call(message, "restricted")) if (typeof message.restricted !== "boolean") return "restricted: boolean expected"; - if (message.maxAllowedLicenses != null && message.hasOwnProperty("maxAllowedLicenses")) + if (message.maxAllowedLicenses != null && Object.hasOwnProperty.call(message, "maxAllowedLicenses")) if (!$util.isInteger(message.maxAllowedLicenses)) return "maxAllowedLicenses: integer expected"; - if (message.allowedMcProducts != null && message.hasOwnProperty("allowedMcProducts")) { + if (message.allowedMcProducts != null && Object.hasOwnProperty.call(message, "allowedMcProducts")) { if (!Array.isArray(message.allowedMcProducts)) return "allowedMcProducts: array expected"; for (let i = 0; i < message.allowedMcProducts.length; ++i) if (!$util.isString(message.allowedMcProducts[i])) return "allowedMcProducts: string[] expected"; } - if (message.allowedAddOns != null && message.hasOwnProperty("allowedAddOns")) { + if (message.allowedAddOns != null && Object.hasOwnProperty.call(message, "allowedAddOns")) { if (!Array.isArray(message.allowedAddOns)) return "allowedAddOns: array expected"; for (let i = 0; i < message.allowedAddOns.length; ++i) if (!$util.isString(message.allowedAddOns[i])) return "allowedAddOns: string[] expected"; } - if (message.maxFilePlanType != null && message.hasOwnProperty("maxFilePlanType")) + if (message.maxFilePlanType != null && Object.hasOwnProperty.call(message, "maxFilePlanType")) if (!$util.isString(message.maxFilePlanType)) return "maxFilePlanType: string expected"; - if (message.allowUnlimitedLicenses != null && message.hasOwnProperty("allowUnlimitedLicenses")) + if (message.allowUnlimitedLicenses != null && Object.hasOwnProperty.call(message, "allowUnlimitedLicenses")) if (typeof message.allowUnlimitedLicenses !== "boolean") return "allowUnlimitedLicenses: boolean expected"; - if (message.mcDefaults != null && message.hasOwnProperty("mcDefaults")) { + if (message.mcDefaults != null && Object.hasOwnProperty.call(message, "mcDefaults")) { if (!Array.isArray(message.mcDefaults)) return "mcDefaults: array expected"; for (let i = 0; i < message.mcDefaults.length; ++i) { @@ -76760,6 +77230,8 @@ export const Enterprise = $root.Enterprise = (() => { MSPPermits.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.MSPPermits) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.MSPPermits: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76792,7 +77264,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.MSPPermits.mcDefaults: array expected"); message.mcDefaults = []; for (let i = 0; i < object.mcDefaults.length; ++i) { - if (typeof object.mcDefaults[i] !== "object") + if (!$util.isObject(object.mcDefaults[i])) throw TypeError(".Enterprise.MSPPermits.mcDefaults: object expected"); message.mcDefaults[i] = $root.Enterprise.MCDefault.fromObject(object.mcDefaults[i], long + 1); } @@ -76828,9 +77300,9 @@ export const Enterprise = $root.Enterprise = (() => { object.maxFilePlanType = ""; object.allowUnlimitedLicenses = false; } - if (message.restricted != null && message.hasOwnProperty("restricted")) + if (message.restricted != null && Object.hasOwnProperty.call(message, "restricted")) object.restricted = message.restricted; - if (message.maxAllowedLicenses != null && message.hasOwnProperty("maxAllowedLicenses")) + if (message.maxAllowedLicenses != null && Object.hasOwnProperty.call(message, "maxAllowedLicenses")) object.maxAllowedLicenses = message.maxAllowedLicenses; if (message.allowedMcProducts && message.allowedMcProducts.length) { object.allowedMcProducts = []; @@ -76842,9 +77314,9 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.allowedAddOns.length; ++j) object.allowedAddOns[j] = message.allowedAddOns[j]; } - if (message.maxFilePlanType != null && message.hasOwnProperty("maxFilePlanType")) + if (message.maxFilePlanType != null && Object.hasOwnProperty.call(message, "maxFilePlanType")) object.maxFilePlanType = message.maxFilePlanType; - if (message.allowUnlimitedLicenses != null && message.hasOwnProperty("allowUnlimitedLicenses")) + if (message.allowUnlimitedLicenses != null && Object.hasOwnProperty.call(message, "allowUnlimitedLicenses")) object.allowUnlimitedLicenses = message.allowUnlimitedLicenses; if (message.mcDefaults && message.mcDefaults.length) { object.mcDefaults = []; @@ -77182,7 +77654,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ License.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -77336,49 +77808,49 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.paid != null && message.hasOwnProperty("paid")) + if (message.paid != null && Object.hasOwnProperty.call(message, "paid")) if (typeof message.paid !== "boolean") return "paid: boolean expected"; - if (message.numberOfSeats != null && message.hasOwnProperty("numberOfSeats")) + if (message.numberOfSeats != null && Object.hasOwnProperty.call(message, "numberOfSeats")) if (!$util.isInteger(message.numberOfSeats)) return "numberOfSeats: integer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.licenseKeyId != null && message.hasOwnProperty("licenseKeyId")) + if (message.licenseKeyId != null && Object.hasOwnProperty.call(message, "licenseKeyId")) if (!$util.isInteger(message.licenseKeyId)) return "licenseKeyId: integer expected"; - if (message.productTypeId != null && message.hasOwnProperty("productTypeId")) + if (message.productTypeId != null && Object.hasOwnProperty.call(message, "productTypeId")) if (!$util.isInteger(message.productTypeId)) return "productTypeId: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.enterpriseLicenseId != null && message.hasOwnProperty("enterpriseLicenseId")) + if (message.enterpriseLicenseId != null && Object.hasOwnProperty.call(message, "enterpriseLicenseId")) if (!$util.isInteger(message.enterpriseLicenseId) && !(message.enterpriseLicenseId && $util.isInteger(message.enterpriseLicenseId.low) && $util.isInteger(message.enterpriseLicenseId.high))) return "enterpriseLicenseId: integer|Long expected"; - if (message.seatsAllocated != null && message.hasOwnProperty("seatsAllocated")) + if (message.seatsAllocated != null && Object.hasOwnProperty.call(message, "seatsAllocated")) if (!$util.isInteger(message.seatsAllocated)) return "seatsAllocated: integer expected"; - if (message.seatsPending != null && message.hasOwnProperty("seatsPending")) + if (message.seatsPending != null && Object.hasOwnProperty.call(message, "seatsPending")) if (!$util.isInteger(message.seatsPending)) return "seatsPending: integer expected"; - if (message.tier != null && message.hasOwnProperty("tier")) + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) if (!$util.isInteger(message.tier)) return "tier: integer expected"; - if (message.filePlanTypeId != null && message.hasOwnProperty("filePlanTypeId")) + if (message.filePlanTypeId != null && Object.hasOwnProperty.call(message, "filePlanTypeId")) if (!$util.isInteger(message.filePlanTypeId)) return "filePlanTypeId: integer expected"; - if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) return "maxBytes: integer|Long expected"; - if (message.storageExpiration != null && message.hasOwnProperty("storageExpiration")) + if (message.storageExpiration != null && Object.hasOwnProperty.call(message, "storageExpiration")) if (!$util.isInteger(message.storageExpiration) && !(message.storageExpiration && $util.isInteger(message.storageExpiration.low) && $util.isInteger(message.storageExpiration.high))) return "storageExpiration: integer|Long expected"; - if (message.licenseStatus != null && message.hasOwnProperty("licenseStatus")) + if (message.licenseStatus != null && Object.hasOwnProperty.call(message, "licenseStatus")) if (!$util.isString(message.licenseStatus)) return "licenseStatus: string expected"; - if (message.mspPool != null && message.hasOwnProperty("mspPool")) { + if (message.mspPool != null && Object.hasOwnProperty.call(message, "mspPool")) { if (!Array.isArray(message.mspPool)) return "mspPool: array expected"; for (let i = 0; i < message.mspPool.length; ++i) { @@ -77387,12 +77859,12 @@ export const Enterprise = $root.Enterprise = (() => { return "mspPool." + error; } } - if (message.managedBy != null && message.hasOwnProperty("managedBy")) { + if (message.managedBy != null && Object.hasOwnProperty.call(message, "managedBy")) { let error = $root.Enterprise.MSPContact.verify(message.managedBy, long + 1); if (error) return "managedBy." + error; } - if (message.addOns != null && message.hasOwnProperty("addOns")) { + if (message.addOns != null && Object.hasOwnProperty.call(message, "addOns")) { if (!Array.isArray(message.addOns)) return "addOns: array expected"; for (let i = 0; i < message.addOns.length; ++i) { @@ -77401,18 +77873,18 @@ export const Enterprise = $root.Enterprise = (() => { return "addOns." + error; } } - if (message.nextBillingDate != null && message.hasOwnProperty("nextBillingDate")) + if (message.nextBillingDate != null && Object.hasOwnProperty.call(message, "nextBillingDate")) if (!$util.isInteger(message.nextBillingDate) && !(message.nextBillingDate && $util.isInteger(message.nextBillingDate.low) && $util.isInteger(message.nextBillingDate.high))) return "nextBillingDate: integer|Long expected"; - if (message.hasMSPLegacyLog != null && message.hasOwnProperty("hasMSPLegacyLog")) + if (message.hasMSPLegacyLog != null && Object.hasOwnProperty.call(message, "hasMSPLegacyLog")) if (typeof message.hasMSPLegacyLog !== "boolean") return "hasMSPLegacyLog: boolean expected"; - if (message.mspPermits != null && message.hasOwnProperty("mspPermits")) { + if (message.mspPermits != null && Object.hasOwnProperty.call(message, "mspPermits")) { let error = $root.Enterprise.MSPPermits.verify(message.mspPermits, long + 1); if (error) return "mspPermits." + error; } - if (message.distributor != null && message.hasOwnProperty("distributor")) + if (message.distributor != null && Object.hasOwnProperty.call(message, "distributor")) if (typeof message.distributor !== "boolean") return "distributor: boolean expected"; return null; @@ -77429,6 +77901,8 @@ export const Enterprise = $root.Enterprise = (() => { License.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.License) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.License: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77495,13 +77969,13 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.License.mspPool: array expected"); message.mspPool = []; for (let i = 0; i < object.mspPool.length; ++i) { - if (typeof object.mspPool[i] !== "object") + if (!$util.isObject(object.mspPool[i])) throw TypeError(".Enterprise.License.mspPool: object expected"); message.mspPool[i] = $root.Enterprise.MSPPool.fromObject(object.mspPool[i], long + 1); } } if (object.managedBy != null) { - if (typeof object.managedBy !== "object") + if (!$util.isObject(object.managedBy)) throw TypeError(".Enterprise.License.managedBy: object expected"); message.managedBy = $root.Enterprise.MSPContact.fromObject(object.managedBy, long + 1); } @@ -77510,7 +77984,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.License.addOns: array expected"); message.addOns = []; for (let i = 0; i < object.addOns.length; ++i) { - if (typeof object.addOns[i] !== "object") + if (!$util.isObject(object.addOns[i])) throw TypeError(".Enterprise.License.addOns: object expected"); message.addOns[i] = $root.Enterprise.LicenseAddOn.fromObject(object.addOns[i], long + 1); } @@ -77527,7 +78001,7 @@ export const Enterprise = $root.Enterprise = (() => { if (object.hasMSPLegacyLog != null) message.hasMSPLegacyLog = Boolean(object.hasMSPLegacyLog); if (object.mspPermits != null) { - if (typeof object.mspPermits !== "object") + if (!$util.isObject(object.mspPermits)) throw TypeError(".Enterprise.License.mspPermits: object expected"); message.mspPermits = $root.Enterprise.MSPPermits.fromObject(object.mspPermits, long + 1); } @@ -77598,78 +78072,78 @@ export const Enterprise = $root.Enterprise = (() => { object.mspPermits = null; object.distributor = false; } - if (message.paid != null && message.hasOwnProperty("paid")) + if (message.paid != null && Object.hasOwnProperty.call(message, "paid")) object.paid = message.paid; - if (message.numberOfSeats != null && message.hasOwnProperty("numberOfSeats")) + if (message.numberOfSeats != null && Object.hasOwnProperty.call(message, "numberOfSeats")) object.numberOfSeats = message.numberOfSeats; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.licenseKeyId != null && message.hasOwnProperty("licenseKeyId")) + if (message.licenseKeyId != null && Object.hasOwnProperty.call(message, "licenseKeyId")) object.licenseKeyId = message.licenseKeyId; - if (message.productTypeId != null && message.hasOwnProperty("productTypeId")) + if (message.productTypeId != null && Object.hasOwnProperty.call(message, "productTypeId")) object.productTypeId = message.productTypeId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.enterpriseLicenseId != null && message.hasOwnProperty("enterpriseLicenseId")) + if (message.enterpriseLicenseId != null && Object.hasOwnProperty.call(message, "enterpriseLicenseId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseLicenseId = typeof message.enterpriseLicenseId === "number" ? BigInt(message.enterpriseLicenseId) : $util.Long.fromBits(message.enterpriseLicenseId.low >>> 0, message.enterpriseLicenseId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseLicenseId === "number") object.enterpriseLicenseId = options.longs === String ? String(message.enterpriseLicenseId) : message.enterpriseLicenseId; else object.enterpriseLicenseId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseLicenseId) : options.longs === Number ? new $util.LongBits(message.enterpriseLicenseId.low >>> 0, message.enterpriseLicenseId.high >>> 0).toNumber() : message.enterpriseLicenseId; - if (message.seatsAllocated != null && message.hasOwnProperty("seatsAllocated")) + if (message.seatsAllocated != null && Object.hasOwnProperty.call(message, "seatsAllocated")) object.seatsAllocated = message.seatsAllocated; - if (message.seatsPending != null && message.hasOwnProperty("seatsPending")) + if (message.seatsPending != null && Object.hasOwnProperty.call(message, "seatsPending")) object.seatsPending = message.seatsPending; - if (message.tier != null && message.hasOwnProperty("tier")) + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) object.tier = message.tier; - if (message.filePlanTypeId != null && message.hasOwnProperty("filePlanTypeId")) + if (message.filePlanTypeId != null && Object.hasOwnProperty.call(message, "filePlanTypeId")) object.filePlanTypeId = message.filePlanTypeId; - if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.maxBytes = typeof message.maxBytes === "number" ? BigInt(message.maxBytes) : $util.Long.fromBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0, false).toBigInt(); else if (typeof message.maxBytes === "number") object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; else object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; - if (message.storageExpiration != null && message.hasOwnProperty("storageExpiration")) + if (message.storageExpiration != null && Object.hasOwnProperty.call(message, "storageExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.storageExpiration = typeof message.storageExpiration === "number" ? BigInt(message.storageExpiration) : $util.Long.fromBits(message.storageExpiration.low >>> 0, message.storageExpiration.high >>> 0, false).toBigInt(); else if (typeof message.storageExpiration === "number") object.storageExpiration = options.longs === String ? String(message.storageExpiration) : message.storageExpiration; else object.storageExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.storageExpiration) : options.longs === Number ? new $util.LongBits(message.storageExpiration.low >>> 0, message.storageExpiration.high >>> 0).toNumber() : message.storageExpiration; - if (message.licenseStatus != null && message.hasOwnProperty("licenseStatus")) + if (message.licenseStatus != null && Object.hasOwnProperty.call(message, "licenseStatus")) object.licenseStatus = message.licenseStatus; if (message.mspPool && message.mspPool.length) { object.mspPool = []; for (let j = 0; j < message.mspPool.length; ++j) object.mspPool[j] = $root.Enterprise.MSPPool.toObject(message.mspPool[j], options, q + 1); } - if (message.managedBy != null && message.hasOwnProperty("managedBy")) + if (message.managedBy != null && Object.hasOwnProperty.call(message, "managedBy")) object.managedBy = $root.Enterprise.MSPContact.toObject(message.managedBy, options, q + 1); if (message.addOns && message.addOns.length) { object.addOns = []; for (let j = 0; j < message.addOns.length; ++j) object.addOns[j] = $root.Enterprise.LicenseAddOn.toObject(message.addOns[j], options, q + 1); } - if (message.nextBillingDate != null && message.hasOwnProperty("nextBillingDate")) + if (message.nextBillingDate != null && Object.hasOwnProperty.call(message, "nextBillingDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nextBillingDate = typeof message.nextBillingDate === "number" ? BigInt(message.nextBillingDate) : $util.Long.fromBits(message.nextBillingDate.low >>> 0, message.nextBillingDate.high >>> 0, false).toBigInt(); else if (typeof message.nextBillingDate === "number") object.nextBillingDate = options.longs === String ? String(message.nextBillingDate) : message.nextBillingDate; else object.nextBillingDate = options.longs === String ? $util.Long.prototype.toString.call(message.nextBillingDate) : options.longs === Number ? new $util.LongBits(message.nextBillingDate.low >>> 0, message.nextBillingDate.high >>> 0).toNumber() : message.nextBillingDate; - if (message.hasMSPLegacyLog != null && message.hasOwnProperty("hasMSPLegacyLog")) + if (message.hasMSPLegacyLog != null && Object.hasOwnProperty.call(message, "hasMSPLegacyLog")) object.hasMSPLegacyLog = message.hasMSPLegacyLog; - if (message.mspPermits != null && message.hasOwnProperty("mspPermits")) + if (message.mspPermits != null && Object.hasOwnProperty.call(message, "mspPermits")) object.mspPermits = $root.Enterprise.MSPPermits.toObject(message.mspPermits, options, q + 1); - if (message.distributor != null && message.hasOwnProperty("distributor")) + if (message.distributor != null && Object.hasOwnProperty.call(message, "distributor")) object.distributor = message.distributor; return object; }; @@ -77822,7 +78296,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ Bridge.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -77908,19 +78382,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.bridgeId != null && message.hasOwnProperty("bridgeId")) + if (message.bridgeId != null && Object.hasOwnProperty.call(message, "bridgeId")) if (!$util.isInteger(message.bridgeId) && !(message.bridgeId && $util.isInteger(message.bridgeId.low) && $util.isInteger(message.bridgeId.high))) return "bridgeId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.wanIpEnforcement != null && message.hasOwnProperty("wanIpEnforcement")) + if (message.wanIpEnforcement != null && Object.hasOwnProperty.call(message, "wanIpEnforcement")) if (!$util.isString(message.wanIpEnforcement)) return "wanIpEnforcement: string expected"; - if (message.lanIpEnforcement != null && message.hasOwnProperty("lanIpEnforcement")) + if (message.lanIpEnforcement != null && Object.hasOwnProperty.call(message, "lanIpEnforcement")) if (!$util.isString(message.lanIpEnforcement)) return "lanIpEnforcement: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -77937,6 +78411,8 @@ export const Enterprise = $root.Enterprise = (() => { Bridge.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.Bridge) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.Bridge: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -78001,25 +78477,25 @@ export const Enterprise = $root.Enterprise = (() => { object.lanIpEnforcement = ""; object.status = ""; } - if (message.bridgeId != null && message.hasOwnProperty("bridgeId")) + if (message.bridgeId != null && Object.hasOwnProperty.call(message, "bridgeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.bridgeId = typeof message.bridgeId === "number" ? BigInt(message.bridgeId) : $util.Long.fromBits(message.bridgeId.low >>> 0, message.bridgeId.high >>> 0, false).toBigInt(); else if (typeof message.bridgeId === "number") object.bridgeId = options.longs === String ? String(message.bridgeId) : message.bridgeId; else object.bridgeId = options.longs === String ? $util.Long.prototype.toString.call(message.bridgeId) : options.longs === Number ? new $util.LongBits(message.bridgeId.low >>> 0, message.bridgeId.high >>> 0).toNumber() : message.bridgeId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.wanIpEnforcement != null && message.hasOwnProperty("wanIpEnforcement")) + if (message.wanIpEnforcement != null && Object.hasOwnProperty.call(message, "wanIpEnforcement")) object.wanIpEnforcement = message.wanIpEnforcement; - if (message.lanIpEnforcement != null && message.hasOwnProperty("lanIpEnforcement")) + if (message.lanIpEnforcement != null && Object.hasOwnProperty.call(message, "lanIpEnforcement")) object.lanIpEnforcement = message.lanIpEnforcement; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -78183,7 +78659,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ Scim.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -78273,22 +78749,22 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.scimId != null && message.hasOwnProperty("scimId")) + if (message.scimId != null && Object.hasOwnProperty.call(message, "scimId")) if (!$util.isInteger(message.scimId) && !(message.scimId && $util.isInteger(message.scimId.low) && $util.isInteger(message.scimId.high))) return "scimId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; - if (message.lastSynced != null && message.hasOwnProperty("lastSynced")) + if (message.lastSynced != null && Object.hasOwnProperty.call(message, "lastSynced")) if (!$util.isInteger(message.lastSynced) && !(message.lastSynced && $util.isInteger(message.lastSynced.low) && $util.isInteger(message.lastSynced.high))) return "lastSynced: integer|Long expected"; - if (message.rolePrefix != null && message.hasOwnProperty("rolePrefix")) + if (message.rolePrefix != null && Object.hasOwnProperty.call(message, "rolePrefix")) if (!$util.isString(message.rolePrefix)) return "rolePrefix: string expected"; - if (message.uniqueGroups != null && message.hasOwnProperty("uniqueGroups")) + if (message.uniqueGroups != null && Object.hasOwnProperty.call(message, "uniqueGroups")) if (typeof message.uniqueGroups !== "boolean") return "uniqueGroups: boolean expected"; return null; @@ -78305,6 +78781,8 @@ export const Enterprise = $root.Enterprise = (() => { Scim.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.Scim) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.Scim: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -78383,32 +78861,32 @@ export const Enterprise = $root.Enterprise = (() => { object.rolePrefix = ""; object.uniqueGroups = false; } - if (message.scimId != null && message.hasOwnProperty("scimId")) + if (message.scimId != null && Object.hasOwnProperty.call(message, "scimId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.scimId = typeof message.scimId === "number" ? BigInt(message.scimId) : $util.Long.fromBits(message.scimId.low >>> 0, message.scimId.high >>> 0, false).toBigInt(); else if (typeof message.scimId === "number") object.scimId = options.longs === String ? String(message.scimId) : message.scimId; else object.scimId = options.longs === String ? $util.Long.prototype.toString.call(message.scimId) : options.longs === Number ? new $util.LongBits(message.scimId.low >>> 0, message.scimId.high >>> 0).toNumber() : message.scimId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.lastSynced != null && message.hasOwnProperty("lastSynced")) + if (message.lastSynced != null && Object.hasOwnProperty.call(message, "lastSynced")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSynced = typeof message.lastSynced === "number" ? BigInt(message.lastSynced) : $util.Long.fromBits(message.lastSynced.low >>> 0, message.lastSynced.high >>> 0, false).toBigInt(); else if (typeof message.lastSynced === "number") object.lastSynced = options.longs === String ? String(message.lastSynced) : message.lastSynced; else object.lastSynced = options.longs === String ? $util.Long.prototype.toString.call(message.lastSynced) : options.longs === Number ? new $util.LongBits(message.lastSynced.low >>> 0, message.lastSynced.high >>> 0).toNumber() : message.lastSynced; - if (message.rolePrefix != null && message.hasOwnProperty("rolePrefix")) + if (message.rolePrefix != null && Object.hasOwnProperty.call(message, "rolePrefix")) object.rolePrefix = message.rolePrefix; - if (message.uniqueGroups != null && message.hasOwnProperty("uniqueGroups")) + if (message.uniqueGroups != null && Object.hasOwnProperty.call(message, "uniqueGroups")) object.uniqueGroups = message.uniqueGroups; return object; }; @@ -78550,7 +79028,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EmailProvision.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -78632,16 +79110,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && Object.hasOwnProperty.call(message, "method")) if (!$util.isString(message.method)) return "method: string expected"; return null; @@ -78658,6 +79136,8 @@ export const Enterprise = $root.Enterprise = (() => { EmailProvision.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EmailProvision) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EmailProvision: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -78708,18 +79188,18 @@ export const Enterprise = $root.Enterprise = (() => { object.domain = ""; object.method = ""; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && Object.hasOwnProperty.call(message, "method")) object.method = message.method; return object; }; @@ -78861,7 +79341,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ QueuedTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -78943,16 +79423,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; return null; @@ -78969,6 +79449,8 @@ export const Enterprise = $root.Enterprise = (() => { QueuedTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.QueuedTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.QueuedTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -79028,18 +79510,18 @@ export const Enterprise = $root.Enterprise = (() => { object.nodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.encryptedData = ""; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; return object; }; @@ -79164,7 +79646,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ QueuedTeamUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -79245,10 +79727,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) @@ -79269,6 +79751,8 @@ export const Enterprise = $root.Enterprise = (() => { QueuedTeamUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.QueuedTeamUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.QueuedTeamUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -79323,7 +79807,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.teamUid = $util.newBuffer(object.teamUid); } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; if (message.users && message.users.length) { object.users = []; @@ -79484,7 +79968,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsAddResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -79570,7 +80054,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.successfulTeamAdd != null && message.hasOwnProperty("successfulTeamAdd")) { + if (message.successfulTeamAdd != null && Object.hasOwnProperty.call(message, "successfulTeamAdd")) { if (!Array.isArray(message.successfulTeamAdd)) return "successfulTeamAdd: array expected"; for (let i = 0; i < message.successfulTeamAdd.length; ++i) { @@ -79579,7 +80063,7 @@ export const Enterprise = $root.Enterprise = (() => { return "successfulTeamAdd." + error; } } - if (message.unsuccessfulTeamAdd != null && message.hasOwnProperty("unsuccessfulTeamAdd")) { + if (message.unsuccessfulTeamAdd != null && Object.hasOwnProperty.call(message, "unsuccessfulTeamAdd")) { if (!Array.isArray(message.unsuccessfulTeamAdd)) return "unsuccessfulTeamAdd: array expected"; for (let i = 0; i < message.unsuccessfulTeamAdd.length; ++i) { @@ -79588,10 +80072,10 @@ export const Enterprise = $root.Enterprise = (() => { return "unsuccessfulTeamAdd." + error; } } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) if (!$util.isString(message.result)) return "result: string expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -79608,6 +80092,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsAddResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsAddResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsAddResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -79618,7 +80104,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamsAddResult.successfulTeamAdd: array expected"); message.successfulTeamAdd = []; for (let i = 0; i < object.successfulTeamAdd.length; ++i) { - if (typeof object.successfulTeamAdd[i] !== "object") + if (!$util.isObject(object.successfulTeamAdd[i])) throw TypeError(".Enterprise.TeamsAddResult.successfulTeamAdd: object expected"); message.successfulTeamAdd[i] = $root.Enterprise.TeamAddResult.fromObject(object.successfulTeamAdd[i], long + 1); } @@ -79628,7 +80114,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamsAddResult.unsuccessfulTeamAdd: array expected"); message.unsuccessfulTeamAdd = []; for (let i = 0; i < object.unsuccessfulTeamAdd.length; ++i) { - if (typeof object.unsuccessfulTeamAdd[i] !== "object") + if (!$util.isObject(object.unsuccessfulTeamAdd[i])) throw TypeError(".Enterprise.TeamsAddResult.unsuccessfulTeamAdd: object expected"); message.unsuccessfulTeamAdd[i] = $root.Enterprise.TeamAddResult.fromObject(object.unsuccessfulTeamAdd[i], long + 1); } @@ -79675,9 +80161,9 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.unsuccessfulTeamAdd.length; ++j) object.unsuccessfulTeamAdd[j] = $root.Enterprise.TeamAddResult.toObject(message.unsuccessfulTeamAdd[j], options, q + 1); } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -79808,7 +80294,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamAddResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -79886,15 +80372,15 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.team != null && message.hasOwnProperty("team")) { + if (message.team != null && Object.hasOwnProperty.call(message, "team")) { let error = $root.Enterprise.Team.verify(message.team, long + 1); if (error) return "team." + error; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) if (!$util.isString(message.result)) return "result: string expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -79911,13 +80397,15 @@ export const Enterprise = $root.Enterprise = (() => { TeamAddResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamAddResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamAddResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Enterprise.TeamAddResult(); if (object.team != null) { - if (typeof object.team !== "object") + if (!$util.isObject(object.team)) throw TypeError(".Enterprise.TeamAddResult.team: object expected"); message.team = $root.Enterprise.Team.fromObject(object.team, long + 1); } @@ -79950,11 +80438,11 @@ export const Enterprise = $root.Enterprise = (() => { object.result = ""; object.errorMessage = ""; } - if (message.team != null && message.hasOwnProperty("team")) + if (message.team != null && Object.hasOwnProperty.call(message, "team")) object.team = $root.Enterprise.Team.toObject(message.team, options, q + 1); - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -80129,7 +80617,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SsoService.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80223,25 +80711,25 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.spUrl != null && message.hasOwnProperty("spUrl")) + if (message.spUrl != null && Object.hasOwnProperty.call(message, "spUrl")) if (!$util.isString(message.spUrl)) return "spUrl: string expected"; - if (message.inviteNewUsers != null && message.hasOwnProperty("inviteNewUsers")) + if (message.inviteNewUsers != null && Object.hasOwnProperty.call(message, "inviteNewUsers")) if (typeof message.inviteNewUsers !== "boolean") return "inviteNewUsers: boolean expected"; - if (message.active != null && message.hasOwnProperty("active")) + if (message.active != null && Object.hasOwnProperty.call(message, "active")) if (typeof message.active !== "boolean") return "active: boolean expected"; - if (message.isCloud != null && message.hasOwnProperty("isCloud")) + if (message.isCloud != null && Object.hasOwnProperty.call(message, "isCloud")) if (typeof message.isCloud !== "boolean") return "isCloud: boolean expected"; return null; @@ -80258,6 +80746,8 @@ export const Enterprise = $root.Enterprise = (() => { SsoService.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SsoService) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SsoService: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -80328,29 +80818,29 @@ export const Enterprise = $root.Enterprise = (() => { object.active = false; object.isCloud = false; } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, false).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber() : message.ssoServiceProviderId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.spUrl != null && message.hasOwnProperty("spUrl")) + if (message.spUrl != null && Object.hasOwnProperty.call(message, "spUrl")) object.spUrl = message.spUrl; - if (message.inviteNewUsers != null && message.hasOwnProperty("inviteNewUsers")) + if (message.inviteNewUsers != null && Object.hasOwnProperty.call(message, "inviteNewUsers")) object.inviteNewUsers = message.inviteNewUsers; - if (message.active != null && message.hasOwnProperty("active")) + if (message.active != null && Object.hasOwnProperty.call(message, "active")) object.active = message.active; - if (message.isCloud != null && message.hasOwnProperty("isCloud")) + if (message.isCloud != null && Object.hasOwnProperty.call(message, "isCloud")) object.isCloud = message.isCloud; return object; }; @@ -80470,7 +80960,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ReportFilterUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80544,10 +81034,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; return null; @@ -80564,6 +81054,8 @@ export const Enterprise = $root.Enterprise = (() => { ReportFilterUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ReportFilterUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ReportFilterUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -80597,9 +81089,9 @@ export const Enterprise = $root.Enterprise = (() => { object.userId = 0; object.email = ""; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; return object; }; @@ -80829,7 +81321,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DeviceRequestForAdminApproval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -80943,40 +81435,40 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) + if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) if (!$util.isString(message.deviceType)) return "deviceType: string expected"; - if (message.date != null && message.hasOwnProperty("date")) + if (message.date != null && Object.hasOwnProperty.call(message, "date")) if (!$util.isInteger(message.date) && !(message.date && $util.isInteger(message.date.low) && $util.isInteger(message.date.high))) return "date: integer|Long expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) if (!$util.isString(message.location)) return "location: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; return null; @@ -80993,6 +81485,8 @@ export const Enterprise = $root.Enterprise = (() => { DeviceRequestForAdminApproval.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DeviceRequestForAdminApproval) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DeviceRequestForAdminApproval: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -81116,44 +81610,44 @@ export const Enterprise = $root.Enterprise = (() => { object.accountUid = $util.newBuffer(object.accountUid); } } - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) + if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) object.deviceType = message.deviceType; - if (message.date != null && message.hasOwnProperty("date")) + if (message.date != null && Object.hasOwnProperty.call(message, "date")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.date = typeof message.date === "number" ? BigInt(message.date) : $util.Long.fromBits(message.date.low >>> 0, message.date.high >>> 0, false).toBigInt(); else if (typeof message.date === "number") object.date = options.longs === String ? String(message.date) : message.date; else object.date = options.longs === String ? $util.Long.prototype.toString.call(message.date) : options.longs === Number ? new $util.LongBits(message.date.low >>> 0, message.date.high >>> 0).toNumber() : message.date; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) object.location = message.location; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; return object; }; @@ -81358,7 +81852,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -81438,7 +81932,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entity != null && message.hasOwnProperty("entity")) + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) switch (message.entity) { default: return "entity: enum value expected"; @@ -81468,10 +81962,10 @@ export const Enterprise = $root.Enterprise = (() => { case 23: break; } - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) if (typeof message["delete"] !== "boolean") return "delete: boolean expected"; - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { if (!Array.isArray(message.data)) return "data: array expected"; for (let i = 0; i < message.data.length; ++i) @@ -81492,6 +81986,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseData.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseData) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -81639,9 +82135,9 @@ export const Enterprise = $root.Enterprise = (() => { object.entity = options.enums === String ? "UNKNOWN" : 0; object["delete"] = false; } - if (message.entity != null && message.hasOwnProperty("entity")) + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) object.entity = options.enums === String ? $root.Enterprise.EnterpriseDataEntity[message.entity] === undefined ? message.entity : $root.Enterprise.EnterpriseDataEntity[message.entity] : message.entity; - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) object["delete"] = message["delete"]; if (message.data && message.data.length) { object.data = []; @@ -81801,7 +82297,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -81889,13 +82385,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; - if (message.cacheStatus != null && message.hasOwnProperty("cacheStatus")) + if (message.cacheStatus != null && Object.hasOwnProperty.call(message, "cacheStatus")) switch (message.cacheStatus) { default: return "cacheStatus: enum value expected"; @@ -81903,7 +82399,7 @@ export const Enterprise = $root.Enterprise = (() => { case 1: break; } - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { if (!Array.isArray(message.data)) return "data: array expected"; for (let i = 0; i < message.data.length; ++i) { @@ -81912,7 +82408,7 @@ export const Enterprise = $root.Enterprise = (() => { return "data." + error; } } - if (message.generalData != null && message.hasOwnProperty("generalData")) { + if (message.generalData != null && Object.hasOwnProperty.call(message, "generalData")) { let error = $root.Enterprise.GeneralDataEntity.verify(message.generalData, long + 1); if (error) return "generalData." + error; @@ -81931,6 +82427,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseDataResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseDataResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseDataResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -81964,13 +82462,13 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseDataResponse.data: array expected"); message.data = []; for (let i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") + if (!$util.isObject(object.data[i])) throw TypeError(".Enterprise.EnterpriseDataResponse.data: object expected"); message.data[i] = $root.Enterprise.EnterpriseData.fromObject(object.data[i], long + 1); } } if (object.generalData != null) { - if (typeof object.generalData !== "object") + if (!$util.isObject(object.generalData)) throw TypeError(".Enterprise.EnterpriseDataResponse.generalData: object expected"); message.generalData = $root.Enterprise.GeneralDataEntity.fromObject(object.generalData, long + 1); } @@ -82008,18 +82506,18 @@ export const Enterprise = $root.Enterprise = (() => { object.cacheStatus = options.enums === String ? "KEEP" : 0; object.generalData = null; } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; - if (message.cacheStatus != null && message.hasOwnProperty("cacheStatus")) + if (message.cacheStatus != null && Object.hasOwnProperty.call(message, "cacheStatus")) object.cacheStatus = options.enums === String ? $root.Enterprise.CacheStatus[message.cacheStatus] === undefined ? message.cacheStatus : $root.Enterprise.CacheStatus[message.cacheStatus] : message.cacheStatus; if (message.data && message.data.length) { object.data = []; for (let j = 0; j < message.data.length; ++j) object.data[j] = $root.Enterprise.EnterpriseData.toObject(message.data[j], options, q + 1); } - if (message.generalData != null && message.hasOwnProperty("generalData")) + if (message.generalData != null && Object.hasOwnProperty.call(message, "generalData")) object.generalData = $root.Enterprise.GeneralDataEntity.toObject(message.generalData, options, q + 1); return object; }; @@ -82128,7 +82626,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -82198,7 +82696,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; return null; @@ -82215,6 +82713,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -82253,7 +82753,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.continuationToken = $util.newBuffer(object.continuationToken); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; return object; }; @@ -82462,7 +82962,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -82556,16 +83056,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -82576,13 +83076,13 @@ export const Enterprise = $root.Enterprise = (() => { case 4: break; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) if (!(message.extra && typeof message.extra.length === "number" || $util.isString(message.extra))) return "extra: buffer expected"; return null; @@ -82599,6 +83099,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -82709,19 +83211,19 @@ export const Enterprise = $root.Enterprise = (() => { object.extra = $util.newBuffer(object.extra); } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.BackupKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.BackupKeyType[message.keyType] : message.keyType; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) object.extra = options.bytes === String ? $util.base64.encode(message.extra, 0, message.extra.length) : options.bytes === Array ? Array.prototype.slice.call(message.extra) : message.extra; return object; }; @@ -82841,7 +83343,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -82915,10 +83417,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.backupKey != null && message.hasOwnProperty("backupKey")) + if (message.backupKey != null && Object.hasOwnProperty.call(message, "backupKey")) if (!(message.backupKey && typeof message.backupKey.length === "number" || $util.isString(message.backupKey))) return "backupKey: buffer expected"; return null; @@ -82935,6 +83437,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -82977,9 +83481,9 @@ export const Enterprise = $root.Enterprise = (() => { object.backupKey = $util.newBuffer(object.backupKey); } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.backupKey != null && message.hasOwnProperty("backupKey")) + if (message.backupKey != null && Object.hasOwnProperty.call(message, "backupKey")) object.backupKey = options.bytes === String ? $util.base64.encode(message.backupKey, 0, message.backupKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.backupKey) : message.backupKey; return object; }; @@ -83178,7 +83682,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -83282,16 +83786,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) if (!$util.isString(message.userName)) return "userName: string expected"; - if (message.dataKey != null && message.hasOwnProperty("dataKey")) + if (message.dataKey != null && Object.hasOwnProperty.call(message, "dataKey")) if (!(message.dataKey && typeof message.dataKey.length === "number" || $util.isString(message.dataKey))) return "dataKey: buffer expected"; - if (message.dataKeyType != null && message.hasOwnProperty("dataKeyType")) + if (message.dataKeyType != null && Object.hasOwnProperty.call(message, "dataKeyType")) switch (message.dataKeyType) { default: return "dataKeyType: enum value expected"; @@ -83299,13 +83803,13 @@ export const Enterprise = $root.Enterprise = (() => { case 1: break; } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) return "privateKey: buffer expected"; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) if (!(message.treeKey && typeof message.treeKey.length === "number" || $util.isString(message.treeKey))) return "treeKey: buffer expected"; - if (message.treeKeyType != null && message.hasOwnProperty("treeKeyType")) + if (message.treeKeyType != null && Object.hasOwnProperty.call(message, "treeKeyType")) switch (message.treeKeyType) { default: return "treeKeyType: enum value expected"; @@ -83316,7 +83820,7 @@ export const Enterprise = $root.Enterprise = (() => { case 4: break; } - if (message.backupKeys != null && message.hasOwnProperty("backupKeys")) { + if (message.backupKeys != null && Object.hasOwnProperty.call(message, "backupKeys")) { if (!Array.isArray(message.backupKeys)) return "backupKeys: array expected"; for (let i = 0; i < message.backupKeys.length; ++i) { @@ -83325,7 +83829,7 @@ export const Enterprise = $root.Enterprise = (() => { return "backupKeys." + error; } } - if (message.privateECKey != null && message.hasOwnProperty("privateECKey")) + if (message.privateECKey != null && Object.hasOwnProperty.call(message, "privateECKey")) if (!(message.privateECKey && typeof message.privateECKey.length === "number" || $util.isString(message.privateECKey))) return "privateECKey: buffer expected"; return null; @@ -83342,6 +83846,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -83415,7 +83921,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.BackupUser.backupKeys: array expected"); message.backupKeys = []; for (let i = 0; i < object.backupKeys.length; ++i) { - if (typeof object.backupKeys[i] !== "object") + if (!$util.isObject(object.backupKeys[i])) throw TypeError(".Enterprise.BackupUser.backupKeys: object expected"); message.backupKeys[i] = $root.Enterprise.BackupKey.fromObject(object.backupKeys[i], long + 1); } @@ -83481,26 +83987,26 @@ export const Enterprise = $root.Enterprise = (() => { object.privateECKey = $util.newBuffer(object.privateECKey); } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) object.userName = message.userName; - if (message.dataKey != null && message.hasOwnProperty("dataKey")) + if (message.dataKey != null && Object.hasOwnProperty.call(message, "dataKey")) object.dataKey = options.bytes === String ? $util.base64.encode(message.dataKey, 0, message.dataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataKey) : message.dataKey; - if (message.dataKeyType != null && message.hasOwnProperty("dataKeyType")) + if (message.dataKeyType != null && Object.hasOwnProperty.call(message, "dataKeyType")) object.dataKeyType = options.enums === String ? $root.Enterprise.BackupUserDataKeyType[message.dataKeyType] === undefined ? message.dataKeyType : $root.Enterprise.BackupUserDataKeyType[message.dataKeyType] : message.dataKeyType; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) object.treeKey = options.bytes === String ? $util.base64.encode(message.treeKey, 0, message.treeKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.treeKey) : message.treeKey; - if (message.treeKeyType != null && message.hasOwnProperty("treeKeyType")) + if (message.treeKeyType != null && Object.hasOwnProperty.call(message, "treeKeyType")) object.treeKeyType = options.enums === String ? $root.Enterprise.BackupKeyType[message.treeKeyType] === undefined ? message.treeKeyType : $root.Enterprise.BackupKeyType[message.treeKeyType] : message.treeKeyType; if (message.backupKeys && message.backupKeys.length) { object.backupKeys = []; for (let j = 0; j < message.backupKeys.length; ++j) object.backupKeys[j] = $root.Enterprise.BackupKey.toObject(message.backupKeys[j], options, q + 1); } - if (message.privateECKey != null && message.hasOwnProperty("privateECKey")) + if (message.privateECKey != null && Object.hasOwnProperty.call(message, "privateECKey")) object.privateECKey = options.bytes === String ? $util.base64.encode(message.privateECKey, 0, message.privateECKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateECKey) : message.privateECKey; return object; }; @@ -83646,7 +84152,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -83732,10 +84238,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseEccPrivateKey != null && message.hasOwnProperty("enterpriseEccPrivateKey")) + if (message.enterpriseEccPrivateKey != null && Object.hasOwnProperty.call(message, "enterpriseEccPrivateKey")) if (!(message.enterpriseEccPrivateKey && typeof message.enterpriseEccPrivateKey.length === "number" || $util.isString(message.enterpriseEccPrivateKey))) return "enterpriseEccPrivateKey: buffer expected"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -83744,7 +84250,7 @@ export const Enterprise = $root.Enterprise = (() => { return "users." + error; } } - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -83753,7 +84259,7 @@ export const Enterprise = $root.Enterprise = (() => { return "records." + error; } } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; return null; @@ -83770,6 +84276,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -83785,7 +84293,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.BackupResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.BackupResponse.users: object expected"); message.users[i] = $root.Enterprise.BackupUser.fromObject(object.users[i], long + 1); } @@ -83795,7 +84303,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.BackupResponse.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Enterprise.BackupResponse.records: object expected"); message.records[i] = $root.Enterprise.BackupRecord.fromObject(object.records[i], long + 1); } @@ -83845,7 +84353,7 @@ export const Enterprise = $root.Enterprise = (() => { object.continuationToken = $util.newBuffer(object.continuationToken); } } - if (message.enterpriseEccPrivateKey != null && message.hasOwnProperty("enterpriseEccPrivateKey")) + if (message.enterpriseEccPrivateKey != null && Object.hasOwnProperty.call(message, "enterpriseEccPrivateKey")) object.enterpriseEccPrivateKey = options.bytes === String ? $util.base64.encode(message.enterpriseEccPrivateKey, 0, message.enterpriseEccPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterpriseEccPrivateKey) : message.enterpriseEccPrivateKey; if (message.users && message.users.length) { object.users = []; @@ -83857,7 +84365,7 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.Enterprise.BackupRecord.toObject(message.records[j], options, q + 1); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; return object; }; @@ -84010,7 +84518,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupFile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84096,19 +84604,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) if (!$util.isString(message.user)) return "user: string expected"; - if (message.backupUid != null && message.hasOwnProperty("backupUid")) + if (message.backupUid != null && Object.hasOwnProperty.call(message, "backupUid")) if (!(message.backupUid && typeof message.backupUid.length === "number" || $util.isString(message.backupUid))) return "backupUid: buffer expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) if (!$util.isString(message.fileName)) return "fileName: string expected"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.downloadUrl != null && message.hasOwnProperty("downloadUrl")) + if (message.downloadUrl != null && Object.hasOwnProperty.call(message, "downloadUrl")) if (!$util.isString(message.downloadUrl)) return "downloadUrl: string expected"; return null; @@ -84125,6 +84633,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupFile.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupFile) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupFile: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -84187,20 +84697,20 @@ export const Enterprise = $root.Enterprise = (() => { object.created = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.downloadUrl = ""; } - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) object.user = message.user; - if (message.backupUid != null && message.hasOwnProperty("backupUid")) + if (message.backupUid != null && Object.hasOwnProperty.call(message, "backupUid")) object.backupUid = options.bytes === String ? $util.base64.encode(message.backupUid, 0, message.backupUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.backupUid) : message.backupUid; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) object.fileName = message.fileName; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.downloadUrl != null && message.hasOwnProperty("downloadUrl")) + if (message.downloadUrl != null && Object.hasOwnProperty.call(message, "downloadUrl")) object.downloadUrl = message.downloadUrl; return object; }; @@ -84311,7 +84821,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ BackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84383,7 +84893,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.files != null && message.hasOwnProperty("files")) { + if (message.files != null && Object.hasOwnProperty.call(message, "files")) { if (!Array.isArray(message.files)) return "files: array expected"; for (let i = 0; i < message.files.length; ++i) { @@ -84406,6 +84916,8 @@ export const Enterprise = $root.Enterprise = (() => { BackupsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.BackupsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.BackupsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -84416,7 +84928,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.BackupsResponse.files: array expected"); message.files = []; for (let i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") + if (!$util.isObject(object.files[i])) throw TypeError(".Enterprise.BackupsResponse.files: object expected"); message.files[i] = $root.Enterprise.BackupFile.fromObject(object.files[i], long + 1); } @@ -84560,7 +85072,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetEnterpriseDataKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84637,7 +85149,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) { + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) { if (!Array.isArray(message.roleId)) return "roleId: array expected"; for (let i = 0; i < message.roleId.length; ++i) @@ -84658,6 +85170,8 @@ export const Enterprise = $root.Enterprise = (() => { GetEnterpriseDataKeysRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetEnterpriseDataKeysRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetEnterpriseDataKeysRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -84864,7 +85378,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetEnterpriseDataKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -84954,7 +85468,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reEncryptedRoleKey != null && message.hasOwnProperty("reEncryptedRoleKey")) { + if (message.reEncryptedRoleKey != null && Object.hasOwnProperty.call(message, "reEncryptedRoleKey")) { if (!Array.isArray(message.reEncryptedRoleKey)) return "reEncryptedRoleKey: array expected"; for (let i = 0; i < message.reEncryptedRoleKey.length; ++i) { @@ -84963,7 +85477,7 @@ export const Enterprise = $root.Enterprise = (() => { return "reEncryptedRoleKey." + error; } } - if (message.roleKey != null && message.hasOwnProperty("roleKey")) { + if (message.roleKey != null && Object.hasOwnProperty.call(message, "roleKey")) { if (!Array.isArray(message.roleKey)) return "roleKey: array expected"; for (let i = 0; i < message.roleKey.length; ++i) { @@ -84972,17 +85486,17 @@ export const Enterprise = $root.Enterprise = (() => { return "roleKey." + error; } } - if (message.mspKey != null && message.hasOwnProperty("mspKey")) { + if (message.mspKey != null && Object.hasOwnProperty.call(message, "mspKey")) { let error = $root.Enterprise.MspKey.verify(message.mspKey, long + 1); if (error) return "mspKey." + error; } - if (message.enterpriseKeys != null && message.hasOwnProperty("enterpriseKeys")) { + if (message.enterpriseKeys != null && Object.hasOwnProperty.call(message, "enterpriseKeys")) { let error = $root.Enterprise.EnterpriseKeys.verify(message.enterpriseKeys, long + 1); if (error) return "enterpriseKeys." + error; } - if (message.treeKey != null && message.hasOwnProperty("treeKey")) { + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) { let error = $root.Enterprise.TreeKey.verify(message.treeKey, long + 1); if (error) return "treeKey." + error; @@ -85001,6 +85515,8 @@ export const Enterprise = $root.Enterprise = (() => { GetEnterpriseDataKeysResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetEnterpriseDataKeysResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -85011,7 +85527,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.reEncryptedRoleKey: array expected"); message.reEncryptedRoleKey = []; for (let i = 0; i < object.reEncryptedRoleKey.length; ++i) { - if (typeof object.reEncryptedRoleKey[i] !== "object") + if (!$util.isObject(object.reEncryptedRoleKey[i])) throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.reEncryptedRoleKey: object expected"); message.reEncryptedRoleKey[i] = $root.Enterprise.ReEncryptedRoleKey.fromObject(object.reEncryptedRoleKey[i], long + 1); } @@ -85021,23 +85537,23 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.roleKey: array expected"); message.roleKey = []; for (let i = 0; i < object.roleKey.length; ++i) { - if (typeof object.roleKey[i] !== "object") + if (!$util.isObject(object.roleKey[i])) throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.roleKey: object expected"); message.roleKey[i] = $root.Enterprise.RoleKey.fromObject(object.roleKey[i], long + 1); } } if (object.mspKey != null) { - if (typeof object.mspKey !== "object") + if (!$util.isObject(object.mspKey)) throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.mspKey: object expected"); message.mspKey = $root.Enterprise.MspKey.fromObject(object.mspKey, long + 1); } if (object.enterpriseKeys != null) { - if (typeof object.enterpriseKeys !== "object") + if (!$util.isObject(object.enterpriseKeys)) throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.enterpriseKeys: object expected"); message.enterpriseKeys = $root.Enterprise.EnterpriseKeys.fromObject(object.enterpriseKeys, long + 1); } if (object.treeKey != null) { - if (typeof object.treeKey !== "object") + if (!$util.isObject(object.treeKey)) throw TypeError(".Enterprise.GetEnterpriseDataKeysResponse.treeKey: object expected"); message.treeKey = $root.Enterprise.TreeKey.fromObject(object.treeKey, long + 1); } @@ -85080,11 +85596,11 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.roleKey.length; ++j) object.roleKey[j] = $root.Enterprise.RoleKey.toObject(message.roleKey[j], options, q + 1); } - if (message.mspKey != null && message.hasOwnProperty("mspKey")) + if (message.mspKey != null && Object.hasOwnProperty.call(message, "mspKey")) object.mspKey = $root.Enterprise.MspKey.toObject(message.mspKey, options, q + 1); - if (message.enterpriseKeys != null && message.hasOwnProperty("enterpriseKeys")) + if (message.enterpriseKeys != null && Object.hasOwnProperty.call(message, "enterpriseKeys")) object.enterpriseKeys = $root.Enterprise.EnterpriseKeys.toObject(message.enterpriseKeys, options, q + 1); - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) object.treeKey = $root.Enterprise.TreeKey.toObject(message.treeKey, options, q + 1); return object; }; @@ -85215,7 +85731,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -85293,13 +85809,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.encryptedKey != null && message.hasOwnProperty("encryptedKey")) + if (message.encryptedKey != null && Object.hasOwnProperty.call(message, "encryptedKey")) if (!$util.isString(message.encryptedKey)) return "encryptedKey: string expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -85324,6 +85840,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -85397,16 +85915,16 @@ export const Enterprise = $root.Enterprise = (() => { object.encryptedKey = ""; object.keyType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.encryptedKey != null && message.hasOwnProperty("encryptedKey")) + if (message.encryptedKey != null && Object.hasOwnProperty.call(message, "encryptedKey")) object.encryptedKey = message.encryptedKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; return object; }; @@ -85526,7 +86044,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ MspKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -85600,10 +86118,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedMspTreeKey != null && message.hasOwnProperty("encryptedMspTreeKey")) + if (message.encryptedMspTreeKey != null && Object.hasOwnProperty.call(message, "encryptedMspTreeKey")) if (!$util.isString(message.encryptedMspTreeKey)) return "encryptedMspTreeKey: string expected"; - if (message.encryptedMspTreeKeyType != null && message.hasOwnProperty("encryptedMspTreeKeyType")) + if (message.encryptedMspTreeKeyType != null && Object.hasOwnProperty.call(message, "encryptedMspTreeKeyType")) switch (message.encryptedMspTreeKeyType) { default: return "encryptedMspTreeKeyType: enum value expected"; @@ -85628,6 +86146,8 @@ export const Enterprise = $root.Enterprise = (() => { MspKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.MspKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.MspKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -85687,9 +86207,9 @@ export const Enterprise = $root.Enterprise = (() => { object.encryptedMspTreeKey = ""; object.encryptedMspTreeKeyType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.encryptedMspTreeKey != null && message.hasOwnProperty("encryptedMspTreeKey")) + if (message.encryptedMspTreeKey != null && Object.hasOwnProperty.call(message, "encryptedMspTreeKey")) object.encryptedMspTreeKey = message.encryptedMspTreeKey; - if (message.encryptedMspTreeKeyType != null && message.hasOwnProperty("encryptedMspTreeKeyType")) + if (message.encryptedMspTreeKeyType != null && Object.hasOwnProperty.call(message, "encryptedMspTreeKeyType")) object.encryptedMspTreeKeyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedMspTreeKeyType] === undefined ? message.encryptedMspTreeKeyType : $root.Enterprise.EncryptedKeyType[message.encryptedMspTreeKeyType] : message.encryptedMspTreeKeyType; return object; }; @@ -85851,7 +86371,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -85933,16 +86453,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rsaPublicKey != null && message.hasOwnProperty("rsaPublicKey")) + if (message.rsaPublicKey != null && Object.hasOwnProperty.call(message, "rsaPublicKey")) if (!(message.rsaPublicKey && typeof message.rsaPublicKey.length === "number" || $util.isString(message.rsaPublicKey))) return "rsaPublicKey: buffer expected"; - if (message.rsaEncryptedPrivateKey != null && message.hasOwnProperty("rsaEncryptedPrivateKey")) + if (message.rsaEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedPrivateKey")) if (!(message.rsaEncryptedPrivateKey && typeof message.rsaEncryptedPrivateKey.length === "number" || $util.isString(message.rsaEncryptedPrivateKey))) return "rsaEncryptedPrivateKey: buffer expected"; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) if (!(message.eccPublicKey && typeof message.eccPublicKey.length === "number" || $util.isString(message.eccPublicKey))) return "eccPublicKey: buffer expected"; - if (message.eccEncryptedPrivateKey != null && message.hasOwnProperty("eccEncryptedPrivateKey")) + if (message.eccEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "eccEncryptedPrivateKey")) if (!(message.eccEncryptedPrivateKey && typeof message.eccEncryptedPrivateKey.length === "number" || $util.isString(message.eccEncryptedPrivateKey))) return "eccEncryptedPrivateKey: buffer expected"; return null; @@ -85959,6 +86479,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseKeys.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseKeys) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseKeys: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86034,13 +86556,13 @@ export const Enterprise = $root.Enterprise = (() => { object.eccEncryptedPrivateKey = $util.newBuffer(object.eccEncryptedPrivateKey); } } - if (message.rsaPublicKey != null && message.hasOwnProperty("rsaPublicKey")) + if (message.rsaPublicKey != null && Object.hasOwnProperty.call(message, "rsaPublicKey")) object.rsaPublicKey = options.bytes === String ? $util.base64.encode(message.rsaPublicKey, 0, message.rsaPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaPublicKey) : message.rsaPublicKey; - if (message.rsaEncryptedPrivateKey != null && message.hasOwnProperty("rsaEncryptedPrivateKey")) + if (message.rsaEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedPrivateKey")) object.rsaEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.rsaEncryptedPrivateKey, 0, message.rsaEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaEncryptedPrivateKey) : message.rsaEncryptedPrivateKey; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) object.eccPublicKey = options.bytes === String ? $util.base64.encode(message.eccPublicKey, 0, message.eccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccPublicKey) : message.eccPublicKey; - if (message.eccEncryptedPrivateKey != null && message.hasOwnProperty("eccEncryptedPrivateKey")) + if (message.eccEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "eccEncryptedPrivateKey")) object.eccEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.eccEncryptedPrivateKey, 0, message.eccEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccEncryptedPrivateKey) : message.eccEncryptedPrivateKey; return object; }; @@ -86160,7 +86682,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TreeKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -86234,10 +86756,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) if (!$util.isString(message.treeKey)) return "treeKey: string expected"; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) switch (message.keyTypeId) { default: return "keyTypeId: enum value expected"; @@ -86262,6 +86784,8 @@ export const Enterprise = $root.Enterprise = (() => { TreeKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TreeKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TreeKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86321,9 +86845,9 @@ export const Enterprise = $root.Enterprise = (() => { object.treeKey = ""; object.keyTypeId = options.enums === String ? "NO_KEY" : 0; } - if (message.treeKey != null && message.hasOwnProperty("treeKey")) + if (message.treeKey != null && Object.hasOwnProperty.call(message, "treeKey")) object.treeKey = message.treeKey; - if (message.keyTypeId != null && message.hasOwnProperty("keyTypeId")) + if (message.keyTypeId != null && Object.hasOwnProperty.call(message, "keyTypeId")) object.keyTypeId = options.enums === String ? $root.Enterprise.BackupKeyType[message.keyTypeId] === undefined ? message.keyTypeId : $root.Enterprise.BackupKeyType[message.keyTypeId] : message.keyTypeId; return object; }; @@ -86434,7 +86958,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SharedRecordResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -86506,7 +87030,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.events != null && message.hasOwnProperty("events")) { + if (message.events != null && Object.hasOwnProperty.call(message, "events")) { if (!Array.isArray(message.events)) return "events: array expected"; for (let i = 0; i < message.events.length; ++i) { @@ -86529,6 +87053,8 @@ export const Enterprise = $root.Enterprise = (() => { SharedRecordResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SharedRecordResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SharedRecordResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86539,7 +87065,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.SharedRecordResponse.events: array expected"); message.events = []; for (let i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") + if (!$util.isObject(object.events[i])) throw TypeError(".Enterprise.SharedRecordResponse.events: object expected"); message.events[i] = $root.Enterprise.SharedRecordEvent.fromObject(object.events[i], long + 1); } @@ -86722,7 +87248,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SharedRecordEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -86808,19 +87334,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) if (!$util.isString(message.userName)) return "userName: string expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.canReshare != null && message.hasOwnProperty("canReshare")) + if (message.canReshare != null && Object.hasOwnProperty.call(message, "canReshare")) if (typeof message.canReshare !== "boolean") return "canReshare: boolean expected"; - if (message.shareFrom != null && message.hasOwnProperty("shareFrom")) + if (message.shareFrom != null && Object.hasOwnProperty.call(message, "shareFrom")) if (!$util.isInteger(message.shareFrom)) return "shareFrom: integer expected"; return null; @@ -86837,6 +87363,8 @@ export const Enterprise = $root.Enterprise = (() => { SharedRecordEvent.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SharedRecordEvent) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SharedRecordEvent: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -86888,15 +87416,15 @@ export const Enterprise = $root.Enterprise = (() => { object.canReshare = false; object.shareFrom = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) object.userName = message.userName; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.canReshare != null && message.hasOwnProperty("canReshare")) + if (message.canReshare != null && Object.hasOwnProperty.call(message, "canReshare")) object.canReshare = message.canReshare; - if (message.shareFrom != null && message.hasOwnProperty("shareFrom")) + if (message.shareFrom != null && Object.hasOwnProperty.call(message, "shareFrom")) object.shareFrom = message.shareFrom; return object; }; @@ -87041,7 +87569,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SetRestrictVisibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -87111,7 +87639,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; return null; @@ -87128,6 +87656,8 @@ export const Enterprise = $root.Enterprise = (() => { SetRestrictVisibilityRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SetRestrictVisibilityRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SetRestrictVisibilityRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -87168,7 +87698,7 @@ export const Enterprise = $root.Enterprise = (() => { object.nodeId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.nodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") @@ -87359,7 +87889,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -87457,16 +87987,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -87477,16 +88007,16 @@ export const Enterprise = $root.Enterprise = (() => { case 4: break; } - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.suppressEmailInvite != null && message.hasOwnProperty("suppressEmailInvite")) + if (message.suppressEmailInvite != null && Object.hasOwnProperty.call(message, "suppressEmailInvite")) if (typeof message.suppressEmailInvite !== "boolean") return "suppressEmailInvite: boolean expected"; return null; @@ -87503,6 +88033,8 @@ export const Enterprise = $root.Enterprise = (() => { UserAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -87611,31 +88143,31 @@ export const Enterprise = $root.Enterprise = (() => { object.email = ""; object.suppressEmailInvite = false; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.suppressEmailInvite != null && message.hasOwnProperty("suppressEmailInvite")) + if (message.suppressEmailInvite != null && Object.hasOwnProperty.call(message, "suppressEmailInvite")) object.suppressEmailInvite = message.suppressEmailInvite; return object; }; @@ -87746,7 +88278,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -87818,7 +88350,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -87841,6 +88373,8 @@ export const Enterprise = $root.Enterprise = (() => { UserUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -87851,7 +88385,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.UserUpdateRequest.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.UserUpdateRequest.users: object expected"); message.users[i] = $root.Enterprise.UserUpdate.fromObject(object.users[i], long + 1); } @@ -88056,7 +88590,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -88150,16 +88684,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -88170,13 +88704,13 @@ export const Enterprise = $root.Enterprise = (() => { case 4: break; } - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; return null; @@ -88193,6 +88727,8 @@ export const Enterprise = $root.Enterprise = (() => { UserUpdate.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserUpdate) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserUpdate: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -88298,29 +88834,29 @@ export const Enterprise = $root.Enterprise = (() => { object.jobTitle = ""; object.email = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; return object; }; @@ -88431,7 +88967,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -88503,7 +89039,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -88526,6 +89062,8 @@ export const Enterprise = $root.Enterprise = (() => { UserUpdateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserUpdateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserUpdateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -88536,7 +89074,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.UserUpdateResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.UserUpdateResponse.users: object expected"); message.users[i] = $root.Enterprise.UserUpdateResult.fromObject(object.users[i], long + 1); } @@ -88686,7 +89224,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserUpdateResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -88760,10 +89298,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -88785,6 +89323,8 @@ export const Enterprise = $root.Enterprise = (() => { UserUpdateResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserUpdateResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserUpdateResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -88843,14 +89383,14 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = options.enums === String ? "USER_UPDATE_OK" : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Enterprise.UserUpdateStatus[message.status] === undefined ? message.status : $root.Enterprise.UserUpdateStatus[message.status] : message.status; return object; }; @@ -88989,7 +89529,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceRecordOwnersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89070,14 +89610,14 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeIds != null && message.hasOwnProperty("nodeIds")) { + if (message.nodeIds != null && Object.hasOwnProperty.call(message, "nodeIds")) { if (!Array.isArray(message.nodeIds)) return "nodeIds: array expected"; for (let i = 0; i < message.nodeIds.length; ++i) if (!$util.isInteger(message.nodeIds[i]) && !(message.nodeIds[i] && $util.isInteger(message.nodeIds[i].low) && $util.isInteger(message.nodeIds[i].high))) return "nodeIds: integer|Long[] expected"; } - if (message.includeNonShared != null && message.hasOwnProperty("includeNonShared")) + if (message.includeNonShared != null && Object.hasOwnProperty.call(message, "includeNonShared")) if (typeof message.includeNonShared !== "boolean") return "includeNonShared: boolean expected"; return null; @@ -89094,6 +89634,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceRecordOwnersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceRecordOwnersRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceRecordOwnersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89149,7 +89691,7 @@ export const Enterprise = $root.Enterprise = (() => { else object.nodeIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.nodeIds[j]) : options.longs === Number ? new $util.LongBits(message.nodeIds[j].low >>> 0, message.nodeIds[j].high >>> 0).toNumber() : message.nodeIds[j]; } - if (message.includeNonShared != null && message.hasOwnProperty("includeNonShared")) + if (message.includeNonShared != null && Object.hasOwnProperty.call(message, "includeNonShared")) object.includeNonShared = message.includeNonShared; return object; }; @@ -89260,7 +89802,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceRecordOwnersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89332,7 +89874,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordOwners != null && message.hasOwnProperty("recordOwners")) { + if (message.recordOwners != null && Object.hasOwnProperty.call(message, "recordOwners")) { if (!Array.isArray(message.recordOwners)) return "recordOwners: array expected"; for (let i = 0; i < message.recordOwners.length; ++i) { @@ -89355,6 +89897,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceRecordOwnersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceRecordOwnersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceRecordOwnersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89365,7 +89909,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceRecordOwnersResponse.recordOwners: array expected"); message.recordOwners = []; for (let i = 0; i < object.recordOwners.length; ++i) { - if (typeof object.recordOwners[i] !== "object") + if (!$util.isObject(object.recordOwners[i])) throw TypeError(".Enterprise.ComplianceRecordOwnersResponse.recordOwners: object expected"); message.recordOwners[i] = $root.Enterprise.RecordOwner.fromObject(object.recordOwners[i], long + 1); } @@ -89515,7 +90059,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RecordOwner.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89589,10 +90133,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; return null; @@ -89609,6 +90153,8 @@ export const Enterprise = $root.Enterprise = (() => { RecordOwner.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RecordOwner) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RecordOwner: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89653,14 +90199,14 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.shared = false; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; return object; }; @@ -89807,7 +90353,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ PreliminaryComplianceDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -89896,20 +90442,20 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) if (!$util.isInteger(message.enterpriseUserIds[i]) && !(message.enterpriseUserIds[i] && $util.isInteger(message.enterpriseUserIds[i].low) && $util.isInteger(message.enterpriseUserIds[i].high))) return "enterpriseUserIds: integer|Long[] expected"; } - if (message.includeNonShared != null && message.hasOwnProperty("includeNonShared")) + if (message.includeNonShared != null && Object.hasOwnProperty.call(message, "includeNonShared")) if (typeof message.includeNonShared !== "boolean") return "includeNonShared: boolean expected"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; - if (message.includeTotalMatchingRecordsInFirstResponse != null && message.hasOwnProperty("includeTotalMatchingRecordsInFirstResponse")) + if (message.includeTotalMatchingRecordsInFirstResponse != null && Object.hasOwnProperty.call(message, "includeTotalMatchingRecordsInFirstResponse")) if (typeof message.includeTotalMatchingRecordsInFirstResponse !== "boolean") return "includeTotalMatchingRecordsInFirstResponse: boolean expected"; return null; @@ -89926,6 +90472,8 @@ export const Enterprise = $root.Enterprise = (() => { PreliminaryComplianceDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.PreliminaryComplianceDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.PreliminaryComplianceDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -89997,11 +90545,11 @@ export const Enterprise = $root.Enterprise = (() => { else object.enterpriseUserIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserIds[j]) : options.longs === Number ? new $util.LongBits(message.enterpriseUserIds[j].low >>> 0, message.enterpriseUserIds[j].high >>> 0).toNumber() : message.enterpriseUserIds[j]; } - if (message.includeNonShared != null && message.hasOwnProperty("includeNonShared")) + if (message.includeNonShared != null && Object.hasOwnProperty.call(message, "includeNonShared")) object.includeNonShared = message.includeNonShared; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; - if (message.includeTotalMatchingRecordsInFirstResponse != null && message.hasOwnProperty("includeTotalMatchingRecordsInFirstResponse")) + if (message.includeTotalMatchingRecordsInFirstResponse != null && Object.hasOwnProperty.call(message, "includeTotalMatchingRecordsInFirstResponse")) object.includeTotalMatchingRecordsInFirstResponse = message.includeTotalMatchingRecordsInFirstResponse; return object; }; @@ -90145,7 +90693,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ PreliminaryComplianceDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -90229,7 +90777,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.auditUserData != null && message.hasOwnProperty("auditUserData")) { + if (message.auditUserData != null && Object.hasOwnProperty.call(message, "auditUserData")) { if (!Array.isArray(message.auditUserData)) return "auditUserData: array expected"; for (let i = 0; i < message.auditUserData.length; ++i) { @@ -90238,13 +90786,13 @@ export const Enterprise = $root.Enterprise = (() => { return "auditUserData." + error; } } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; - if (message.totalMatchingRecords != null && message.hasOwnProperty("totalMatchingRecords")) + if (message.totalMatchingRecords != null && Object.hasOwnProperty.call(message, "totalMatchingRecords")) if (!$util.isInteger(message.totalMatchingRecords)) return "totalMatchingRecords: integer expected"; return null; @@ -90261,6 +90809,8 @@ export const Enterprise = $root.Enterprise = (() => { PreliminaryComplianceDataResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.PreliminaryComplianceDataResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.PreliminaryComplianceDataResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -90271,7 +90821,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.PreliminaryComplianceDataResponse.auditUserData: array expected"); message.auditUserData = []; for (let i = 0; i < object.auditUserData.length; ++i) { - if (typeof object.auditUserData[i] !== "object") + if (!$util.isObject(object.auditUserData[i])) throw TypeError(".Enterprise.PreliminaryComplianceDataResponse.auditUserData: object expected"); message.auditUserData[i] = $root.Enterprise.AuditUserData.fromObject(object.auditUserData[i], long + 1); } @@ -90323,11 +90873,11 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.auditUserData.length; ++j) object.auditUserData[j] = $root.Enterprise.AuditUserData.toObject(message.auditUserData[j], options, q + 1); } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; - if (message.totalMatchingRecords != null && message.hasOwnProperty("totalMatchingRecords")) + if (message.totalMatchingRecords != null && Object.hasOwnProperty.call(message, "totalMatchingRecords")) object.totalMatchingRecords = message.totalMatchingRecords; return object; }; @@ -90469,7 +91019,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ AuditUserRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -90551,16 +91101,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; - if (message.isDriveRecord != null && message.hasOwnProperty("isDriveRecord")) + if (message.isDriveRecord != null && Object.hasOwnProperty.call(message, "isDriveRecord")) if (typeof message.isDriveRecord !== "boolean") return "isDriveRecord: boolean expected"; return null; @@ -90577,6 +91127,8 @@ export const Enterprise = $root.Enterprise = (() => { AuditUserRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.AuditUserRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.AuditUserRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -90634,13 +91186,13 @@ export const Enterprise = $root.Enterprise = (() => { object.shared = false; object.isDriveRecord = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; - if (message.isDriveRecord != null && message.hasOwnProperty("isDriveRecord")) + if (message.isDriveRecord != null && Object.hasOwnProperty.call(message, "isDriveRecord")) object.isDriveRecord = message.isDriveRecord; return object; }; @@ -90789,7 +91341,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ AuditUserData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -90869,10 +91421,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.auditUserRecords != null && message.hasOwnProperty("auditUserRecords")) { + if (message.auditUserRecords != null && Object.hasOwnProperty.call(message, "auditUserRecords")) { if (!Array.isArray(message.auditUserRecords)) return "auditUserRecords: array expected"; for (let i = 0; i < message.auditUserRecords.length; ++i) { @@ -90881,7 +91433,7 @@ export const Enterprise = $root.Enterprise = (() => { return "auditUserRecords." + error; } } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -90904,6 +91456,8 @@ export const Enterprise = $root.Enterprise = (() => { AuditUserData.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.AuditUserData) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.AuditUserData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -90923,7 +91477,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.AuditUserData.auditUserRecords: array expected"); message.auditUserRecords = []; for (let i = 0; i < object.auditUserRecords.length; ++i) { - if (typeof object.auditUserRecords[i] !== "object") + if (!$util.isObject(object.auditUserRecords[i])) throw TypeError(".Enterprise.AuditUserData.auditUserRecords: object expected"); message.auditUserRecords[i] = $root.Enterprise.AuditUserRecord.fromObject(object.auditUserRecords[i], long + 1); } @@ -90978,7 +91532,7 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = options.enums === String ? "OK" : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -90990,7 +91544,7 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.auditUserRecords.length; ++j) object.auditUserRecords[j] = $root.Enterprise.AuditUserRecord.toObject(message.auditUserRecords[j], options, q + 1); } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Enterprise.AuditUserStatus[message.status] === undefined ? message.status : $root.Enterprise.AuditUserStatus[message.status] : message.status; return object; }; @@ -91159,7 +91713,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportFilters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -91265,35 +91819,35 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordTitles != null && message.hasOwnProperty("recordTitles")) { + if (message.recordTitles != null && Object.hasOwnProperty.call(message, "recordTitles")) { if (!Array.isArray(message.recordTitles)) return "recordTitles: array expected"; for (let i = 0; i < message.recordTitles.length; ++i) if (!$util.isString(message.recordTitles[i])) return "recordTitles: string[] expected"; } - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) if (!(message.recordUids[i] && typeof message.recordUids[i].length === "number" || $util.isString(message.recordUids[i]))) return "recordUids: buffer[] expected"; } - if (message.jobTitles != null && message.hasOwnProperty("jobTitles")) { + if (message.jobTitles != null && Object.hasOwnProperty.call(message, "jobTitles")) { if (!Array.isArray(message.jobTitles)) return "jobTitles: array expected"; for (let i = 0; i < message.jobTitles.length; ++i) if (!$util.isInteger(message.jobTitles[i]) && !(message.jobTitles[i] && $util.isInteger(message.jobTitles[i].low) && $util.isInteger(message.jobTitles[i].high))) return "jobTitles: integer|Long[] expected"; } - if (message.urls != null && message.hasOwnProperty("urls")) { + if (message.urls != null && Object.hasOwnProperty.call(message, "urls")) { if (!Array.isArray(message.urls)) return "urls: array expected"; for (let i = 0; i < message.urls.length; ++i) if (!$util.isString(message.urls[i])) return "urls: string[] expected"; } - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) @@ -91314,6 +91868,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportFilters.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportFilters) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportFilters: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -91562,7 +92118,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -91640,15 +92196,15 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.complianceReportRun != null && message.hasOwnProperty("complianceReportRun")) { + if (message.complianceReportRun != null && Object.hasOwnProperty.call(message, "complianceReportRun")) { let error = $root.Enterprise.ComplianceReportRun.verify(message.complianceReportRun, long + 1); if (error) return "complianceReportRun." + error; } - if (message.reportName != null && message.hasOwnProperty("reportName")) + if (message.reportName != null && Object.hasOwnProperty.call(message, "reportName")) if (!$util.isString(message.reportName)) return "reportName: string expected"; - if (message.saveReport != null && message.hasOwnProperty("saveReport")) + if (message.saveReport != null && Object.hasOwnProperty.call(message, "saveReport")) if (typeof message.saveReport !== "boolean") return "saveReport: boolean expected"; return null; @@ -91665,13 +92221,15 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Enterprise.ComplianceReportRequest(); if (object.complianceReportRun != null) { - if (typeof object.complianceReportRun !== "object") + if (!$util.isObject(object.complianceReportRun)) throw TypeError(".Enterprise.ComplianceReportRequest.complianceReportRun: object expected"); message.complianceReportRun = $root.Enterprise.ComplianceReportRun.fromObject(object.complianceReportRun, long + 1); } @@ -91704,11 +92262,11 @@ export const Enterprise = $root.Enterprise = (() => { object.reportName = ""; object.saveReport = false; } - if (message.complianceReportRun != null && message.hasOwnProperty("complianceReportRun")) + if (message.complianceReportRun != null && Object.hasOwnProperty.call(message, "complianceReportRun")) object.complianceReportRun = $root.Enterprise.ComplianceReportRun.toObject(message.complianceReportRun, options, q + 1); - if (message.reportName != null && message.hasOwnProperty("reportName")) + if (message.reportName != null && Object.hasOwnProperty.call(message, "reportName")) object.reportName = message.reportName; - if (message.saveReport != null && message.hasOwnProperty("saveReport")) + if (message.saveReport != null && Object.hasOwnProperty.call(message, "saveReport")) object.saveReport = message.saveReport; return object; }; @@ -91846,7 +92404,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportRun.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -91933,19 +92491,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reportCriteriaAndFilter != null && message.hasOwnProperty("reportCriteriaAndFilter")) { + if (message.reportCriteriaAndFilter != null && Object.hasOwnProperty.call(message, "reportCriteriaAndFilter")) { let error = $root.Enterprise.ComplianceReportCriteriaAndFilter.verify(message.reportCriteriaAndFilter, long + 1); if (error) return "reportCriteriaAndFilter." + error; } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) if (!$util.isInteger(message.users[i]) && !(message.users[i] && $util.isInteger(message.users[i].low) && $util.isInteger(message.users[i].high))) return "users: integer|Long[] expected"; } - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) @@ -91966,13 +92524,15 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportRun.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportRun) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportRun: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Enterprise.ComplianceReportRun(); if (object.reportCriteriaAndFilter != null) { - if (typeof object.reportCriteriaAndFilter !== "object") + if (!$util.isObject(object.reportCriteriaAndFilter)) throw TypeError(".Enterprise.ComplianceReportRun.reportCriteriaAndFilter: object expected"); message.reportCriteriaAndFilter = $root.Enterprise.ComplianceReportCriteriaAndFilter.fromObject(object.reportCriteriaAndFilter, long + 1); } @@ -92026,7 +92586,7 @@ export const Enterprise = $root.Enterprise = (() => { } if (options.defaults) object.reportCriteriaAndFilter = null; - if (message.reportCriteriaAndFilter != null && message.hasOwnProperty("reportCriteriaAndFilter")) + if (message.reportCriteriaAndFilter != null && Object.hasOwnProperty.call(message, "reportCriteriaAndFilter")) object.reportCriteriaAndFilter = $root.Enterprise.ComplianceReportCriteriaAndFilter.toObject(message.reportCriteriaAndFilter, options, q + 1); if (message.users && message.users.length) { object.users = []; @@ -92218,7 +92778,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportCriteriaAndFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -92314,21 +92874,21 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.criteriaUid != null && message.hasOwnProperty("criteriaUid")) + if (message.criteriaUid != null && Object.hasOwnProperty.call(message, "criteriaUid")) if (!(message.criteriaUid && typeof message.criteriaUid.length === "number" || $util.isString(message.criteriaUid))) return "criteriaUid: buffer expected"; - if (message.criteriaName != null && message.hasOwnProperty("criteriaName")) + if (message.criteriaName != null && Object.hasOwnProperty.call(message, "criteriaName")) if (!$util.isString(message.criteriaName)) return "criteriaName: string expected"; - if (message.criteria != null && message.hasOwnProperty("criteria")) { + if (message.criteria != null && Object.hasOwnProperty.call(message, "criteria")) { let error = $root.Enterprise.ComplianceReportCriteria.verify(message.criteria, long + 1); if (error) return "criteria." + error; } - if (message.filters != null && message.hasOwnProperty("filters")) { + if (message.filters != null && Object.hasOwnProperty.call(message, "filters")) { if (!Array.isArray(message.filters)) return "filters: array expected"; for (let i = 0; i < message.filters.length; ++i) { @@ -92337,10 +92897,10 @@ export const Enterprise = $root.Enterprise = (() => { return "filters." + error; } } - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; - if (message.nodeEncryptedData != null && message.hasOwnProperty("nodeEncryptedData")) + if (message.nodeEncryptedData != null && Object.hasOwnProperty.call(message, "nodeEncryptedData")) if (!(message.nodeEncryptedData && typeof message.nodeEncryptedData.length === "number" || $util.isString(message.nodeEncryptedData))) return "nodeEncryptedData: buffer expected"; return null; @@ -92357,6 +92917,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportCriteriaAndFilter.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportCriteriaAndFilter) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportCriteriaAndFilter: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -92379,7 +92941,7 @@ export const Enterprise = $root.Enterprise = (() => { if (object.criteriaName != null) message.criteriaName = String(object.criteriaName); if (object.criteria != null) { - if (typeof object.criteria !== "object") + if (!$util.isObject(object.criteria)) throw TypeError(".Enterprise.ComplianceReportCriteriaAndFilter.criteria: object expected"); message.criteria = $root.Enterprise.ComplianceReportCriteria.fromObject(object.criteria, long + 1); } @@ -92388,7 +92950,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportCriteriaAndFilter.filters: array expected"); message.filters = []; for (let i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") + if (!$util.isObject(object.filters[i])) throw TypeError(".Enterprise.ComplianceReportCriteriaAndFilter.filters: object expected"); message.filters[i] = $root.Enterprise.ComplianceReportFilter.fromObject(object.filters[i], long + 1); } @@ -92457,32 +93019,32 @@ export const Enterprise = $root.Enterprise = (() => { object.nodeEncryptedData = $util.newBuffer(object.nodeEncryptedData); } } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.criteriaUid != null && message.hasOwnProperty("criteriaUid")) + if (message.criteriaUid != null && Object.hasOwnProperty.call(message, "criteriaUid")) object.criteriaUid = options.bytes === String ? $util.base64.encode(message.criteriaUid, 0, message.criteriaUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.criteriaUid) : message.criteriaUid; - if (message.criteriaName != null && message.hasOwnProperty("criteriaName")) + if (message.criteriaName != null && Object.hasOwnProperty.call(message, "criteriaName")) object.criteriaName = message.criteriaName; - if (message.criteria != null && message.hasOwnProperty("criteria")) + if (message.criteria != null && Object.hasOwnProperty.call(message, "criteria")) object.criteria = $root.Enterprise.ComplianceReportCriteria.toObject(message.criteria, options, q + 1); if (message.filters && message.filters.length) { object.filters = []; for (let j = 0; j < message.filters.length; ++j) object.filters[j] = $root.Enterprise.ComplianceReportFilter.toObject(message.filters[j], options, q + 1); } - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") object.lastModified = options.longs === String ? String(message.lastModified) : message.lastModified; else object.lastModified = options.longs === String ? $util.Long.prototype.toString.call(message.lastModified) : options.longs === Number ? new $util.LongBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0).toNumber() : message.lastModified; - if (message.nodeEncryptedData != null && message.hasOwnProperty("nodeEncryptedData")) + if (message.nodeEncryptedData != null && Object.hasOwnProperty.call(message, "nodeEncryptedData")) object.nodeEncryptedData = options.bytes === String ? $util.base64.encode(message.nodeEncryptedData, 0, message.nodeEncryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.nodeEncryptedData) : message.nodeEncryptedData; return object; }; @@ -92620,7 +93182,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -92707,21 +93269,21 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.jobTitles != null && message.hasOwnProperty("jobTitles")) { + if (message.jobTitles != null && Object.hasOwnProperty.call(message, "jobTitles")) { if (!Array.isArray(message.jobTitles)) return "jobTitles: array expected"; for (let i = 0; i < message.jobTitles.length; ++i) if (!$util.isString(message.jobTitles[i])) return "jobTitles: string[] expected"; } - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) if (!$util.isInteger(message.enterpriseUserIds[i]) && !(message.enterpriseUserIds[i] && $util.isInteger(message.enterpriseUserIds[i].low) && $util.isInteger(message.enterpriseUserIds[i].high))) return "enterpriseUserIds: integer|Long[] expected"; } - if (message.includeNonShared != null && message.hasOwnProperty("includeNonShared")) + if (message.includeNonShared != null && Object.hasOwnProperty.call(message, "includeNonShared")) if (typeof message.includeNonShared !== "boolean") return "includeNonShared: boolean expected"; return null; @@ -92738,6 +93300,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportCriteria.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportCriteria) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportCriteria: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -92807,7 +93371,7 @@ export const Enterprise = $root.Enterprise = (() => { else object.enterpriseUserIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserIds[j]) : options.longs === Number ? new $util.LongBits(message.enterpriseUserIds[j].low >>> 0, message.enterpriseUserIds[j].high >>> 0).toNumber() : message.enterpriseUserIds[j]; } - if (message.includeNonShared != null && message.hasOwnProperty("includeNonShared")) + if (message.includeNonShared != null && Object.hasOwnProperty.call(message, "includeNonShared")) object.includeNonShared = message.includeNonShared; return object; }; @@ -92970,7 +93534,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -93066,35 +93630,35 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordTitles != null && message.hasOwnProperty("recordTitles")) { + if (message.recordTitles != null && Object.hasOwnProperty.call(message, "recordTitles")) { if (!Array.isArray(message.recordTitles)) return "recordTitles: array expected"; for (let i = 0; i < message.recordTitles.length; ++i) if (!$util.isString(message.recordTitles[i])) return "recordTitles: string[] expected"; } - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) if (!(message.recordUids[i] && typeof message.recordUids[i].length === "number" || $util.isString(message.recordUids[i]))) return "recordUids: buffer[] expected"; } - if (message.jobTitles != null && message.hasOwnProperty("jobTitles")) { + if (message.jobTitles != null && Object.hasOwnProperty.call(message, "jobTitles")) { if (!Array.isArray(message.jobTitles)) return "jobTitles: array expected"; for (let i = 0; i < message.jobTitles.length; ++i) if (!$util.isString(message.jobTitles[i])) return "jobTitles: string[] expected"; } - if (message.urls != null && message.hasOwnProperty("urls")) { + if (message.urls != null && Object.hasOwnProperty.call(message, "urls")) { if (!Array.isArray(message.urls)) return "urls: array expected"; for (let i = 0; i < message.urls.length; ++i) if (!$util.isString(message.urls[i])) return "urls: string[] expected"; } - if (message.recordTypes != null && message.hasOwnProperty("recordTypes")) { + if (message.recordTypes != null && Object.hasOwnProperty.call(message, "recordTypes")) { if (!Array.isArray(message.recordTypes)) return "recordTypes: array expected"; for (let i = 0; i < message.recordTypes.length; ++i) @@ -93115,6 +93679,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportFilter.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportFilter) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportFilter: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -93491,7 +94057,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -93637,24 +94203,24 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.dateGenerated != null && message.hasOwnProperty("dateGenerated")) + if (message.dateGenerated != null && Object.hasOwnProperty.call(message, "dateGenerated")) if (!$util.isInteger(message.dateGenerated) && !(message.dateGenerated && $util.isInteger(message.dateGenerated.low) && $util.isInteger(message.dateGenerated.high))) return "dateGenerated: integer|Long expected"; - if (message.runByUserName != null && message.hasOwnProperty("runByUserName")) + if (message.runByUserName != null && Object.hasOwnProperty.call(message, "runByUserName")) if (!$util.isString(message.runByUserName)) return "runByUserName: string expected"; - if (message.reportName != null && message.hasOwnProperty("reportName")) + if (message.reportName != null && Object.hasOwnProperty.call(message, "reportName")) if (!$util.isString(message.reportName)) return "reportName: string expected"; - if (message.reportUid != null && message.hasOwnProperty("reportUid")) + if (message.reportUid != null && Object.hasOwnProperty.call(message, "reportUid")) if (!(message.reportUid && typeof message.reportUid.length === "number" || $util.isString(message.reportUid))) return "reportUid: buffer expected"; - if (message.complianceReportRun != null && message.hasOwnProperty("complianceReportRun")) { + if (message.complianceReportRun != null && Object.hasOwnProperty.call(message, "complianceReportRun")) { let error = $root.Enterprise.ComplianceReportRun.verify(message.complianceReportRun, long + 1); if (error) return "complianceReportRun." + error; } - if (message.userProfiles != null && message.hasOwnProperty("userProfiles")) { + if (message.userProfiles != null && Object.hasOwnProperty.call(message, "userProfiles")) { if (!Array.isArray(message.userProfiles)) return "userProfiles: array expected"; for (let i = 0; i < message.userProfiles.length; ++i) { @@ -93663,7 +94229,7 @@ export const Enterprise = $root.Enterprise = (() => { return "userProfiles." + error; } } - if (message.auditTeams != null && message.hasOwnProperty("auditTeams")) { + if (message.auditTeams != null && Object.hasOwnProperty.call(message, "auditTeams")) { if (!Array.isArray(message.auditTeams)) return "auditTeams: array expected"; for (let i = 0; i < message.auditTeams.length; ++i) { @@ -93672,7 +94238,7 @@ export const Enterprise = $root.Enterprise = (() => { return "auditTeams." + error; } } - if (message.auditRecords != null && message.hasOwnProperty("auditRecords")) { + if (message.auditRecords != null && Object.hasOwnProperty.call(message, "auditRecords")) { if (!Array.isArray(message.auditRecords)) return "auditRecords: array expected"; for (let i = 0; i < message.auditRecords.length; ++i) { @@ -93681,7 +94247,7 @@ export const Enterprise = $root.Enterprise = (() => { return "auditRecords." + error; } } - if (message.userRecords != null && message.hasOwnProperty("userRecords")) { + if (message.userRecords != null && Object.hasOwnProperty.call(message, "userRecords")) { if (!Array.isArray(message.userRecords)) return "userRecords: array expected"; for (let i = 0; i < message.userRecords.length; ++i) { @@ -93690,7 +94256,7 @@ export const Enterprise = $root.Enterprise = (() => { return "userRecords." + error; } } - if (message.sharedFolderRecords != null && message.hasOwnProperty("sharedFolderRecords")) { + if (message.sharedFolderRecords != null && Object.hasOwnProperty.call(message, "sharedFolderRecords")) { if (!Array.isArray(message.sharedFolderRecords)) return "sharedFolderRecords: array expected"; for (let i = 0; i < message.sharedFolderRecords.length; ++i) { @@ -93699,7 +94265,7 @@ export const Enterprise = $root.Enterprise = (() => { return "sharedFolderRecords." + error; } } - if (message.sharedFolderUsers != null && message.hasOwnProperty("sharedFolderUsers")) { + if (message.sharedFolderUsers != null && Object.hasOwnProperty.call(message, "sharedFolderUsers")) { if (!Array.isArray(message.sharedFolderUsers)) return "sharedFolderUsers: array expected"; for (let i = 0; i < message.sharedFolderUsers.length; ++i) { @@ -93708,7 +94274,7 @@ export const Enterprise = $root.Enterprise = (() => { return "sharedFolderUsers." + error; } } - if (message.sharedFolderTeams != null && message.hasOwnProperty("sharedFolderTeams")) { + if (message.sharedFolderTeams != null && Object.hasOwnProperty.call(message, "sharedFolderTeams")) { if (!Array.isArray(message.sharedFolderTeams)) return "sharedFolderTeams: array expected"; for (let i = 0; i < message.sharedFolderTeams.length; ++i) { @@ -93717,7 +94283,7 @@ export const Enterprise = $root.Enterprise = (() => { return "sharedFolderTeams." + error; } } - if (message.auditTeamUsers != null && message.hasOwnProperty("auditTeamUsers")) { + if (message.auditTeamUsers != null && Object.hasOwnProperty.call(message, "auditTeamUsers")) { if (!Array.isArray(message.auditTeamUsers)) return "auditTeamUsers: array expected"; for (let i = 0; i < message.auditTeamUsers.length; ++i) { @@ -93726,7 +94292,7 @@ export const Enterprise = $root.Enterprise = (() => { return "auditTeamUsers." + error; } } - if (message.auditRoles != null && message.hasOwnProperty("auditRoles")) { + if (message.auditRoles != null && Object.hasOwnProperty.call(message, "auditRoles")) { if (!Array.isArray(message.auditRoles)) return "auditRoles: array expected"; for (let i = 0; i < message.auditRoles.length; ++i) { @@ -93735,7 +94301,7 @@ export const Enterprise = $root.Enterprise = (() => { return "auditRoles." + error; } } - if (message.linkedRecords != null && message.hasOwnProperty("linkedRecords")) { + if (message.linkedRecords != null && Object.hasOwnProperty.call(message, "linkedRecords")) { if (!Array.isArray(message.linkedRecords)) return "linkedRecords: array expected"; for (let i = 0; i < message.linkedRecords.length; ++i) { @@ -93758,6 +94324,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -93782,7 +94350,7 @@ export const Enterprise = $root.Enterprise = (() => { else if (object.reportUid.length >= 0) message.reportUid = object.reportUid; if (object.complianceReportRun != null) { - if (typeof object.complianceReportRun !== "object") + if (!$util.isObject(object.complianceReportRun)) throw TypeError(".Enterprise.ComplianceReportResponse.complianceReportRun: object expected"); message.complianceReportRun = $root.Enterprise.ComplianceReportRun.fromObject(object.complianceReportRun, long + 1); } @@ -93791,7 +94359,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.userProfiles: array expected"); message.userProfiles = []; for (let i = 0; i < object.userProfiles.length; ++i) { - if (typeof object.userProfiles[i] !== "object") + if (!$util.isObject(object.userProfiles[i])) throw TypeError(".Enterprise.ComplianceReportResponse.userProfiles: object expected"); message.userProfiles[i] = $root.Enterprise.UserProfile.fromObject(object.userProfiles[i], long + 1); } @@ -93801,7 +94369,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.auditTeams: array expected"); message.auditTeams = []; for (let i = 0; i < object.auditTeams.length; ++i) { - if (typeof object.auditTeams[i] !== "object") + if (!$util.isObject(object.auditTeams[i])) throw TypeError(".Enterprise.ComplianceReportResponse.auditTeams: object expected"); message.auditTeams[i] = $root.Enterprise.AuditTeam.fromObject(object.auditTeams[i], long + 1); } @@ -93811,7 +94379,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.auditRecords: array expected"); message.auditRecords = []; for (let i = 0; i < object.auditRecords.length; ++i) { - if (typeof object.auditRecords[i] !== "object") + if (!$util.isObject(object.auditRecords[i])) throw TypeError(".Enterprise.ComplianceReportResponse.auditRecords: object expected"); message.auditRecords[i] = $root.Enterprise.AuditRecord.fromObject(object.auditRecords[i], long + 1); } @@ -93821,7 +94389,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.userRecords: array expected"); message.userRecords = []; for (let i = 0; i < object.userRecords.length; ++i) { - if (typeof object.userRecords[i] !== "object") + if (!$util.isObject(object.userRecords[i])) throw TypeError(".Enterprise.ComplianceReportResponse.userRecords: object expected"); message.userRecords[i] = $root.Enterprise.UserRecord.fromObject(object.userRecords[i], long + 1); } @@ -93831,7 +94399,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.sharedFolderRecords: array expected"); message.sharedFolderRecords = []; for (let i = 0; i < object.sharedFolderRecords.length; ++i) { - if (typeof object.sharedFolderRecords[i] !== "object") + if (!$util.isObject(object.sharedFolderRecords[i])) throw TypeError(".Enterprise.ComplianceReportResponse.sharedFolderRecords: object expected"); message.sharedFolderRecords[i] = $root.Enterprise.SharedFolderRecord.fromObject(object.sharedFolderRecords[i], long + 1); } @@ -93841,7 +94409,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.sharedFolderUsers: array expected"); message.sharedFolderUsers = []; for (let i = 0; i < object.sharedFolderUsers.length; ++i) { - if (typeof object.sharedFolderUsers[i] !== "object") + if (!$util.isObject(object.sharedFolderUsers[i])) throw TypeError(".Enterprise.ComplianceReportResponse.sharedFolderUsers: object expected"); message.sharedFolderUsers[i] = $root.Enterprise.SharedFolderUser.fromObject(object.sharedFolderUsers[i], long + 1); } @@ -93851,7 +94419,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.sharedFolderTeams: array expected"); message.sharedFolderTeams = []; for (let i = 0; i < object.sharedFolderTeams.length; ++i) { - if (typeof object.sharedFolderTeams[i] !== "object") + if (!$util.isObject(object.sharedFolderTeams[i])) throw TypeError(".Enterprise.ComplianceReportResponse.sharedFolderTeams: object expected"); message.sharedFolderTeams[i] = $root.Enterprise.SharedFolderTeam.fromObject(object.sharedFolderTeams[i], long + 1); } @@ -93861,7 +94429,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.auditTeamUsers: array expected"); message.auditTeamUsers = []; for (let i = 0; i < object.auditTeamUsers.length; ++i) { - if (typeof object.auditTeamUsers[i] !== "object") + if (!$util.isObject(object.auditTeamUsers[i])) throw TypeError(".Enterprise.ComplianceReportResponse.auditTeamUsers: object expected"); message.auditTeamUsers[i] = $root.Enterprise.AuditTeamUser.fromObject(object.auditTeamUsers[i], long + 1); } @@ -93871,7 +94439,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.auditRoles: array expected"); message.auditRoles = []; for (let i = 0; i < object.auditRoles.length; ++i) { - if (typeof object.auditRoles[i] !== "object") + if (!$util.isObject(object.auditRoles[i])) throw TypeError(".Enterprise.ComplianceReportResponse.auditRoles: object expected"); message.auditRoles[i] = $root.Enterprise.AuditRole.fromObject(object.auditRoles[i], long + 1); } @@ -93881,7 +94449,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.ComplianceReportResponse.linkedRecords: array expected"); message.linkedRecords = []; for (let i = 0; i < object.linkedRecords.length; ++i) { - if (typeof object.linkedRecords[i] !== "object") + if (!$util.isObject(object.linkedRecords[i])) throw TypeError(".Enterprise.ComplianceReportResponse.linkedRecords: object expected"); message.linkedRecords[i] = $root.Enterprise.LinkedRecord.fromObject(object.linkedRecords[i], long + 1); } @@ -93935,20 +94503,20 @@ export const Enterprise = $root.Enterprise = (() => { } object.complianceReportRun = null; } - if (message.dateGenerated != null && message.hasOwnProperty("dateGenerated")) + if (message.dateGenerated != null && Object.hasOwnProperty.call(message, "dateGenerated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateGenerated = typeof message.dateGenerated === "number" ? BigInt(message.dateGenerated) : $util.Long.fromBits(message.dateGenerated.low >>> 0, message.dateGenerated.high >>> 0, false).toBigInt(); else if (typeof message.dateGenerated === "number") object.dateGenerated = options.longs === String ? String(message.dateGenerated) : message.dateGenerated; else object.dateGenerated = options.longs === String ? $util.Long.prototype.toString.call(message.dateGenerated) : options.longs === Number ? new $util.LongBits(message.dateGenerated.low >>> 0, message.dateGenerated.high >>> 0).toNumber() : message.dateGenerated; - if (message.runByUserName != null && message.hasOwnProperty("runByUserName")) + if (message.runByUserName != null && Object.hasOwnProperty.call(message, "runByUserName")) object.runByUserName = message.runByUserName; - if (message.reportName != null && message.hasOwnProperty("reportName")) + if (message.reportName != null && Object.hasOwnProperty.call(message, "reportName")) object.reportName = message.reportName; - if (message.reportUid != null && message.hasOwnProperty("reportUid")) + if (message.reportUid != null && Object.hasOwnProperty.call(message, "reportUid")) object.reportUid = options.bytes === String ? $util.base64.encode(message.reportUid, 0, message.reportUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportUid) : message.reportUid; - if (message.complianceReportRun != null && message.hasOwnProperty("complianceReportRun")) + if (message.complianceReportRun != null && Object.hasOwnProperty.call(message, "complianceReportRun")) object.complianceReportRun = $root.Enterprise.ComplianceReportRun.toObject(message.complianceReportRun, options, q + 1); if (message.userProfiles && message.userProfiles.length) { object.userProfiles = []; @@ -94173,7 +94741,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ AuditRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -94267,25 +94835,25 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.auditData != null && message.hasOwnProperty("auditData")) + if (message.auditData != null && Object.hasOwnProperty.call(message, "auditData")) if (!(message.auditData && typeof message.auditData.length === "number" || $util.isString(message.auditData))) return "auditData: buffer expected"; - if (message.hasAttachments != null && message.hasOwnProperty("hasAttachments")) + if (message.hasAttachments != null && Object.hasOwnProperty.call(message, "hasAttachments")) if (typeof message.hasAttachments !== "boolean") return "hasAttachments: boolean expected"; - if (message.inTrash != null && message.hasOwnProperty("inTrash")) + if (message.inTrash != null && Object.hasOwnProperty.call(message, "inTrash")) if (typeof message.inTrash !== "boolean") return "inTrash: boolean expected"; - if (message.treeLeft != null && message.hasOwnProperty("treeLeft")) + if (message.treeLeft != null && Object.hasOwnProperty.call(message, "treeLeft")) if (!$util.isInteger(message.treeLeft)) return "treeLeft: integer expected"; - if (message.treeRight != null && message.hasOwnProperty("treeRight")) + if (message.treeRight != null && Object.hasOwnProperty.call(message, "treeRight")) if (!$util.isInteger(message.treeRight)) return "treeRight: integer expected"; - if (message.isDriveRecord != null && message.hasOwnProperty("isDriveRecord")) + if (message.isDriveRecord != null && Object.hasOwnProperty.call(message, "isDriveRecord")) if (typeof message.isDriveRecord !== "boolean") return "isDriveRecord: boolean expected"; return null; @@ -94302,6 +94870,8 @@ export const Enterprise = $root.Enterprise = (() => { AuditRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.AuditRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.AuditRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -94368,19 +94938,19 @@ export const Enterprise = $root.Enterprise = (() => { object.treeRight = 0; object.isDriveRecord = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.auditData != null && message.hasOwnProperty("auditData")) + if (message.auditData != null && Object.hasOwnProperty.call(message, "auditData")) object.auditData = options.bytes === String ? $util.base64.encode(message.auditData, 0, message.auditData.length) : options.bytes === Array ? Array.prototype.slice.call(message.auditData) : message.auditData; - if (message.hasAttachments != null && message.hasOwnProperty("hasAttachments")) + if (message.hasAttachments != null && Object.hasOwnProperty.call(message, "hasAttachments")) object.hasAttachments = message.hasAttachments; - if (message.inTrash != null && message.hasOwnProperty("inTrash")) + if (message.inTrash != null && Object.hasOwnProperty.call(message, "inTrash")) object.inTrash = message.inTrash; - if (message.treeLeft != null && message.hasOwnProperty("treeLeft")) + if (message.treeLeft != null && Object.hasOwnProperty.call(message, "treeLeft")) object.treeLeft = message.treeLeft; - if (message.treeRight != null && message.hasOwnProperty("treeRight")) + if (message.treeRight != null && Object.hasOwnProperty.call(message, "treeRight")) object.treeRight = message.treeRight; - if (message.isDriveRecord != null && message.hasOwnProperty("isDriveRecord")) + if (message.isDriveRecord != null && Object.hasOwnProperty.call(message, "isDriveRecord")) object.isDriveRecord = message.isDriveRecord; return object; }; @@ -94557,7 +95127,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ AuditRole.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -94653,25 +95223,25 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; - if (message.restrictShareOutsideEnterprise != null && message.hasOwnProperty("restrictShareOutsideEnterprise")) + if (message.restrictShareOutsideEnterprise != null && Object.hasOwnProperty.call(message, "restrictShareOutsideEnterprise")) if (typeof message.restrictShareOutsideEnterprise !== "boolean") return "restrictShareOutsideEnterprise: boolean expected"; - if (message.restrictShareAll != null && message.hasOwnProperty("restrictShareAll")) + if (message.restrictShareAll != null && Object.hasOwnProperty.call(message, "restrictShareAll")) if (typeof message.restrictShareAll !== "boolean") return "restrictShareAll: boolean expected"; - if (message.restrictShareOfAttachments != null && message.hasOwnProperty("restrictShareOfAttachments")) + if (message.restrictShareOfAttachments != null && Object.hasOwnProperty.call(message, "restrictShareOfAttachments")) if (typeof message.restrictShareOfAttachments !== "boolean") return "restrictShareOfAttachments: boolean expected"; - if (message.restrictMaskPasswordsWhileEditing != null && message.hasOwnProperty("restrictMaskPasswordsWhileEditing")) + if (message.restrictMaskPasswordsWhileEditing != null && Object.hasOwnProperty.call(message, "restrictMaskPasswordsWhileEditing")) if (typeof message.restrictMaskPasswordsWhileEditing !== "boolean") return "restrictMaskPasswordsWhileEditing: boolean expected"; - if (message.roleNodeManagements != null && message.hasOwnProperty("roleNodeManagements")) { + if (message.roleNodeManagements != null && Object.hasOwnProperty.call(message, "roleNodeManagements")) { if (!Array.isArray(message.roleNodeManagements)) return "roleNodeManagements: array expected"; for (let i = 0; i < message.roleNodeManagements.length; ++i) { @@ -94694,6 +95264,8 @@ export const Enterprise = $root.Enterprise = (() => { AuditRole.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.AuditRole) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.AuditRole: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -94726,7 +95298,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.AuditRole.roleNodeManagements: array expected"); message.roleNodeManagements = []; for (let i = 0; i < object.roleNodeManagements.length; ++i) { - if (typeof object.roleNodeManagements[i] !== "object") + if (!$util.isObject(object.roleNodeManagements[i])) throw TypeError(".Enterprise.AuditRole.roleNodeManagements: object expected"); message.roleNodeManagements[i] = $root.Enterprise.RoleNodeManagement.fromObject(object.roleNodeManagements[i], long + 1); } @@ -94771,22 +95343,22 @@ export const Enterprise = $root.Enterprise = (() => { object.restrictShareOfAttachments = false; object.restrictMaskPasswordsWhileEditing = false; } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; - if (message.restrictShareOutsideEnterprise != null && message.hasOwnProperty("restrictShareOutsideEnterprise")) + if (message.restrictShareOutsideEnterprise != null && Object.hasOwnProperty.call(message, "restrictShareOutsideEnterprise")) object.restrictShareOutsideEnterprise = message.restrictShareOutsideEnterprise; - if (message.restrictShareAll != null && message.hasOwnProperty("restrictShareAll")) + if (message.restrictShareAll != null && Object.hasOwnProperty.call(message, "restrictShareAll")) object.restrictShareAll = message.restrictShareAll; - if (message.restrictShareOfAttachments != null && message.hasOwnProperty("restrictShareOfAttachments")) + if (message.restrictShareOfAttachments != null && Object.hasOwnProperty.call(message, "restrictShareOfAttachments")) object.restrictShareOfAttachments = message.restrictShareOfAttachments; - if (message.restrictMaskPasswordsWhileEditing != null && message.hasOwnProperty("restrictMaskPasswordsWhileEditing")) + if (message.restrictMaskPasswordsWhileEditing != null && Object.hasOwnProperty.call(message, "restrictMaskPasswordsWhileEditing")) object.restrictMaskPasswordsWhileEditing = message.restrictMaskPasswordsWhileEditing; if (message.roleNodeManagements && message.roleNodeManagements.length) { object.roleNodeManagements = []; @@ -94933,7 +95505,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RoleNodeManagement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -95015,16 +95587,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.treeLeft != null && message.hasOwnProperty("treeLeft")) + if (message.treeLeft != null && Object.hasOwnProperty.call(message, "treeLeft")) if (!$util.isInteger(message.treeLeft)) return "treeLeft: integer expected"; - if (message.treeRight != null && message.hasOwnProperty("treeRight")) + if (message.treeRight != null && Object.hasOwnProperty.call(message, "treeRight")) if (!$util.isInteger(message.treeRight)) return "treeRight: integer expected"; - if (message.cascade != null && message.hasOwnProperty("cascade")) + if (message.cascade != null && Object.hasOwnProperty.call(message, "cascade")) if (typeof message.cascade !== "boolean") return "cascade: boolean expected"; - if (message.privileges != null && message.hasOwnProperty("privileges")) + if (message.privileges != null && Object.hasOwnProperty.call(message, "privileges")) if (!$util.isInteger(message.privileges)) return "privileges: integer expected"; return null; @@ -95041,6 +95613,8 @@ export const Enterprise = $root.Enterprise = (() => { RoleNodeManagement.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RoleNodeManagement) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RoleNodeManagement: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -95080,13 +95654,13 @@ export const Enterprise = $root.Enterprise = (() => { object.cascade = false; object.privileges = 0; } - if (message.treeLeft != null && message.hasOwnProperty("treeLeft")) + if (message.treeLeft != null && Object.hasOwnProperty.call(message, "treeLeft")) object.treeLeft = message.treeLeft; - if (message.treeRight != null && message.hasOwnProperty("treeRight")) + if (message.treeRight != null && Object.hasOwnProperty.call(message, "treeRight")) object.treeRight = message.treeRight; - if (message.cascade != null && message.hasOwnProperty("cascade")) + if (message.cascade != null && Object.hasOwnProperty.call(message, "cascade")) object.cascade = message.cascade; - if (message.privileges != null && message.hasOwnProperty("privileges")) + if (message.privileges != null && Object.hasOwnProperty.call(message, "privileges")) object.privileges = message.privileges; return object; }; @@ -95244,7 +95818,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserProfile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -95337,19 +95911,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.roleIds != null && message.hasOwnProperty("roleIds")) { + if (message.roleIds != null && Object.hasOwnProperty.call(message, "roleIds")) { if (!Array.isArray(message.roleIds)) return "roleIds: array expected"; for (let i = 0; i < message.roleIds.length; ++i) @@ -95370,6 +95944,8 @@ export const Enterprise = $root.Enterprise = (() => { UserProfile.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserProfile) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserProfile: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -95436,18 +96012,18 @@ export const Enterprise = $root.Enterprise = (() => { object.jobTitle = ""; object.email = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; if (message.roleIds && message.roleIds.length) { object.roleIds = []; @@ -95612,7 +96188,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RecordPermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -95691,15 +96267,15 @@ export const Enterprise = $root.Enterprise = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.permissionBits != null && message.hasOwnProperty("permissionBits")) { + if (message.permissionBits != null && Object.hasOwnProperty.call(message, "permissionBits")) { properties.permission = 1; if (!$util.isInteger(message.permissionBits)) return "permissionBits: integer expected"; } - if (message.drive != null && message.hasOwnProperty("drive")) { + if (message.drive != null && Object.hasOwnProperty.call(message, "drive")) { if (properties.permission === 1) return "permission: multiple values"; properties.permission = 1; @@ -95723,6 +96299,8 @@ export const Enterprise = $root.Enterprise = (() => { RecordPermission.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RecordPermission) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RecordPermission: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -95736,7 +96314,7 @@ export const Enterprise = $root.Enterprise = (() => { if (object.permissionBits != null) message.permissionBits = object.permissionBits | 0; if (object.drive != null) { - if (typeof object.drive !== "object") + if (!$util.isObject(object.drive)) throw TypeError(".Enterprise.RecordPermission.drive: object expected"); message.drive = $root.Enterprise.DrivePermission.fromObject(object.drive, long + 1); } @@ -95768,14 +96346,14 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.recordUid = $util.newBuffer(object.recordUid); } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.permissionBits != null && message.hasOwnProperty("permissionBits")) { + if (message.permissionBits != null && Object.hasOwnProperty.call(message, "permissionBits")) { object.permissionBits = message.permissionBits; if (options.oneofs) object.permission = "permissionBits"; } - if (message.drive != null && message.hasOwnProperty("drive")) { + if (message.drive != null && Object.hasOwnProperty.call(message, "drive")) { object.drive = $root.Enterprise.DrivePermission.toObject(message.drive, options, q + 1); if (options.oneofs) object.permission = "drive"; @@ -95960,7 +96538,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DrivePermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96054,22 +96632,22 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (typeof message.owner !== "boolean") return "owner: boolean expected"; - if (message.denied != null && message.hasOwnProperty("denied")) + if (message.denied != null && Object.hasOwnProperty.call(message, "denied")) if (typeof message.denied !== "boolean") return "denied: boolean expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) if (typeof message.canShare !== "boolean") return "canShare: boolean expected"; - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) if (typeof message.isShareAdmin !== "boolean") return "isShareAdmin: boolean expected"; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) switch (message.accessType) { default: return "accessType: enum value expected"; @@ -96082,7 +96660,7 @@ export const Enterprise = $root.Enterprise = (() => { case 6: break; } - if (message.folderPermissions != null && message.hasOwnProperty("folderPermissions")) { + if (message.folderPermissions != null && Object.hasOwnProperty.call(message, "folderPermissions")) { let error = $root.Folder.FolderPermissions.verify(message.folderPermissions, long + 1); if (error) return "folderPermissions." + error; @@ -96101,6 +96679,8 @@ export const Enterprise = $root.Enterprise = (() => { DrivePermission.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DrivePermission) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DrivePermission: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -96153,7 +96733,7 @@ export const Enterprise = $root.Enterprise = (() => { break; } if (object.folderPermissions != null) { - if (typeof object.folderPermissions !== "object") + if (!$util.isObject(object.folderPermissions)) throw TypeError(".Enterprise.DrivePermission.folderPermissions: object expected"); message.folderPermissions = $root.Folder.FolderPermissions.fromObject(object.folderPermissions, long + 1); } @@ -96186,19 +96766,19 @@ export const Enterprise = $root.Enterprise = (() => { object.accessType = options.enums === String ? "AT_UNKNOWN" : 0; object.folderPermissions = null; } - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.denied != null && message.hasOwnProperty("denied")) + if (message.denied != null && Object.hasOwnProperty.call(message, "denied")) object.denied = message.denied; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) object.canShare = message.canShare; - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) object.isShareAdmin = message.isShareAdmin; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) object.accessType = options.enums === String ? $root.Folder.AccessType[message.accessType] === undefined ? message.accessType : $root.Folder.AccessType[message.accessType] : message.accessType; - if (message.folderPermissions != null && message.hasOwnProperty("folderPermissions")) + if (message.folderPermissions != null && Object.hasOwnProperty.call(message, "folderPermissions")) object.folderPermissions = $root.Folder.FolderPermissions.toObject(message.folderPermissions, options, q + 1); return object; }; @@ -96320,7 +96900,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96396,10 +96976,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.recordPermissions != null && message.hasOwnProperty("recordPermissions")) { + if (message.recordPermissions != null && Object.hasOwnProperty.call(message, "recordPermissions")) { if (!Array.isArray(message.recordPermissions)) return "recordPermissions: array expected"; for (let i = 0; i < message.recordPermissions.length; ++i) { @@ -96422,6 +97002,8 @@ export const Enterprise = $root.Enterprise = (() => { UserRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -96441,7 +97023,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.UserRecord.recordPermissions: array expected"); message.recordPermissions = []; for (let i = 0; i < object.recordPermissions.length; ++i) { - if (typeof object.recordPermissions[i] !== "object") + if (!$util.isObject(object.recordPermissions[i])) throw TypeError(".Enterprise.UserRecord.recordPermissions: object expected"); message.recordPermissions[i] = $root.Enterprise.RecordPermission.fromObject(object.recordPermissions[i], long + 1); } @@ -96474,7 +97056,7 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -96626,7 +97208,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ AuditTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96708,16 +97290,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) if (!$util.isString(message.teamName)) return "teamName: string expected"; - if (message.restrictEdit != null && message.hasOwnProperty("restrictEdit")) + if (message.restrictEdit != null && Object.hasOwnProperty.call(message, "restrictEdit")) if (typeof message.restrictEdit !== "boolean") return "restrictEdit: boolean expected"; - if (message.restrictShare != null && message.hasOwnProperty("restrictShare")) + if (message.restrictShare != null && Object.hasOwnProperty.call(message, "restrictShare")) if (typeof message.restrictShare !== "boolean") return "restrictShare: boolean expected"; return null; @@ -96734,6 +97316,8 @@ export const Enterprise = $root.Enterprise = (() => { AuditTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.AuditTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.AuditTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -96782,13 +97366,13 @@ export const Enterprise = $root.Enterprise = (() => { object.restrictEdit = false; object.restrictShare = false; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) object.teamName = message.teamName; - if (message.restrictEdit != null && message.hasOwnProperty("restrictEdit")) + if (message.restrictEdit != null && Object.hasOwnProperty.call(message, "restrictEdit")) object.restrictEdit = message.restrictEdit; - if (message.restrictShare != null && message.hasOwnProperty("restrictShare")) + if (message.restrictShare != null && Object.hasOwnProperty.call(message, "restrictShare")) object.restrictShare = message.restrictShare; return object; }; @@ -96913,7 +97497,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ AuditTeamUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -96994,10 +97578,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) @@ -97018,6 +97602,8 @@ export const Enterprise = $root.Enterprise = (() => { AuditTeamUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.AuditTeamUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.AuditTeamUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97072,7 +97658,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.teamUid = $util.newBuffer(object.teamUid); } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; if (message.enterpriseUserIds && message.enterpriseUserIds.length) { object.enterpriseUserIds = []; @@ -97217,7 +97803,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -97299,10 +97885,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.recordPermissions != null && message.hasOwnProperty("recordPermissions")) { + if (message.recordPermissions != null && Object.hasOwnProperty.call(message, "recordPermissions")) { if (!Array.isArray(message.recordPermissions)) return "recordPermissions: array expected"; for (let i = 0; i < message.recordPermissions.length; ++i) { @@ -97311,7 +97897,7 @@ export const Enterprise = $root.Enterprise = (() => { return "recordPermissions." + error; } } - if (message.shareAdminRecords != null && message.hasOwnProperty("shareAdminRecords")) { + if (message.shareAdminRecords != null && Object.hasOwnProperty.call(message, "shareAdminRecords")) { if (!Array.isArray(message.shareAdminRecords)) return "shareAdminRecords: array expected"; for (let i = 0; i < message.shareAdminRecords.length; ++i) { @@ -97334,6 +97920,8 @@ export const Enterprise = $root.Enterprise = (() => { SharedFolderRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SharedFolderRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SharedFolderRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97349,7 +97937,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.SharedFolderRecord.recordPermissions: array expected"); message.recordPermissions = []; for (let i = 0; i < object.recordPermissions.length; ++i) { - if (typeof object.recordPermissions[i] !== "object") + if (!$util.isObject(object.recordPermissions[i])) throw TypeError(".Enterprise.SharedFolderRecord.recordPermissions: object expected"); message.recordPermissions[i] = $root.Enterprise.RecordPermission.fromObject(object.recordPermissions[i], long + 1); } @@ -97359,7 +97947,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.SharedFolderRecord.shareAdminRecords: array expected"); message.shareAdminRecords = []; for (let i = 0; i < object.shareAdminRecords.length; ++i) { - if (typeof object.shareAdminRecords[i] !== "object") + if (!$util.isObject(object.shareAdminRecords[i])) throw TypeError(".Enterprise.SharedFolderRecord.shareAdminRecords: object expected"); message.shareAdminRecords[i] = $root.Enterprise.ShareAdminRecord.fromObject(object.shareAdminRecords[i], long + 1); } @@ -97396,7 +97984,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; if (message.recordPermissions && message.recordPermissions.length) { object.recordPermissions = []; @@ -97531,7 +98119,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ShareAdminRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -97612,10 +98200,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.recordPermissionIndexes != null && message.hasOwnProperty("recordPermissionIndexes")) { + if (message.recordPermissionIndexes != null && Object.hasOwnProperty.call(message, "recordPermissionIndexes")) { if (!Array.isArray(message.recordPermissionIndexes)) return "recordPermissionIndexes: array expected"; for (let i = 0; i < message.recordPermissionIndexes.length; ++i) @@ -97636,6 +98224,8 @@ export const Enterprise = $root.Enterprise = (() => { ShareAdminRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ShareAdminRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ShareAdminRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97685,7 +98275,7 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -97820,7 +98410,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -97901,10 +98491,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) @@ -97925,6 +98515,8 @@ export const Enterprise = $root.Enterprise = (() => { SharedFolderUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SharedFolderUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SharedFolderUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -97979,7 +98571,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; if (message.enterpriseUserIds && message.enterpriseUserIds.length) { object.enterpriseUserIds = []; @@ -98111,7 +98703,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98187,10 +98779,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.teamUids != null && message.hasOwnProperty("teamUids")) { + if (message.teamUids != null && Object.hasOwnProperty.call(message, "teamUids")) { if (!Array.isArray(message.teamUids)) return "teamUids: array expected"; for (let i = 0; i < message.teamUids.length; ++i) @@ -98211,6 +98803,8 @@ export const Enterprise = $root.Enterprise = (() => { SharedFolderTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SharedFolderTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SharedFolderTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98261,7 +98855,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; if (message.teamUids && message.teamUids.length) { object.teamUids = []; @@ -98375,7 +98969,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetComplianceReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98445,7 +99039,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reportUid != null && message.hasOwnProperty("reportUid")) + if (message.reportUid != null && Object.hasOwnProperty.call(message, "reportUid")) if (!(message.reportUid && typeof message.reportUid.length === "number" || $util.isString(message.reportUid))) return "reportUid: buffer expected"; return null; @@ -98462,6 +99056,8 @@ export const Enterprise = $root.Enterprise = (() => { GetComplianceReportRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetComplianceReportRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetComplianceReportRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98500,7 +99096,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.reportUid = $util.newBuffer(object.reportUid); } - if (message.reportUid != null && message.hasOwnProperty("reportUid")) + if (message.reportUid != null && Object.hasOwnProperty.call(message, "reportUid")) object.reportUid = options.bytes === String ? $util.base64.encode(message.reportUid, 0, message.reportUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportUid) : message.reportUid; return object; }; @@ -98609,7 +99205,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetComplianceReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98679,7 +99275,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.downloadUrl != null && message.hasOwnProperty("downloadUrl")) + if (message.downloadUrl != null && Object.hasOwnProperty.call(message, "downloadUrl")) if (!$util.isString(message.downloadUrl)) return "downloadUrl: string expected"; return null; @@ -98696,6 +99292,8 @@ export const Enterprise = $root.Enterprise = (() => { GetComplianceReportResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetComplianceReportResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetComplianceReportResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98725,7 +99323,7 @@ export const Enterprise = $root.Enterprise = (() => { let object = {}; if (options.defaults) object.downloadUrl = ""; - if (message.downloadUrl != null && message.hasOwnProperty("downloadUrl")) + if (message.downloadUrl != null && Object.hasOwnProperty.call(message, "downloadUrl")) object.downloadUrl = message.downloadUrl; return object; }; @@ -98834,7 +99432,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceReportCriteriaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -98904,7 +99502,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.criteriaUid != null && message.hasOwnProperty("criteriaUid")) + if (message.criteriaUid != null && Object.hasOwnProperty.call(message, "criteriaUid")) if (!(message.criteriaUid && typeof message.criteriaUid.length === "number" || $util.isString(message.criteriaUid))) return "criteriaUid: buffer expected"; return null; @@ -98921,6 +99519,8 @@ export const Enterprise = $root.Enterprise = (() => { ComplianceReportCriteriaRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ComplianceReportCriteriaRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ComplianceReportCriteriaRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -98959,7 +99559,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.criteriaUid = $util.newBuffer(object.criteriaUid); } - if (message.criteriaUid != null && message.hasOwnProperty("criteriaUid")) + if (message.criteriaUid != null && Object.hasOwnProperty.call(message, "criteriaUid")) object.criteriaUid = options.bytes === String ? $util.base64.encode(message.criteriaUid, 0, message.criteriaUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.criteriaUid) : message.criteriaUid; return object; }; @@ -99068,7 +99668,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ SaveComplianceReportCriteriaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99138,7 +99738,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.criteriaUid != null && message.hasOwnProperty("criteriaUid")) + if (message.criteriaUid != null && Object.hasOwnProperty.call(message, "criteriaUid")) if (!(message.criteriaUid && typeof message.criteriaUid.length === "number" || $util.isString(message.criteriaUid))) return "criteriaUid: buffer expected"; return null; @@ -99155,6 +99755,8 @@ export const Enterprise = $root.Enterprise = (() => { SaveComplianceReportCriteriaResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.SaveComplianceReportCriteriaResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.SaveComplianceReportCriteriaResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99193,7 +99795,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.criteriaUid = $util.newBuffer(object.criteriaUid); } - if (message.criteriaUid != null && message.hasOwnProperty("criteriaUid")) + if (message.criteriaUid != null && Object.hasOwnProperty.call(message, "criteriaUid")) object.criteriaUid = options.bytes === String ? $util.base64.encode(message.criteriaUid, 0, message.criteriaUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.criteriaUid) : message.criteriaUid; return object; }; @@ -99315,7 +99917,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LinkedRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99391,10 +99993,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ownerUid != null && message.hasOwnProperty("ownerUid")) + if (message.ownerUid != null && Object.hasOwnProperty.call(message, "ownerUid")) if (!(message.ownerUid && typeof message.ownerUid.length === "number" || $util.isString(message.ownerUid))) return "ownerUid: buffer expected"; - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) @@ -99415,6 +100017,8 @@ export const Enterprise = $root.Enterprise = (() => { LinkedRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LinkedRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LinkedRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99465,7 +100069,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.ownerUid = $util.newBuffer(object.ownerUid); } - if (message.ownerUid != null && message.hasOwnProperty("ownerUid")) + if (message.ownerUid != null && Object.hasOwnProperty.call(message, "ownerUid")) object.ownerUid = options.bytes === String ? $util.base64.encode(message.ownerUid, 0, message.ownerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.ownerUid) : message.ownerUid; if (message.recordUids && message.recordUids.length) { object.recordUids = []; @@ -99601,7 +100205,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetSharingAdminsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -99679,13 +100283,13 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -99702,6 +100306,8 @@ export const Enterprise = $root.Enterprise = (() => { GetSharingAdminsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetSharingAdminsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetSharingAdminsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -99756,11 +100362,11 @@ export const Enterprise = $root.Enterprise = (() => { } object.username = ""; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -99946,7 +100552,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UserProfileExt.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100044,28 +100650,28 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.isMSPMCAdmin != null && message.hasOwnProperty("isMSPMCAdmin")) + if (message.isMSPMCAdmin != null && Object.hasOwnProperty.call(message, "isMSPMCAdmin")) if (typeof message.isMSPMCAdmin !== "boolean") return "isMSPMCAdmin: boolean expected"; - if (message.isInSharedFolder != null && message.hasOwnProperty("isInSharedFolder")) + if (message.isInSharedFolder != null && Object.hasOwnProperty.call(message, "isInSharedFolder")) if (typeof message.isInSharedFolder !== "boolean") return "isInSharedFolder: boolean expected"; - if (message.isShareAdminForRequestedObject != null && message.hasOwnProperty("isShareAdminForRequestedObject")) + if (message.isShareAdminForRequestedObject != null && Object.hasOwnProperty.call(message, "isShareAdminForRequestedObject")) if (typeof message.isShareAdminForRequestedObject !== "boolean") return "isShareAdminForRequestedObject: boolean expected"; - if (message.isShareAdminForSharedFolderOwner != null && message.hasOwnProperty("isShareAdminForSharedFolderOwner")) + if (message.isShareAdminForSharedFolderOwner != null && Object.hasOwnProperty.call(message, "isShareAdminForSharedFolderOwner")) if (typeof message.isShareAdminForSharedFolderOwner !== "boolean") return "isShareAdminForSharedFolderOwner: boolean expected"; - if (message.hasAccessToObject != null && message.hasOwnProperty("hasAccessToObject")) + if (message.hasAccessToObject != null && Object.hasOwnProperty.call(message, "hasAccessToObject")) if (typeof message.hasAccessToObject !== "boolean") return "hasAccessToObject: boolean expected"; return null; @@ -100082,6 +100688,8 @@ export const Enterprise = $root.Enterprise = (() => { UserProfileExt.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UserProfileExt) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UserProfileExt: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100133,21 +100741,21 @@ export const Enterprise = $root.Enterprise = (() => { object.isShareAdminForSharedFolderOwner = false; object.hasAccessToObject = false; } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.isMSPMCAdmin != null && message.hasOwnProperty("isMSPMCAdmin")) + if (message.isMSPMCAdmin != null && Object.hasOwnProperty.call(message, "isMSPMCAdmin")) object.isMSPMCAdmin = message.isMSPMCAdmin; - if (message.isInSharedFolder != null && message.hasOwnProperty("isInSharedFolder")) + if (message.isInSharedFolder != null && Object.hasOwnProperty.call(message, "isInSharedFolder")) object.isInSharedFolder = message.isInSharedFolder; - if (message.isShareAdminForRequestedObject != null && message.hasOwnProperty("isShareAdminForRequestedObject")) + if (message.isShareAdminForRequestedObject != null && Object.hasOwnProperty.call(message, "isShareAdminForRequestedObject")) object.isShareAdminForRequestedObject = message.isShareAdminForRequestedObject; - if (message.isShareAdminForSharedFolderOwner != null && message.hasOwnProperty("isShareAdminForSharedFolderOwner")) + if (message.isShareAdminForSharedFolderOwner != null && Object.hasOwnProperty.call(message, "isShareAdminForSharedFolderOwner")) object.isShareAdminForSharedFolderOwner = message.isShareAdminForSharedFolderOwner; - if (message.hasAccessToObject != null && message.hasOwnProperty("hasAccessToObject")) + if (message.hasAccessToObject != null && Object.hasOwnProperty.call(message, "hasAccessToObject")) object.hasAccessToObject = message.hasAccessToObject; return object; }; @@ -100258,7 +100866,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ GetSharingAdminsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100330,7 +100938,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userProfileExts != null && message.hasOwnProperty("userProfileExts")) { + if (message.userProfileExts != null && Object.hasOwnProperty.call(message, "userProfileExts")) { if (!Array.isArray(message.userProfileExts)) return "userProfileExts: array expected"; for (let i = 0; i < message.userProfileExts.length; ++i) { @@ -100353,6 +100961,8 @@ export const Enterprise = $root.Enterprise = (() => { GetSharingAdminsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.GetSharingAdminsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.GetSharingAdminsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100363,7 +100973,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.GetSharingAdminsResponse.userProfileExts: array expected"); message.userProfileExts = []; for (let i = 0; i < object.userProfileExts.length; ++i) { - if (typeof object.userProfileExts[i] !== "object") + if (!$util.isObject(object.userProfileExts[i])) throw TypeError(".Enterprise.GetSharingAdminsResponse.userProfileExts: object expected"); message.userProfileExts[i] = $root.Enterprise.UserProfileExt.fromObject(object.userProfileExts[i], long + 1); } @@ -100504,7 +101114,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsEnterpriseUsersAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100576,7 +101186,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teams != null && message.hasOwnProperty("teams")) { + if (message.teams != null && Object.hasOwnProperty.call(message, "teams")) { if (!Array.isArray(message.teams)) return "teams: array expected"; for (let i = 0; i < message.teams.length; ++i) { @@ -100599,6 +101209,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsEnterpriseUsersAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsEnterpriseUsersAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsEnterpriseUsersAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100609,7 +101221,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamsEnterpriseUsersAddRequest.teams: array expected"); message.teams = []; for (let i = 0; i < object.teams.length; ++i) { - if (typeof object.teams[i] !== "object") + if (!$util.isObject(object.teams[i])) throw TypeError(".Enterprise.TeamsEnterpriseUsersAddRequest.teams: object expected"); message.teams[i] = $root.Enterprise.TeamsEnterpriseUsersAddTeamRequest.fromObject(object.teams[i], long + 1); } @@ -100761,7 +101373,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsEnterpriseUsersAddTeamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -100837,10 +101449,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -100863,6 +101475,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsEnterpriseUsersAddTeamRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsEnterpriseUsersAddTeamRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsEnterpriseUsersAddTeamRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -100878,7 +101492,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamsEnterpriseUsersAddTeamRequest.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.TeamsEnterpriseUsersAddTeamRequest.users: object expected"); message.users[i] = $root.Enterprise.TeamsEnterpriseUsersAddUserRequest.fromObject(object.users[i], long + 1); } @@ -100913,7 +101527,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.teamUid = $util.newBuffer(object.teamUid); } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; if (message.users && message.users.length) { object.users = []; @@ -101060,7 +101674,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsEnterpriseUsersAddUserRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -101142,10 +101756,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.userType != null && message.hasOwnProperty("userType")) + if (message.userType != null && Object.hasOwnProperty.call(message, "userType")) switch (message.userType) { default: return "userType: enum value expected"; @@ -101154,10 +101768,10 @@ export const Enterprise = $root.Enterprise = (() => { case 2: break; } - if (message.teamKey != null && message.hasOwnProperty("teamKey")) + if (message.teamKey != null && Object.hasOwnProperty.call(message, "teamKey")) if (!$util.isString(message.teamKey)) return "teamKey: string expected"; - if (message.typedTeamKey != null && message.hasOwnProperty("typedTeamKey")) { + if (message.typedTeamKey != null && Object.hasOwnProperty.call(message, "typedTeamKey")) { let error = $root.Enterprise.TypedKey.verify(message.typedTeamKey, long + 1); if (error) return "typedTeamKey." + error; @@ -101176,6 +101790,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsEnterpriseUsersAddUserRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsEnterpriseUsersAddUserRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsEnterpriseUsersAddUserRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -101213,7 +101829,7 @@ export const Enterprise = $root.Enterprise = (() => { if (object.teamKey != null) message.teamKey = String(object.teamKey); if (object.typedTeamKey != null) { - if (typeof object.typedTeamKey !== "object") + if (!$util.isObject(object.typedTeamKey)) throw TypeError(".Enterprise.TeamsEnterpriseUsersAddUserRequest.typedTeamKey: object expected"); message.typedTeamKey = $root.Enterprise.TypedKey.fromObject(object.typedTeamKey, long + 1); } @@ -101247,18 +101863,18 @@ export const Enterprise = $root.Enterprise = (() => { object.teamKey = ""; object.typedTeamKey = null; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.userType != null && message.hasOwnProperty("userType")) + if (message.userType != null && Object.hasOwnProperty.call(message, "userType")) object.userType = options.enums === String ? $root.Enterprise.TeamUserType[message.userType] === undefined ? message.userType : $root.Enterprise.TeamUserType[message.userType] : message.userType; - if (message.teamKey != null && message.hasOwnProperty("teamKey")) + if (message.teamKey != null && Object.hasOwnProperty.call(message, "teamKey")) object.teamKey = message.teamKey; - if (message.typedTeamKey != null && message.hasOwnProperty("typedTeamKey")) + if (message.typedTeamKey != null && Object.hasOwnProperty.call(message, "typedTeamKey")) object.typedTeamKey = $root.Enterprise.TypedKey.toObject(message.typedTeamKey, options, q + 1); return object; }; @@ -101378,7 +101994,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TypedKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -101452,10 +102068,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -101480,6 +102096,8 @@ export const Enterprise = $root.Enterprise = (() => { TypedKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TypedKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TypedKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -101548,9 +102166,9 @@ export const Enterprise = $root.Enterprise = (() => { } object.keyType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; return object; }; @@ -101688,7 +102306,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsEnterpriseUsersAddResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -101764,7 +102382,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teams != null && message.hasOwnProperty("teams")) { + if (message.teams != null && Object.hasOwnProperty.call(message, "teams")) { if (!Array.isArray(message.teams)) return "teams: array expected"; for (let i = 0; i < message.teams.length; ++i) { @@ -101773,7 +102391,7 @@ export const Enterprise = $root.Enterprise = (() => { return "teams." + error; } } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -101790,6 +102408,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsEnterpriseUsersAddResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsEnterpriseUsersAddResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsEnterpriseUsersAddResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -101800,7 +102420,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamsEnterpriseUsersAddResponse.teams: array expected"); message.teams = []; for (let i = 0; i < object.teams.length; ++i) { - if (typeof object.teams[i] !== "object") + if (!$util.isObject(object.teams[i])) throw TypeError(".Enterprise.TeamsEnterpriseUsersAddResponse.teams: object expected"); message.teams[i] = $root.Enterprise.TeamsEnterpriseUsersAddTeamResponse.fromObject(object.teams[i], long + 1); } @@ -101847,7 +102467,7 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.teams.length; ++j) object.teams[j] = $root.Enterprise.TeamsEnterpriseUsersAddTeamResponse.toObject(message.teams[j], options, q + 1); } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -102018,7 +102638,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsEnterpriseUsersAddTeamResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102110,10 +102730,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -102122,16 +102742,16 @@ export const Enterprise = $root.Enterprise = (() => { return "users." + error; } } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) if (!$util.isString(message.resultCode)) return "resultCode: string expected"; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) if (!$util.isString(message.additionalInfo)) return "additionalInfo: string expected"; return null; @@ -102148,6 +102768,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsEnterpriseUsersAddTeamResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsEnterpriseUsersAddTeamResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsEnterpriseUsersAddTeamResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102163,7 +102785,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamsEnterpriseUsersAddTeamResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.TeamsEnterpriseUsersAddTeamResponse.users: object expected"); message.users[i] = $root.Enterprise.TeamsEnterpriseUsersAddUserResponse.fromObject(object.users[i], long + 1); } @@ -102211,20 +102833,20 @@ export const Enterprise = $root.Enterprise = (() => { object.resultCode = ""; object.additionalInfo = ""; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; if (message.users && message.users.length) { object.users = []; for (let j = 0; j < message.users.length; ++j) object.users[j] = $root.Enterprise.TeamsEnterpriseUsersAddUserResponse.toObject(message.users[j], options, q + 1); } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) object.resultCode = message.resultCode; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) object.additionalInfo = message.additionalInfo; return object; }; @@ -102388,7 +103010,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamsEnterpriseUsersAddUserResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102478,22 +103100,22 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) if (!$util.isString(message.resultCode)) return "resultCode: string expected"; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) if (!$util.isString(message.additionalInfo)) return "additionalInfo: string expected"; return null; @@ -102510,6 +103132,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamsEnterpriseUsersAddUserResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamsEnterpriseUsersAddUserResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamsEnterpriseUsersAddUserResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102577,27 +103201,27 @@ export const Enterprise = $root.Enterprise = (() => { object.resultCode = ""; object.additionalInfo = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) object.resultCode = message.resultCode; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) object.additionalInfo = message.additionalInfo; return object; }; @@ -102717,7 +103341,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamEnterpriseUserRemove.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -102791,10 +103415,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -102811,6 +103435,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamEnterpriseUserRemove.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamEnterpriseUserRemove) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamEnterpriseUserRemove: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -102864,9 +103490,9 @@ export const Enterprise = $root.Enterprise = (() => { } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -102982,7 +103608,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamEnterpriseUserRemovesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103054,7 +103680,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamEnterpriseUserRemove != null && message.hasOwnProperty("teamEnterpriseUserRemove")) { + if (message.teamEnterpriseUserRemove != null && Object.hasOwnProperty.call(message, "teamEnterpriseUserRemove")) { if (!Array.isArray(message.teamEnterpriseUserRemove)) return "teamEnterpriseUserRemove: array expected"; for (let i = 0; i < message.teamEnterpriseUserRemove.length; ++i) { @@ -103077,6 +103703,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamEnterpriseUserRemovesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamEnterpriseUserRemovesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamEnterpriseUserRemovesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -103087,7 +103715,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamEnterpriseUserRemovesRequest.teamEnterpriseUserRemove: array expected"); message.teamEnterpriseUserRemove = []; for (let i = 0; i < object.teamEnterpriseUserRemove.length; ++i) { - if (typeof object.teamEnterpriseUserRemove[i] !== "object") + if (!$util.isObject(object.teamEnterpriseUserRemove[i])) throw TypeError(".Enterprise.TeamEnterpriseUserRemovesRequest.teamEnterpriseUserRemove: object expected"); message.teamEnterpriseUserRemove[i] = $root.Enterprise.TeamEnterpriseUserRemove.fromObject(object.teamEnterpriseUserRemove[i], long + 1); } @@ -103228,7 +103856,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamEnterpriseUserRemovesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103300,7 +103928,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamEnterpriseUserRemoveResponse != null && message.hasOwnProperty("teamEnterpriseUserRemoveResponse")) { + if (message.teamEnterpriseUserRemoveResponse != null && Object.hasOwnProperty.call(message, "teamEnterpriseUserRemoveResponse")) { if (!Array.isArray(message.teamEnterpriseUserRemoveResponse)) return "teamEnterpriseUserRemoveResponse: array expected"; for (let i = 0; i < message.teamEnterpriseUserRemoveResponse.length; ++i) { @@ -103323,6 +103951,8 @@ export const Enterprise = $root.Enterprise = (() => { TeamEnterpriseUserRemovesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamEnterpriseUserRemovesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamEnterpriseUserRemovesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -103333,7 +103963,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.TeamEnterpriseUserRemovesResponse.teamEnterpriseUserRemoveResponse: array expected"); message.teamEnterpriseUserRemoveResponse = []; for (let i = 0; i < object.teamEnterpriseUserRemoveResponse.length; ++i) { - if (typeof object.teamEnterpriseUserRemoveResponse[i] !== "object") + if (!$util.isObject(object.teamEnterpriseUserRemoveResponse[i])) throw TypeError(".Enterprise.TeamEnterpriseUserRemovesResponse.teamEnterpriseUserRemoveResponse: object expected"); message.teamEnterpriseUserRemoveResponse[i] = $root.Enterprise.TeamEnterpriseUserRemoveResponse.fromObject(object.teamEnterpriseUserRemoveResponse[i], long + 1); } @@ -103516,7 +104146,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ TeamEnterpriseUserRemoveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103602,21 +104232,21 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamEnterpriseUserRemove != null && message.hasOwnProperty("teamEnterpriseUserRemove")) { + if (message.teamEnterpriseUserRemove != null && Object.hasOwnProperty.call(message, "teamEnterpriseUserRemove")) { let error = $root.Enterprise.TeamEnterpriseUserRemove.verify(message.teamEnterpriseUserRemove, long + 1); if (error) return "teamEnterpriseUserRemove." + error; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) if (!$util.isString(message.resultCode)) return "resultCode: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) if (!$util.isString(message.additionalInfo)) return "additionalInfo: string expected"; return null; @@ -103633,13 +104263,15 @@ export const Enterprise = $root.Enterprise = (() => { TeamEnterpriseUserRemoveResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.TeamEnterpriseUserRemoveResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.TeamEnterpriseUserRemoveResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Enterprise.TeamEnterpriseUserRemoveResponse(); if (object.teamEnterpriseUserRemove != null) { - if (typeof object.teamEnterpriseUserRemove !== "object") + if (!$util.isObject(object.teamEnterpriseUserRemove)) throw TypeError(".Enterprise.TeamEnterpriseUserRemoveResponse.teamEnterpriseUserRemove: object expected"); message.teamEnterpriseUserRemove = $root.Enterprise.TeamEnterpriseUserRemove.fromObject(object.teamEnterpriseUserRemove, long + 1); } @@ -103678,15 +104310,15 @@ export const Enterprise = $root.Enterprise = (() => { object.message = ""; object.additionalInfo = ""; } - if (message.teamEnterpriseUserRemove != null && message.hasOwnProperty("teamEnterpriseUserRemove")) + if (message.teamEnterpriseUserRemove != null && Object.hasOwnProperty.call(message, "teamEnterpriseUserRemove")) object.teamEnterpriseUserRemove = $root.Enterprise.TeamEnterpriseUserRemove.toObject(message.teamEnterpriseUserRemove, options, q + 1); - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) object.resultCode = message.resultCode; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) object.additionalInfo = message.additionalInfo; return object; }; @@ -103828,7 +104460,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DomainAlias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -103910,16 +104542,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) if (!$util.isString(message.alias)) return "alias: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -103936,6 +104568,8 @@ export const Enterprise = $root.Enterprise = (() => { DomainAlias.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DomainAlias) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DomainAlias: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -103975,13 +104609,13 @@ export const Enterprise = $root.Enterprise = (() => { object.status = 0; object.message = ""; } - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) object.alias = message.alias; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -104092,7 +104726,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DomainAliasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104164,7 +104798,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.domainAlias != null && message.hasOwnProperty("domainAlias")) { + if (message.domainAlias != null && Object.hasOwnProperty.call(message, "domainAlias")) { if (!Array.isArray(message.domainAlias)) return "domainAlias: array expected"; for (let i = 0; i < message.domainAlias.length; ++i) { @@ -104187,6 +104821,8 @@ export const Enterprise = $root.Enterprise = (() => { DomainAliasRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DomainAliasRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DomainAliasRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -104197,7 +104833,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.DomainAliasRequest.domainAlias: array expected"); message.domainAlias = []; for (let i = 0; i < object.domainAlias.length; ++i) { - if (typeof object.domainAlias[i] !== "object") + if (!$util.isObject(object.domainAlias[i])) throw TypeError(".Enterprise.DomainAliasRequest.domainAlias: object expected"); message.domainAlias[i] = $root.Enterprise.DomainAlias.fromObject(object.domainAlias[i], long + 1); } @@ -104338,7 +104974,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DomainAliasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104410,7 +105046,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.domainAlias != null && message.hasOwnProperty("domainAlias")) { + if (message.domainAlias != null && Object.hasOwnProperty.call(message, "domainAlias")) { if (!Array.isArray(message.domainAlias)) return "domainAlias: array expected"; for (let i = 0; i < message.domainAlias.length; ++i) { @@ -104433,6 +105069,8 @@ export const Enterprise = $root.Enterprise = (() => { DomainAliasResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DomainAliasResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DomainAliasResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -104443,7 +105081,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.DomainAliasResponse.domainAlias: array expected"); message.domainAlias = []; for (let i = 0; i < object.domainAlias.length; ++i) { - if (typeof object.domainAlias[i] !== "object") + if (!$util.isObject(object.domainAlias[i])) throw TypeError(".Enterprise.DomainAliasResponse.domainAlias: object expected"); message.domainAlias[i] = $root.Enterprise.DomainAlias.fromObject(object.domainAlias[i], long + 1); } @@ -104595,7 +105233,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersProvisionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -104671,7 +105309,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -104680,7 +105318,7 @@ export const Enterprise = $root.Enterprise = (() => { return "users." + error; } } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; return null; @@ -104697,6 +105335,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersProvisionRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersProvisionRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersProvisionRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -104707,7 +105347,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUsersProvisionRequest.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.EnterpriseUsersProvisionRequest.users: object expected"); message.users[i] = $root.Enterprise.EnterpriseUsersProvision.fromObject(object.users[i], long + 1); } @@ -104743,7 +105383,7 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.users.length; ++j) object.users[j] = $root.Enterprise.EnterpriseUsersProvision.toObject(message.users[j], options, q + 1); } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; return object; }; @@ -105017,7 +105657,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersProvision.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -105147,19 +105787,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -105170,37 +105810,37 @@ export const Enterprise = $root.Enterprise = (() => { case 4: break; } - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.enterpriseUsersDataKey != null && message.hasOwnProperty("enterpriseUsersDataKey")) + if (message.enterpriseUsersDataKey != null && Object.hasOwnProperty.call(message, "enterpriseUsersDataKey")) if (!(message.enterpriseUsersDataKey && typeof message.enterpriseUsersDataKey.length === "number" || $util.isString(message.enterpriseUsersDataKey))) return "enterpriseUsersDataKey: buffer expected"; - if (message.authVerifier != null && message.hasOwnProperty("authVerifier")) + if (message.authVerifier != null && Object.hasOwnProperty.call(message, "authVerifier")) if (!(message.authVerifier && typeof message.authVerifier.length === "number" || $util.isString(message.authVerifier))) return "authVerifier: buffer expected"; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) if (!(message.encryptionParams && typeof message.encryptionParams.length === "number" || $util.isString(message.encryptionParams))) return "encryptionParams: buffer expected"; - if (message.rsaPublicKey != null && message.hasOwnProperty("rsaPublicKey")) + if (message.rsaPublicKey != null && Object.hasOwnProperty.call(message, "rsaPublicKey")) if (!(message.rsaPublicKey && typeof message.rsaPublicKey.length === "number" || $util.isString(message.rsaPublicKey))) return "rsaPublicKey: buffer expected"; - if (message.rsaEncryptedPrivateKey != null && message.hasOwnProperty("rsaEncryptedPrivateKey")) + if (message.rsaEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedPrivateKey")) if (!(message.rsaEncryptedPrivateKey && typeof message.rsaEncryptedPrivateKey.length === "number" || $util.isString(message.rsaEncryptedPrivateKey))) return "rsaEncryptedPrivateKey: buffer expected"; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) if (!(message.eccPublicKey && typeof message.eccPublicKey.length === "number" || $util.isString(message.eccPublicKey))) return "eccPublicKey: buffer expected"; - if (message.eccEncryptedPrivateKey != null && message.hasOwnProperty("eccEncryptedPrivateKey")) + if (message.eccEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "eccEncryptedPrivateKey")) if (!(message.eccEncryptedPrivateKey && typeof message.eccEncryptedPrivateKey.length === "number" || $util.isString(message.eccEncryptedPrivateKey))) return "eccEncryptedPrivateKey: buffer expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) if (!(message.encryptedClientKey && typeof message.encryptedClientKey.length === "number" || $util.isString(message.encryptedClientKey))) return "encryptedClientKey: buffer expected"; return null; @@ -105217,6 +105857,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersProvision.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersProvision) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersProvision: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -105421,47 +106063,47 @@ export const Enterprise = $root.Enterprise = (() => { object.encryptedClientKey = $util.newBuffer(object.encryptedClientKey); } } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.enterpriseUsersDataKey != null && message.hasOwnProperty("enterpriseUsersDataKey")) + if (message.enterpriseUsersDataKey != null && Object.hasOwnProperty.call(message, "enterpriseUsersDataKey")) object.enterpriseUsersDataKey = options.bytes === String ? $util.base64.encode(message.enterpriseUsersDataKey, 0, message.enterpriseUsersDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterpriseUsersDataKey) : message.enterpriseUsersDataKey; - if (message.authVerifier != null && message.hasOwnProperty("authVerifier")) + if (message.authVerifier != null && Object.hasOwnProperty.call(message, "authVerifier")) object.authVerifier = options.bytes === String ? $util.base64.encode(message.authVerifier, 0, message.authVerifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.authVerifier) : message.authVerifier; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) object.encryptionParams = options.bytes === String ? $util.base64.encode(message.encryptionParams, 0, message.encryptionParams.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptionParams) : message.encryptionParams; - if (message.rsaPublicKey != null && message.hasOwnProperty("rsaPublicKey")) + if (message.rsaPublicKey != null && Object.hasOwnProperty.call(message, "rsaPublicKey")) object.rsaPublicKey = options.bytes === String ? $util.base64.encode(message.rsaPublicKey, 0, message.rsaPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaPublicKey) : message.rsaPublicKey; - if (message.rsaEncryptedPrivateKey != null && message.hasOwnProperty("rsaEncryptedPrivateKey")) + if (message.rsaEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedPrivateKey")) object.rsaEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.rsaEncryptedPrivateKey, 0, message.rsaEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaEncryptedPrivateKey) : message.rsaEncryptedPrivateKey; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) object.eccPublicKey = options.bytes === String ? $util.base64.encode(message.eccPublicKey, 0, message.eccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccPublicKey) : message.eccPublicKey; - if (message.eccEncryptedPrivateKey != null && message.hasOwnProperty("eccEncryptedPrivateKey")) + if (message.eccEncryptedPrivateKey != null && Object.hasOwnProperty.call(message, "eccEncryptedPrivateKey")) object.eccEncryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.eccEncryptedPrivateKey, 0, message.eccEncryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccEncryptedPrivateKey) : message.eccEncryptedPrivateKey; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) object.encryptedClientKey = options.bytes === String ? $util.base64.encode(message.encryptedClientKey, 0, message.encryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedClientKey) : message.encryptedClientKey; return object; }; @@ -105572,7 +106214,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersProvisionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -105644,7 +106286,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -105667,6 +106309,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersProvisionResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersProvisionResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersProvisionResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -105677,7 +106321,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUsersProvisionResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".Enterprise.EnterpriseUsersProvisionResponse.results: object expected"); message.results[i] = $root.Enterprise.EnterpriseUsersProvisionResult.fromObject(object.results[i], long + 1); } @@ -105849,7 +106493,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersProvisionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -105931,16 +106575,16 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) if (!$util.isString(message.additionalInfo)) return "additionalInfo: string expected"; return null; @@ -105957,6 +106601,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersProvisionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersProvisionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersProvisionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106007,18 +106653,18 @@ export const Enterprise = $root.Enterprise = (() => { object.message = ""; object.additionalInfo = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) object.additionalInfo = message.additionalInfo; return object; }; @@ -106140,7 +106786,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -106216,7 +106862,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -106225,7 +106871,7 @@ export const Enterprise = $root.Enterprise = (() => { return "users." + error; } } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; return null; @@ -106242,6 +106888,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106252,7 +106900,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUsersAddRequest.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Enterprise.EnterpriseUsersAddRequest.users: object expected"); message.users[i] = $root.Enterprise.EnterpriseUsersAdd.fromObject(object.users[i], long + 1); } @@ -106288,7 +106936,7 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.users.length; ++j) object.users[j] = $root.Enterprise.EnterpriseUsersAdd.toObject(message.users[j], options, q + 1); } - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; return object; }; @@ -106507,7 +107155,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersAdd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -106617,19 +107265,19 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!$util.isString(message.encryptedData)) return "encryptedData: string expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -106640,22 +107288,22 @@ export const Enterprise = $root.Enterprise = (() => { case 4: break; } - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) if (!$util.isString(message.jobTitle)) return "jobTitle: string expected"; - if (message.suppressEmailInvite != null && message.hasOwnProperty("suppressEmailInvite")) + if (message.suppressEmailInvite != null && Object.hasOwnProperty.call(message, "suppressEmailInvite")) if (typeof message.suppressEmailInvite !== "boolean") return "suppressEmailInvite: boolean expected"; - if (message.inviteeLocale != null && message.hasOwnProperty("inviteeLocale")) + if (message.inviteeLocale != null && Object.hasOwnProperty.call(message, "inviteeLocale")) if (!$util.isString(message.inviteeLocale)) return "inviteeLocale: string expected"; - if (message.move != null && message.hasOwnProperty("move")) + if (message.move != null && Object.hasOwnProperty.call(message, "move")) if (typeof message.move !== "boolean") return "move: boolean expected"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; return null; @@ -106672,6 +107320,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersAdd.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersAdd) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersAdd: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -106791,37 +107441,37 @@ export const Enterprise = $root.Enterprise = (() => { } else object.roleId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = message.encryptedData; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.keyType] === undefined ? message.keyType : $root.Enterprise.EncryptedKeyType[message.keyType] : message.keyType; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.jobTitle != null && message.hasOwnProperty("jobTitle")) + if (message.jobTitle != null && Object.hasOwnProperty.call(message, "jobTitle")) object.jobTitle = message.jobTitle; - if (message.suppressEmailInvite != null && message.hasOwnProperty("suppressEmailInvite")) + if (message.suppressEmailInvite != null && Object.hasOwnProperty.call(message, "suppressEmailInvite")) object.suppressEmailInvite = message.suppressEmailInvite; - if (message.inviteeLocale != null && message.hasOwnProperty("inviteeLocale")) + if (message.inviteeLocale != null && Object.hasOwnProperty.call(message, "inviteeLocale")) object.inviteeLocale = message.inviteeLocale; - if (message.move != null && message.hasOwnProperty("move")) + if (message.move != null && Object.hasOwnProperty.call(message, "move")) object.move = message.move; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") @@ -106981,7 +107631,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersAddResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107069,7 +107719,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -107078,16 +107728,16 @@ export const Enterprise = $root.Enterprise = (() => { return "results." + error; } } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) if (!$util.isString(message.additionalInfo)) return "additionalInfo: string expected"; return null; @@ -107104,6 +107754,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersAddResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersAddResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersAddResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107114,7 +107766,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.EnterpriseUsersAddResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".Enterprise.EnterpriseUsersAddResponse.results: object expected"); message.results[i] = $root.Enterprise.EnterpriseUsersAddResult.fromObject(object.results[i], long + 1); } @@ -107160,13 +107812,13 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.results.length; ++j) object.results[j] = $root.Enterprise.EnterpriseUsersAddResult.toObject(message.results[j], options, q + 1); } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) object.additionalInfo = message.additionalInfo; return object; }; @@ -107330,7 +107982,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseUsersAddResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107420,22 +108072,22 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) if (!$util.isString(message.additionalInfo)) return "additionalInfo: string expected"; return null; @@ -107452,6 +108104,8 @@ export const Enterprise = $root.Enterprise = (() => { EnterpriseUsersAddResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.EnterpriseUsersAddResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.EnterpriseUsersAddResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107508,22 +108162,22 @@ export const Enterprise = $root.Enterprise = (() => { object.message = ""; object.additionalInfo = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.additionalInfo != null && message.hasOwnProperty("additionalInfo")) + if (message.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) object.additionalInfo = message.additionalInfo; return object; }; @@ -107691,7 +108345,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ UpdateMSPPermitsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -107785,30 +108439,30 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.mspEnterpriseId != null && message.hasOwnProperty("mspEnterpriseId")) + if (message.mspEnterpriseId != null && Object.hasOwnProperty.call(message, "mspEnterpriseId")) if (!$util.isInteger(message.mspEnterpriseId)) return "mspEnterpriseId: integer expected"; - if (message.maxAllowedLicenses != null && message.hasOwnProperty("maxAllowedLicenses")) + if (message.maxAllowedLicenses != null && Object.hasOwnProperty.call(message, "maxAllowedLicenses")) if (!$util.isInteger(message.maxAllowedLicenses)) return "maxAllowedLicenses: integer expected"; - if (message.allowedMcProducts != null && message.hasOwnProperty("allowedMcProducts")) { + if (message.allowedMcProducts != null && Object.hasOwnProperty.call(message, "allowedMcProducts")) { if (!Array.isArray(message.allowedMcProducts)) return "allowedMcProducts: array expected"; for (let i = 0; i < message.allowedMcProducts.length; ++i) if (!$util.isString(message.allowedMcProducts[i])) return "allowedMcProducts: string[] expected"; } - if (message.allowedAddOns != null && message.hasOwnProperty("allowedAddOns")) { + if (message.allowedAddOns != null && Object.hasOwnProperty.call(message, "allowedAddOns")) { if (!Array.isArray(message.allowedAddOns)) return "allowedAddOns: array expected"; for (let i = 0; i < message.allowedAddOns.length; ++i) if (!$util.isString(message.allowedAddOns[i])) return "allowedAddOns: string[] expected"; } - if (message.maxFilePlanType != null && message.hasOwnProperty("maxFilePlanType")) + if (message.maxFilePlanType != null && Object.hasOwnProperty.call(message, "maxFilePlanType")) if (!$util.isString(message.maxFilePlanType)) return "maxFilePlanType: string expected"; - if (message.allowUnlimitedLicenses != null && message.hasOwnProperty("allowUnlimitedLicenses")) + if (message.allowUnlimitedLicenses != null && Object.hasOwnProperty.call(message, "allowUnlimitedLicenses")) if (typeof message.allowUnlimitedLicenses !== "boolean") return "allowUnlimitedLicenses: boolean expected"; return null; @@ -107825,6 +108479,8 @@ export const Enterprise = $root.Enterprise = (() => { UpdateMSPPermitsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.UpdateMSPPermitsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.UpdateMSPPermitsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -107882,9 +108538,9 @@ export const Enterprise = $root.Enterprise = (() => { object.maxFilePlanType = ""; object.allowUnlimitedLicenses = false; } - if (message.mspEnterpriseId != null && message.hasOwnProperty("mspEnterpriseId")) + if (message.mspEnterpriseId != null && Object.hasOwnProperty.call(message, "mspEnterpriseId")) object.mspEnterpriseId = message.mspEnterpriseId; - if (message.maxAllowedLicenses != null && message.hasOwnProperty("maxAllowedLicenses")) + if (message.maxAllowedLicenses != null && Object.hasOwnProperty.call(message, "maxAllowedLicenses")) object.maxAllowedLicenses = message.maxAllowedLicenses; if (message.allowedMcProducts && message.allowedMcProducts.length) { object.allowedMcProducts = []; @@ -107896,9 +108552,9 @@ export const Enterprise = $root.Enterprise = (() => { for (let j = 0; j < message.allowedAddOns.length; ++j) object.allowedAddOns[j] = message.allowedAddOns[j]; } - if (message.maxFilePlanType != null && message.hasOwnProperty("maxFilePlanType")) + if (message.maxFilePlanType != null && Object.hasOwnProperty.call(message, "maxFilePlanType")) object.maxFilePlanType = message.maxFilePlanType; - if (message.allowUnlimitedLicenses != null && message.hasOwnProperty("allowUnlimitedLicenses")) + if (message.allowUnlimitedLicenses != null && Object.hasOwnProperty.call(message, "allowUnlimitedLicenses")) object.allowUnlimitedLicenses = message.allowUnlimitedLicenses; return object; }; @@ -108032,7 +108688,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DeleteEnterpriseUsersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -108109,7 +108765,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserIds != null && message.hasOwnProperty("enterpriseUserIds")) { + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { if (!Array.isArray(message.enterpriseUserIds)) return "enterpriseUserIds: array expected"; for (let i = 0; i < message.enterpriseUserIds.length; ++i) @@ -108130,6 +108786,8 @@ export const Enterprise = $root.Enterprise = (() => { DeleteEnterpriseUsersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DeleteEnterpriseUsersRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DeleteEnterpriseUsersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -108319,7 +108977,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DeleteEnterpriseUserStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -108393,10 +109051,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -108421,6 +109079,8 @@ export const Enterprise = $root.Enterprise = (() => { DeleteEnterpriseUserStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DeleteEnterpriseUserStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DeleteEnterpriseUserStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -108491,14 +109151,14 @@ export const Enterprise = $root.Enterprise = (() => { object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = options.enums === String ? "SUCCESS" : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Enterprise.DeleteEnterpriseUsersResult[message.status] === undefined ? message.status : $root.Enterprise.DeleteEnterpriseUsersResult[message.status] : message.status; return object; }; @@ -108609,7 +109269,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ DeleteEnterpriseUsersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -108681,7 +109341,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deleteStatus != null && message.hasOwnProperty("deleteStatus")) { + if (message.deleteStatus != null && Object.hasOwnProperty.call(message, "deleteStatus")) { if (!Array.isArray(message.deleteStatus)) return "deleteStatus: array expected"; for (let i = 0; i < message.deleteStatus.length; ++i) { @@ -108704,6 +109364,8 @@ export const Enterprise = $root.Enterprise = (() => { DeleteEnterpriseUsersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.DeleteEnterpriseUsersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.DeleteEnterpriseUsersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -108714,7 +109376,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.DeleteEnterpriseUsersResponse.deleteStatus: array expected"); message.deleteStatus = []; for (let i = 0; i < object.deleteStatus.length; ++i) { - if (typeof object.deleteStatus[i] !== "object") + if (!$util.isObject(object.deleteStatus[i])) throw TypeError(".Enterprise.DeleteEnterpriseUsersResponse.deleteStatus: object expected"); message.deleteStatus[i] = $root.Enterprise.DeleteEnterpriseUserStatus.fromObject(object.deleteStatus[i], long + 1); } @@ -108896,7 +109558,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ClearSecurityDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -108981,17 +109643,17 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) { + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) { if (!Array.isArray(message.enterpriseUserId)) return "enterpriseUserId: array expected"; for (let i = 0; i < message.enterpriseUserId.length; ++i) if (!$util.isInteger(message.enterpriseUserId[i]) && !(message.enterpriseUserId[i] && $util.isInteger(message.enterpriseUserId[i].low) && $util.isInteger(message.enterpriseUserId[i].high))) return "enterpriseUserId: integer|Long[] expected"; } - if (message.allUsers != null && message.hasOwnProperty("allUsers")) + if (message.allUsers != null && Object.hasOwnProperty.call(message, "allUsers")) if (typeof message.allUsers !== "boolean") return "allUsers: boolean expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -109014,6 +109676,8 @@ export const Enterprise = $root.Enterprise = (() => { ClearSecurityDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ClearSecurityDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ClearSecurityDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -109091,9 +109755,9 @@ export const Enterprise = $root.Enterprise = (() => { else object.enterpriseUserId[j] = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId[j]) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId[j].low >>> 0, message.enterpriseUserId[j].high >>> 0).toNumber() : message.enterpriseUserId[j]; } - if (message.allUsers != null && message.hasOwnProperty("allUsers")) + if (message.allUsers != null && Object.hasOwnProperty.call(message, "allUsers")) object.allUsers = message.allUsers; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.Enterprise.ClearSecurityDataType[message.type] === undefined ? message.type : $root.Enterprise.ClearSecurityDataType[message.type] : message.type; return object; }; @@ -109204,7 +109868,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ListDomainsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -109276,7 +109940,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.domain != null && message.hasOwnProperty("domain")) { + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) { if (!Array.isArray(message.domain)) return "domain: array expected"; for (let i = 0; i < message.domain.length; ++i) @@ -109297,6 +109961,8 @@ export const Enterprise = $root.Enterprise = (() => { ListDomainsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ListDomainsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ListDomainsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -109470,7 +110136,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ReserveDomainRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -109544,7 +110210,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.reserveDomainAction != null && message.hasOwnProperty("reserveDomainAction")) + if (message.reserveDomainAction != null && Object.hasOwnProperty.call(message, "reserveDomainAction")) switch (message.reserveDomainAction) { default: return "reserveDomainAction: enum value expected"; @@ -109553,7 +110219,7 @@ export const Enterprise = $root.Enterprise = (() => { case 2: break; } - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; return null; @@ -109570,6 +110236,8 @@ export const Enterprise = $root.Enterprise = (() => { ReserveDomainRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ReserveDomainRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ReserveDomainRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -109621,9 +110289,9 @@ export const Enterprise = $root.Enterprise = (() => { object.reserveDomainAction = options.enums === String ? "DOMAIN_TOKEN" : 0; object.domain = ""; } - if (message.reserveDomainAction != null && message.hasOwnProperty("reserveDomainAction")) + if (message.reserveDomainAction != null && Object.hasOwnProperty.call(message, "reserveDomainAction")) object.reserveDomainAction = options.enums === String ? $root.Enterprise.ReserveDomainAction[message.reserveDomainAction] === undefined ? message.reserveDomainAction : $root.Enterprise.ReserveDomainAction[message.reserveDomainAction] : message.reserveDomainAction; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; return object; }; @@ -109732,7 +110400,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ ReserveDomainResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -109802,7 +110470,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) if (!$util.isString(message.token)) return "token: string expected"; return null; @@ -109819,6 +110487,8 @@ export const Enterprise = $root.Enterprise = (() => { ReserveDomainResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.ReserveDomainResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.ReserveDomainResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -109848,7 +110518,7 @@ export const Enterprise = $root.Enterprise = (() => { let object = {}; if (options.defaults) object.token = ""; - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) object.token = message.token; return object; }; @@ -109973,7 +110643,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ RolesByTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -110054,10 +110724,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.roleId != null && message.hasOwnProperty("roleId")) { + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) { if (!Array.isArray(message.roleId)) return "roleId: array expected"; for (let i = 0; i < message.roleId.length; ++i) @@ -110078,6 +110748,8 @@ export const Enterprise = $root.Enterprise = (() => { RolesByTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.RolesByTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.RolesByTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -110132,7 +110804,7 @@ export const Enterprise = $root.Enterprise = (() => { if (options.bytes !== Array) object.teamUid = $util.newBuffer(object.teamUid); } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; if (message.roleId && message.roleId.length) { object.roleId = []; @@ -110299,7 +110971,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LockUsersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -110402,28 +111074,28 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.lockEnterpriseUserIds != null && message.hasOwnProperty("lockEnterpriseUserIds")) { + if (message.lockEnterpriseUserIds != null && Object.hasOwnProperty.call(message, "lockEnterpriseUserIds")) { if (!Array.isArray(message.lockEnterpriseUserIds)) return "lockEnterpriseUserIds: array expected"; for (let i = 0; i < message.lockEnterpriseUserIds.length; ++i) if (!$util.isInteger(message.lockEnterpriseUserIds[i]) && !(message.lockEnterpriseUserIds[i] && $util.isInteger(message.lockEnterpriseUserIds[i].low) && $util.isInteger(message.lockEnterpriseUserIds[i].high))) return "lockEnterpriseUserIds: integer|Long[] expected"; } - if (message.disableEnterpriseUserIds != null && message.hasOwnProperty("disableEnterpriseUserIds")) { + if (message.disableEnterpriseUserIds != null && Object.hasOwnProperty.call(message, "disableEnterpriseUserIds")) { if (!Array.isArray(message.disableEnterpriseUserIds)) return "disableEnterpriseUserIds: array expected"; for (let i = 0; i < message.disableEnterpriseUserIds.length; ++i) if (!$util.isInteger(message.disableEnterpriseUserIds[i]) && !(message.disableEnterpriseUserIds[i] && $util.isInteger(message.disableEnterpriseUserIds[i].low) && $util.isInteger(message.disableEnterpriseUserIds[i].high))) return "disableEnterpriseUserIds: integer|Long[] expected"; } - if (message.unlockEnterpriseUserIds != null && message.hasOwnProperty("unlockEnterpriseUserIds")) { + if (message.unlockEnterpriseUserIds != null && Object.hasOwnProperty.call(message, "unlockEnterpriseUserIds")) { if (!Array.isArray(message.unlockEnterpriseUserIds)) return "unlockEnterpriseUserIds: array expected"; for (let i = 0; i < message.unlockEnterpriseUserIds.length; ++i) if (!$util.isInteger(message.unlockEnterpriseUserIds[i]) && !(message.unlockEnterpriseUserIds[i] && $util.isInteger(message.unlockEnterpriseUserIds[i].low) && $util.isInteger(message.unlockEnterpriseUserIds[i].high))) return "unlockEnterpriseUserIds: integer|Long[] expected"; } - if (message.deleteIfPending != null && message.hasOwnProperty("deleteIfPending")) + if (message.deleteIfPending != null && Object.hasOwnProperty.call(message, "deleteIfPending")) if (typeof message.deleteIfPending !== "boolean") return "deleteIfPending: boolean expected"; return null; @@ -110440,6 +111112,8 @@ export const Enterprise = $root.Enterprise = (() => { LockUsersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LockUsersRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LockUsersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -110546,7 +111220,7 @@ export const Enterprise = $root.Enterprise = (() => { else object.unlockEnterpriseUserIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.unlockEnterpriseUserIds[j]) : options.longs === Number ? new $util.LongBits(message.unlockEnterpriseUserIds[j].low >>> 0, message.unlockEnterpriseUserIds[j].high >>> 0).toNumber() : message.unlockEnterpriseUserIds[j]; } - if (message.deleteIfPending != null && message.hasOwnProperty("deleteIfPending")) + if (message.deleteIfPending != null && Object.hasOwnProperty.call(message, "deleteIfPending")) object.deleteIfPending = message.deleteIfPending; return object; }; @@ -110657,7 +111331,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LockUsersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -110729,7 +111403,7 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.response != null && message.hasOwnProperty("response")) { + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { if (!Array.isArray(message.response)) return "response: array expected"; for (let i = 0; i < message.response.length; ++i) { @@ -110752,6 +111426,8 @@ export const Enterprise = $root.Enterprise = (() => { LockUsersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LockUsersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LockUsersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -110762,7 +111438,7 @@ export const Enterprise = $root.Enterprise = (() => { throw TypeError(".Enterprise.LockUsersResponse.response: array expected"); message.response = []; for (let i = 0; i < object.response.length; ++i) { - if (typeof object.response[i] !== "object") + if (!$util.isObject(object.response[i])) throw TypeError(".Enterprise.LockUsersResponse.response: object expected"); message.response[i] = $root.Enterprise.LockUserResponse.fromObject(object.response[i], long + 1); } @@ -110945,7 +111621,7 @@ export const Enterprise = $root.Enterprise = (() => { * @returns {$protobuf.Writer} Writer */ LockUserResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -111023,10 +111699,10 @@ export const Enterprise = $root.Enterprise = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -111038,7 +111714,7 @@ export const Enterprise = $root.Enterprise = (() => { case 5: break; } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -111055,6 +111731,8 @@ export const Enterprise = $root.Enterprise = (() => { LockUserResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Enterprise.LockUserResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Enterprise.LockUserResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -111132,16 +111810,16 @@ export const Enterprise = $root.Enterprise = (() => { object.status = options.enums === String ? "UNKNOWN_LOCK_STATUS" : 0; object.errorMessage = ""; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Enterprise.UserLockStatus[message.status] === undefined ? message.status : $root.Enterprise.UserLockStatus[message.status] : message.status; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -111341,7 +112019,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ EncryptedDataKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -111415,10 +112093,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedKey != null && message.hasOwnProperty("encryptedKey")) + if (message.encryptedKey != null && Object.hasOwnProperty.call(message, "encryptedKey")) if (!(message.encryptedKey && typeof message.encryptedKey.length === "number" || $util.isString(message.encryptedKey))) return "encryptedKey: buffer expected"; - if (message.encryptedKeyType != null && message.hasOwnProperty("encryptedKeyType")) + if (message.encryptedKeyType != null && Object.hasOwnProperty.call(message, "encryptedKeyType")) switch (message.encryptedKeyType) { default: return "encryptedKeyType: enum value expected"; @@ -111443,6 +112121,8 @@ export const Folder = $root.Folder = (() => { EncryptedDataKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.EncryptedDataKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.EncryptedDataKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -111511,9 +112191,9 @@ export const Folder = $root.Folder = (() => { } object.encryptedKeyType = options.enums === String ? "no_key" : 0; } - if (message.encryptedKey != null && message.hasOwnProperty("encryptedKey")) + if (message.encryptedKey != null && Object.hasOwnProperty.call(message, "encryptedKey")) object.encryptedKey = options.bytes === String ? $util.base64.encode(message.encryptedKey, 0, message.encryptedKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedKey) : message.encryptedKey; - if (message.encryptedKeyType != null && message.hasOwnProperty("encryptedKeyType")) + if (message.encryptedKeyType != null && Object.hasOwnProperty.call(message, "encryptedKeyType")) object.encryptedKeyType = options.enums === String ? $root.Folder.EncryptedKeyType[message.encryptedKeyType] === undefined ? message.encryptedKeyType : $root.Folder.EncryptedKeyType[message.encryptedKeyType] : message.encryptedKeyType; return object; }; @@ -111657,7 +112337,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecordData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -111741,16 +112421,16 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) { + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) { if (!Array.isArray(message.encryptedDataKey)) return "encryptedDataKey: array expected"; for (let i = 0; i < message.encryptedDataKey.length; ++i) { @@ -111773,6 +112453,8 @@ export const Folder = $root.Folder = (() => { SharedFolderRecordData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderRecordData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderRecordData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -111795,7 +112477,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderRecordData.encryptedDataKey: array expected"); message.encryptedDataKey = []; for (let i = 0; i < object.encryptedDataKey.length; ++i) { - if (typeof object.encryptedDataKey[i] !== "object") + if (!$util.isObject(object.encryptedDataKey[i])) throw TypeError(".Folder.SharedFolderRecordData.encryptedDataKey: object expected"); message.encryptedDataKey[i] = $root.Folder.EncryptedDataKey.fromObject(object.encryptedDataKey[i], long + 1); } @@ -111839,11 +112521,11 @@ export const Folder = $root.Folder = (() => { } object.userId = 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; if (message.encryptedDataKey && message.encryptedDataKey.length) { object.encryptedDataKey = []; @@ -111959,7 +112641,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecordDataList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -112031,7 +112713,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderRecordData != null && message.hasOwnProperty("sharedFolderRecordData")) { + if (message.sharedFolderRecordData != null && Object.hasOwnProperty.call(message, "sharedFolderRecordData")) { if (!Array.isArray(message.sharedFolderRecordData)) return "sharedFolderRecordData: array expected"; for (let i = 0; i < message.sharedFolderRecordData.length; ++i) { @@ -112054,6 +112736,8 @@ export const Folder = $root.Folder = (() => { SharedFolderRecordDataList.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderRecordDataList) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderRecordDataList: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -112064,7 +112748,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderRecordDataList.sharedFolderRecordData: array expected"); message.sharedFolderRecordData = []; for (let i = 0; i < object.sharedFolderRecordData.length; ++i) { - if (typeof object.sharedFolderRecordData[i] !== "object") + if (!$util.isObject(object.sharedFolderRecordData[i])) throw TypeError(".Folder.SharedFolderRecordDataList.sharedFolderRecordData: object expected"); message.sharedFolderRecordData[i] = $root.Folder.SharedFolderRecordData.fromObject(object.sharedFolderRecordData[i], long + 1); } @@ -112225,7 +112909,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecordFix.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -112303,13 +112987,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedRecordFolderKey != null && message.hasOwnProperty("encryptedRecordFolderKey")) + if (message.encryptedRecordFolderKey != null && Object.hasOwnProperty.call(message, "encryptedRecordFolderKey")) if (!(message.encryptedRecordFolderKey && typeof message.encryptedRecordFolderKey.length === "number" || $util.isString(message.encryptedRecordFolderKey))) return "encryptedRecordFolderKey: buffer expected"; return null; @@ -112326,6 +113010,8 @@ export const Folder = $root.Folder = (() => { SharedFolderRecordFix.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderRecordFix) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderRecordFix: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -112389,11 +113075,11 @@ export const Folder = $root.Folder = (() => { object.encryptedRecordFolderKey = $util.newBuffer(object.encryptedRecordFolderKey); } } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedRecordFolderKey != null && message.hasOwnProperty("encryptedRecordFolderKey")) + if (message.encryptedRecordFolderKey != null && Object.hasOwnProperty.call(message, "encryptedRecordFolderKey")) object.encryptedRecordFolderKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordFolderKey, 0, message.encryptedRecordFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordFolderKey) : message.encryptedRecordFolderKey; return object; }; @@ -112504,7 +113190,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecordFixList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -112576,7 +113262,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderRecordFix != null && message.hasOwnProperty("sharedFolderRecordFix")) { + if (message.sharedFolderRecordFix != null && Object.hasOwnProperty.call(message, "sharedFolderRecordFix")) { if (!Array.isArray(message.sharedFolderRecordFix)) return "sharedFolderRecordFix: array expected"; for (let i = 0; i < message.sharedFolderRecordFix.length; ++i) { @@ -112599,6 +113285,8 @@ export const Folder = $root.Folder = (() => { SharedFolderRecordFixList.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderRecordFixList) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderRecordFixList: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -112609,7 +113297,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderRecordFixList.sharedFolderRecordFix: array expected"); message.sharedFolderRecordFix = []; for (let i = 0; i < object.sharedFolderRecordFix.length; ++i) { - if (typeof object.sharedFolderRecordFix[i] !== "object") + if (!$util.isObject(object.sharedFolderRecordFix[i])) throw TypeError(".Folder.SharedFolderRecordFixList.sharedFolderRecordFix: object expected"); message.sharedFolderRecordFix[i] = $root.Folder.SharedFolderRecordFix.fromObject(object.sharedFolderRecordFix[i], long + 1); } @@ -112863,7 +113551,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -112980,23 +113668,23 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordType != null && message.hasOwnProperty("recordType")) + if (message.recordType != null && Object.hasOwnProperty.call(message, "recordType")) switch (message.recordType) { default: return "recordType: enum value expected"; case 0: break; } - if (message.recordData != null && message.hasOwnProperty("recordData")) + if (message.recordData != null && Object.hasOwnProperty.call(message, "recordData")) if (!(message.recordData && typeof message.recordData.length === "number" || $util.isString(message.recordData))) return "recordData: buffer expected"; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) if (!(message.encryptedRecordKey && typeof message.encryptedRecordKey.length === "number" || $util.isString(message.encryptedRecordKey))) return "encryptedRecordKey: buffer expected"; - if (message.folderType != null && message.hasOwnProperty("folderType")) + if (message.folderType != null && Object.hasOwnProperty.call(message, "folderType")) switch (message.folderType) { default: return "folderType: enum value expected"; @@ -113006,22 +113694,22 @@ export const Folder = $root.Folder = (() => { case 3: break; } - if (message.howLongAgo != null && message.hasOwnProperty("howLongAgo")) + if (message.howLongAgo != null && Object.hasOwnProperty.call(message, "howLongAgo")) if (!$util.isInteger(message.howLongAgo) && !(message.howLongAgo && $util.isInteger(message.howLongAgo.low) && $util.isInteger(message.howLongAgo.high))) return "howLongAgo: integer|Long expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.encryptedRecordFolderKey != null && message.hasOwnProperty("encryptedRecordFolderKey")) + if (message.encryptedRecordFolderKey != null && Object.hasOwnProperty.call(message, "encryptedRecordFolderKey")) if (!(message.encryptedRecordFolderKey && typeof message.encryptedRecordFolderKey.length === "number" || $util.isString(message.encryptedRecordFolderKey))) return "encryptedRecordFolderKey: buffer expected"; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) if (!(message.extra && typeof message.extra.length === "number" || $util.isString(message.extra))) return "extra: buffer expected"; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) if (!(message.nonSharedData && typeof message.nonSharedData.length === "number" || $util.isString(message.nonSharedData))) return "nonSharedData: buffer expected"; - if (message.fileIds != null && message.hasOwnProperty("fileIds")) { + if (message.fileIds != null && Object.hasOwnProperty.call(message, "fileIds")) { if (!Array.isArray(message.fileIds)) return "fileIds: array expected"; for (let i = 0; i < message.fileIds.length; ++i) @@ -113042,6 +113730,8 @@ export const Folder = $root.Folder = (() => { RecordRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RecordRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RecordRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -113221,30 +113911,30 @@ export const Folder = $root.Folder = (() => { object.nonSharedData = $util.newBuffer(object.nonSharedData); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordType != null && message.hasOwnProperty("recordType")) + if (message.recordType != null && Object.hasOwnProperty.call(message, "recordType")) object.recordType = options.enums === String ? $root.Folder.RecordType[message.recordType] === undefined ? message.recordType : $root.Folder.RecordType[message.recordType] : message.recordType; - if (message.recordData != null && message.hasOwnProperty("recordData")) + if (message.recordData != null && Object.hasOwnProperty.call(message, "recordData")) object.recordData = options.bytes === String ? $util.base64.encode(message.recordData, 0, message.recordData.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordData) : message.recordData; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) object.encryptedRecordKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordKey, 0, message.encryptedRecordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordKey) : message.encryptedRecordKey; - if (message.folderType != null && message.hasOwnProperty("folderType")) + if (message.folderType != null && Object.hasOwnProperty.call(message, "folderType")) object.folderType = options.enums === String ? $root.Folder.FolderType[message.folderType] === undefined ? message.folderType : $root.Folder.FolderType[message.folderType] : message.folderType; - if (message.howLongAgo != null && message.hasOwnProperty("howLongAgo")) + if (message.howLongAgo != null && Object.hasOwnProperty.call(message, "howLongAgo")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.howLongAgo = typeof message.howLongAgo === "number" ? BigInt(message.howLongAgo) : $util.Long.fromBits(message.howLongAgo.low >>> 0, message.howLongAgo.high >>> 0, false).toBigInt(); else if (typeof message.howLongAgo === "number") object.howLongAgo = options.longs === String ? String(message.howLongAgo) : message.howLongAgo; else object.howLongAgo = options.longs === String ? $util.Long.prototype.toString.call(message.howLongAgo) : options.longs === Number ? new $util.LongBits(message.howLongAgo.low >>> 0, message.howLongAgo.high >>> 0).toNumber() : message.howLongAgo; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.encryptedRecordFolderKey != null && message.hasOwnProperty("encryptedRecordFolderKey")) + if (message.encryptedRecordFolderKey != null && Object.hasOwnProperty.call(message, "encryptedRecordFolderKey")) object.encryptedRecordFolderKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordFolderKey, 0, message.encryptedRecordFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordFolderKey) : message.encryptedRecordFolderKey; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) object.extra = options.bytes === String ? $util.base64.encode(message.extra, 0, message.extra.length) : options.bytes === Array ? Array.prototype.slice.call(message.extra) : message.extra; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) object.nonSharedData = options.bytes === String ? $util.base64.encode(message.nonSharedData, 0, message.nonSharedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonSharedData) : message.nonSharedData; if (message.fileIds && message.fileIds.length) { object.fileIds = []; @@ -113385,7 +114075,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -113463,13 +114153,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -113486,6 +114176,8 @@ export const Folder = $root.Folder = (() => { RecordResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RecordResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RecordResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -113542,16 +114234,16 @@ export const Folder = $root.Folder = (() => { object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -113704,7 +114396,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderFields.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -113790,19 +114482,19 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedFolderName != null && message.hasOwnProperty("encryptedFolderName")) + if (message.encryptedFolderName != null && Object.hasOwnProperty.call(message, "encryptedFolderName")) if (!(message.encryptedFolderName && typeof message.encryptedFolderName.length === "number" || $util.isString(message.encryptedFolderName))) return "encryptedFolderName: buffer expected"; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) if (typeof message.manageUsers !== "boolean") return "manageUsers: boolean expected"; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) if (typeof message.manageRecords !== "boolean") return "manageRecords: boolean expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) if (typeof message.canShare !== "boolean") return "canShare: boolean expected"; return null; @@ -113819,6 +114511,8 @@ export const Folder = $root.Folder = (() => { SharedFolderFields.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderFields) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderFields: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -113870,15 +114564,15 @@ export const Folder = $root.Folder = (() => { object.canEdit = false; object.canShare = false; } - if (message.encryptedFolderName != null && message.hasOwnProperty("encryptedFolderName")) + if (message.encryptedFolderName != null && Object.hasOwnProperty.call(message, "encryptedFolderName")) object.encryptedFolderName = options.bytes === String ? $util.base64.encode(message.encryptedFolderName, 0, message.encryptedFolderName.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedFolderName) : message.encryptedFolderName; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) object.manageUsers = message.manageUsers; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) object.manageRecords = message.manageRecords; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) object.canShare = message.canShare; return object; }; @@ -113987,7 +114681,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderFolderFields.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -114057,7 +114751,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; return null; @@ -114074,6 +114768,8 @@ export const Folder = $root.Folder = (() => { SharedFolderFolderFields.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderFolderFields) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderFolderFields: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -114112,7 +114808,7 @@ export const Folder = $root.Folder = (() => { if (options.bytes !== Array) object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; return object; }; @@ -114287,7 +114983,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -114381,10 +115077,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.folderType != null && message.hasOwnProperty("folderType")) + if (message.folderType != null && Object.hasOwnProperty.call(message, "folderType")) switch (message.folderType) { default: return "folderType: enum value expected"; @@ -114394,21 +115090,21 @@ export const Folder = $root.Folder = (() => { case 3: break; } - if (message.parentFolderUid != null && message.hasOwnProperty("parentFolderUid")) + if (message.parentFolderUid != null && Object.hasOwnProperty.call(message, "parentFolderUid")) if (!(message.parentFolderUid && typeof message.parentFolderUid.length === "number" || $util.isString(message.parentFolderUid))) return "parentFolderUid: buffer expected"; - if (message.folderData != null && message.hasOwnProperty("folderData")) + if (message.folderData != null && Object.hasOwnProperty.call(message, "folderData")) if (!(message.folderData && typeof message.folderData.length === "number" || $util.isString(message.folderData))) return "folderData: buffer expected"; - if (message.encryptedFolderKey != null && message.hasOwnProperty("encryptedFolderKey")) + if (message.encryptedFolderKey != null && Object.hasOwnProperty.call(message, "encryptedFolderKey")) if (!(message.encryptedFolderKey && typeof message.encryptedFolderKey.length === "number" || $util.isString(message.encryptedFolderKey))) return "encryptedFolderKey: buffer expected"; - if (message.sharedFolderFields != null && message.hasOwnProperty("sharedFolderFields")) { + if (message.sharedFolderFields != null && Object.hasOwnProperty.call(message, "sharedFolderFields")) { let error = $root.Folder.SharedFolderFields.verify(message.sharedFolderFields, long + 1); if (error) return "sharedFolderFields." + error; } - if (message.sharedFolderFolderFields != null && message.hasOwnProperty("sharedFolderFolderFields")) { + if (message.sharedFolderFolderFields != null && Object.hasOwnProperty.call(message, "sharedFolderFolderFields")) { let error = $root.Folder.SharedFolderFolderFields.verify(message.sharedFolderFolderFields, long + 1); if (error) return "sharedFolderFolderFields." + error; @@ -114427,6 +115123,8 @@ export const Folder = $root.Folder = (() => { FolderRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -114477,12 +115175,12 @@ export const Folder = $root.Folder = (() => { else if (object.encryptedFolderKey.length >= 0) message.encryptedFolderKey = object.encryptedFolderKey; if (object.sharedFolderFields != null) { - if (typeof object.sharedFolderFields !== "object") + if (!$util.isObject(object.sharedFolderFields)) throw TypeError(".Folder.FolderRequest.sharedFolderFields: object expected"); message.sharedFolderFields = $root.Folder.SharedFolderFields.fromObject(object.sharedFolderFields, long + 1); } if (object.sharedFolderFolderFields != null) { - if (typeof object.sharedFolderFolderFields !== "object") + if (!$util.isObject(object.sharedFolderFolderFields)) throw TypeError(".Folder.FolderRequest.sharedFolderFolderFields: object expected"); message.sharedFolderFolderFields = $root.Folder.SharedFolderFolderFields.fromObject(object.sharedFolderFolderFields, long + 1); } @@ -114539,19 +115237,19 @@ export const Folder = $root.Folder = (() => { object.sharedFolderFields = null; object.sharedFolderFolderFields = null; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.folderType != null && message.hasOwnProperty("folderType")) + if (message.folderType != null && Object.hasOwnProperty.call(message, "folderType")) object.folderType = options.enums === String ? $root.Folder.FolderType[message.folderType] === undefined ? message.folderType : $root.Folder.FolderType[message.folderType] : message.folderType; - if (message.parentFolderUid != null && message.hasOwnProperty("parentFolderUid")) + if (message.parentFolderUid != null && Object.hasOwnProperty.call(message, "parentFolderUid")) object.parentFolderUid = options.bytes === String ? $util.base64.encode(message.parentFolderUid, 0, message.parentFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentFolderUid) : message.parentFolderUid; - if (message.folderData != null && message.hasOwnProperty("folderData")) + if (message.folderData != null && Object.hasOwnProperty.call(message, "folderData")) object.folderData = options.bytes === String ? $util.base64.encode(message.folderData, 0, message.folderData.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderData) : message.folderData; - if (message.encryptedFolderKey != null && message.hasOwnProperty("encryptedFolderKey")) + if (message.encryptedFolderKey != null && Object.hasOwnProperty.call(message, "encryptedFolderKey")) object.encryptedFolderKey = options.bytes === String ? $util.base64.encode(message.encryptedFolderKey, 0, message.encryptedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedFolderKey) : message.encryptedFolderKey; - if (message.sharedFolderFields != null && message.hasOwnProperty("sharedFolderFields")) + if (message.sharedFolderFields != null && Object.hasOwnProperty.call(message, "sharedFolderFields")) object.sharedFolderFields = $root.Folder.SharedFolderFields.toObject(message.sharedFolderFields, options, q + 1); - if (message.sharedFolderFolderFields != null && message.hasOwnProperty("sharedFolderFolderFields")) + if (message.sharedFolderFolderFields != null && Object.hasOwnProperty.call(message, "sharedFolderFolderFields")) object.sharedFolderFolderFields = $root.Folder.SharedFolderFolderFields.toObject(message.sharedFolderFolderFields, options, q + 1); return object; }; @@ -114682,7 +115380,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -114760,13 +115458,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -114783,6 +115481,8 @@ export const Folder = $root.Folder = (() => { FolderResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -114839,16 +115539,16 @@ export const Folder = $root.Folder = (() => { object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.status = ""; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -114972,7 +115672,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ ImportFolderRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -115050,7 +115750,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderRequest != null && message.hasOwnProperty("folderRequest")) { + if (message.folderRequest != null && Object.hasOwnProperty.call(message, "folderRequest")) { if (!Array.isArray(message.folderRequest)) return "folderRequest: array expected"; for (let i = 0; i < message.folderRequest.length; ++i) { @@ -115059,7 +115759,7 @@ export const Folder = $root.Folder = (() => { return "folderRequest." + error; } } - if (message.recordRequest != null && message.hasOwnProperty("recordRequest")) { + if (message.recordRequest != null && Object.hasOwnProperty.call(message, "recordRequest")) { if (!Array.isArray(message.recordRequest)) return "recordRequest: array expected"; for (let i = 0; i < message.recordRequest.length; ++i) { @@ -115082,6 +115782,8 @@ export const Folder = $root.Folder = (() => { ImportFolderRecordRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.ImportFolderRecordRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.ImportFolderRecordRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -115092,7 +115794,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.ImportFolderRecordRequest.folderRequest: array expected"); message.folderRequest = []; for (let i = 0; i < object.folderRequest.length; ++i) { - if (typeof object.folderRequest[i] !== "object") + if (!$util.isObject(object.folderRequest[i])) throw TypeError(".Folder.ImportFolderRecordRequest.folderRequest: object expected"); message.folderRequest[i] = $root.Folder.FolderRequest.fromObject(object.folderRequest[i], long + 1); } @@ -115102,7 +115804,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.ImportFolderRecordRequest.recordRequest: array expected"); message.recordRequest = []; for (let i = 0; i < object.recordRequest.length; ++i) { - if (typeof object.recordRequest[i] !== "object") + if (!$util.isObject(object.recordRequest[i])) throw TypeError(".Folder.ImportFolderRecordRequest.recordRequest: object expected"); message.recordRequest[i] = $root.Folder.RecordRequest.fromObject(object.recordRequest[i], long + 1); } @@ -115263,7 +115965,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ ImportFolderRecordResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -115341,7 +116043,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderResponse != null && message.hasOwnProperty("folderResponse")) { + if (message.folderResponse != null && Object.hasOwnProperty.call(message, "folderResponse")) { if (!Array.isArray(message.folderResponse)) return "folderResponse: array expected"; for (let i = 0; i < message.folderResponse.length; ++i) { @@ -115350,7 +116052,7 @@ export const Folder = $root.Folder = (() => { return "folderResponse." + error; } } - if (message.recordResponse != null && message.hasOwnProperty("recordResponse")) { + if (message.recordResponse != null && Object.hasOwnProperty.call(message, "recordResponse")) { if (!Array.isArray(message.recordResponse)) return "recordResponse: array expected"; for (let i = 0; i < message.recordResponse.length; ++i) { @@ -115373,6 +116075,8 @@ export const Folder = $root.Folder = (() => { ImportFolderRecordResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.ImportFolderRecordResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.ImportFolderRecordResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -115383,7 +116087,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.ImportFolderRecordResponse.folderResponse: array expected"); message.folderResponse = []; for (let i = 0; i < object.folderResponse.length; ++i) { - if (typeof object.folderResponse[i] !== "object") + if (!$util.isObject(object.folderResponse[i])) throw TypeError(".Folder.ImportFolderRecordResponse.folderResponse: object expected"); message.folderResponse[i] = $root.Folder.FolderResponse.fromObject(object.folderResponse[i], long + 1); } @@ -115393,7 +116097,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.ImportFolderRecordResponse.recordResponse: array expected"); message.recordResponse = []; for (let i = 0; i < object.recordResponse.length; ++i) { - if (typeof object.recordResponse[i] !== "object") + if (!$util.isObject(object.recordResponse[i])) throw TypeError(".Folder.ImportFolderRecordResponse.recordResponse: object expected"); message.recordResponse[i] = $root.Folder.RecordResponse.fromObject(object.recordResponse[i], long + 1); } @@ -115654,7 +116358,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -115760,16 +116464,16 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) switch (message.canEdit) { default: return "canEdit: enum value expected"; @@ -115778,7 +116482,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) switch (message.canShare) { default: return "canShare: enum value expected"; @@ -115787,16 +116491,16 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) if (!(message.encryptedRecordKey && typeof message.encryptedRecordKey.length === "number" || $util.isString(message.encryptedRecordKey))) return "encryptedRecordKey: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision)) return "revision: integer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -115805,7 +116509,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -115822,6 +116526,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -115980,30 +116686,30 @@ export const Folder = $root.Folder = (() => { object.timerNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = options.enums === String ? $root.Folder.SetBooleanValue[message.canEdit] === undefined ? message.canEdit : $root.Folder.SetBooleanValue[message.canEdit] : message.canEdit; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) object.canShare = options.enums === String ? $root.Folder.SetBooleanValue[message.canShare] === undefined ? message.canShare : $root.Folder.SetBooleanValue[message.canShare] : message.canShare; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) object.encryptedRecordKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordKey, 0, message.encryptedRecordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordKey) : message.encryptedRecordKey; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) object.revision = message.revision; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -116189,7 +116895,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -116287,10 +116993,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) switch (message.manageUsers) { default: return "manageUsers: enum value expected"; @@ -116299,7 +117005,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) switch (message.manageRecords) { default: return "manageRecords: enum value expected"; @@ -116308,13 +117014,13 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) if (!(message.sharedFolderKey && typeof message.sharedFolderKey.length === "number" || $util.isString(message.sharedFolderKey))) return "sharedFolderKey: buffer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -116323,12 +117029,12 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.typedSharedFolderKey != null && message.hasOwnProperty("typedSharedFolderKey")) { + if (message.typedSharedFolderKey != null && Object.hasOwnProperty.call(message, "typedSharedFolderKey")) { let error = $root.Folder.EncryptedDataKey.verify(message.typedSharedFolderKey, long + 1); if (error) return "typedSharedFolderKey." + error; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -116345,6 +117051,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -116427,7 +117135,7 @@ export const Folder = $root.Folder = (() => { break; } if (object.typedSharedFolderKey != null) { - if (typeof object.typedSharedFolderKey !== "object") + if (!$util.isObject(object.typedSharedFolderKey)) throw TypeError(".Folder.SharedFolderUpdateUser.typedSharedFolderKey: object expected"); message.typedSharedFolderKey = $root.Folder.EncryptedDataKey.fromObject(object.typedSharedFolderKey, long + 1); } @@ -116473,26 +117181,26 @@ export const Folder = $root.Folder = (() => { object.typedSharedFolderKey = null; object.rotateOnExpiration = false; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) object.manageUsers = options.enums === String ? $root.Folder.SetBooleanValue[message.manageUsers] === undefined ? message.manageUsers : $root.Folder.SetBooleanValue[message.manageUsers] : message.manageUsers; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) object.manageRecords = options.enums === String ? $root.Folder.SetBooleanValue[message.manageRecords] === undefined ? message.manageRecords : $root.Folder.SetBooleanValue[message.manageRecords] : message.manageRecords; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) object.sharedFolderKey = options.bytes === String ? $util.base64.encode(message.sharedFolderKey, 0, message.sharedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderKey) : message.sharedFolderKey; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.typedSharedFolderKey != null && message.hasOwnProperty("typedSharedFolderKey")) + if (message.typedSharedFolderKey != null && Object.hasOwnProperty.call(message, "typedSharedFolderKey")) object.typedSharedFolderKey = $root.Folder.EncryptedDataKey.toObject(message.typedSharedFolderKey, options, q + 1); - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -116678,7 +117386,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -116776,22 +117484,22 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) if (typeof message.manageUsers !== "boolean") return "manageUsers: boolean expected"; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) if (typeof message.manageRecords !== "boolean") return "manageRecords: boolean expected"; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) if (!(message.sharedFolderKey && typeof message.sharedFolderKey.length === "number" || $util.isString(message.sharedFolderKey))) return "sharedFolderKey: buffer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -116800,12 +117508,12 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.typedSharedFolderKey != null && message.hasOwnProperty("typedSharedFolderKey")) { + if (message.typedSharedFolderKey != null && Object.hasOwnProperty.call(message, "typedSharedFolderKey")) { let error = $root.Folder.EncryptedDataKey.verify(message.typedSharedFolderKey, long + 1); if (error) return "typedSharedFolderKey." + error; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -116822,6 +117530,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -116871,7 +117581,7 @@ export const Folder = $root.Folder = (() => { break; } if (object.typedSharedFolderKey != null) { - if (typeof object.typedSharedFolderKey !== "object") + if (!$util.isObject(object.typedSharedFolderKey)) throw TypeError(".Folder.SharedFolderUpdateTeam.typedSharedFolderKey: object expected"); message.typedSharedFolderKey = $root.Folder.EncryptedDataKey.fromObject(object.typedSharedFolderKey, long + 1); } @@ -116923,26 +117633,26 @@ export const Folder = $root.Folder = (() => { object.typedSharedFolderKey = null; object.rotateOnExpiration = false; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) object.manageUsers = message.manageUsers; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) object.manageRecords = message.manageRecords; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) object.sharedFolderKey = options.bytes === String ? $util.base64.encode(message.sharedFolderKey, 0, message.sharedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderKey) : message.sharedFolderKey; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.typedSharedFolderKey != null && message.hasOwnProperty("typedSharedFolderKey")) + if (message.typedSharedFolderKey != null && Object.hasOwnProperty.call(message, "typedSharedFolderKey")) object.typedSharedFolderKey = $root.Folder.EncryptedDataKey.toObject(message.typedSharedFolderKey, options, q + 1); - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -117278,7 +117988,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateV3Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -117442,25 +118152,25 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUpdateOperationDontUse != null && message.hasOwnProperty("sharedFolderUpdateOperationDontUse")) + if (message.sharedFolderUpdateOperationDontUse != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateOperationDontUse")) if (!$util.isInteger(message.sharedFolderUpdateOperationDontUse)) return "sharedFolderUpdateOperationDontUse: integer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.encryptedSharedFolderName != null && message.hasOwnProperty("encryptedSharedFolderName")) + if (message.encryptedSharedFolderName != null && Object.hasOwnProperty.call(message, "encryptedSharedFolderName")) if (!(message.encryptedSharedFolderName && typeof message.encryptedSharedFolderName.length === "number" || $util.isString(message.encryptedSharedFolderName))) return "encryptedSharedFolderName: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.forceUpdate != null && message.hasOwnProperty("forceUpdate")) + if (message.forceUpdate != null && Object.hasOwnProperty.call(message, "forceUpdate")) if (typeof message.forceUpdate !== "boolean") return "forceUpdate: boolean expected"; - if (message.fromTeamUid != null && message.hasOwnProperty("fromTeamUid")) + if (message.fromTeamUid != null && Object.hasOwnProperty.call(message, "fromTeamUid")) if (!(message.fromTeamUid && typeof message.fromTeamUid.length === "number" || $util.isString(message.fromTeamUid))) return "fromTeamUid: buffer expected"; - if (message.defaultManageUsers != null && message.hasOwnProperty("defaultManageUsers")) + if (message.defaultManageUsers != null && Object.hasOwnProperty.call(message, "defaultManageUsers")) switch (message.defaultManageUsers) { default: return "defaultManageUsers: enum value expected"; @@ -117469,7 +118179,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.defaultManageRecords != null && message.hasOwnProperty("defaultManageRecords")) + if (message.defaultManageRecords != null && Object.hasOwnProperty.call(message, "defaultManageRecords")) switch (message.defaultManageRecords) { default: return "defaultManageRecords: enum value expected"; @@ -117478,7 +118188,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.defaultCanEdit != null && message.hasOwnProperty("defaultCanEdit")) + if (message.defaultCanEdit != null && Object.hasOwnProperty.call(message, "defaultCanEdit")) switch (message.defaultCanEdit) { default: return "defaultCanEdit: enum value expected"; @@ -117487,7 +118197,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.defaultCanShare != null && message.hasOwnProperty("defaultCanShare")) + if (message.defaultCanShare != null && Object.hasOwnProperty.call(message, "defaultCanShare")) switch (message.defaultCanShare) { default: return "defaultCanShare: enum value expected"; @@ -117496,7 +118206,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.sharedFolderAddRecord != null && message.hasOwnProperty("sharedFolderAddRecord")) { + if (message.sharedFolderAddRecord != null && Object.hasOwnProperty.call(message, "sharedFolderAddRecord")) { if (!Array.isArray(message.sharedFolderAddRecord)) return "sharedFolderAddRecord: array expected"; for (let i = 0; i < message.sharedFolderAddRecord.length; ++i) { @@ -117505,7 +118215,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderAddRecord." + error; } } - if (message.sharedFolderAddUser != null && message.hasOwnProperty("sharedFolderAddUser")) { + if (message.sharedFolderAddUser != null && Object.hasOwnProperty.call(message, "sharedFolderAddUser")) { if (!Array.isArray(message.sharedFolderAddUser)) return "sharedFolderAddUser: array expected"; for (let i = 0; i < message.sharedFolderAddUser.length; ++i) { @@ -117514,7 +118224,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderAddUser." + error; } } - if (message.sharedFolderAddTeam != null && message.hasOwnProperty("sharedFolderAddTeam")) { + if (message.sharedFolderAddTeam != null && Object.hasOwnProperty.call(message, "sharedFolderAddTeam")) { if (!Array.isArray(message.sharedFolderAddTeam)) return "sharedFolderAddTeam: array expected"; for (let i = 0; i < message.sharedFolderAddTeam.length; ++i) { @@ -117523,7 +118233,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderAddTeam." + error; } } - if (message.sharedFolderUpdateRecord != null && message.hasOwnProperty("sharedFolderUpdateRecord")) { + if (message.sharedFolderUpdateRecord != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateRecord")) { if (!Array.isArray(message.sharedFolderUpdateRecord)) return "sharedFolderUpdateRecord: array expected"; for (let i = 0; i < message.sharedFolderUpdateRecord.length; ++i) { @@ -117532,7 +118242,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderUpdateRecord." + error; } } - if (message.sharedFolderUpdateUser != null && message.hasOwnProperty("sharedFolderUpdateUser")) { + if (message.sharedFolderUpdateUser != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateUser")) { if (!Array.isArray(message.sharedFolderUpdateUser)) return "sharedFolderUpdateUser: array expected"; for (let i = 0; i < message.sharedFolderUpdateUser.length; ++i) { @@ -117541,7 +118251,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderUpdateUser." + error; } } - if (message.sharedFolderUpdateTeam != null && message.hasOwnProperty("sharedFolderUpdateTeam")) { + if (message.sharedFolderUpdateTeam != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateTeam")) { if (!Array.isArray(message.sharedFolderUpdateTeam)) return "sharedFolderUpdateTeam: array expected"; for (let i = 0; i < message.sharedFolderUpdateTeam.length; ++i) { @@ -117550,28 +118260,28 @@ export const Folder = $root.Folder = (() => { return "sharedFolderUpdateTeam." + error; } } - if (message.sharedFolderRemoveRecord != null && message.hasOwnProperty("sharedFolderRemoveRecord")) { + if (message.sharedFolderRemoveRecord != null && Object.hasOwnProperty.call(message, "sharedFolderRemoveRecord")) { if (!Array.isArray(message.sharedFolderRemoveRecord)) return "sharedFolderRemoveRecord: array expected"; for (let i = 0; i < message.sharedFolderRemoveRecord.length; ++i) if (!(message.sharedFolderRemoveRecord[i] && typeof message.sharedFolderRemoveRecord[i].length === "number" || $util.isString(message.sharedFolderRemoveRecord[i]))) return "sharedFolderRemoveRecord: buffer[] expected"; } - if (message.sharedFolderRemoveUser != null && message.hasOwnProperty("sharedFolderRemoveUser")) { + if (message.sharedFolderRemoveUser != null && Object.hasOwnProperty.call(message, "sharedFolderRemoveUser")) { if (!Array.isArray(message.sharedFolderRemoveUser)) return "sharedFolderRemoveUser: array expected"; for (let i = 0; i < message.sharedFolderRemoveUser.length; ++i) if (!$util.isString(message.sharedFolderRemoveUser[i])) return "sharedFolderRemoveUser: string[] expected"; } - if (message.sharedFolderRemoveTeam != null && message.hasOwnProperty("sharedFolderRemoveTeam")) { + if (message.sharedFolderRemoveTeam != null && Object.hasOwnProperty.call(message, "sharedFolderRemoveTeam")) { if (!Array.isArray(message.sharedFolderRemoveTeam)) return "sharedFolderRemoveTeam: array expected"; for (let i = 0; i < message.sharedFolderRemoveTeam.length; ++i) if (!(message.sharedFolderRemoveTeam[i] && typeof message.sharedFolderRemoveTeam[i].length === "number" || $util.isString(message.sharedFolderRemoveTeam[i]))) return "sharedFolderRemoveTeam: buffer[] expected"; } - if (message.sharedFolderOwner != null && message.hasOwnProperty("sharedFolderOwner")) + if (message.sharedFolderOwner != null && Object.hasOwnProperty.call(message, "sharedFolderOwner")) if (!$util.isString(message.sharedFolderOwner)) return "sharedFolderOwner: string expected"; return null; @@ -117588,6 +118298,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateV3Request.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateV3Request) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateV3Request: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -117706,7 +118418,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderAddRecord: array expected"); message.sharedFolderAddRecord = []; for (let i = 0; i < object.sharedFolderAddRecord.length; ++i) { - if (typeof object.sharedFolderAddRecord[i] !== "object") + if (!$util.isObject(object.sharedFolderAddRecord[i])) throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderAddRecord: object expected"); message.sharedFolderAddRecord[i] = $root.Folder.SharedFolderUpdateRecord.fromObject(object.sharedFolderAddRecord[i], long + 1); } @@ -117716,7 +118428,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderAddUser: array expected"); message.sharedFolderAddUser = []; for (let i = 0; i < object.sharedFolderAddUser.length; ++i) { - if (typeof object.sharedFolderAddUser[i] !== "object") + if (!$util.isObject(object.sharedFolderAddUser[i])) throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderAddUser: object expected"); message.sharedFolderAddUser[i] = $root.Folder.SharedFolderUpdateUser.fromObject(object.sharedFolderAddUser[i], long + 1); } @@ -117726,7 +118438,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderAddTeam: array expected"); message.sharedFolderAddTeam = []; for (let i = 0; i < object.sharedFolderAddTeam.length; ++i) { - if (typeof object.sharedFolderAddTeam[i] !== "object") + if (!$util.isObject(object.sharedFolderAddTeam[i])) throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderAddTeam: object expected"); message.sharedFolderAddTeam[i] = $root.Folder.SharedFolderUpdateTeam.fromObject(object.sharedFolderAddTeam[i], long + 1); } @@ -117736,7 +118448,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderUpdateRecord: array expected"); message.sharedFolderUpdateRecord = []; for (let i = 0; i < object.sharedFolderUpdateRecord.length; ++i) { - if (typeof object.sharedFolderUpdateRecord[i] !== "object") + if (!$util.isObject(object.sharedFolderUpdateRecord[i])) throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderUpdateRecord: object expected"); message.sharedFolderUpdateRecord[i] = $root.Folder.SharedFolderUpdateRecord.fromObject(object.sharedFolderUpdateRecord[i], long + 1); } @@ -117746,7 +118458,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderUpdateUser: array expected"); message.sharedFolderUpdateUser = []; for (let i = 0; i < object.sharedFolderUpdateUser.length; ++i) { - if (typeof object.sharedFolderUpdateUser[i] !== "object") + if (!$util.isObject(object.sharedFolderUpdateUser[i])) throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderUpdateUser: object expected"); message.sharedFolderUpdateUser[i] = $root.Folder.SharedFolderUpdateUser.fromObject(object.sharedFolderUpdateUser[i], long + 1); } @@ -117756,7 +118468,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderUpdateTeam: array expected"); message.sharedFolderUpdateTeam = []; for (let i = 0; i < object.sharedFolderUpdateTeam.length; ++i) { - if (typeof object.sharedFolderUpdateTeam[i] !== "object") + if (!$util.isObject(object.sharedFolderUpdateTeam[i])) throw TypeError(".Folder.SharedFolderUpdateV3Request.sharedFolderUpdateTeam: object expected"); message.sharedFolderUpdateTeam[i] = $root.Folder.SharedFolderUpdateTeam.fromObject(object.sharedFolderUpdateTeam[i], long + 1); } @@ -117856,30 +118568,30 @@ export const Folder = $root.Folder = (() => { object.defaultCanShare = options.enums === String ? "BOOLEAN_NO_CHANGE" : 0; object.sharedFolderOwner = ""; } - if (message.sharedFolderUpdateOperationDontUse != null && message.hasOwnProperty("sharedFolderUpdateOperationDontUse")) + if (message.sharedFolderUpdateOperationDontUse != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateOperationDontUse")) object.sharedFolderUpdateOperationDontUse = message.sharedFolderUpdateOperationDontUse; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.encryptedSharedFolderName != null && message.hasOwnProperty("encryptedSharedFolderName")) + if (message.encryptedSharedFolderName != null && Object.hasOwnProperty.call(message, "encryptedSharedFolderName")) object.encryptedSharedFolderName = options.bytes === String ? $util.base64.encode(message.encryptedSharedFolderName, 0, message.encryptedSharedFolderName.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSharedFolderName) : message.encryptedSharedFolderName; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.forceUpdate != null && message.hasOwnProperty("forceUpdate")) + if (message.forceUpdate != null && Object.hasOwnProperty.call(message, "forceUpdate")) object.forceUpdate = message.forceUpdate; - if (message.fromTeamUid != null && message.hasOwnProperty("fromTeamUid")) + if (message.fromTeamUid != null && Object.hasOwnProperty.call(message, "fromTeamUid")) object.fromTeamUid = options.bytes === String ? $util.base64.encode(message.fromTeamUid, 0, message.fromTeamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.fromTeamUid) : message.fromTeamUid; - if (message.defaultManageUsers != null && message.hasOwnProperty("defaultManageUsers")) + if (message.defaultManageUsers != null && Object.hasOwnProperty.call(message, "defaultManageUsers")) object.defaultManageUsers = options.enums === String ? $root.Folder.SetBooleanValue[message.defaultManageUsers] === undefined ? message.defaultManageUsers : $root.Folder.SetBooleanValue[message.defaultManageUsers] : message.defaultManageUsers; - if (message.defaultManageRecords != null && message.hasOwnProperty("defaultManageRecords")) + if (message.defaultManageRecords != null && Object.hasOwnProperty.call(message, "defaultManageRecords")) object.defaultManageRecords = options.enums === String ? $root.Folder.SetBooleanValue[message.defaultManageRecords] === undefined ? message.defaultManageRecords : $root.Folder.SetBooleanValue[message.defaultManageRecords] : message.defaultManageRecords; - if (message.defaultCanEdit != null && message.hasOwnProperty("defaultCanEdit")) + if (message.defaultCanEdit != null && Object.hasOwnProperty.call(message, "defaultCanEdit")) object.defaultCanEdit = options.enums === String ? $root.Folder.SetBooleanValue[message.defaultCanEdit] === undefined ? message.defaultCanEdit : $root.Folder.SetBooleanValue[message.defaultCanEdit] : message.defaultCanEdit; - if (message.defaultCanShare != null && message.hasOwnProperty("defaultCanShare")) + if (message.defaultCanShare != null && Object.hasOwnProperty.call(message, "defaultCanShare")) object.defaultCanShare = options.enums === String ? $root.Folder.SetBooleanValue[message.defaultCanShare] === undefined ? message.defaultCanShare : $root.Folder.SetBooleanValue[message.defaultCanShare] : message.defaultCanShare; if (message.sharedFolderAddRecord && message.sharedFolderAddRecord.length) { object.sharedFolderAddRecord = []; @@ -117926,7 +118638,7 @@ export const Folder = $root.Folder = (() => { for (let j = 0; j < message.sharedFolderRemoveTeam.length; ++j) object.sharedFolderRemoveTeam[j] = options.bytes === String ? $util.base64.encode(message.sharedFolderRemoveTeam[j], 0, message.sharedFolderRemoveTeam[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderRemoveTeam[j]) : message.sharedFolderRemoveTeam[j]; } - if (message.sharedFolderOwner != null && message.hasOwnProperty("sharedFolderOwner")) + if (message.sharedFolderOwner != null && Object.hasOwnProperty.call(message, "sharedFolderOwner")) object.sharedFolderOwner = message.sharedFolderOwner; return object; }; @@ -118037,7 +118749,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateV3RequestV2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -118109,7 +118821,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFoldersUpdateV3 != null && message.hasOwnProperty("sharedFoldersUpdateV3")) { + if (message.sharedFoldersUpdateV3 != null && Object.hasOwnProperty.call(message, "sharedFoldersUpdateV3")) { if (!Array.isArray(message.sharedFoldersUpdateV3)) return "sharedFoldersUpdateV3: array expected"; for (let i = 0; i < message.sharedFoldersUpdateV3.length; ++i) { @@ -118132,6 +118844,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateV3RequestV2.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateV3RequestV2) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateV3RequestV2: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -118142,7 +118856,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3RequestV2.sharedFoldersUpdateV3: array expected"); message.sharedFoldersUpdateV3 = []; for (let i = 0; i < object.sharedFoldersUpdateV3.length; ++i) { - if (typeof object.sharedFoldersUpdateV3[i] !== "object") + if (!$util.isObject(object.sharedFoldersUpdateV3[i])) throw TypeError(".Folder.SharedFolderUpdateV3RequestV2.sharedFoldersUpdateV3: object expected"); message.sharedFoldersUpdateV3[i] = $root.Folder.SharedFolderUpdateV3Request.fromObject(object.sharedFoldersUpdateV3[i], long + 1); } @@ -118292,7 +119006,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateRecordStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -118366,10 +119080,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -118386,6 +119100,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateRecordStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateRecordStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateRecordStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -118428,9 +119144,9 @@ export const Folder = $root.Folder = (() => { } object.status = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -118550,7 +119266,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateUserStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -118624,10 +119340,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -118644,6 +119360,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateUserStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateUserStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateUserStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -118677,9 +119395,9 @@ export const Folder = $root.Folder = (() => { object.username = ""; object.status = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -118799,7 +119517,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateTeamStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -118873,10 +119591,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -118893,6 +119611,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateTeamStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateTeamStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateTeamStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -118935,9 +119655,9 @@ export const Folder = $root.Folder = (() => { } object.status = ""; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -119185,7 +119905,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateV3Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -119317,10 +120037,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.sharedFolderAddRecordStatus != null && message.hasOwnProperty("sharedFolderAddRecordStatus")) { + if (message.sharedFolderAddRecordStatus != null && Object.hasOwnProperty.call(message, "sharedFolderAddRecordStatus")) { if (!Array.isArray(message.sharedFolderAddRecordStatus)) return "sharedFolderAddRecordStatus: array expected"; for (let i = 0; i < message.sharedFolderAddRecordStatus.length; ++i) { @@ -119329,7 +120049,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderAddRecordStatus." + error; } } - if (message.sharedFolderAddUserStatus != null && message.hasOwnProperty("sharedFolderAddUserStatus")) { + if (message.sharedFolderAddUserStatus != null && Object.hasOwnProperty.call(message, "sharedFolderAddUserStatus")) { if (!Array.isArray(message.sharedFolderAddUserStatus)) return "sharedFolderAddUserStatus: array expected"; for (let i = 0; i < message.sharedFolderAddUserStatus.length; ++i) { @@ -119338,7 +120058,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderAddUserStatus." + error; } } - if (message.sharedFolderAddTeamStatus != null && message.hasOwnProperty("sharedFolderAddTeamStatus")) { + if (message.sharedFolderAddTeamStatus != null && Object.hasOwnProperty.call(message, "sharedFolderAddTeamStatus")) { if (!Array.isArray(message.sharedFolderAddTeamStatus)) return "sharedFolderAddTeamStatus: array expected"; for (let i = 0; i < message.sharedFolderAddTeamStatus.length; ++i) { @@ -119347,7 +120067,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderAddTeamStatus." + error; } } - if (message.sharedFolderUpdateRecordStatus != null && message.hasOwnProperty("sharedFolderUpdateRecordStatus")) { + if (message.sharedFolderUpdateRecordStatus != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateRecordStatus")) { if (!Array.isArray(message.sharedFolderUpdateRecordStatus)) return "sharedFolderUpdateRecordStatus: array expected"; for (let i = 0; i < message.sharedFolderUpdateRecordStatus.length; ++i) { @@ -119356,7 +120076,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderUpdateRecordStatus." + error; } } - if (message.sharedFolderUpdateUserStatus != null && message.hasOwnProperty("sharedFolderUpdateUserStatus")) { + if (message.sharedFolderUpdateUserStatus != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateUserStatus")) { if (!Array.isArray(message.sharedFolderUpdateUserStatus)) return "sharedFolderUpdateUserStatus: array expected"; for (let i = 0; i < message.sharedFolderUpdateUserStatus.length; ++i) { @@ -119365,7 +120085,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderUpdateUserStatus." + error; } } - if (message.sharedFolderUpdateTeamStatus != null && message.hasOwnProperty("sharedFolderUpdateTeamStatus")) { + if (message.sharedFolderUpdateTeamStatus != null && Object.hasOwnProperty.call(message, "sharedFolderUpdateTeamStatus")) { if (!Array.isArray(message.sharedFolderUpdateTeamStatus)) return "sharedFolderUpdateTeamStatus: array expected"; for (let i = 0; i < message.sharedFolderUpdateTeamStatus.length; ++i) { @@ -119374,7 +120094,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderUpdateTeamStatus." + error; } } - if (message.sharedFolderRemoveRecordStatus != null && message.hasOwnProperty("sharedFolderRemoveRecordStatus")) { + if (message.sharedFolderRemoveRecordStatus != null && Object.hasOwnProperty.call(message, "sharedFolderRemoveRecordStatus")) { if (!Array.isArray(message.sharedFolderRemoveRecordStatus)) return "sharedFolderRemoveRecordStatus: array expected"; for (let i = 0; i < message.sharedFolderRemoveRecordStatus.length; ++i) { @@ -119383,7 +120103,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderRemoveRecordStatus." + error; } } - if (message.sharedFolderRemoveUserStatus != null && message.hasOwnProperty("sharedFolderRemoveUserStatus")) { + if (message.sharedFolderRemoveUserStatus != null && Object.hasOwnProperty.call(message, "sharedFolderRemoveUserStatus")) { if (!Array.isArray(message.sharedFolderRemoveUserStatus)) return "sharedFolderRemoveUserStatus: array expected"; for (let i = 0; i < message.sharedFolderRemoveUserStatus.length; ++i) { @@ -119392,7 +120112,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderRemoveUserStatus." + error; } } - if (message.sharedFolderRemoveTeamStatus != null && message.hasOwnProperty("sharedFolderRemoveTeamStatus")) { + if (message.sharedFolderRemoveTeamStatus != null && Object.hasOwnProperty.call(message, "sharedFolderRemoveTeamStatus")) { if (!Array.isArray(message.sharedFolderRemoveTeamStatus)) return "sharedFolderRemoveTeamStatus: array expected"; for (let i = 0; i < message.sharedFolderRemoveTeamStatus.length; ++i) { @@ -119401,10 +120121,10 @@ export const Folder = $root.Folder = (() => { return "sharedFolderRemoveTeamStatus." + error; } } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; return null; @@ -119421,6 +120141,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateV3Response.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateV3Response) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateV3Response: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -119440,7 +120162,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderAddRecordStatus: array expected"); message.sharedFolderAddRecordStatus = []; for (let i = 0; i < object.sharedFolderAddRecordStatus.length; ++i) { - if (typeof object.sharedFolderAddRecordStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderAddRecordStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderAddRecordStatus: object expected"); message.sharedFolderAddRecordStatus[i] = $root.Folder.SharedFolderUpdateRecordStatus.fromObject(object.sharedFolderAddRecordStatus[i], long + 1); } @@ -119450,7 +120172,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderAddUserStatus: array expected"); message.sharedFolderAddUserStatus = []; for (let i = 0; i < object.sharedFolderAddUserStatus.length; ++i) { - if (typeof object.sharedFolderAddUserStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderAddUserStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderAddUserStatus: object expected"); message.sharedFolderAddUserStatus[i] = $root.Folder.SharedFolderUpdateUserStatus.fromObject(object.sharedFolderAddUserStatus[i], long + 1); } @@ -119460,7 +120182,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderAddTeamStatus: array expected"); message.sharedFolderAddTeamStatus = []; for (let i = 0; i < object.sharedFolderAddTeamStatus.length; ++i) { - if (typeof object.sharedFolderAddTeamStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderAddTeamStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderAddTeamStatus: object expected"); message.sharedFolderAddTeamStatus[i] = $root.Folder.SharedFolderUpdateTeamStatus.fromObject(object.sharedFolderAddTeamStatus[i], long + 1); } @@ -119470,7 +120192,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderUpdateRecordStatus: array expected"); message.sharedFolderUpdateRecordStatus = []; for (let i = 0; i < object.sharedFolderUpdateRecordStatus.length; ++i) { - if (typeof object.sharedFolderUpdateRecordStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderUpdateRecordStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderUpdateRecordStatus: object expected"); message.sharedFolderUpdateRecordStatus[i] = $root.Folder.SharedFolderUpdateRecordStatus.fromObject(object.sharedFolderUpdateRecordStatus[i], long + 1); } @@ -119480,7 +120202,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderUpdateUserStatus: array expected"); message.sharedFolderUpdateUserStatus = []; for (let i = 0; i < object.sharedFolderUpdateUserStatus.length; ++i) { - if (typeof object.sharedFolderUpdateUserStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderUpdateUserStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderUpdateUserStatus: object expected"); message.sharedFolderUpdateUserStatus[i] = $root.Folder.SharedFolderUpdateUserStatus.fromObject(object.sharedFolderUpdateUserStatus[i], long + 1); } @@ -119490,7 +120212,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderUpdateTeamStatus: array expected"); message.sharedFolderUpdateTeamStatus = []; for (let i = 0; i < object.sharedFolderUpdateTeamStatus.length; ++i) { - if (typeof object.sharedFolderUpdateTeamStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderUpdateTeamStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderUpdateTeamStatus: object expected"); message.sharedFolderUpdateTeamStatus[i] = $root.Folder.SharedFolderUpdateTeamStatus.fromObject(object.sharedFolderUpdateTeamStatus[i], long + 1); } @@ -119500,7 +120222,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderRemoveRecordStatus: array expected"); message.sharedFolderRemoveRecordStatus = []; for (let i = 0; i < object.sharedFolderRemoveRecordStatus.length; ++i) { - if (typeof object.sharedFolderRemoveRecordStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderRemoveRecordStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderRemoveRecordStatus: object expected"); message.sharedFolderRemoveRecordStatus[i] = $root.Folder.SharedFolderUpdateRecordStatus.fromObject(object.sharedFolderRemoveRecordStatus[i], long + 1); } @@ -119510,7 +120232,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderRemoveUserStatus: array expected"); message.sharedFolderRemoveUserStatus = []; for (let i = 0; i < object.sharedFolderRemoveUserStatus.length; ++i) { - if (typeof object.sharedFolderRemoveUserStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderRemoveUserStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderRemoveUserStatus: object expected"); message.sharedFolderRemoveUserStatus[i] = $root.Folder.SharedFolderUpdateUserStatus.fromObject(object.sharedFolderRemoveUserStatus[i], long + 1); } @@ -119520,7 +120242,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderRemoveTeamStatus: array expected"); message.sharedFolderRemoveTeamStatus = []; for (let i = 0; i < object.sharedFolderRemoveTeamStatus.length; ++i) { - if (typeof object.sharedFolderRemoveTeamStatus[i] !== "object") + if (!$util.isObject(object.sharedFolderRemoveTeamStatus[i])) throw TypeError(".Folder.SharedFolderUpdateV3Response.sharedFolderRemoveTeamStatus: object expected"); message.sharedFolderRemoveTeamStatus[i] = $root.Folder.SharedFolderUpdateTeamStatus.fromObject(object.sharedFolderRemoveTeamStatus[i], long + 1); } @@ -119578,7 +120300,7 @@ export const Folder = $root.Folder = (() => { } object.status = ""; } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -119630,9 +120352,9 @@ export const Folder = $root.Folder = (() => { for (let j = 0; j < message.sharedFolderRemoveTeamStatus.length; ++j) object.sharedFolderRemoveTeamStatus[j] = $root.Folder.SharedFolderUpdateTeamStatus.toObject(message.sharedFolderRemoveTeamStatus[j], options, q + 1); } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -119743,7 +120465,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUpdateV3ResponseV2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -119815,7 +120537,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFoldersUpdateV3Response != null && message.hasOwnProperty("sharedFoldersUpdateV3Response")) { + if (message.sharedFoldersUpdateV3Response != null && Object.hasOwnProperty.call(message, "sharedFoldersUpdateV3Response")) { if (!Array.isArray(message.sharedFoldersUpdateV3Response)) return "sharedFoldersUpdateV3Response: array expected"; for (let i = 0; i < message.sharedFoldersUpdateV3Response.length; ++i) { @@ -119838,6 +120560,8 @@ export const Folder = $root.Folder = (() => { SharedFolderUpdateV3ResponseV2.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.SharedFolderUpdateV3ResponseV2) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.SharedFolderUpdateV3ResponseV2: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -119848,7 +120572,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.SharedFolderUpdateV3ResponseV2.sharedFoldersUpdateV3Response: array expected"); message.sharedFoldersUpdateV3Response = []; for (let i = 0; i < object.sharedFoldersUpdateV3Response.length; ++i) { - if (typeof object.sharedFoldersUpdateV3Response[i] !== "object") + if (!$util.isObject(object.sharedFoldersUpdateV3Response[i])) throw TypeError(".Folder.SharedFolderUpdateV3ResponseV2.sharedFoldersUpdateV3Response: object expected"); message.sharedFoldersUpdateV3Response[i] = $root.Folder.SharedFolderUpdateV3Response.fromObject(object.sharedFoldersUpdateV3Response[i], long + 1); } @@ -120028,7 +120752,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ GetDeletedSharedFoldersAndRecordsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -120118,7 +120842,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolders != null && message.hasOwnProperty("sharedFolders")) { + if (message.sharedFolders != null && Object.hasOwnProperty.call(message, "sharedFolders")) { if (!Array.isArray(message.sharedFolders)) return "sharedFolders: array expected"; for (let i = 0; i < message.sharedFolders.length; ++i) { @@ -120127,7 +120851,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolders." + error; } } - if (message.sharedFolderRecords != null && message.hasOwnProperty("sharedFolderRecords")) { + if (message.sharedFolderRecords != null && Object.hasOwnProperty.call(message, "sharedFolderRecords")) { if (!Array.isArray(message.sharedFolderRecords)) return "sharedFolderRecords: array expected"; for (let i = 0; i < message.sharedFolderRecords.length; ++i) { @@ -120136,7 +120860,7 @@ export const Folder = $root.Folder = (() => { return "sharedFolderRecords." + error; } } - if (message.deletedRecordData != null && message.hasOwnProperty("deletedRecordData")) { + if (message.deletedRecordData != null && Object.hasOwnProperty.call(message, "deletedRecordData")) { if (!Array.isArray(message.deletedRecordData)) return "deletedRecordData: array expected"; for (let i = 0; i < message.deletedRecordData.length; ++i) { @@ -120145,7 +120869,7 @@ export const Folder = $root.Folder = (() => { return "deletedRecordData." + error; } } - if (message.usernames != null && message.hasOwnProperty("usernames")) { + if (message.usernames != null && Object.hasOwnProperty.call(message, "usernames")) { if (!Array.isArray(message.usernames)) return "usernames: array expected"; for (let i = 0; i < message.usernames.length; ++i) { @@ -120168,6 +120892,8 @@ export const Folder = $root.Folder = (() => { GetDeletedSharedFoldersAndRecordsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.GetDeletedSharedFoldersAndRecordsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -120178,7 +120904,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.sharedFolders: array expected"); message.sharedFolders = []; for (let i = 0; i < object.sharedFolders.length; ++i) { - if (typeof object.sharedFolders[i] !== "object") + if (!$util.isObject(object.sharedFolders[i])) throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.sharedFolders: object expected"); message.sharedFolders[i] = $root.Folder.DeletedSharedFolder.fromObject(object.sharedFolders[i], long + 1); } @@ -120188,7 +120914,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.sharedFolderRecords: array expected"); message.sharedFolderRecords = []; for (let i = 0; i < object.sharedFolderRecords.length; ++i) { - if (typeof object.sharedFolderRecords[i] !== "object") + if (!$util.isObject(object.sharedFolderRecords[i])) throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.sharedFolderRecords: object expected"); message.sharedFolderRecords[i] = $root.Folder.DeletedSharedFolderRecord.fromObject(object.sharedFolderRecords[i], long + 1); } @@ -120198,7 +120924,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.deletedRecordData: array expected"); message.deletedRecordData = []; for (let i = 0; i < object.deletedRecordData.length; ++i) { - if (typeof object.deletedRecordData[i] !== "object") + if (!$util.isObject(object.deletedRecordData[i])) throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.deletedRecordData: object expected"); message.deletedRecordData[i] = $root.Folder.DeletedRecordData.fromObject(object.deletedRecordData[i], long + 1); } @@ -120208,7 +120934,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.usernames: array expected"); message.usernames = []; for (let i = 0; i < object.usernames.length; ++i) { - if (typeof object.usernames[i] !== "object") + if (!$util.isObject(object.usernames[i])) throw TypeError(".Folder.GetDeletedSharedFoldersAndRecordsResponse.usernames: object expected"); message.usernames[i] = $root.Folder.Username.fromObject(object.usernames[i], long + 1); } @@ -120443,7 +121169,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ DeletedSharedFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -120541,19 +121267,19 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) if (!(message.parentUid && typeof message.parentUid.length === "number" || $util.isString(message.parentUid))) return "parentUid: buffer expected"; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) if (!(message.sharedFolderKey && typeof message.sharedFolderKey.length === "number" || $util.isString(message.sharedFolderKey))) return "sharedFolderKey: buffer expected"; - if (message.folderKeyType != null && message.hasOwnProperty("folderKeyType")) + if (message.folderKeyType != null && Object.hasOwnProperty.call(message, "folderKeyType")) switch (message.folderKeyType) { default: return "folderKeyType: enum value expected"; @@ -120566,13 +121292,13 @@ export const Folder = $root.Folder = (() => { case 6: break; } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.dateDeleted != null && message.hasOwnProperty("dateDeleted")) + if (message.dateDeleted != null && Object.hasOwnProperty.call(message, "dateDeleted")) if (!$util.isInteger(message.dateDeleted) && !(message.dateDeleted && $util.isInteger(message.dateDeleted.low) && $util.isInteger(message.dateDeleted.high))) return "dateDeleted: integer|Long expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -120589,6 +121315,8 @@ export const Folder = $root.Folder = (() => { DeletedSharedFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.DeletedSharedFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.DeletedSharedFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -120741,26 +121469,26 @@ export const Folder = $root.Folder = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) object.parentUid = options.bytes === String ? $util.base64.encode(message.parentUid, 0, message.parentUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentUid) : message.parentUid; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) object.sharedFolderKey = options.bytes === String ? $util.base64.encode(message.sharedFolderKey, 0, message.sharedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderKey) : message.sharedFolderKey; - if (message.folderKeyType != null && message.hasOwnProperty("folderKeyType")) + if (message.folderKeyType != null && Object.hasOwnProperty.call(message, "folderKeyType")) object.folderKeyType = options.enums === String ? $root.Records.RecordKeyType[message.folderKeyType] === undefined ? message.folderKeyType : $root.Records.RecordKeyType[message.folderKeyType] : message.folderKeyType; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.dateDeleted != null && message.hasOwnProperty("dateDeleted")) + if (message.dateDeleted != null && Object.hasOwnProperty.call(message, "dateDeleted")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateDeleted = typeof message.dateDeleted === "number" ? BigInt(message.dateDeleted) : $util.Long.fromBits(message.dateDeleted.low >>> 0, message.dateDeleted.high >>> 0, false).toBigInt(); else if (typeof message.dateDeleted === "number") object.dateDeleted = options.longs === String ? String(message.dateDeleted) : message.dateDeleted; else object.dateDeleted = options.longs === String ? $util.Long.prototype.toString.call(message.dateDeleted) : options.longs === Number ? new $util.LongBits(message.dateDeleted.low >>> 0, message.dateDeleted.high >>> 0).toNumber() : message.dateDeleted; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -120918,7 +121646,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ DeletedSharedFolderRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -121004,19 +121732,19 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.sharedRecordKey != null && message.hasOwnProperty("sharedRecordKey")) + if (message.sharedRecordKey != null && Object.hasOwnProperty.call(message, "sharedRecordKey")) if (!(message.sharedRecordKey && typeof message.sharedRecordKey.length === "number" || $util.isString(message.sharedRecordKey))) return "sharedRecordKey: buffer expected"; - if (message.dateDeleted != null && message.hasOwnProperty("dateDeleted")) + if (message.dateDeleted != null && Object.hasOwnProperty.call(message, "dateDeleted")) if (!$util.isInteger(message.dateDeleted) && !(message.dateDeleted && $util.isInteger(message.dateDeleted.low) && $util.isInteger(message.dateDeleted.high))) return "dateDeleted: integer|Long expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -121033,6 +121761,8 @@ export const Folder = $root.Folder = (() => { DeletedSharedFolderRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.DeletedSharedFolderRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.DeletedSharedFolderRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -121124,20 +121854,20 @@ export const Folder = $root.Folder = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.sharedRecordKey != null && message.hasOwnProperty("sharedRecordKey")) + if (message.sharedRecordKey != null && Object.hasOwnProperty.call(message, "sharedRecordKey")) object.sharedRecordKey = options.bytes === String ? $util.base64.encode(message.sharedRecordKey, 0, message.sharedRecordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedRecordKey) : message.sharedRecordKey; - if (message.dateDeleted != null && message.hasOwnProperty("dateDeleted")) + if (message.dateDeleted != null && Object.hasOwnProperty.call(message, "dateDeleted")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateDeleted = typeof message.dateDeleted === "number" ? BigInt(message.dateDeleted) : $util.Long.fromBits(message.dateDeleted.low >>> 0, message.dateDeleted.high >>> 0, false).toBigInt(); else if (typeof message.dateDeleted === "number") object.dateDeleted = options.longs === String ? String(message.dateDeleted) : message.dateDeleted; else object.dateDeleted = options.longs === String ? $util.Long.prototype.toString.call(message.dateDeleted) : options.longs === Number ? new $util.LongBits(message.dateDeleted.low >>> 0, message.dateDeleted.high >>> 0).toNumber() : message.dateDeleted; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -121306,7 +122036,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ DeletedRecordData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -121396,22 +122126,22 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.ownerUid != null && message.hasOwnProperty("ownerUid")) + if (message.ownerUid != null && Object.hasOwnProperty.call(message, "ownerUid")) if (!(message.ownerUid && typeof message.ownerUid.length === "number" || $util.isString(message.ownerUid))) return "ownerUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; return null; @@ -121428,6 +122158,8 @@ export const Folder = $root.Folder = (() => { DeletedRecordData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.DeletedRecordData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.DeletedRecordData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -121522,27 +122254,27 @@ export const Folder = $root.Folder = (() => { } object.version = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.ownerUid != null && message.hasOwnProperty("ownerUid")) + if (message.ownerUid != null && Object.hasOwnProperty.call(message, "ownerUid")) object.ownerUid = options.bytes === String ? $util.base64.encode(message.ownerUid, 0, message.ownerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.ownerUid) : message.ownerUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; return object; }; @@ -121662,7 +122394,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ Username.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -121736,10 +122468,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -121756,6 +122488,8 @@ export const Folder = $root.Folder = (() => { Username.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.Username) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.Username: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -121798,9 +122532,9 @@ export const Folder = $root.Folder = (() => { } object.username = ""; } - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -121924,7 +122658,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RestoreDeletedSharedFoldersAndRecordsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -122002,7 +122736,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -122011,7 +122745,7 @@ export const Folder = $root.Folder = (() => { return "folders." + error; } } - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -122034,6 +122768,8 @@ export const Folder = $root.Folder = (() => { RestoreDeletedSharedFoldersAndRecordsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RestoreDeletedSharedFoldersAndRecordsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RestoreDeletedSharedFoldersAndRecordsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -122044,7 +122780,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.RestoreDeletedSharedFoldersAndRecordsRequest.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".Folder.RestoreDeletedSharedFoldersAndRecordsRequest.folders: object expected"); message.folders[i] = $root.Folder.RestoreSharedObject.fromObject(object.folders[i], long + 1); } @@ -122054,7 +122790,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.RestoreDeletedSharedFoldersAndRecordsRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Folder.RestoreDeletedSharedFoldersAndRecordsRequest.records: object expected"); message.records[i] = $root.Folder.RestoreSharedObject.fromObject(object.records[i], long + 1); } @@ -122213,7 +122949,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RestoreSharedObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -122289,10 +123025,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) @@ -122313,6 +123049,8 @@ export const Folder = $root.Folder = (() => { RestoreSharedObject.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RestoreSharedObject) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RestoreSharedObject: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -122363,7 +123101,7 @@ export const Folder = $root.Folder = (() => { if (options.bytes !== Array) object.folderUid = $util.newBuffer(object.folderUid); } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; if (message.recordUids && message.recordUids.length) { object.recordUids = []; @@ -122584,7 +123322,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -122686,16 +123424,16 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) if (!(message.parentUid && typeof message.parentUid.length === "number" || $util.isString(message.parentUid))) return "parentUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -122705,7 +123443,7 @@ export const Folder = $root.Folder = (() => { case 3: break; } - if (message.inheritUserPermissions != null && message.hasOwnProperty("inheritUserPermissions")) + if (message.inheritUserPermissions != null && Object.hasOwnProperty.call(message, "inheritUserPermissions")) switch (message.inheritUserPermissions) { default: return "inheritUserPermissions: enum value expected"; @@ -122714,18 +123452,18 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) if (!(message.folderKey && typeof message.folderKey.length === "number" || $util.isString(message.folderKey))) return "folderKey: buffer expected"; - if (message.ownerInfo != null && message.hasOwnProperty("ownerInfo")) { + if (message.ownerInfo != null && Object.hasOwnProperty.call(message, "ownerInfo")) { let error = $root.Folder.UserInfo.verify(message.ownerInfo, long + 1); if (error) return "ownerInfo." + error; } - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (!$util.isInteger(message.dateCreated) && !(message.dateCreated && $util.isInteger(message.dateCreated.low) && $util.isInteger(message.dateCreated.high))) return "dateCreated: integer|Long expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; return null; @@ -122742,6 +123480,8 @@ export const Folder = $root.Folder = (() => { FolderData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -122812,7 +123552,7 @@ export const Folder = $root.Folder = (() => { else if (object.folderKey.length >= 0) message.folderKey = object.folderKey; if (object.ownerInfo != null) { - if (typeof object.ownerInfo !== "object") + if (!$util.isObject(object.ownerInfo)) throw TypeError(".Folder.FolderData.ownerInfo: object expected"); message.ownerInfo = $root.Folder.UserInfo.fromObject(object.ownerInfo, long + 1); } @@ -122897,28 +123637,28 @@ export const Folder = $root.Folder = (() => { } else object.lastModified = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) object.parentUid = options.bytes === String ? $util.base64.encode(message.parentUid, 0, message.parentUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentUid) : message.parentUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.Folder.FolderUsageType[message.type] === undefined ? message.type : $root.Folder.FolderUsageType[message.type] : message.type; - if (message.inheritUserPermissions != null && message.hasOwnProperty("inheritUserPermissions")) + if (message.inheritUserPermissions != null && Object.hasOwnProperty.call(message, "inheritUserPermissions")) object.inheritUserPermissions = options.enums === String ? $root.Folder.SetBooleanValue[message.inheritUserPermissions] === undefined ? message.inheritUserPermissions : $root.Folder.SetBooleanValue[message.inheritUserPermissions] : message.inheritUserPermissions; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) object.folderKey = options.bytes === String ? $util.base64.encode(message.folderKey, 0, message.folderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderKey) : message.folderKey; - if (message.ownerInfo != null && message.hasOwnProperty("ownerInfo")) + if (message.ownerInfo != null && Object.hasOwnProperty.call(message, "ownerInfo")) object.ownerInfo = $root.Folder.UserInfo.toObject(message.ownerInfo, options, q + 1); - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateCreated = typeof message.dateCreated === "number" ? BigInt(message.dateCreated) : $util.Long.fromBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0, false).toBigInt(); else if (typeof message.dateCreated === "number") object.dateCreated = options.longs === String ? String(message.dateCreated) : message.dateCreated; else object.dateCreated = options.longs === String ? $util.Long.prototype.toString.call(message.dateCreated) : options.longs === Number ? new $util.LongBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0).toNumber() : message.dateCreated; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") @@ -123065,7 +123805,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -123147,16 +123887,16 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) if (!(message.parentUid && typeof message.parentUid.length === "number" || $util.isString(message.parentUid))) return "parentUid: buffer expected"; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) if (!(message.folderKey && typeof message.folderKey.length === "number" || $util.isString(message.folderKey))) return "folderKey: buffer expected"; - if (message.encryptedBy != null && message.hasOwnProperty("encryptedBy")) + if (message.encryptedBy != null && Object.hasOwnProperty.call(message, "encryptedBy")) switch (message.encryptedBy) { default: return "encryptedBy: enum value expected"; @@ -123179,6 +123919,8 @@ export const Folder = $root.Folder = (() => { FolderKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -123263,13 +124005,13 @@ export const Folder = $root.Folder = (() => { } object.encryptedBy = options.enums === String ? "ENCRYPTED_BY_USER_KEY" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) object.parentUid = options.bytes === String ? $util.base64.encode(message.parentUid, 0, message.parentUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentUid) : message.parentUid; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) object.folderKey = options.bytes === String ? $util.base64.encode(message.folderKey, 0, message.folderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderKey) : message.folderKey; - if (message.encryptedBy != null && message.hasOwnProperty("encryptedBy")) + if (message.encryptedBy != null && Object.hasOwnProperty.call(message, "encryptedBy")) object.encryptedBy = options.enums === String ? $root.Folder.FolderKeyEncryptionType[message.encryptedBy] === undefined ? message.encryptedBy : $root.Folder.FolderKeyEncryptionType[message.encryptedBy] : message.encryptedBy; return object; }; @@ -123396,7 +124138,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -123468,7 +124210,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderData != null && message.hasOwnProperty("folderData")) { + if (message.folderData != null && Object.hasOwnProperty.call(message, "folderData")) { if (!Array.isArray(message.folderData)) return "folderData: array expected"; for (let i = 0; i < message.folderData.length; ++i) { @@ -123491,6 +124233,8 @@ export const Folder = $root.Folder = (() => { FolderAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -123501,7 +124245,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderAddRequest.folderData: array expected"); message.folderData = []; for (let i = 0; i < object.folderData.length; ++i) { - if (typeof object.folderData[i] !== "object") + if (!$util.isObject(object.folderData[i])) throw TypeError(".Folder.FolderAddRequest.folderData: object expected"); message.folderData[i] = $root.Folder.FolderData.fromObject(object.folderData[i], long + 1); } @@ -123680,7 +124424,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderModifyResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -123758,10 +124502,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -123771,7 +124515,7 @@ export const Folder = $root.Folder = (() => { case 3: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -123788,6 +124532,8 @@ export const Folder = $root.Folder = (() => { FolderModifyResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderModifyResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderModifyResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -123855,11 +124601,11 @@ export const Folder = $root.Folder = (() => { object.status = options.enums === String ? "SUCCESS" : 0; object.message = ""; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Folder.FolderModifyStatus[message.status] === undefined ? message.status : $root.Folder.FolderModifyStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -123970,7 +124716,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderAddResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -124042,7 +124788,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderAddResults != null && message.hasOwnProperty("folderAddResults")) { + if (message.folderAddResults != null && Object.hasOwnProperty.call(message, "folderAddResults")) { if (!Array.isArray(message.folderAddResults)) return "folderAddResults: array expected"; for (let i = 0; i < message.folderAddResults.length; ++i) { @@ -124065,6 +124811,8 @@ export const Folder = $root.Folder = (() => { FolderAddResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderAddResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderAddResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -124075,7 +124823,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderAddResponse.folderAddResults: array expected"); message.folderAddResults = []; for (let i = 0; i < object.folderAddResults.length; ++i) { - if (typeof object.folderAddResults[i] !== "object") + if (!$util.isObject(object.folderAddResults[i])) throw TypeError(".Folder.FolderAddResponse.folderAddResults: object expected"); message.folderAddResults[i] = $root.Folder.FolderModifyResult.fromObject(object.folderAddResults[i], long + 1); } @@ -124216,7 +124964,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -124288,7 +125036,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderData != null && message.hasOwnProperty("folderData")) { + if (message.folderData != null && Object.hasOwnProperty.call(message, "folderData")) { if (!Array.isArray(message.folderData)) return "folderData: array expected"; for (let i = 0; i < message.folderData.length; ++i) { @@ -124311,6 +125059,8 @@ export const Folder = $root.Folder = (() => { FolderUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -124321,7 +125071,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderUpdateRequest.folderData: array expected"); message.folderData = []; for (let i = 0; i < object.folderData.length; ++i) { - if (typeof object.folderData[i] !== "object") + if (!$util.isObject(object.folderData[i])) throw TypeError(".Folder.FolderUpdateRequest.folderData: object expected"); message.folderData[i] = $root.Folder.FolderData.fromObject(object.folderData[i], long + 1); } @@ -124462,7 +125212,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -124534,7 +125284,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUpdateResults != null && message.hasOwnProperty("folderUpdateResults")) { + if (message.folderUpdateResults != null && Object.hasOwnProperty.call(message, "folderUpdateResults")) { if (!Array.isArray(message.folderUpdateResults)) return "folderUpdateResults: array expected"; for (let i = 0; i < message.folderUpdateResults.length; ++i) { @@ -124557,6 +125307,8 @@ export const Folder = $root.Folder = (() => { FolderUpdateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderUpdateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderUpdateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -124567,7 +125319,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderUpdateResponse.folderUpdateResults: array expected"); message.folderUpdateResults = []; for (let i = 0; i < object.folderUpdateResults.length; ++i) { - if (typeof object.folderUpdateResults[i] !== "object") + if (!$util.isObject(object.folderUpdateResults[i])) throw TypeError(".Folder.FolderUpdateResponse.folderUpdateResults: object expected"); message.folderUpdateResults[i] = $root.Folder.FolderModifyResult.fromObject(object.folderUpdateResults[i], long + 1); } @@ -124876,7 +125628,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderPermissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -124994,43 +125746,43 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.canAdd != null && message.hasOwnProperty("canAdd")) + if (message.canAdd != null && Object.hasOwnProperty.call(message, "canAdd")) if (typeof message.canAdd !== "boolean") return "canAdd: boolean expected"; - if (message.canRemove != null && message.hasOwnProperty("canRemove")) + if (message.canRemove != null && Object.hasOwnProperty.call(message, "canRemove")) if (typeof message.canRemove !== "boolean") return "canRemove: boolean expected"; - if (message.canDelete != null && message.hasOwnProperty("canDelete")) + if (message.canDelete != null && Object.hasOwnProperty.call(message, "canDelete")) if (typeof message.canDelete !== "boolean") return "canDelete: boolean expected"; - if (message.canListAccess != null && message.hasOwnProperty("canListAccess")) + if (message.canListAccess != null && Object.hasOwnProperty.call(message, "canListAccess")) if (typeof message.canListAccess !== "boolean") return "canListAccess: boolean expected"; - if (message.canUpdateAccess != null && message.hasOwnProperty("canUpdateAccess")) + if (message.canUpdateAccess != null && Object.hasOwnProperty.call(message, "canUpdateAccess")) if (typeof message.canUpdateAccess !== "boolean") return "canUpdateAccess: boolean expected"; - if (message.canChangeOwnership != null && message.hasOwnProperty("canChangeOwnership")) + if (message.canChangeOwnership != null && Object.hasOwnProperty.call(message, "canChangeOwnership")) if (typeof message.canChangeOwnership !== "boolean") return "canChangeOwnership: boolean expected"; - if (message.canEditRecords != null && message.hasOwnProperty("canEditRecords")) + if (message.canEditRecords != null && Object.hasOwnProperty.call(message, "canEditRecords")) if (typeof message.canEditRecords !== "boolean") return "canEditRecords: boolean expected"; - if (message.canViewRecords != null && message.hasOwnProperty("canViewRecords")) + if (message.canViewRecords != null && Object.hasOwnProperty.call(message, "canViewRecords")) if (typeof message.canViewRecords !== "boolean") return "canViewRecords: boolean expected"; - if (message.canApproveAccess != null && message.hasOwnProperty("canApproveAccess")) + if (message.canApproveAccess != null && Object.hasOwnProperty.call(message, "canApproveAccess")) if (typeof message.canApproveAccess !== "boolean") return "canApproveAccess: boolean expected"; - if (message.canRequestAccess != null && message.hasOwnProperty("canRequestAccess")) + if (message.canRequestAccess != null && Object.hasOwnProperty.call(message, "canRequestAccess")) if (typeof message.canRequestAccess !== "boolean") return "canRequestAccess: boolean expected"; - if (message.canUpdateSetting != null && message.hasOwnProperty("canUpdateSetting")) + if (message.canUpdateSetting != null && Object.hasOwnProperty.call(message, "canUpdateSetting")) if (typeof message.canUpdateSetting !== "boolean") return "canUpdateSetting: boolean expected"; - if (message.canListRecords != null && message.hasOwnProperty("canListRecords")) + if (message.canListRecords != null && Object.hasOwnProperty.call(message, "canListRecords")) if (typeof message.canListRecords !== "boolean") return "canListRecords: boolean expected"; - if (message.canListFolders != null && message.hasOwnProperty("canListFolders")) + if (message.canListFolders != null && Object.hasOwnProperty.call(message, "canListFolders")) if (typeof message.canListFolders !== "boolean") return "canListFolders: boolean expected"; return null; @@ -125047,6 +125799,8 @@ export const Folder = $root.Folder = (() => { FolderPermissions.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderPermissions) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderPermissions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -125113,31 +125867,31 @@ export const Folder = $root.Folder = (() => { object.canListRecords = false; object.canListFolders = false; } - if (message.canAdd != null && message.hasOwnProperty("canAdd")) + if (message.canAdd != null && Object.hasOwnProperty.call(message, "canAdd")) object.canAdd = message.canAdd; - if (message.canRemove != null && message.hasOwnProperty("canRemove")) + if (message.canRemove != null && Object.hasOwnProperty.call(message, "canRemove")) object.canRemove = message.canRemove; - if (message.canDelete != null && message.hasOwnProperty("canDelete")) + if (message.canDelete != null && Object.hasOwnProperty.call(message, "canDelete")) object.canDelete = message.canDelete; - if (message.canListAccess != null && message.hasOwnProperty("canListAccess")) + if (message.canListAccess != null && Object.hasOwnProperty.call(message, "canListAccess")) object.canListAccess = message.canListAccess; - if (message.canUpdateAccess != null && message.hasOwnProperty("canUpdateAccess")) + if (message.canUpdateAccess != null && Object.hasOwnProperty.call(message, "canUpdateAccess")) object.canUpdateAccess = message.canUpdateAccess; - if (message.canChangeOwnership != null && message.hasOwnProperty("canChangeOwnership")) + if (message.canChangeOwnership != null && Object.hasOwnProperty.call(message, "canChangeOwnership")) object.canChangeOwnership = message.canChangeOwnership; - if (message.canEditRecords != null && message.hasOwnProperty("canEditRecords")) + if (message.canEditRecords != null && Object.hasOwnProperty.call(message, "canEditRecords")) object.canEditRecords = message.canEditRecords; - if (message.canViewRecords != null && message.hasOwnProperty("canViewRecords")) + if (message.canViewRecords != null && Object.hasOwnProperty.call(message, "canViewRecords")) object.canViewRecords = message.canViewRecords; - if (message.canApproveAccess != null && message.hasOwnProperty("canApproveAccess")) + if (message.canApproveAccess != null && Object.hasOwnProperty.call(message, "canApproveAccess")) object.canApproveAccess = message.canApproveAccess; - if (message.canRequestAccess != null && message.hasOwnProperty("canRequestAccess")) + if (message.canRequestAccess != null && Object.hasOwnProperty.call(message, "canRequestAccess")) object.canRequestAccess = message.canRequestAccess; - if (message.canUpdateSetting != null && message.hasOwnProperty("canUpdateSetting")) + if (message.canUpdateSetting != null && Object.hasOwnProperty.call(message, "canUpdateSetting")) object.canUpdateSetting = message.canUpdateSetting; - if (message.canListRecords != null && message.hasOwnProperty("canListRecords")) + if (message.canListRecords != null && Object.hasOwnProperty.call(message, "canListRecords")) object.canListRecords = message.canListRecords; - if (message.canListFolders != null && message.hasOwnProperty("canListFolders")) + if (message.canListFolders != null && Object.hasOwnProperty.call(message, "canListFolders")) object.canListFolders = message.canListFolders; return object; }; @@ -125378,7 +126132,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ Capabilities.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -125496,7 +126250,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.canAdd != null && message.hasOwnProperty("canAdd")) + if (message.canAdd != null && Object.hasOwnProperty.call(message, "canAdd")) switch (message.canAdd) { default: return "canAdd: enum value expected"; @@ -125505,7 +126259,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canRemove != null && message.hasOwnProperty("canRemove")) + if (message.canRemove != null && Object.hasOwnProperty.call(message, "canRemove")) switch (message.canRemove) { default: return "canRemove: enum value expected"; @@ -125514,7 +126268,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canDelete != null && message.hasOwnProperty("canDelete")) + if (message.canDelete != null && Object.hasOwnProperty.call(message, "canDelete")) switch (message.canDelete) { default: return "canDelete: enum value expected"; @@ -125523,7 +126277,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canListAccess != null && message.hasOwnProperty("canListAccess")) + if (message.canListAccess != null && Object.hasOwnProperty.call(message, "canListAccess")) switch (message.canListAccess) { default: return "canListAccess: enum value expected"; @@ -125532,7 +126286,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canUpdateAccess != null && message.hasOwnProperty("canUpdateAccess")) + if (message.canUpdateAccess != null && Object.hasOwnProperty.call(message, "canUpdateAccess")) switch (message.canUpdateAccess) { default: return "canUpdateAccess: enum value expected"; @@ -125541,7 +126295,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canChangeOwnership != null && message.hasOwnProperty("canChangeOwnership")) + if (message.canChangeOwnership != null && Object.hasOwnProperty.call(message, "canChangeOwnership")) switch (message.canChangeOwnership) { default: return "canChangeOwnership: enum value expected"; @@ -125550,7 +126304,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canEditRecords != null && message.hasOwnProperty("canEditRecords")) + if (message.canEditRecords != null && Object.hasOwnProperty.call(message, "canEditRecords")) switch (message.canEditRecords) { default: return "canEditRecords: enum value expected"; @@ -125559,7 +126313,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canViewRecords != null && message.hasOwnProperty("canViewRecords")) + if (message.canViewRecords != null && Object.hasOwnProperty.call(message, "canViewRecords")) switch (message.canViewRecords) { default: return "canViewRecords: enum value expected"; @@ -125568,7 +126322,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canApproveAccess != null && message.hasOwnProperty("canApproveAccess")) + if (message.canApproveAccess != null && Object.hasOwnProperty.call(message, "canApproveAccess")) switch (message.canApproveAccess) { default: return "canApproveAccess: enum value expected"; @@ -125577,7 +126331,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canRequestAccess != null && message.hasOwnProperty("canRequestAccess")) + if (message.canRequestAccess != null && Object.hasOwnProperty.call(message, "canRequestAccess")) switch (message.canRequestAccess) { default: return "canRequestAccess: enum value expected"; @@ -125586,7 +126340,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canUpdateSetting != null && message.hasOwnProperty("canUpdateSetting")) + if (message.canUpdateSetting != null && Object.hasOwnProperty.call(message, "canUpdateSetting")) switch (message.canUpdateSetting) { default: return "canUpdateSetting: enum value expected"; @@ -125595,7 +126349,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canListRecords != null && message.hasOwnProperty("canListRecords")) + if (message.canListRecords != null && Object.hasOwnProperty.call(message, "canListRecords")) switch (message.canListRecords) { default: return "canListRecords: enum value expected"; @@ -125604,7 +126358,7 @@ export const Folder = $root.Folder = (() => { case 2: break; } - if (message.canListFolders != null && message.hasOwnProperty("canListFolders")) + if (message.canListFolders != null && Object.hasOwnProperty.call(message, "canListFolders")) switch (message.canListFolders) { default: return "canListFolders: enum value expected"; @@ -125627,6 +126381,8 @@ export const Folder = $root.Folder = (() => { Capabilities.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.Capabilities) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.Capabilities: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -125927,31 +126683,31 @@ export const Folder = $root.Folder = (() => { object.canListRecords = options.enums === String ? "BOOLEAN_NO_CHANGE" : 0; object.canListFolders = options.enums === String ? "BOOLEAN_NO_CHANGE" : 0; } - if (message.canAdd != null && message.hasOwnProperty("canAdd")) + if (message.canAdd != null && Object.hasOwnProperty.call(message, "canAdd")) object.canAdd = options.enums === String ? $root.Folder.SetBooleanValue[message.canAdd] === undefined ? message.canAdd : $root.Folder.SetBooleanValue[message.canAdd] : message.canAdd; - if (message.canRemove != null && message.hasOwnProperty("canRemove")) + if (message.canRemove != null && Object.hasOwnProperty.call(message, "canRemove")) object.canRemove = options.enums === String ? $root.Folder.SetBooleanValue[message.canRemove] === undefined ? message.canRemove : $root.Folder.SetBooleanValue[message.canRemove] : message.canRemove; - if (message.canDelete != null && message.hasOwnProperty("canDelete")) + if (message.canDelete != null && Object.hasOwnProperty.call(message, "canDelete")) object.canDelete = options.enums === String ? $root.Folder.SetBooleanValue[message.canDelete] === undefined ? message.canDelete : $root.Folder.SetBooleanValue[message.canDelete] : message.canDelete; - if (message.canListAccess != null && message.hasOwnProperty("canListAccess")) + if (message.canListAccess != null && Object.hasOwnProperty.call(message, "canListAccess")) object.canListAccess = options.enums === String ? $root.Folder.SetBooleanValue[message.canListAccess] === undefined ? message.canListAccess : $root.Folder.SetBooleanValue[message.canListAccess] : message.canListAccess; - if (message.canUpdateAccess != null && message.hasOwnProperty("canUpdateAccess")) + if (message.canUpdateAccess != null && Object.hasOwnProperty.call(message, "canUpdateAccess")) object.canUpdateAccess = options.enums === String ? $root.Folder.SetBooleanValue[message.canUpdateAccess] === undefined ? message.canUpdateAccess : $root.Folder.SetBooleanValue[message.canUpdateAccess] : message.canUpdateAccess; - if (message.canChangeOwnership != null && message.hasOwnProperty("canChangeOwnership")) + if (message.canChangeOwnership != null && Object.hasOwnProperty.call(message, "canChangeOwnership")) object.canChangeOwnership = options.enums === String ? $root.Folder.SetBooleanValue[message.canChangeOwnership] === undefined ? message.canChangeOwnership : $root.Folder.SetBooleanValue[message.canChangeOwnership] : message.canChangeOwnership; - if (message.canEditRecords != null && message.hasOwnProperty("canEditRecords")) + if (message.canEditRecords != null && Object.hasOwnProperty.call(message, "canEditRecords")) object.canEditRecords = options.enums === String ? $root.Folder.SetBooleanValue[message.canEditRecords] === undefined ? message.canEditRecords : $root.Folder.SetBooleanValue[message.canEditRecords] : message.canEditRecords; - if (message.canViewRecords != null && message.hasOwnProperty("canViewRecords")) + if (message.canViewRecords != null && Object.hasOwnProperty.call(message, "canViewRecords")) object.canViewRecords = options.enums === String ? $root.Folder.SetBooleanValue[message.canViewRecords] === undefined ? message.canViewRecords : $root.Folder.SetBooleanValue[message.canViewRecords] : message.canViewRecords; - if (message.canApproveAccess != null && message.hasOwnProperty("canApproveAccess")) + if (message.canApproveAccess != null && Object.hasOwnProperty.call(message, "canApproveAccess")) object.canApproveAccess = options.enums === String ? $root.Folder.SetBooleanValue[message.canApproveAccess] === undefined ? message.canApproveAccess : $root.Folder.SetBooleanValue[message.canApproveAccess] : message.canApproveAccess; - if (message.canRequestAccess != null && message.hasOwnProperty("canRequestAccess")) + if (message.canRequestAccess != null && Object.hasOwnProperty.call(message, "canRequestAccess")) object.canRequestAccess = options.enums === String ? $root.Folder.SetBooleanValue[message.canRequestAccess] === undefined ? message.canRequestAccess : $root.Folder.SetBooleanValue[message.canRequestAccess] : message.canRequestAccess; - if (message.canUpdateSetting != null && message.hasOwnProperty("canUpdateSetting")) + if (message.canUpdateSetting != null && Object.hasOwnProperty.call(message, "canUpdateSetting")) object.canUpdateSetting = options.enums === String ? $root.Folder.SetBooleanValue[message.canUpdateSetting] === undefined ? message.canUpdateSetting : $root.Folder.SetBooleanValue[message.canUpdateSetting] : message.canUpdateSetting; - if (message.canListRecords != null && message.hasOwnProperty("canListRecords")) + if (message.canListRecords != null && Object.hasOwnProperty.call(message, "canListRecords")) object.canListRecords = options.enums === String ? $root.Folder.SetBooleanValue[message.canListRecords] === undefined ? message.canListRecords : $root.Folder.SetBooleanValue[message.canListRecords] : message.canListRecords; - if (message.canListFolders != null && message.hasOwnProperty("canListFolders")) + if (message.canListFolders != null && Object.hasOwnProperty.call(message, "canListFolders")) object.canListFolders = options.enums === String ? $root.Folder.SetBooleanValue[message.canListFolders] === undefined ? message.canListFolders : $root.Folder.SetBooleanValue[message.canListFolders] : message.canListFolders; return object; }; @@ -126099,7 +126855,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRecordUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -126187,10 +126943,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.addRecords != null && message.hasOwnProperty("addRecords")) { + if (message.addRecords != null && Object.hasOwnProperty.call(message, "addRecords")) { if (!Array.isArray(message.addRecords)) return "addRecords: array expected"; for (let i = 0; i < message.addRecords.length; ++i) { @@ -126199,7 +126955,7 @@ export const Folder = $root.Folder = (() => { return "addRecords." + error; } } - if (message.updateRecords != null && message.hasOwnProperty("updateRecords")) { + if (message.updateRecords != null && Object.hasOwnProperty.call(message, "updateRecords")) { if (!Array.isArray(message.updateRecords)) return "updateRecords: array expected"; for (let i = 0; i < message.updateRecords.length; ++i) { @@ -126208,7 +126964,7 @@ export const Folder = $root.Folder = (() => { return "updateRecords." + error; } } - if (message.removeRecords != null && message.hasOwnProperty("removeRecords")) { + if (message.removeRecords != null && Object.hasOwnProperty.call(message, "removeRecords")) { if (!Array.isArray(message.removeRecords)) return "removeRecords: array expected"; for (let i = 0; i < message.removeRecords.length; ++i) { @@ -126231,6 +126987,8 @@ export const Folder = $root.Folder = (() => { FolderRecordUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderRecordUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderRecordUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -126246,7 +127004,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderRecordUpdateRequest.addRecords: array expected"); message.addRecords = []; for (let i = 0; i < object.addRecords.length; ++i) { - if (typeof object.addRecords[i] !== "object") + if (!$util.isObject(object.addRecords[i])) throw TypeError(".Folder.FolderRecordUpdateRequest.addRecords: object expected"); message.addRecords[i] = $root.Folder.RecordMetadata.fromObject(object.addRecords[i], long + 1); } @@ -126256,7 +127014,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderRecordUpdateRequest.updateRecords: array expected"); message.updateRecords = []; for (let i = 0; i < object.updateRecords.length; ++i) { - if (typeof object.updateRecords[i] !== "object") + if (!$util.isObject(object.updateRecords[i])) throw TypeError(".Folder.FolderRecordUpdateRequest.updateRecords: object expected"); message.updateRecords[i] = $root.Folder.RecordMetadata.fromObject(object.updateRecords[i], long + 1); } @@ -126266,7 +127024,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderRecordUpdateRequest.removeRecords: array expected"); message.removeRecords = []; for (let i = 0; i < object.removeRecords.length; ++i) { - if (typeof object.removeRecords[i] !== "object") + if (!$util.isObject(object.removeRecords[i])) throw TypeError(".Folder.FolderRecordUpdateRequest.removeRecords: object expected"); message.removeRecords[i] = $root.Folder.RecordMetadata.fromObject(object.removeRecords[i], long + 1); } @@ -126304,7 +127062,7 @@ export const Folder = $root.Folder = (() => { if (options.bytes !== Array) object.folderUid = $util.newBuffer(object.folderUid); } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; if (message.addRecords && message.addRecords.length) { object.addRecords = []; @@ -126461,7 +127219,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -126543,13 +127301,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) if (!(message.encryptedRecordKey && typeof message.encryptedRecordKey.length === "number" || $util.isString(message.encryptedRecordKey))) return "encryptedRecordKey: buffer expected"; - if (message.encryptedRecordKeyType != null && message.hasOwnProperty("encryptedRecordKeyType")) + if (message.encryptedRecordKeyType != null && Object.hasOwnProperty.call(message, "encryptedRecordKeyType")) switch (message.encryptedRecordKeyType) { default: return "encryptedRecordKeyType: enum value expected"; @@ -126560,7 +127318,7 @@ export const Folder = $root.Folder = (() => { case 4: break; } - if (message.tlaProperties != null && message.hasOwnProperty("tlaProperties")) { + if (message.tlaProperties != null && Object.hasOwnProperty.call(message, "tlaProperties")) { let error = $root.common.tla.TLAProperties.verify(message.tlaProperties, long + 1); if (error) return "tlaProperties." + error; @@ -126579,6 +127337,8 @@ export const Folder = $root.Folder = (() => { RecordMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RecordMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RecordMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -126623,7 +127383,7 @@ export const Folder = $root.Folder = (() => { break; } if (object.tlaProperties != null) { - if (typeof object.tlaProperties !== "object") + if (!$util.isObject(object.tlaProperties)) throw TypeError(".Folder.RecordMetadata.tlaProperties: object expected"); message.tlaProperties = $root.common.tla.TLAProperties.fromObject(object.tlaProperties, long + 1); } @@ -126665,13 +127425,13 @@ export const Folder = $root.Folder = (() => { object.encryptedRecordKeyType = options.enums === String ? "no_key" : 0; object.tlaProperties = null; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) object.encryptedRecordKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordKey, 0, message.encryptedRecordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordKey) : message.encryptedRecordKey; - if (message.encryptedRecordKeyType != null && message.hasOwnProperty("encryptedRecordKeyType")) + if (message.encryptedRecordKeyType != null && Object.hasOwnProperty.call(message, "encryptedRecordKeyType")) object.encryptedRecordKeyType = options.enums === String ? $root.Folder.EncryptedKeyType[message.encryptedRecordKeyType] === undefined ? message.encryptedRecordKeyType : $root.Folder.EncryptedKeyType[message.encryptedRecordKeyType] : message.encryptedRecordKeyType; - if (message.tlaProperties != null && message.hasOwnProperty("tlaProperties")) + if (message.tlaProperties != null && Object.hasOwnProperty.call(message, "tlaProperties")) object.tlaProperties = $root.common.tla.TLAProperties.toObject(message.tlaProperties, options, q + 1); return object; }; @@ -126802,7 +127562,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -126880,15 +127640,15 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordMetadata != null && message.hasOwnProperty("recordMetadata")) { + if (message.recordMetadata != null && Object.hasOwnProperty.call(message, "recordMetadata")) { let error = $root.Folder.RecordMetadata.verify(message.recordMetadata, long + 1); if (error) return "recordMetadata." + error; } - if (message.folderKeyEncryptionType != null && message.hasOwnProperty("folderKeyEncryptionType")) + if (message.folderKeyEncryptionType != null && Object.hasOwnProperty.call(message, "folderKeyEncryptionType")) switch (message.folderKeyEncryptionType) { default: return "folderKeyEncryptionType: enum value expected"; @@ -126911,6 +127671,8 @@ export const Folder = $root.Folder = (() => { FolderRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -126922,7 +127684,7 @@ export const Folder = $root.Folder = (() => { else if (object.folderUid.length >= 0) message.folderUid = object.folderUid; if (object.recordMetadata != null) { - if (typeof object.recordMetadata !== "object") + if (!$util.isObject(object.recordMetadata)) throw TypeError(".Folder.FolderRecord.recordMetadata: object expected"); message.recordMetadata = $root.Folder.RecordMetadata.fromObject(object.recordMetadata, long + 1); } @@ -126977,11 +127739,11 @@ export const Folder = $root.Folder = (() => { object.recordMetadata = null; object.folderKeyEncryptionType = options.enums === String ? "ENCRYPTED_BY_USER_KEY" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordMetadata != null && message.hasOwnProperty("recordMetadata")) + if (message.recordMetadata != null && Object.hasOwnProperty.call(message, "recordMetadata")) object.recordMetadata = $root.Folder.RecordMetadata.toObject(message.recordMetadata, options, q + 1); - if (message.folderKeyEncryptionType != null && message.hasOwnProperty("folderKeyEncryptionType")) + if (message.folderKeyEncryptionType != null && Object.hasOwnProperty.call(message, "folderKeyEncryptionType")) object.folderKeyEncryptionType = options.enums === String ? $root.Folder.FolderKeyEncryptionType[message.folderKeyEncryptionType] === undefined ? message.folderKeyEncryptionType : $root.Folder.FolderKeyEncryptionType[message.folderKeyEncryptionType] : message.folderKeyEncryptionType; return object; }; @@ -127103,7 +127865,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRecordUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -127179,10 +127941,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.folderRecordUpdateResult != null && message.hasOwnProperty("folderRecordUpdateResult")) { + if (message.folderRecordUpdateResult != null && Object.hasOwnProperty.call(message, "folderRecordUpdateResult")) { if (!Array.isArray(message.folderRecordUpdateResult)) return "folderRecordUpdateResult: array expected"; for (let i = 0; i < message.folderRecordUpdateResult.length; ++i) { @@ -127205,6 +127967,8 @@ export const Folder = $root.Folder = (() => { FolderRecordUpdateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderRecordUpdateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderRecordUpdateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -127220,7 +127984,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderRecordUpdateResponse.folderRecordUpdateResult: array expected"); message.folderRecordUpdateResult = []; for (let i = 0; i < object.folderRecordUpdateResult.length; ++i) { - if (typeof object.folderRecordUpdateResult[i] !== "object") + if (!$util.isObject(object.folderRecordUpdateResult[i])) throw TypeError(".Folder.FolderRecordUpdateResponse.folderRecordUpdateResult: object expected"); message.folderRecordUpdateResult[i] = $root.Folder.FolderRecordUpdateResult.fromObject(object.folderRecordUpdateResult[i], long + 1); } @@ -127255,7 +128019,7 @@ export const Folder = $root.Folder = (() => { if (options.bytes !== Array) object.folderUid = $util.newBuffer(object.folderUid); } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; if (message.folderRecordUpdateResult && message.folderRecordUpdateResult.length) { object.folderRecordUpdateResult = []; @@ -127391,7 +128155,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRecordUpdateResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -127469,10 +128233,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -127482,7 +128246,7 @@ export const Folder = $root.Folder = (() => { case 3: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -127499,6 +128263,8 @@ export const Folder = $root.Folder = (() => { FolderRecordUpdateResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderRecordUpdateResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderRecordUpdateResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -127566,11 +128332,11 @@ export const Folder = $root.Folder = (() => { object.status = options.enums === String ? "SUCCESS" : 0; object.message = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Folder.FolderModifyStatus[message.status] === undefined ? message.status : $root.Folder.FolderModifyStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -127826,7 +128592,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderAccessData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -127940,13 +128706,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.accessTypeUid != null && message.hasOwnProperty("accessTypeUid")) + if (message.accessTypeUid != null && Object.hasOwnProperty.call(message, "accessTypeUid")) if (!(message.accessTypeUid && typeof message.accessTypeUid.length === "number" || $util.isString(message.accessTypeUid))) return "accessTypeUid: buffer expected"; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) switch (message.accessType) { default: return "accessType: enum value expected"; @@ -127959,7 +128725,7 @@ export const Folder = $root.Folder = (() => { case 6: break; } - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) switch (message.accessRoleType) { default: return "accessRoleType: enum value expected"; @@ -127973,34 +128739,34 @@ export const Folder = $root.Folder = (() => { case 7: break; } - if (message.folderKey != null && message.hasOwnProperty("folderKey")) { + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) { let error = $root.Folder.EncryptedDataKey.verify(message.folderKey, long + 1); if (error) return "folderKey." + error; } - if (message.inherited != null && message.hasOwnProperty("inherited")) + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) if (typeof message.inherited !== "boolean") return "inherited: boolean expected"; - if (message.hidden != null && message.hasOwnProperty("hidden")) + if (message.hidden != null && Object.hasOwnProperty.call(message, "hidden")) if (typeof message.hidden !== "boolean") return "hidden: boolean expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) { let error = $root.Folder.FolderPermissions.verify(message.permissions, long + 1); if (error) return "permissions." + error; } - if (message.tlaProperties != null && message.hasOwnProperty("tlaProperties")) { + if (message.tlaProperties != null && Object.hasOwnProperty.call(message, "tlaProperties")) { let error = $root.common.tla.TLAProperties.verify(message.tlaProperties, long + 1); if (error) return "tlaProperties." + error; } - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (!$util.isInteger(message.dateCreated) && !(message.dateCreated && $util.isInteger(message.dateCreated.low) && $util.isInteger(message.dateCreated.high))) return "dateCreated: integer|Long expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; - if (message.deniedAccess != null && message.hasOwnProperty("deniedAccess")) + if (message.deniedAccess != null && Object.hasOwnProperty.call(message, "deniedAccess")) if (typeof message.deniedAccess !== "boolean") return "deniedAccess: boolean expected"; return null; @@ -128017,6 +128783,8 @@ export const Folder = $root.Folder = (() => { FolderAccessData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderAccessData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderAccessData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -128109,7 +128877,7 @@ export const Folder = $root.Folder = (() => { break; } if (object.folderKey != null) { - if (typeof object.folderKey !== "object") + if (!$util.isObject(object.folderKey)) throw TypeError(".Folder.FolderAccessData.folderKey: object expected"); message.folderKey = $root.Folder.EncryptedDataKey.fromObject(object.folderKey, long + 1); } @@ -128118,12 +128886,12 @@ export const Folder = $root.Folder = (() => { if (object.hidden != null) message.hidden = Boolean(object.hidden); if (object.permissions != null) { - if (typeof object.permissions !== "object") + if (!$util.isObject(object.permissions)) throw TypeError(".Folder.FolderAccessData.permissions: object expected"); message.permissions = $root.Folder.FolderPermissions.fromObject(object.permissions, long + 1); } if (object.tlaProperties != null) { - if (typeof object.tlaProperties !== "object") + if (!$util.isObject(object.tlaProperties)) throw TypeError(".Folder.FolderAccessData.tlaProperties: object expected"); message.tlaProperties = $root.common.tla.TLAProperties.fromObject(object.tlaProperties, long + 1); } @@ -128201,39 +128969,39 @@ export const Folder = $root.Folder = (() => { object.lastModified = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.deniedAccess = false; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.accessTypeUid != null && message.hasOwnProperty("accessTypeUid")) + if (message.accessTypeUid != null && Object.hasOwnProperty.call(message, "accessTypeUid")) object.accessTypeUid = options.bytes === String ? $util.base64.encode(message.accessTypeUid, 0, message.accessTypeUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accessTypeUid) : message.accessTypeUid; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) object.accessType = options.enums === String ? $root.Folder.AccessType[message.accessType] === undefined ? message.accessType : $root.Folder.AccessType[message.accessType] : message.accessType; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) object.accessRoleType = options.enums === String ? $root.Folder.AccessRoleType[message.accessRoleType] === undefined ? message.accessRoleType : $root.Folder.AccessRoleType[message.accessRoleType] : message.accessRoleType; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) object.folderKey = $root.Folder.EncryptedDataKey.toObject(message.folderKey, options, q + 1); - if (message.inherited != null && message.hasOwnProperty("inherited")) + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) object.inherited = message.inherited; - if (message.hidden != null && message.hasOwnProperty("hidden")) + if (message.hidden != null && Object.hasOwnProperty.call(message, "hidden")) object.hidden = message.hidden; - if (message.permissions != null && message.hasOwnProperty("permissions")) + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) object.permissions = $root.Folder.FolderPermissions.toObject(message.permissions, options, q + 1); - if (message.tlaProperties != null && message.hasOwnProperty("tlaProperties")) + if (message.tlaProperties != null && Object.hasOwnProperty.call(message, "tlaProperties")) object.tlaProperties = $root.common.tla.TLAProperties.toObject(message.tlaProperties, options, q + 1); - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateCreated = typeof message.dateCreated === "number" ? BigInt(message.dateCreated) : $util.Long.fromBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0, false).toBigInt(); else if (typeof message.dateCreated === "number") object.dateCreated = options.longs === String ? String(message.dateCreated) : message.dateCreated; else object.dateCreated = options.longs === String ? $util.Long.prototype.toString.call(message.dateCreated) : options.longs === Number ? new $util.LongBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0).toNumber() : message.dateCreated; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") object.lastModified = options.longs === String ? String(message.lastModified) : message.lastModified; else object.lastModified = options.longs === String ? $util.Long.prototype.toString.call(message.lastModified) : options.longs === Number ? new $util.LongBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0).toNumber() : message.lastModified; - if (message.deniedAccess != null && message.hasOwnProperty("deniedAccess")) + if (message.deniedAccess != null && Object.hasOwnProperty.call(message, "deniedAccess")) object.deniedAccess = message.deniedAccess; return object; }; @@ -128364,7 +129132,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RevokedAccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -128442,13 +129210,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.actorUid != null && message.hasOwnProperty("actorUid")) + if (message.actorUid != null && Object.hasOwnProperty.call(message, "actorUid")) if (!(message.actorUid && typeof message.actorUid.length === "number" || $util.isString(message.actorUid))) return "actorUid: buffer expected"; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) switch (message.accessType) { default: return "accessType: enum value expected"; @@ -128475,6 +129243,8 @@ export const Folder = $root.Folder = (() => { RevokedAccess.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RevokedAccess) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RevokedAccess: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -128563,11 +129333,11 @@ export const Folder = $root.Folder = (() => { } object.accessType = options.enums === String ? "AT_UNKNOWN" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.actorUid != null && message.hasOwnProperty("actorUid")) + if (message.actorUid != null && Object.hasOwnProperty.call(message, "actorUid")) object.actorUid = options.bytes === String ? $util.base64.encode(message.actorUid, 0, message.actorUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.actorUid) : message.actorUid; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) object.accessType = options.enums === String ? $root.Folder.AccessType[message.accessType] === undefined ? message.accessType : $root.Folder.AccessType[message.accessType] : message.accessType; return object; }; @@ -128676,7 +129446,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRemoved.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -128746,7 +129516,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; return null; @@ -128763,6 +129533,8 @@ export const Folder = $root.Folder = (() => { FolderRemoved.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderRemoved) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderRemoved: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -128801,7 +129573,7 @@ export const Folder = $root.Folder = (() => { if (options.bytes !== Array) object.folderUid = $util.newBuffer(object.folderUid); } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; return object; }; @@ -129119,7 +129891,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordAccessData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -129265,10 +130037,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accessTypeUid != null && message.hasOwnProperty("accessTypeUid")) + if (message.accessTypeUid != null && Object.hasOwnProperty.call(message, "accessTypeUid")) if (!(message.accessTypeUid && typeof message.accessTypeUid.length === "number" || $util.isString(message.accessTypeUid))) return "accessTypeUid: buffer expected"; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) switch (message.accessType) { default: return "accessType: enum value expected"; @@ -129281,10 +130053,10 @@ export const Folder = $root.Folder = (() => { case 6: break; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) switch (message.accessRoleType) { default: return "accessRoleType: enum value expected"; @@ -129298,52 +130070,52 @@ export const Folder = $root.Folder = (() => { case 7: break; } - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (typeof message.owner !== "boolean") return "owner: boolean expected"; - if (message.inherited != null && message.hasOwnProperty("inherited")) + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) if (typeof message.inherited !== "boolean") return "inherited: boolean expected"; - if (message.hidden != null && message.hasOwnProperty("hidden")) + if (message.hidden != null && Object.hasOwnProperty.call(message, "hidden")) if (typeof message.hidden !== "boolean") return "hidden: boolean expected"; - if (message.deniedAccess != null && message.hasOwnProperty("deniedAccess")) + if (message.deniedAccess != null && Object.hasOwnProperty.call(message, "deniedAccess")) if (typeof message.deniedAccess !== "boolean") return "deniedAccess: boolean expected"; - if (message.canViewTitle != null && message.hasOwnProperty("canViewTitle")) + if (message.canViewTitle != null && Object.hasOwnProperty.call(message, "canViewTitle")) if (typeof message.canViewTitle !== "boolean") return "canViewTitle: boolean expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.canView != null && message.hasOwnProperty("canView")) + if (message.canView != null && Object.hasOwnProperty.call(message, "canView")) if (typeof message.canView !== "boolean") return "canView: boolean expected"; - if (message.canListAccess != null && message.hasOwnProperty("canListAccess")) + if (message.canListAccess != null && Object.hasOwnProperty.call(message, "canListAccess")) if (typeof message.canListAccess !== "boolean") return "canListAccess: boolean expected"; - if (message.canUpdateAccess != null && message.hasOwnProperty("canUpdateAccess")) + if (message.canUpdateAccess != null && Object.hasOwnProperty.call(message, "canUpdateAccess")) if (typeof message.canUpdateAccess !== "boolean") return "canUpdateAccess: boolean expected"; - if (message.canDelete != null && message.hasOwnProperty("canDelete")) + if (message.canDelete != null && Object.hasOwnProperty.call(message, "canDelete")) if (typeof message.canDelete !== "boolean") return "canDelete: boolean expected"; - if (message.canChangeOwnership != null && message.hasOwnProperty("canChangeOwnership")) + if (message.canChangeOwnership != null && Object.hasOwnProperty.call(message, "canChangeOwnership")) if (typeof message.canChangeOwnership !== "boolean") return "canChangeOwnership: boolean expected"; - if (message.canRequestAccess != null && message.hasOwnProperty("canRequestAccess")) + if (message.canRequestAccess != null && Object.hasOwnProperty.call(message, "canRequestAccess")) if (typeof message.canRequestAccess !== "boolean") return "canRequestAccess: boolean expected"; - if (message.canApproveAccess != null && message.hasOwnProperty("canApproveAccess")) + if (message.canApproveAccess != null && Object.hasOwnProperty.call(message, "canApproveAccess")) if (typeof message.canApproveAccess !== "boolean") return "canApproveAccess: boolean expected"; - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (!$util.isInteger(message.dateCreated) && !(message.dateCreated && $util.isInteger(message.dateCreated.low) && $util.isInteger(message.dateCreated.high))) return "dateCreated: integer|Long expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; - if (message.tlaProperties != null && message.hasOwnProperty("tlaProperties")) { + if (message.tlaProperties != null && Object.hasOwnProperty.call(message, "tlaProperties")) { let error = $root.common.tla.TLAProperties.verify(message.tlaProperties, long + 1); if (error) return "tlaProperties." + error; @@ -129362,6 +130134,8 @@ export const Folder = $root.Folder = (() => { RecordAccessData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RecordAccessData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RecordAccessData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -129498,7 +130272,7 @@ export const Folder = $root.Folder = (() => { else if (typeof object.lastModified === "object") message.lastModified = new $util.LongBits(object.lastModified.low >>> 0, object.lastModified.high >>> 0).toNumber(); if (object.tlaProperties != null) { - if (typeof object.tlaProperties !== "object") + if (!$util.isObject(object.tlaProperties)) throw TypeError(".Folder.RecordAccessData.tlaProperties: object expected"); message.tlaProperties = $root.common.tla.TLAProperties.fromObject(object.tlaProperties, long + 1); } @@ -129564,55 +130338,55 @@ export const Folder = $root.Folder = (() => { object.lastModified = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.tlaProperties = null; } - if (message.accessTypeUid != null && message.hasOwnProperty("accessTypeUid")) + if (message.accessTypeUid != null && Object.hasOwnProperty.call(message, "accessTypeUid")) object.accessTypeUid = options.bytes === String ? $util.base64.encode(message.accessTypeUid, 0, message.accessTypeUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accessTypeUid) : message.accessTypeUid; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) object.accessType = options.enums === String ? $root.Folder.AccessType[message.accessType] === undefined ? message.accessType : $root.Folder.AccessType[message.accessType] : message.accessType; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) object.accessRoleType = options.enums === String ? $root.Folder.AccessRoleType[message.accessRoleType] === undefined ? message.accessRoleType : $root.Folder.AccessRoleType[message.accessRoleType] : message.accessRoleType; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.inherited != null && message.hasOwnProperty("inherited")) + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) object.inherited = message.inherited; - if (message.hidden != null && message.hasOwnProperty("hidden")) + if (message.hidden != null && Object.hasOwnProperty.call(message, "hidden")) object.hidden = message.hidden; - if (message.deniedAccess != null && message.hasOwnProperty("deniedAccess")) + if (message.deniedAccess != null && Object.hasOwnProperty.call(message, "deniedAccess")) object.deniedAccess = message.deniedAccess; - if (message.canViewTitle != null && message.hasOwnProperty("canViewTitle")) + if (message.canViewTitle != null && Object.hasOwnProperty.call(message, "canViewTitle")) object.canViewTitle = message.canViewTitle; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.canView != null && message.hasOwnProperty("canView")) + if (message.canView != null && Object.hasOwnProperty.call(message, "canView")) object.canView = message.canView; - if (message.canListAccess != null && message.hasOwnProperty("canListAccess")) + if (message.canListAccess != null && Object.hasOwnProperty.call(message, "canListAccess")) object.canListAccess = message.canListAccess; - if (message.canUpdateAccess != null && message.hasOwnProperty("canUpdateAccess")) + if (message.canUpdateAccess != null && Object.hasOwnProperty.call(message, "canUpdateAccess")) object.canUpdateAccess = message.canUpdateAccess; - if (message.canDelete != null && message.hasOwnProperty("canDelete")) + if (message.canDelete != null && Object.hasOwnProperty.call(message, "canDelete")) object.canDelete = message.canDelete; - if (message.canChangeOwnership != null && message.hasOwnProperty("canChangeOwnership")) + if (message.canChangeOwnership != null && Object.hasOwnProperty.call(message, "canChangeOwnership")) object.canChangeOwnership = message.canChangeOwnership; - if (message.canRequestAccess != null && message.hasOwnProperty("canRequestAccess")) + if (message.canRequestAccess != null && Object.hasOwnProperty.call(message, "canRequestAccess")) object.canRequestAccess = message.canRequestAccess; - if (message.canApproveAccess != null && message.hasOwnProperty("canApproveAccess")) + if (message.canApproveAccess != null && Object.hasOwnProperty.call(message, "canApproveAccess")) object.canApproveAccess = message.canApproveAccess; - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateCreated = typeof message.dateCreated === "number" ? BigInt(message.dateCreated) : $util.Long.fromBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0, false).toBigInt(); else if (typeof message.dateCreated === "number") object.dateCreated = options.longs === String ? String(message.dateCreated) : message.dateCreated; else object.dateCreated = options.longs === String ? $util.Long.prototype.toString.call(message.dateCreated) : options.longs === Number ? new $util.LongBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0).toNumber() : message.dateCreated; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") object.lastModified = options.longs === String ? String(message.lastModified) : message.lastModified; else object.lastModified = options.longs === String ? $util.Long.prototype.toString.call(message.lastModified) : options.longs === Number ? new $util.LongBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0).toNumber() : message.lastModified; - if (message.tlaProperties != null && message.hasOwnProperty("tlaProperties")) + if (message.tlaProperties != null && Object.hasOwnProperty.call(message, "tlaProperties")) object.tlaProperties = $root.common.tla.TLAProperties.toObject(message.tlaProperties, options, q + 1); return object; }; @@ -129776,7 +130550,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ AccessData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -129866,10 +130640,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accessTypeUid != null && message.hasOwnProperty("accessTypeUid")) + if (message.accessTypeUid != null && Object.hasOwnProperty.call(message, "accessTypeUid")) if (!(message.accessTypeUid && typeof message.accessTypeUid.length === "number" || $util.isString(message.accessTypeUid))) return "accessTypeUid: buffer expected"; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) switch (message.accessRoleType) { default: return "accessRoleType: enum value expected"; @@ -129883,16 +130657,16 @@ export const Folder = $root.Folder = (() => { case 7: break; } - if (message.deniedAccess != null && message.hasOwnProperty("deniedAccess")) + if (message.deniedAccess != null && Object.hasOwnProperty.call(message, "deniedAccess")) if (typeof message.deniedAccess !== "boolean") return "deniedAccess: boolean expected"; - if (message.inherited != null && message.hasOwnProperty("inherited")) + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) if (typeof message.inherited !== "boolean") return "inherited: boolean expected"; - if (message.hidden != null && message.hasOwnProperty("hidden")) + if (message.hidden != null && Object.hasOwnProperty.call(message, "hidden")) if (typeof message.hidden !== "boolean") return "hidden: boolean expected"; - if (message.capabilities != null && message.hasOwnProperty("capabilities")) { + if (message.capabilities != null && Object.hasOwnProperty.call(message, "capabilities")) { let error = $root.Folder.Capabilities.verify(message.capabilities, long + 1); if (error) return "capabilities." + error; @@ -129911,6 +130685,8 @@ export const Folder = $root.Folder = (() => { AccessData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.AccessData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.AccessData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -129968,7 +130744,7 @@ export const Folder = $root.Folder = (() => { if (object.hidden != null) message.hidden = Boolean(object.hidden); if (object.capabilities != null) { - if (typeof object.capabilities !== "object") + if (!$util.isObject(object.capabilities)) throw TypeError(".Folder.AccessData.capabilities: object expected"); message.capabilities = $root.Folder.Capabilities.fromObject(object.capabilities, long + 1); } @@ -130006,17 +130782,17 @@ export const Folder = $root.Folder = (() => { object.hidden = false; object.capabilities = null; } - if (message.accessTypeUid != null && message.hasOwnProperty("accessTypeUid")) + if (message.accessTypeUid != null && Object.hasOwnProperty.call(message, "accessTypeUid")) object.accessTypeUid = options.bytes === String ? $util.base64.encode(message.accessTypeUid, 0, message.accessTypeUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accessTypeUid) : message.accessTypeUid; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) object.accessRoleType = options.enums === String ? $root.Folder.AccessRoleType[message.accessRoleType] === undefined ? message.accessRoleType : $root.Folder.AccessRoleType[message.accessRoleType] : message.accessRoleType; - if (message.deniedAccess != null && message.hasOwnProperty("deniedAccess")) + if (message.deniedAccess != null && Object.hasOwnProperty.call(message, "deniedAccess")) object.deniedAccess = message.deniedAccess; - if (message.inherited != null && message.hasOwnProperty("inherited")) + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) object.inherited = message.inherited; - if (message.hidden != null && message.hasOwnProperty("hidden")) + if (message.hidden != null && Object.hasOwnProperty.call(message, "hidden")) object.hidden = message.hidden; - if (message.capabilities != null && message.hasOwnProperty("capabilities")) + if (message.capabilities != null && Object.hasOwnProperty.call(message, "capabilities")) object.capabilities = $root.Folder.Capabilities.toObject(message.capabilities, options, q + 1); return object; }; @@ -130153,7 +130929,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderAccessRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -130237,7 +131013,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderAccessAdds != null && message.hasOwnProperty("folderAccessAdds")) { + if (message.folderAccessAdds != null && Object.hasOwnProperty.call(message, "folderAccessAdds")) { if (!Array.isArray(message.folderAccessAdds)) return "folderAccessAdds: array expected"; for (let i = 0; i < message.folderAccessAdds.length; ++i) { @@ -130246,7 +131022,7 @@ export const Folder = $root.Folder = (() => { return "folderAccessAdds." + error; } } - if (message.folderAccessUpdates != null && message.hasOwnProperty("folderAccessUpdates")) { + if (message.folderAccessUpdates != null && Object.hasOwnProperty.call(message, "folderAccessUpdates")) { if (!Array.isArray(message.folderAccessUpdates)) return "folderAccessUpdates: array expected"; for (let i = 0; i < message.folderAccessUpdates.length; ++i) { @@ -130255,7 +131031,7 @@ export const Folder = $root.Folder = (() => { return "folderAccessUpdates." + error; } } - if (message.folderAccessRemoves != null && message.hasOwnProperty("folderAccessRemoves")) { + if (message.folderAccessRemoves != null && Object.hasOwnProperty.call(message, "folderAccessRemoves")) { if (!Array.isArray(message.folderAccessRemoves)) return "folderAccessRemoves: array expected"; for (let i = 0; i < message.folderAccessRemoves.length; ++i) { @@ -130278,6 +131054,8 @@ export const Folder = $root.Folder = (() => { FolderAccessRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderAccessRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderAccessRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -130288,7 +131066,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderAccessRequest.folderAccessAdds: array expected"); message.folderAccessAdds = []; for (let i = 0; i < object.folderAccessAdds.length; ++i) { - if (typeof object.folderAccessAdds[i] !== "object") + if (!$util.isObject(object.folderAccessAdds[i])) throw TypeError(".Folder.FolderAccessRequest.folderAccessAdds: object expected"); message.folderAccessAdds[i] = $root.Folder.FolderAccessData.fromObject(object.folderAccessAdds[i], long + 1); } @@ -130298,7 +131076,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderAccessRequest.folderAccessUpdates: array expected"); message.folderAccessUpdates = []; for (let i = 0; i < object.folderAccessUpdates.length; ++i) { - if (typeof object.folderAccessUpdates[i] !== "object") + if (!$util.isObject(object.folderAccessUpdates[i])) throw TypeError(".Folder.FolderAccessRequest.folderAccessUpdates: object expected"); message.folderAccessUpdates[i] = $root.Folder.FolderAccessData.fromObject(object.folderAccessUpdates[i], long + 1); } @@ -130308,7 +131086,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderAccessRequest.folderAccessRemoves: array expected"); message.folderAccessRemoves = []; for (let i = 0; i < object.folderAccessRemoves.length; ++i) { - if (typeof object.folderAccessRemoves[i] !== "object") + if (!$util.isObject(object.folderAccessRemoves[i])) throw TypeError(".Folder.FolderAccessRequest.folderAccessRemoves: object expected"); message.folderAccessRemoves[i] = $root.Folder.FolderAccessData.fromObject(object.folderAccessRemoves[i], long + 1); } @@ -130504,7 +131282,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderAccessResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -130590,13 +131368,13 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.accessUid != null && message.hasOwnProperty("accessUid")) + if (message.accessUid != null && Object.hasOwnProperty.call(message, "accessUid")) if (!(message.accessUid && typeof message.accessUid.length === "number" || $util.isString(message.accessUid))) return "accessUid: buffer expected"; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) switch (message.accessType) { default: return "accessType: enum value expected"; @@ -130609,7 +131387,7 @@ export const Folder = $root.Folder = (() => { case 6: break; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -130619,7 +131397,7 @@ export const Folder = $root.Folder = (() => { case 3: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -130636,6 +131414,8 @@ export const Folder = $root.Folder = (() => { FolderAccessResult.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderAccessResult) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderAccessResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -130752,15 +131532,15 @@ export const Folder = $root.Folder = (() => { object.status = options.enums === String ? "SUCCESS" : 0; object.message = ""; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.accessUid != null && message.hasOwnProperty("accessUid")) + if (message.accessUid != null && Object.hasOwnProperty.call(message, "accessUid")) object.accessUid = options.bytes === String ? $util.base64.encode(message.accessUid, 0, message.accessUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accessUid) : message.accessUid; - if (message.accessType != null && message.hasOwnProperty("accessType")) + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) object.accessType = options.enums === String ? $root.Folder.AccessType[message.accessType] === undefined ? message.accessType : $root.Folder.AccessType[message.accessType] : message.accessType; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Folder.FolderModifyStatus[message.status] === undefined ? message.status : $root.Folder.FolderModifyStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -130871,7 +131651,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderAccessResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -130943,7 +131723,7 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderAccessResults != null && message.hasOwnProperty("folderAccessResults")) { + if (message.folderAccessResults != null && Object.hasOwnProperty.call(message, "folderAccessResults")) { if (!Array.isArray(message.folderAccessResults)) return "folderAccessResults: array expected"; for (let i = 0; i < message.folderAccessResults.length; ++i) { @@ -130966,6 +131746,8 @@ export const Folder = $root.Folder = (() => { FolderAccessResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.FolderAccessResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.FolderAccessResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -130976,7 +131758,7 @@ export const Folder = $root.Folder = (() => { throw TypeError(".Folder.FolderAccessResponse.folderAccessResults: array expected"); message.folderAccessResults = []; for (let i = 0; i < object.folderAccessResults.length; ++i) { - if (typeof object.folderAccessResults[i] !== "object") + if (!$util.isObject(object.folderAccessResults[i])) throw TypeError(".Folder.FolderAccessResponse.folderAccessResults: object expected"); message.folderAccessResults[i] = $root.Folder.FolderAccessResult.fromObject(object.folderAccessResults[i], long + 1); } @@ -131166,7 +131948,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ UserInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -131240,10 +132022,10 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -131260,6 +132042,8 @@ export const Folder = $root.Folder = (() => { UserInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.UserInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.UserInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -131302,9 +132086,9 @@ export const Folder = $root.Folder = (() => { } object.username = ""; } - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -131435,7 +132219,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -131513,15 +132297,15 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.user != null && message.hasOwnProperty("user")) { + if (message.user != null && Object.hasOwnProperty.call(message, "user")) { let error = $root.Folder.UserInfo.verify(message.user, long + 1); if (error) return "user." + error; } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; return null; @@ -131538,13 +132322,15 @@ export const Folder = $root.Folder = (() => { RecordData.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RecordData) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RecordData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.Folder.RecordData(); if (object.user != null) { - if (typeof object.user !== "object") + if (!$util.isObject(object.user)) throw TypeError(".Folder.RecordData.user: object expected"); message.user = $root.Folder.UserInfo.fromObject(object.user, long + 1); } @@ -131595,11 +132381,11 @@ export const Folder = $root.Folder = (() => { object.recordUid = $util.newBuffer(object.recordUid); } } - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) object.user = $root.Folder.UserInfo.toObject(message.user, options, q + 1); - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; return object; }; @@ -131742,7 +132528,7 @@ export const Folder = $root.Folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -131824,16 +132610,16 @@ export const Folder = $root.Folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userUid != null && message.hasOwnProperty("userUid")) + if (message.userUid != null && Object.hasOwnProperty.call(message, "userUid")) if (!(message.userUid && typeof message.userUid.length === "number" || $util.isString(message.userUid))) return "userUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.encryptedKeyType != null && message.hasOwnProperty("encryptedKeyType")) + if (message.encryptedKeyType != null && Object.hasOwnProperty.call(message, "encryptedKeyType")) switch (message.encryptedKeyType) { default: return "encryptedKeyType: enum value expected"; @@ -131858,6 +132644,8 @@ export const Folder = $root.Folder = (() => { RecordKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Folder.RecordKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Folder.RecordKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -131950,13 +132738,13 @@ export const Folder = $root.Folder = (() => { } object.encryptedKeyType = options.enums === String ? "no_key" : 0; } - if (message.userUid != null && message.hasOwnProperty("userUid")) + if (message.userUid != null && Object.hasOwnProperty.call(message, "userUid")) object.userUid = options.bytes === String ? $util.base64.encode(message.userUid, 0, message.userUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.userUid) : message.userUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.encryptedKeyType != null && message.hasOwnProperty("encryptedKeyType")) + if (message.encryptedKeyType != null && Object.hasOwnProperty.call(message, "encryptedKeyType")) object.encryptedKeyType = options.enums === String ? $root.Folder.EncryptedKeyType[message.encryptedKeyType] === undefined ? message.encryptedKeyType : $root.Folder.EncryptedKeyType[message.encryptedKeyType] : message.encryptedKeyType; return object; }; @@ -132119,7 +132907,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -132197,13 +132985,13 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordTypeId != null && message.hasOwnProperty("recordTypeId")) + if (message.recordTypeId != null && Object.hasOwnProperty.call(message, "recordTypeId")) if (!$util.isInteger(message.recordTypeId)) return "recordTypeId: integer expected"; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) if (!$util.isString(message.content)) return "content: string expected"; - if (message.scope != null && message.hasOwnProperty("scope")) + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) switch (message.scope) { default: return "scope: enum value expected"; @@ -132228,6 +133016,8 @@ export const Records = $root.Records = (() => { RecordType.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordType) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordType: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -132290,11 +133080,11 @@ export const Records = $root.Records = (() => { object.content = ""; object.scope = options.enums === String ? "RT_STANDARD" : 0; } - if (message.recordTypeId != null && message.hasOwnProperty("recordTypeId")) + if (message.recordTypeId != null && Object.hasOwnProperty.call(message, "recordTypeId")) object.recordTypeId = message.recordTypeId; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = message.content; - if (message.scope != null && message.hasOwnProperty("scope")) + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) object.scope = options.enums === String ? $root.Records.RecordTypeScope[message.scope] === undefined ? message.scope : $root.Records.RecordTypeScope[message.scope] : message.scope; return object; }; @@ -132436,7 +133226,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -132518,16 +133308,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.standard != null && message.hasOwnProperty("standard")) + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) if (typeof message.standard !== "boolean") return "standard: boolean expected"; - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) if (typeof message.user !== "boolean") return "user: boolean expected"; - if (message.enterprise != null && message.hasOwnProperty("enterprise")) + if (message.enterprise != null && Object.hasOwnProperty.call(message, "enterprise")) if (typeof message.enterprise !== "boolean") return "enterprise: boolean expected"; - if (message.pam != null && message.hasOwnProperty("pam")) + if (message.pam != null && Object.hasOwnProperty.call(message, "pam")) if (typeof message.pam !== "boolean") return "pam: boolean expected"; return null; @@ -132544,6 +133334,8 @@ export const Records = $root.Records = (() => { RecordTypesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordTypesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordTypesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -132583,13 +133375,13 @@ export const Records = $root.Records = (() => { object.enterprise = false; object.pam = false; } - if (message.standard != null && message.hasOwnProperty("standard")) + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) object.standard = message.standard; - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) object.user = message.user; - if (message.enterprise != null && message.hasOwnProperty("enterprise")) + if (message.enterprise != null && Object.hasOwnProperty.call(message, "enterprise")) object.enterprise = message.enterprise; - if (message.pam != null && message.hasOwnProperty("pam")) + if (message.pam != null && Object.hasOwnProperty.call(message, "pam")) object.pam = message.pam; return object; }; @@ -132744,7 +133536,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -132832,7 +133624,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordTypes != null && message.hasOwnProperty("recordTypes")) { + if (message.recordTypes != null && Object.hasOwnProperty.call(message, "recordTypes")) { if (!Array.isArray(message.recordTypes)) return "recordTypes: array expected"; for (let i = 0; i < message.recordTypes.length; ++i) { @@ -132841,16 +133633,16 @@ export const Records = $root.Records = (() => { return "recordTypes." + error; } } - if (message.standardCounter != null && message.hasOwnProperty("standardCounter")) + if (message.standardCounter != null && Object.hasOwnProperty.call(message, "standardCounter")) if (!$util.isInteger(message.standardCounter)) return "standardCounter: integer expected"; - if (message.userCounter != null && message.hasOwnProperty("userCounter")) + if (message.userCounter != null && Object.hasOwnProperty.call(message, "userCounter")) if (!$util.isInteger(message.userCounter)) return "userCounter: integer expected"; - if (message.enterpriseCounter != null && message.hasOwnProperty("enterpriseCounter")) + if (message.enterpriseCounter != null && Object.hasOwnProperty.call(message, "enterpriseCounter")) if (!$util.isInteger(message.enterpriseCounter)) return "enterpriseCounter: integer expected"; - if (message.pamCounter != null && message.hasOwnProperty("pamCounter")) + if (message.pamCounter != null && Object.hasOwnProperty.call(message, "pamCounter")) if (!$util.isInteger(message.pamCounter)) return "pamCounter: integer expected"; return null; @@ -132867,6 +133659,8 @@ export const Records = $root.Records = (() => { RecordTypesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordTypesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordTypesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -132877,7 +133671,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordTypesResponse.recordTypes: array expected"); message.recordTypes = []; for (let i = 0; i < object.recordTypes.length; ++i) { - if (typeof object.recordTypes[i] !== "object") + if (!$util.isObject(object.recordTypes[i])) throw TypeError(".Records.RecordTypesResponse.recordTypes: object expected"); message.recordTypes[i] = $root.Records.RecordType.fromObject(object.recordTypes[i], long + 1); } @@ -132923,13 +133717,13 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordTypes.length; ++j) object.recordTypes[j] = $root.Records.RecordType.toObject(message.recordTypes[j], options, q + 1); } - if (message.standardCounter != null && message.hasOwnProperty("standardCounter")) + if (message.standardCounter != null && Object.hasOwnProperty.call(message, "standardCounter")) object.standardCounter = message.standardCounter; - if (message.userCounter != null && message.hasOwnProperty("userCounter")) + if (message.userCounter != null && Object.hasOwnProperty.call(message, "userCounter")) object.userCounter = message.userCounter; - if (message.enterpriseCounter != null && message.hasOwnProperty("enterpriseCounter")) + if (message.enterpriseCounter != null && Object.hasOwnProperty.call(message, "enterpriseCounter")) object.enterpriseCounter = message.enterpriseCounter; - if (message.pamCounter != null && message.hasOwnProperty("pamCounter")) + if (message.pamCounter != null && Object.hasOwnProperty.call(message, "pamCounter")) object.pamCounter = message.pamCounter; return object; }; @@ -133049,7 +133843,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordTypeModifyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -133123,10 +133917,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordTypeId != null && message.hasOwnProperty("recordTypeId")) + if (message.recordTypeId != null && Object.hasOwnProperty.call(message, "recordTypeId")) if (!$util.isInteger(message.recordTypeId)) return "recordTypeId: integer expected"; - if (message.counter != null && message.hasOwnProperty("counter")) + if (message.counter != null && Object.hasOwnProperty.call(message, "counter")) if (!$util.isInteger(message.counter)) return "counter: integer expected"; return null; @@ -133143,6 +133937,8 @@ export const Records = $root.Records = (() => { RecordTypeModifyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordTypeModifyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordTypeModifyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -133176,9 +133972,9 @@ export const Records = $root.Records = (() => { object.recordTypeId = 0; object.counter = 0; } - if (message.recordTypeId != null && message.hasOwnProperty("recordTypeId")) + if (message.recordTypeId != null && Object.hasOwnProperty.call(message, "recordTypeId")) object.recordTypeId = message.recordTypeId; - if (message.counter != null && message.hasOwnProperty("counter")) + if (message.counter != null && Object.hasOwnProperty.call(message, "counter")) object.counter = message.counter; return object; }; @@ -133300,7 +134096,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsGetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -133376,14 +134172,14 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) if (!(message.recordUids[i] && typeof message.recordUids[i].length === "number" || $util.isString(message.recordUids[i]))) return "recordUids: buffer[] expected"; } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; return null; @@ -133400,6 +134196,8 @@ export const Records = $root.Records = (() => { RecordsGetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsGetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsGetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -133457,7 +134255,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordUids.length; ++j) object.recordUids[j] = options.bytes === String ? $util.base64.encode(message.recordUids[j], 0, message.recordUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUids[j]) : message.recordUids[j]; } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") @@ -133661,7 +134459,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ Record.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -133765,13 +134563,13 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) switch (message.recordKeyType) { default: return "recordKeyType: enum value expected"; @@ -133784,22 +134582,22 @@ export const Records = $root.Records = (() => { case 6: break; } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) if (!(message.extra && typeof message.extra.length === "number" || $util.isString(message.extra))) return "extra: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.fileIds != null && message.hasOwnProperty("fileIds")) { + if (message.fileIds != null && Object.hasOwnProperty.call(message, "fileIds")) { if (!Array.isArray(message.fileIds)) return "fileIds: array expected"; for (let i = 0; i < message.fileIds.length; ++i) @@ -133820,6 +134618,8 @@ export const Records = $root.Records = (() => { Record.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.Record) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.Record: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -133975,26 +134775,26 @@ export const Records = $root.Records = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) object.recordKeyType = options.enums === String ? $root.Records.RecordKeyType[message.recordKeyType] === undefined ? message.recordKeyType : $root.Records.RecordKeyType[message.recordKeyType] : message.recordKeyType; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) object.extra = options.bytes === String ? $util.base64.encode(message.extra, 0, message.extra.length) : options.bytes === Array ? Array.prototype.slice.call(message.extra) : message.extra; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -134159,7 +134959,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FolderRecordKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -134237,13 +135037,13 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; return null; @@ -134260,6 +135060,8 @@ export const Records = $root.Records = (() => { FolderRecordKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FolderRecordKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FolderRecordKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -134323,11 +135125,11 @@ export const Records = $root.Records = (() => { object.recordKey = $util.newBuffer(object.recordKey); } } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; return object; }; @@ -134458,7 +135260,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ Folder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -134536,13 +135338,13 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) if (!(message.folderKey && typeof message.folderKey.length === "number" || $util.isString(message.folderKey))) return "folderKey: buffer expected"; - if (message.folderKeyType != null && message.hasOwnProperty("folderKeyType")) + if (message.folderKeyType != null && Object.hasOwnProperty.call(message, "folderKeyType")) switch (message.folderKeyType) { default: return "folderKeyType: enum value expected"; @@ -134569,6 +135371,8 @@ export const Records = $root.Records = (() => { Folder.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.Folder) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.Folder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -134657,11 +135461,11 @@ export const Records = $root.Records = (() => { } object.folderKeyType = options.enums === String ? "NO_KEY" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) object.folderKey = options.bytes === String ? $util.base64.encode(message.folderKey, 0, message.folderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderKey) : message.folderKey; - if (message.folderKeyType != null && message.hasOwnProperty("folderKeyType")) + if (message.folderKeyType != null && Object.hasOwnProperty.call(message, "folderKeyType")) object.folderKeyType = options.enums === String ? $root.Records.RecordKeyType[message.folderKeyType] === undefined ? message.folderKeyType : $root.Records.RecordKeyType[message.folderKeyType] : message.folderKeyType; return object; }; @@ -134816,7 +135620,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ Team.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -134904,16 +135708,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.teamKey != null && message.hasOwnProperty("teamKey")) + if (message.teamKey != null && Object.hasOwnProperty.call(message, "teamKey")) if (!(message.teamKey && typeof message.teamKey.length === "number" || $util.isString(message.teamKey))) return "teamKey: buffer expected"; - if (message.teamPrivateKey != null && message.hasOwnProperty("teamPrivateKey")) + if (message.teamPrivateKey != null && Object.hasOwnProperty.call(message, "teamPrivateKey")) if (!(message.teamPrivateKey && typeof message.teamPrivateKey.length === "number" || $util.isString(message.teamPrivateKey))) return "teamPrivateKey: buffer expected"; - if (message.teamKeyType != null && message.hasOwnProperty("teamKeyType")) + if (message.teamKeyType != null && Object.hasOwnProperty.call(message, "teamKeyType")) switch (message.teamKeyType) { default: return "teamKeyType: enum value expected"; @@ -134926,7 +135730,7 @@ export const Records = $root.Records = (() => { case 6: break; } - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -134949,6 +135753,8 @@ export const Records = $root.Records = (() => { Team.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.Team) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.Team: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -135010,7 +135816,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.Team.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".Records.Team.folders: object expected"); message.folders[i] = $root.Records.Folder.fromObject(object.folders[i], long + 1); } @@ -135061,13 +135867,13 @@ export const Records = $root.Records = (() => { } object.teamKeyType = options.enums === String ? "NO_KEY" : 0; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.teamKey != null && message.hasOwnProperty("teamKey")) + if (message.teamKey != null && Object.hasOwnProperty.call(message, "teamKey")) object.teamKey = options.bytes === String ? $util.base64.encode(message.teamKey, 0, message.teamKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamKey) : message.teamKey; - if (message.teamPrivateKey != null && message.hasOwnProperty("teamPrivateKey")) + if (message.teamPrivateKey != null && Object.hasOwnProperty.call(message, "teamPrivateKey")) object.teamPrivateKey = options.bytes === String ? $util.base64.encode(message.teamPrivateKey, 0, message.teamPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamPrivateKey) : message.teamPrivateKey; - if (message.teamKeyType != null && message.hasOwnProperty("teamKeyType")) + if (message.teamKeyType != null && Object.hasOwnProperty.call(message, "teamKeyType")) object.teamKeyType = options.enums === String ? $root.Records.RecordKeyType[message.teamKeyType] === undefined ? message.teamKeyType : $root.Records.RecordKeyType[message.teamKeyType] : message.teamKeyType; if (message.folders && message.folders.length) { object.folders = []; @@ -135222,7 +136028,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -135312,7 +136118,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -135321,7 +136127,7 @@ export const Records = $root.Records = (() => { return "records." + error; } } - if (message.folderRecordKeys != null && message.hasOwnProperty("folderRecordKeys")) { + if (message.folderRecordKeys != null && Object.hasOwnProperty.call(message, "folderRecordKeys")) { if (!Array.isArray(message.folderRecordKeys)) return "folderRecordKeys: array expected"; for (let i = 0; i < message.folderRecordKeys.length; ++i) { @@ -135330,7 +136136,7 @@ export const Records = $root.Records = (() => { return "folderRecordKeys." + error; } } - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -135339,7 +136145,7 @@ export const Records = $root.Records = (() => { return "folders." + error; } } - if (message.teams != null && message.hasOwnProperty("teams")) { + if (message.teams != null && Object.hasOwnProperty.call(message, "teams")) { if (!Array.isArray(message.teams)) return "teams: array expected"; for (let i = 0; i < message.teams.length; ++i) { @@ -135362,6 +136168,8 @@ export const Records = $root.Records = (() => { RecordsGetResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsGetResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsGetResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -135372,7 +136180,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsGetResponse.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.RecordsGetResponse.records: object expected"); message.records[i] = $root.Records.Record.fromObject(object.records[i], long + 1); } @@ -135382,7 +136190,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsGetResponse.folderRecordKeys: array expected"); message.folderRecordKeys = []; for (let i = 0; i < object.folderRecordKeys.length; ++i) { - if (typeof object.folderRecordKeys[i] !== "object") + if (!$util.isObject(object.folderRecordKeys[i])) throw TypeError(".Records.RecordsGetResponse.folderRecordKeys: object expected"); message.folderRecordKeys[i] = $root.Records.FolderRecordKey.fromObject(object.folderRecordKeys[i], long + 1); } @@ -135392,7 +136200,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsGetResponse.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".Records.RecordsGetResponse.folders: object expected"); message.folders[i] = $root.Records.Folder.fromObject(object.folders[i], long + 1); } @@ -135402,7 +136210,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsGetResponse.teams: array expected"); message.teams = []; for (let i = 0; i < object.teams.length; ++i) { - if (typeof object.teams[i] !== "object") + if (!$util.isObject(object.teams[i])) throw TypeError(".Records.RecordsGetResponse.teams: object expected"); message.teams[i] = $root.Records.Team.fromObject(object.teams[i], long + 1); } @@ -135587,7 +136395,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -135661,10 +136469,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; return null; @@ -135681,6 +136489,8 @@ export const Records = $root.Records = (() => { RecordLink.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordLink) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordLink: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -135732,9 +136542,9 @@ export const Records = $root.Records = (() => { object.recordKey = $util.newBuffer(object.recordKey); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; return object; }; @@ -135854,7 +136664,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordAudit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -135928,10 +136738,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -135948,6 +136758,8 @@ export const Records = $root.Records = (() => { RecordAudit.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordAudit) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordAudit: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -135990,9 +136802,9 @@ export const Records = $root.Records = (() => { object.data = $util.newBuffer(object.data); } } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -136101,7 +136913,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ SecurityData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -136171,7 +136983,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -136188,6 +137000,8 @@ export const Records = $root.Records = (() => { SecurityData.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.SecurityData) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.SecurityData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -136226,7 +137040,7 @@ export const Records = $root.Records = (() => { if (options.bytes !== Array) object.data = $util.newBuffer(object.data); } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -136335,7 +137149,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ SecurityScoreData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -136405,7 +137219,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -136422,6 +137236,8 @@ export const Records = $root.Records = (() => { SecurityScoreData.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.SecurityScoreData) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.SecurityScoreData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -136460,7 +137276,7 @@ export const Records = $root.Records = (() => { if (options.bytes !== Array) object.data = $util.newBuffer(object.data); } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -136692,7 +137508,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordAdd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -136808,22 +137624,22 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) if (!(message.nonSharedData && typeof message.nonSharedData.length === "number" || $util.isString(message.nonSharedData))) return "nonSharedData: buffer expected"; - if (message.folderType != null && message.hasOwnProperty("folderType")) + if (message.folderType != null && Object.hasOwnProperty.call(message, "folderType")) switch (message.folderType) { default: return "folderType: enum value expected"; @@ -136832,13 +137648,13 @@ export const Records = $root.Records = (() => { case 2: break; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) if (!(message.folderKey && typeof message.folderKey.length === "number" || $util.isString(message.folderKey))) return "folderKey: buffer expected"; - if (message.recordLinks != null && message.hasOwnProperty("recordLinks")) { + if (message.recordLinks != null && Object.hasOwnProperty.call(message, "recordLinks")) { if (!Array.isArray(message.recordLinks)) return "recordLinks: array expected"; for (let i = 0; i < message.recordLinks.length; ++i) { @@ -136847,17 +137663,17 @@ export const Records = $root.Records = (() => { return "recordLinks." + error; } } - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { let error = $root.Records.RecordAudit.verify(message.audit, long + 1); if (error) return "audit." + error; } - if (message.securityData != null && message.hasOwnProperty("securityData")) { + if (message.securityData != null && Object.hasOwnProperty.call(message, "securityData")) { let error = $root.Records.SecurityData.verify(message.securityData, long + 1); if (error) return "securityData." + error; } - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) { + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) { let error = $root.Records.SecurityScoreData.verify(message.securityScoreData, long + 1); if (error) return "securityScoreData." + error; @@ -136876,6 +137692,8 @@ export const Records = $root.Records = (() => { RecordAdd.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordAdd) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordAdd: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -136945,23 +137763,23 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordAdd.recordLinks: array expected"); message.recordLinks = []; for (let i = 0; i < object.recordLinks.length; ++i) { - if (typeof object.recordLinks[i] !== "object") + if (!$util.isObject(object.recordLinks[i])) throw TypeError(".Records.RecordAdd.recordLinks: object expected"); message.recordLinks[i] = $root.Records.RecordLink.fromObject(object.recordLinks[i], long + 1); } } if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".Records.RecordAdd.audit: object expected"); message.audit = $root.Records.RecordAudit.fromObject(object.audit, long + 1); } if (object.securityData != null) { - if (typeof object.securityData !== "object") + if (!$util.isObject(object.securityData)) throw TypeError(".Records.RecordAdd.securityData: object expected"); message.securityData = $root.Records.SecurityData.fromObject(object.securityData, long + 1); } if (object.securityScoreData != null) { - if (typeof object.securityScoreData !== "object") + if (!$util.isObject(object.securityScoreData)) throw TypeError(".Records.RecordAdd.securityScoreData: object expected"); message.securityScoreData = $root.Records.SecurityScoreData.fromObject(object.securityScoreData, long + 1); } @@ -137040,37 +137858,37 @@ export const Records = $root.Records = (() => { object.securityData = null; object.securityScoreData = null; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) object.nonSharedData = options.bytes === String ? $util.base64.encode(message.nonSharedData, 0, message.nonSharedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonSharedData) : message.nonSharedData; - if (message.folderType != null && message.hasOwnProperty("folderType")) + if (message.folderType != null && Object.hasOwnProperty.call(message, "folderType")) object.folderType = options.enums === String ? $root.Records.RecordFolderType[message.folderType] === undefined ? message.folderType : $root.Records.RecordFolderType[message.folderType] : message.folderType; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.folderKey != null && message.hasOwnProperty("folderKey")) + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) object.folderKey = options.bytes === String ? $util.base64.encode(message.folderKey, 0, message.folderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderKey) : message.folderKey; if (message.recordLinks && message.recordLinks.length) { object.recordLinks = []; for (let j = 0; j < message.recordLinks.length; ++j) object.recordLinks[j] = $root.Records.RecordLink.toObject(message.recordLinks[j], options, q + 1); } - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = $root.Records.RecordAudit.toObject(message.audit, options, q + 1); - if (message.securityData != null && message.hasOwnProperty("securityData")) + if (message.securityData != null && Object.hasOwnProperty.call(message, "securityData")) object.securityData = $root.Records.SecurityData.toObject(message.securityData, options, q + 1); - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) object.securityScoreData = $root.Records.SecurityScoreData.toObject(message.securityScoreData, options, q + 1); return object; }; @@ -137203,7 +138021,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -137283,7 +138101,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -137292,10 +138110,10 @@ export const Records = $root.Records = (() => { return "records." + error; } } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; - if (message.securityDataKeyType != null && message.hasOwnProperty("securityDataKeyType")) + if (message.securityDataKeyType != null && Object.hasOwnProperty.call(message, "securityDataKeyType")) switch (message.securityDataKeyType) { default: return "securityDataKeyType: enum value expected"; @@ -137322,6 +138140,8 @@ export const Records = $root.Records = (() => { RecordsAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -137332,7 +138152,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsAddRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.RecordsAddRequest.records: object expected"); message.records[i] = $root.Records.RecordAdd.fromObject(object.records[i], long + 1); } @@ -137417,14 +138237,14 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.Records.RecordAdd.toObject(message.records[j], options, q + 1); } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") object.clientTime = options.longs === String ? String(message.clientTime) : message.clientTime; else object.clientTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientTime) : options.longs === Number ? new $util.LongBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0).toNumber() : message.clientTime; - if (message.securityDataKeyType != null && message.hasOwnProperty("securityDataKeyType")) + if (message.securityDataKeyType != null && Object.hasOwnProperty.call(message, "securityDataKeyType")) object.securityDataKeyType = options.enums === String ? $root.Records.RecordKeyType[message.securityDataKeyType] === undefined ? message.securityDataKeyType : $root.Records.RecordKeyType[message.securityDataKeyType] : message.securityDataKeyType; return object; }; @@ -137636,7 +138456,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -137746,22 +138566,22 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) if (!(message.nonSharedData && typeof message.nonSharedData.length === "number" || $util.isString(message.nonSharedData))) return "nonSharedData: buffer expected"; - if (message.recordLinksAdd != null && message.hasOwnProperty("recordLinksAdd")) { + if (message.recordLinksAdd != null && Object.hasOwnProperty.call(message, "recordLinksAdd")) { if (!Array.isArray(message.recordLinksAdd)) return "recordLinksAdd: array expected"; for (let i = 0; i < message.recordLinksAdd.length; ++i) { @@ -137770,24 +138590,24 @@ export const Records = $root.Records = (() => { return "recordLinksAdd." + error; } } - if (message.recordLinksRemove != null && message.hasOwnProperty("recordLinksRemove")) { + if (message.recordLinksRemove != null && Object.hasOwnProperty.call(message, "recordLinksRemove")) { if (!Array.isArray(message.recordLinksRemove)) return "recordLinksRemove: array expected"; for (let i = 0; i < message.recordLinksRemove.length; ++i) if (!(message.recordLinksRemove[i] && typeof message.recordLinksRemove[i].length === "number" || $util.isString(message.recordLinksRemove[i]))) return "recordLinksRemove: buffer[] expected"; } - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { let error = $root.Records.RecordAudit.verify(message.audit, long + 1); if (error) return "audit." + error; } - if (message.securityData != null && message.hasOwnProperty("securityData")) { + if (message.securityData != null && Object.hasOwnProperty.call(message, "securityData")) { let error = $root.Records.SecurityData.verify(message.securityData, long + 1); if (error) return "securityData." + error; } - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) { + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) { let error = $root.Records.SecurityScoreData.verify(message.securityScoreData, long + 1); if (error) return "securityScoreData." + error; @@ -137806,6 +138626,8 @@ export const Records = $root.Records = (() => { RecordUpdate.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordUpdate) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordUpdate: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -137849,7 +138671,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordUpdate.recordLinksAdd: array expected"); message.recordLinksAdd = []; for (let i = 0; i < object.recordLinksAdd.length; ++i) { - if (typeof object.recordLinksAdd[i] !== "object") + if (!$util.isObject(object.recordLinksAdd[i])) throw TypeError(".Records.RecordUpdate.recordLinksAdd: object expected"); message.recordLinksAdd[i] = $root.Records.RecordLink.fromObject(object.recordLinksAdd[i], long + 1); } @@ -137865,17 +138687,17 @@ export const Records = $root.Records = (() => { message.recordLinksRemove[i] = object.recordLinksRemove[i]; } if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".Records.RecordUpdate.audit: object expected"); message.audit = $root.Records.RecordAudit.fromObject(object.audit, long + 1); } if (object.securityData != null) { - if (typeof object.securityData !== "object") + if (!$util.isObject(object.securityData)) throw TypeError(".Records.RecordUpdate.securityData: object expected"); message.securityData = $root.Records.SecurityData.fromObject(object.securityData, long + 1); } if (object.securityScoreData != null) { - if (typeof object.securityScoreData !== "object") + if (!$util.isObject(object.securityScoreData)) throw TypeError(".Records.RecordUpdate.securityScoreData: object expected"); message.securityScoreData = $root.Records.SecurityScoreData.fromObject(object.securityScoreData, long + 1); } @@ -137939,25 +138761,25 @@ export const Records = $root.Records = (() => { object.securityData = null; object.securityScoreData = null; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) object.nonSharedData = options.bytes === String ? $util.base64.encode(message.nonSharedData, 0, message.nonSharedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonSharedData) : message.nonSharedData; if (message.recordLinksAdd && message.recordLinksAdd.length) { object.recordLinksAdd = []; @@ -137969,11 +138791,11 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordLinksRemove.length; ++j) object.recordLinksRemove[j] = options.bytes === String ? $util.base64.encode(message.recordLinksRemove[j], 0, message.recordLinksRemove[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordLinksRemove[j]) : message.recordLinksRemove[j]; } - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = $root.Records.RecordAudit.toObject(message.audit, options, q + 1); - if (message.securityData != null && message.hasOwnProperty("securityData")) + if (message.securityData != null && Object.hasOwnProperty.call(message, "securityData")) object.securityData = $root.Records.SecurityData.toObject(message.securityData, options, q + 1); - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) object.securityScoreData = $root.Records.SecurityScoreData.toObject(message.securityScoreData, options, q + 1); return object; }; @@ -138106,7 +138928,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -138186,7 +139008,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -138195,10 +139017,10 @@ export const Records = $root.Records = (() => { return "records." + error; } } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; - if (message.securityDataKeyType != null && message.hasOwnProperty("securityDataKeyType")) + if (message.securityDataKeyType != null && Object.hasOwnProperty.call(message, "securityDataKeyType")) switch (message.securityDataKeyType) { default: return "securityDataKeyType: enum value expected"; @@ -138225,6 +139047,8 @@ export const Records = $root.Records = (() => { RecordsUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -138235,7 +139059,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsUpdateRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.RecordsUpdateRequest.records: object expected"); message.records[i] = $root.Records.RecordUpdate.fromObject(object.records[i], long + 1); } @@ -138320,14 +139144,14 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.Records.RecordUpdate.toObject(message.records[j], options, q + 1); } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") object.clientTime = options.longs === String ? String(message.clientTime) : message.clientTime; else object.clientTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientTime) : options.longs === Number ? new $util.LongBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0).toNumber() : message.clientTime; - if (message.securityDataKeyType != null && message.hasOwnProperty("securityDataKeyType")) + if (message.securityDataKeyType != null && Object.hasOwnProperty.call(message, "securityDataKeyType")) object.securityDataKeyType = options.enums === String ? $root.Records.RecordKeyType[message.securityDataKeyType] === undefined ? message.securityDataKeyType : $root.Records.RecordKeyType[message.securityDataKeyType] : message.securityDataKeyType; return object; }; @@ -138491,7 +139315,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordFileForConversion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -138581,22 +139405,22 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.fileFileId != null && message.hasOwnProperty("fileFileId")) + if (message.fileFileId != null && Object.hasOwnProperty.call(message, "fileFileId")) if (!$util.isString(message.fileFileId)) return "fileFileId: string expected"; - if (message.thumbFileId != null && message.hasOwnProperty("thumbFileId")) + if (message.thumbFileId != null && Object.hasOwnProperty.call(message, "thumbFileId")) if (!$util.isString(message.thumbFileId)) return "thumbFileId: string expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.linkKey != null && message.hasOwnProperty("linkKey")) + if (message.linkKey != null && Object.hasOwnProperty.call(message, "linkKey")) if (!(message.linkKey && typeof message.linkKey.length === "number" || $util.isString(message.linkKey))) return "linkKey: buffer expected"; return null; @@ -138613,6 +139437,8 @@ export const Records = $root.Records = (() => { RecordFileForConversion.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordFileForConversion) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordFileForConversion: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -138694,17 +139520,17 @@ export const Records = $root.Records = (() => { object.linkKey = $util.newBuffer(object.linkKey); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.fileFileId != null && message.hasOwnProperty("fileFileId")) + if (message.fileFileId != null && Object.hasOwnProperty.call(message, "fileFileId")) object.fileFileId = message.fileFileId; - if (message.thumbFileId != null && message.hasOwnProperty("thumbFileId")) + if (message.thumbFileId != null && Object.hasOwnProperty.call(message, "thumbFileId")) object.thumbFileId = message.thumbFileId; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.linkKey != null && message.hasOwnProperty("linkKey")) + if (message.linkKey != null && Object.hasOwnProperty.call(message, "linkKey")) object.linkKey = options.bytes === String ? $util.base64.encode(message.linkKey, 0, message.linkKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.linkKey) : message.linkKey; return object; }; @@ -138824,7 +139650,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordFolderForConversion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -138898,10 +139724,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordFolderKey != null && message.hasOwnProperty("recordFolderKey")) + if (message.recordFolderKey != null && Object.hasOwnProperty.call(message, "recordFolderKey")) if (!(message.recordFolderKey && typeof message.recordFolderKey.length === "number" || $util.isString(message.recordFolderKey))) return "recordFolderKey: buffer expected"; return null; @@ -138918,6 +139744,8 @@ export const Records = $root.Records = (() => { RecordFolderForConversion.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordFolderForConversion) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordFolderForConversion: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -138969,9 +139797,9 @@ export const Records = $root.Records = (() => { object.recordFolderKey = $util.newBuffer(object.recordFolderKey); } } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordFolderKey != null && message.hasOwnProperty("recordFolderKey")) + if (message.recordFolderKey != null && Object.hasOwnProperty.call(message, "recordFolderKey")) object.recordFolderKey = options.bytes === String ? $util.base64.encode(message.recordFolderKey, 0, message.recordFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordFolderKey) : message.recordFolderKey; return object; }; @@ -139161,7 +139989,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordConvertToV3.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -139263,27 +140091,27 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) if (!(message.nonSharedData && typeof message.nonSharedData.length === "number" || $util.isString(message.nonSharedData))) return "nonSharedData: buffer expected"; - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { let error = $root.Records.RecordAudit.verify(message.audit, long + 1); if (error) return "audit." + error; } - if (message.recordFile != null && message.hasOwnProperty("recordFile")) { + if (message.recordFile != null && Object.hasOwnProperty.call(message, "recordFile")) { if (!Array.isArray(message.recordFile)) return "recordFile: array expected"; for (let i = 0; i < message.recordFile.length; ++i) { @@ -139292,7 +140120,7 @@ export const Records = $root.Records = (() => { return "recordFile." + error; } } - if (message.folderKey != null && message.hasOwnProperty("folderKey")) { + if (message.folderKey != null && Object.hasOwnProperty.call(message, "folderKey")) { if (!Array.isArray(message.folderKey)) return "folderKey: array expected"; for (let i = 0; i < message.folderKey.length; ++i) { @@ -139315,6 +140143,8 @@ export const Records = $root.Records = (() => { RecordConvertToV3.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordConvertToV3) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordConvertToV3: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -139354,7 +140184,7 @@ export const Records = $root.Records = (() => { else if (object.nonSharedData.length >= 0) message.nonSharedData = object.nonSharedData; if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".Records.RecordConvertToV3.audit: object expected"); message.audit = $root.Records.RecordAudit.fromObject(object.audit, long + 1); } @@ -139363,7 +140193,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordConvertToV3.recordFile: array expected"); message.recordFile = []; for (let i = 0; i < object.recordFile.length; ++i) { - if (typeof object.recordFile[i] !== "object") + if (!$util.isObject(object.recordFile[i])) throw TypeError(".Records.RecordConvertToV3.recordFile: object expected"); message.recordFile[i] = $root.Records.RecordFileForConversion.fromObject(object.recordFile[i], long + 1); } @@ -139373,7 +140203,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordConvertToV3.folderKey: array expected"); message.folderKey = []; for (let i = 0; i < object.folderKey.length; ++i) { - if (typeof object.folderKey[i] !== "object") + if (!$util.isObject(object.folderKey[i])) throw TypeError(".Records.RecordConvertToV3.folderKey: object expected"); message.folderKey[i] = $root.Records.RecordFolderForConversion.fromObject(object.folderKey[i], long + 1); } @@ -139436,27 +140266,27 @@ export const Records = $root.Records = (() => { } object.audit = null; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) object.nonSharedData = options.bytes === String ? $util.base64.encode(message.nonSharedData, 0, message.nonSharedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonSharedData) : message.nonSharedData; - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = $root.Records.RecordAudit.toObject(message.audit, options, q + 1); if (message.recordFile && message.recordFile.length) { object.recordFile = []; @@ -139588,7 +140418,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsConvertToV3Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -139664,7 +140494,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -139673,7 +140503,7 @@ export const Records = $root.Records = (() => { return "records." + error; } } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; return null; @@ -139690,6 +140520,8 @@ export const Records = $root.Records = (() => { RecordsConvertToV3Request.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsConvertToV3Request) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsConvertToV3Request: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -139700,7 +140532,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsConvertToV3Request.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.RecordsConvertToV3Request.records: object expected"); message.records[i] = $root.Records.RecordConvertToV3.fromObject(object.records[i], long + 1); } @@ -139747,7 +140579,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.Records.RecordConvertToV3.toObject(message.records[j], options, q + 1); } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") @@ -139863,7 +140695,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsRemoveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -139935,7 +140767,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) @@ -139956,6 +140788,8 @@ export const Records = $root.Records = (() => { RecordsRemoveRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsRemoveRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsRemoveRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -140116,7 +140950,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordRevert.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -140190,10 +141024,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revertToRevision != null && message.hasOwnProperty("revertToRevision")) + if (message.revertToRevision != null && Object.hasOwnProperty.call(message, "revertToRevision")) if (!$util.isInteger(message.revertToRevision) && !(message.revertToRevision && $util.isInteger(message.revertToRevision.low) && $util.isInteger(message.revertToRevision.high))) return "revertToRevision: integer|Long expected"; return null; @@ -140210,6 +141044,8 @@ export const Records = $root.Records = (() => { RecordRevert.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordRevert) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordRevert: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -140263,9 +141099,9 @@ export const Records = $root.Records = (() => { } else object.revertToRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revertToRevision != null && message.hasOwnProperty("revertToRevision")) + if (message.revertToRevision != null && Object.hasOwnProperty.call(message, "revertToRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revertToRevision = typeof message.revertToRevision === "number" ? BigInt(message.revertToRevision) : $util.Long.fromBits(message.revertToRevision.low >>> 0, message.revertToRevision.high >>> 0, false).toBigInt(); else if (typeof message.revertToRevision === "number") @@ -140381,7 +141217,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsRevertRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -140453,7 +141289,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -140476,6 +141312,8 @@ export const Records = $root.Records = (() => { RecordsRevertRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsRevertRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsRevertRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -140486,7 +141324,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsRevertRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.RecordsRevertRequest.records: object expected"); message.records[i] = $root.Records.RecordRevert.fromObject(object.records[i], long + 1); } @@ -140683,7 +141521,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordLinkError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -140761,10 +141599,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -140783,7 +141621,7 @@ export const Records = $root.Records = (() => { case 12: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -140800,6 +141638,8 @@ export const Records = $root.Records = (() => { RecordLinkError.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordLinkError) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordLinkError: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -140903,11 +141743,11 @@ export const Records = $root.Records = (() => { object.status = options.enums === String ? "RS_SUCCESS" : 0; object.message = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Records.RecordModifyResult[message.status] === undefined ? message.status : $root.Records.RecordModifyResult[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -141051,7 +141891,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordModifyStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -141135,10 +141975,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -141157,10 +141997,10 @@ export const Records = $root.Records = (() => { case 12: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.linkErrors != null && message.hasOwnProperty("linkErrors")) { + if (message.linkErrors != null && Object.hasOwnProperty.call(message, "linkErrors")) { if (!Array.isArray(message.linkErrors)) return "linkErrors: array expected"; for (let i = 0; i < message.linkErrors.length; ++i) { @@ -141183,6 +142023,8 @@ export const Records = $root.Records = (() => { RecordModifyStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordModifyStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordModifyStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -141260,7 +142102,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordModifyStatus.linkErrors: array expected"); message.linkErrors = []; for (let i = 0; i < object.linkErrors.length; ++i) { - if (typeof object.linkErrors[i] !== "object") + if (!$util.isObject(object.linkErrors[i])) throw TypeError(".Records.RecordModifyStatus.linkErrors: object expected"); message.linkErrors[i] = $root.Records.RecordLinkError.fromObject(object.linkErrors[i], long + 1); } @@ -141298,11 +142140,11 @@ export const Records = $root.Records = (() => { object.status = options.enums === String ? "RS_SUCCESS" : 0; object.message = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Records.RecordModifyResult[message.status] === undefined ? message.status : $root.Records.RecordModifyResult[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.linkErrors && message.linkErrors.length) { object.linkErrors = []; @@ -141429,7 +142271,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsModifyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -141505,7 +142347,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -141514,7 +142356,7 @@ export const Records = $root.Records = (() => { return "records." + error; } } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -141531,6 +142373,8 @@ export const Records = $root.Records = (() => { RecordsModifyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsModifyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsModifyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -141541,7 +142385,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsModifyResponse.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.RecordsModifyResponse.records: object expected"); message.records[i] = $root.Records.RecordModifyStatus.fromObject(object.records[i], long + 1); } @@ -141588,7 +142432,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.Records.RecordModifyStatus.toObject(message.records[j], options, q + 1); } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -141735,7 +142579,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordAddAuditData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -141817,16 +142661,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; return null; @@ -141843,6 +142687,8 @@ export const Records = $root.Records = (() => { RecordAddAuditData.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordAddAuditData) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordAddAuditData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -141911,18 +142757,18 @@ export const Records = $root.Records = (() => { } object.version = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; return object; }; @@ -142033,7 +142879,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ AddAuditDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -142105,7 +142951,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -142128,6 +142974,8 @@ export const Records = $root.Records = (() => { AddAuditDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.AddAuditDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.AddAuditDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -142138,7 +142986,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.AddAuditDataRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Records.AddAuditDataRequest.records: object expected"); message.records[i] = $root.Records.RecordAddAuditData.fromObject(object.records[i], long + 1); } @@ -142332,7 +143180,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ File.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -142422,22 +143270,22 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (!$util.isInteger(message.fileSize) && !(message.fileSize && $util.isInteger(message.fileSize.low) && $util.isInteger(message.fileSize.high))) return "fileSize: integer|Long expected"; - if (message.thumbSize != null && message.hasOwnProperty("thumbSize")) + if (message.thumbSize != null && Object.hasOwnProperty.call(message, "thumbSize")) if (!$util.isInteger(message.thumbSize)) return "thumbSize: integer expected"; - if (message.isScript != null && message.hasOwnProperty("isScript")) + if (message.isScript != null && Object.hasOwnProperty.call(message, "isScript")) if (typeof message.isScript !== "boolean") return "isScript: boolean expected"; return null; @@ -142454,6 +143302,8 @@ export const Records = $root.Records = (() => { File.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.File) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.File: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -142537,22 +143387,22 @@ export const Records = $root.Records = (() => { object.thumbSize = 0; object.isScript = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fileSize = typeof message.fileSize === "number" ? BigInt(message.fileSize) : $util.Long.fromBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0, false).toBigInt(); else if (typeof message.fileSize === "number") object.fileSize = options.longs === String ? String(message.fileSize) : message.fileSize; else object.fileSize = options.longs === String ? $util.Long.prototype.toString.call(message.fileSize) : options.longs === Number ? new $util.LongBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0).toNumber() : message.fileSize; - if (message.thumbSize != null && message.hasOwnProperty("thumbSize")) + if (message.thumbSize != null && Object.hasOwnProperty.call(message, "thumbSize")) object.thumbSize = message.thumbSize; - if (message.isScript != null && message.hasOwnProperty("isScript")) + if (message.isScript != null && Object.hasOwnProperty.call(message, "isScript")) object.isScript = message.isScript; return object; }; @@ -142674,7 +143524,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FilesAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -142750,7 +143600,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.files != null && message.hasOwnProperty("files")) { + if (message.files != null && Object.hasOwnProperty.call(message, "files")) { if (!Array.isArray(message.files)) return "files: array expected"; for (let i = 0; i < message.files.length; ++i) { @@ -142759,7 +143609,7 @@ export const Records = $root.Records = (() => { return "files." + error; } } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; return null; @@ -142776,6 +143626,8 @@ export const Records = $root.Records = (() => { FilesAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FilesAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FilesAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -142786,7 +143638,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.FilesAddRequest.files: array expected"); message.files = []; for (let i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") + if (!$util.isObject(object.files[i])) throw TypeError(".Records.FilesAddRequest.files: object expected"); message.files[i] = $root.Records.File.fromObject(object.files[i], long + 1); } @@ -142833,7 +143685,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.files.length; ++j) object.files[j] = $root.Records.File.toObject(message.files[j], options, q + 1); } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") @@ -143016,7 +143868,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FileAddStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -143106,10 +143958,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -143117,16 +143969,16 @@ export const Records = $root.Records = (() => { case 1: break; } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) if (!$util.isString(message.parameters)) return "parameters: string expected"; - if (message.thumbnailParameters != null && message.hasOwnProperty("thumbnailParameters")) + if (message.thumbnailParameters != null && Object.hasOwnProperty.call(message, "thumbnailParameters")) if (!$util.isString(message.thumbnailParameters)) return "thumbnailParameters: string expected"; - if (message.successStatusCode != null && message.hasOwnProperty("successStatusCode")) + if (message.successStatusCode != null && Object.hasOwnProperty.call(message, "successStatusCode")) if (!$util.isInteger(message.successStatusCode)) return "successStatusCode: integer expected"; return null; @@ -143143,6 +143995,8 @@ export const Records = $root.Records = (() => { FileAddStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FileAddStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FileAddStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -143211,17 +144065,17 @@ export const Records = $root.Records = (() => { object.thumbnailParameters = ""; object.successStatusCode = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Records.FileAddResult[message.status] === undefined ? message.status : $root.Records.FileAddResult[message.status] : message.status; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; - if (message.parameters != null && message.hasOwnProperty("parameters")) + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) object.parameters = message.parameters; - if (message.thumbnailParameters != null && message.hasOwnProperty("thumbnailParameters")) + if (message.thumbnailParameters != null && Object.hasOwnProperty.call(message, "thumbnailParameters")) object.thumbnailParameters = message.thumbnailParameters; - if (message.successStatusCode != null && message.hasOwnProperty("successStatusCode")) + if (message.successStatusCode != null && Object.hasOwnProperty.call(message, "successStatusCode")) object.successStatusCode = message.successStatusCode; return object; }; @@ -143343,7 +144197,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FilesAddResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -143419,7 +144273,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.files != null && message.hasOwnProperty("files")) { + if (message.files != null && Object.hasOwnProperty.call(message, "files")) { if (!Array.isArray(message.files)) return "files: array expected"; for (let i = 0; i < message.files.length; ++i) { @@ -143428,7 +144282,7 @@ export const Records = $root.Records = (() => { return "files." + error; } } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -143445,6 +144299,8 @@ export const Records = $root.Records = (() => { FilesAddResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FilesAddResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FilesAddResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -143455,7 +144311,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.FilesAddResponse.files: array expected"); message.files = []; for (let i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") + if (!$util.isObject(object.files[i])) throw TypeError(".Records.FilesAddResponse.files: object expected"); message.files[i] = $root.Records.FileAddStatus.fromObject(object.files[i], long + 1); } @@ -143502,7 +144358,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.files.length; ++j) object.files[j] = $root.Records.FileAddStatus.toObject(message.files[j], options, q + 1); } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -143640,7 +144496,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FilesGetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -143720,17 +144576,17 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) if (!(message.recordUids[i] && typeof message.recordUids[i].length === "number" || $util.isString(message.recordUids[i]))) return "recordUids: buffer[] expected"; } - if (message.forThumbnails != null && message.hasOwnProperty("forThumbnails")) + if (message.forThumbnails != null && Object.hasOwnProperty.call(message, "forThumbnails")) if (typeof message.forThumbnails !== "boolean") return "forThumbnails: boolean expected"; - if (message.emergencyAccessAccountOwner != null && message.hasOwnProperty("emergencyAccessAccountOwner")) + if (message.emergencyAccessAccountOwner != null && Object.hasOwnProperty.call(message, "emergencyAccessAccountOwner")) if (!$util.isString(message.emergencyAccessAccountOwner)) return "emergencyAccessAccountOwner: string expected"; return null; @@ -143747,6 +144603,8 @@ export const Records = $root.Records = (() => { FilesGetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FilesGetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FilesGetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -143797,9 +144655,9 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordUids.length; ++j) object.recordUids[j] = options.bytes === String ? $util.base64.encode(message.recordUids[j], 0, message.recordUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUids[j]) : message.recordUids[j]; } - if (message.forThumbnails != null && message.hasOwnProperty("forThumbnails")) + if (message.forThumbnails != null && Object.hasOwnProperty.call(message, "forThumbnails")) object.forThumbnails = message.forThumbnails; - if (message.emergencyAccessAccountOwner != null && message.hasOwnProperty("emergencyAccessAccountOwner")) + if (message.emergencyAccessAccountOwner != null && Object.hasOwnProperty.call(message, "emergencyAccessAccountOwner")) object.emergencyAccessAccountOwner = message.emergencyAccessAccountOwner; return object; }; @@ -143968,7 +144826,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FileGetStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -144054,10 +144912,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -144066,13 +144924,13 @@ export const Records = $root.Records = (() => { case 2: break; } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.successStatusCode != null && message.hasOwnProperty("successStatusCode")) + if (message.successStatusCode != null && Object.hasOwnProperty.call(message, "successStatusCode")) if (!$util.isInteger(message.successStatusCode)) return "successStatusCode: integer expected"; - if (message.fileKeyType != null && message.hasOwnProperty("fileKeyType")) + if (message.fileKeyType != null && Object.hasOwnProperty.call(message, "fileKeyType")) switch (message.fileKeyType) { default: return "fileKeyType: enum value expected"; @@ -144099,6 +144957,8 @@ export const Records = $root.Records = (() => { FileGetStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FileGetStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FileGetStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -144202,15 +145062,15 @@ export const Records = $root.Records = (() => { object.successStatusCode = 0; object.fileKeyType = options.enums === String ? "NO_KEY" : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Records.FileGetResult[message.status] === undefined ? message.status : $root.Records.FileGetResult[message.status] : message.status; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; - if (message.successStatusCode != null && message.hasOwnProperty("successStatusCode")) + if (message.successStatusCode != null && Object.hasOwnProperty.call(message, "successStatusCode")) object.successStatusCode = message.successStatusCode; - if (message.fileKeyType != null && message.hasOwnProperty("fileKeyType")) + if (message.fileKeyType != null && Object.hasOwnProperty.call(message, "fileKeyType")) object.fileKeyType = options.enums === String ? $root.Records.RecordKeyType[message.fileKeyType] === undefined ? message.fileKeyType : $root.Records.RecordKeyType[message.fileKeyType] : message.fileKeyType; return object; }; @@ -144321,7 +145181,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ FilesGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -144393,7 +145253,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.files != null && message.hasOwnProperty("files")) { + if (message.files != null && Object.hasOwnProperty.call(message, "files")) { if (!Array.isArray(message.files)) return "files: array expected"; for (let i = 0; i < message.files.length; ++i) { @@ -144416,6 +145276,8 @@ export const Records = $root.Records = (() => { FilesGetResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.FilesGetResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.FilesGetResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -144426,7 +145288,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.FilesGetResponse.files: array expected"); message.files = []; for (let i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") + if (!$util.isObject(object.files[i])) throw TypeError(".Records.FilesGetResponse.files: object expected"); message.files[i] = $root.Records.FileGetStatus.fromObject(object.files[i], long + 1); } @@ -144609,7 +145471,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ ApplicationAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -144695,19 +145557,19 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appUid != null && message.hasOwnProperty("appUid")) + if (message.appUid != null && Object.hasOwnProperty.call(message, "appUid")) if (!(message.appUid && typeof message.appUid.length === "number" || $util.isString(message.appUid))) return "appUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { let error = $root.Records.RecordAudit.verify(message.audit, long + 1); if (error) return "audit." + error; @@ -144726,6 +145588,8 @@ export const Records = $root.Records = (() => { ApplicationAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.ApplicationAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.ApplicationAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -144756,7 +145620,7 @@ export const Records = $root.Records = (() => { else if (object.data.length >= 0) message.data = object.data; if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".Records.ApplicationAddRequest.audit: object expected"); message.audit = $root.Records.RecordAudit.fromObject(object.audit, long + 1); } @@ -144809,20 +145673,20 @@ export const Records = $root.Records = (() => { } object.audit = null; } - if (message.appUid != null && message.hasOwnProperty("appUid")) + if (message.appUid != null && Object.hasOwnProperty.call(message, "appUid")) object.appUid = options.bytes === String ? $util.base64.encode(message.appUid, 0, message.appUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appUid) : message.appUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = $root.Records.RecordAudit.toObject(message.audit, options, q + 1); return object; }; @@ -144971,7 +145835,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ GetRecordDataWithAccessInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -145051,17 +145915,17 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) { + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) { if (!Array.isArray(message.recordUid)) return "recordUid: array expected"; for (let i = 0; i < message.recordUid.length; ++i) if (!(message.recordUid[i] && typeof message.recordUid[i].length === "number" || $util.isString(message.recordUid[i]))) return "recordUid: buffer[] expected"; } - if (message.recordDetailsInclude != null && message.hasOwnProperty("recordDetailsInclude")) + if (message.recordDetailsInclude != null && Object.hasOwnProperty.call(message, "recordDetailsInclude")) switch (message.recordDetailsInclude) { default: return "recordDetailsInclude: enum value expected"; @@ -145084,6 +145948,8 @@ export const Records = $root.Records = (() => { GetRecordDataWithAccessInfoRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.GetRecordDataWithAccessInfoRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.GetRecordDataWithAccessInfoRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -145158,7 +146024,7 @@ export const Records = $root.Records = (() => { object.clientTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.recordDetailsInclude = options.enums === String ? "DATA_PLUS_SHARE" : 0; } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") @@ -145170,7 +146036,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordUid.length; ++j) object.recordUid[j] = options.bytes === String ? $util.base64.encode(message.recordUid[j], 0, message.recordUid[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid[j]) : message.recordUid[j]; } - if (message.recordDetailsInclude != null && message.hasOwnProperty("recordDetailsInclude")) + if (message.recordDetailsInclude != null && Object.hasOwnProperty.call(message, "recordDetailsInclude")) object.recordDetailsInclude = options.enums === String ? $root.Records.RecordDetailsInclude[message.recordDetailsInclude] === undefined ? message.recordDetailsInclude : $root.Records.RecordDetailsInclude[message.recordDetailsInclude] : message.recordDetailsInclude; return object; }; @@ -145378,7 +146244,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ UserPermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -145484,31 +146350,31 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (typeof message.owner !== "boolean") return "owner: boolean expected"; - if (message.shareAdmin != null && message.hasOwnProperty("shareAdmin")) + if (message.shareAdmin != null && Object.hasOwnProperty.call(message, "shareAdmin")) if (typeof message.shareAdmin !== "boolean") return "shareAdmin: boolean expected"; - if (message.sharable != null && message.hasOwnProperty("sharable")) + if (message.sharable != null && Object.hasOwnProperty.call(message, "sharable")) if (typeof message.sharable !== "boolean") return "sharable: boolean expected"; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) if (typeof message.editable !== "boolean") return "editable: boolean expected"; - if (message.awaitingApproval != null && message.hasOwnProperty("awaitingApproval")) + if (message.awaitingApproval != null && Object.hasOwnProperty.call(message, "awaitingApproval")) if (typeof message.awaitingApproval !== "boolean") return "awaitingApproval: boolean expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -145517,7 +146383,7 @@ export const Records = $root.Records = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -145534,6 +146400,8 @@ export const Records = $root.Records = (() => { UserPermission.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.UserPermission) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.UserPermission: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -145629,30 +146497,30 @@ export const Records = $root.Records = (() => { object.timerNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.shareAdmin != null && message.hasOwnProperty("shareAdmin")) + if (message.shareAdmin != null && Object.hasOwnProperty.call(message, "shareAdmin")) object.shareAdmin = message.shareAdmin; - if (message.sharable != null && message.hasOwnProperty("sharable")) + if (message.sharable != null && Object.hasOwnProperty.call(message, "sharable")) object.sharable = message.sharable; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) object.editable = message.editable; - if (message.awaitingApproval != null && message.hasOwnProperty("awaitingApproval")) + if (message.awaitingApproval != null && Object.hasOwnProperty.call(message, "awaitingApproval")) object.awaitingApproval = message.awaitingApproval; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -145827,7 +146695,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderPermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -145921,22 +146789,22 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.resharable != null && message.hasOwnProperty("resharable")) + if (message.resharable != null && Object.hasOwnProperty.call(message, "resharable")) if (typeof message.resharable !== "boolean") return "resharable: boolean expected"; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) if (typeof message.editable !== "boolean") return "editable: boolean expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -145945,7 +146813,7 @@ export const Records = $root.Records = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -145962,6 +146830,8 @@ export const Records = $root.Records = (() => { SharedFolderPermission.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.SharedFolderPermission) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.SharedFolderPermission: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -146059,29 +146929,29 @@ export const Records = $root.Records = (() => { object.timerNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.resharable != null && message.hasOwnProperty("resharable")) + if (message.resharable != null && Object.hasOwnProperty.call(message, "resharable")) object.resharable = message.resharable; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) object.editable = message.editable; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -146337,7 +147207,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -146463,28 +147333,28 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; - if (message.encryptedRecordData != null && message.hasOwnProperty("encryptedRecordData")) + if (message.encryptedRecordData != null && Object.hasOwnProperty.call(message, "encryptedRecordData")) if (!$util.isString(message.encryptedRecordData)) return "encryptedRecordData: string expected"; - if (message.encryptedExtraData != null && message.hasOwnProperty("encryptedExtraData")) + if (message.encryptedExtraData != null && Object.hasOwnProperty.call(message, "encryptedExtraData")) if (!$util.isString(message.encryptedExtraData)) return "encryptedExtraData: string expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) if (!$util.isString(message.nonSharedData)) return "nonSharedData: string expected"; - if (message.linkedRecordData != null && message.hasOwnProperty("linkedRecordData")) { + if (message.linkedRecordData != null && Object.hasOwnProperty.call(message, "linkedRecordData")) { if (!Array.isArray(message.linkedRecordData)) return "linkedRecordData: array expected"; for (let i = 0; i < message.linkedRecordData.length; ++i) { @@ -146493,20 +147363,20 @@ export const Records = $root.Records = (() => { return "linkedRecordData." + error; } } - if (message.fileId != null && message.hasOwnProperty("fileId")) { + if (message.fileId != null && Object.hasOwnProperty.call(message, "fileId")) { if (!Array.isArray(message.fileId)) return "fileId: array expected"; for (let i = 0; i < message.fileId.length; ++i) if (!(message.fileId[i] && typeof message.fileId[i].length === "number" || $util.isString(message.fileId[i]))) return "fileId: buffer[] expected"; } - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (!$util.isInteger(message.fileSize) && !(message.fileSize && $util.isInteger(message.fileSize.low) && $util.isInteger(message.fileSize.high))) return "fileSize: integer|Long expected"; - if (message.thumbnailSize != null && message.hasOwnProperty("thumbnailSize")) + if (message.thumbnailSize != null && Object.hasOwnProperty.call(message, "thumbnailSize")) if (!$util.isInteger(message.thumbnailSize) && !(message.thumbnailSize && $util.isInteger(message.thumbnailSize.low) && $util.isInteger(message.thumbnailSize.high))) return "thumbnailSize: integer|Long expected"; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) switch (message.recordKeyType) { default: return "recordKeyType: enum value expected"; @@ -146519,10 +147389,10 @@ export const Records = $root.Records = (() => { case 6: break; } - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; return null; @@ -146539,6 +147409,8 @@ export const Records = $root.Records = (() => { RecordData.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordData) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -146577,7 +147449,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordData.linkedRecordData: array expected"); message.linkedRecordData = []; for (let i = 0; i < object.linkedRecordData.length; ++i) { - if (typeof object.linkedRecordData[i] !== "object") + if (!$util.isObject(object.linkedRecordData[i])) throw TypeError(".Records.RecordData.linkedRecordData: object expected"); message.linkedRecordData[i] = $root.Records.RecordData.fromObject(object.linkedRecordData[i], long + 1); } @@ -146722,29 +147594,29 @@ export const Records = $root.Records = (() => { object.recordUid = $util.newBuffer(object.recordUid); } } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; - if (message.encryptedRecordData != null && message.hasOwnProperty("encryptedRecordData")) + if (message.encryptedRecordData != null && Object.hasOwnProperty.call(message, "encryptedRecordData")) object.encryptedRecordData = message.encryptedRecordData; - if (message.encryptedExtraData != null && message.hasOwnProperty("encryptedExtraData")) + if (message.encryptedExtraData != null && Object.hasOwnProperty.call(message, "encryptedExtraData")) object.encryptedExtraData = message.encryptedExtraData; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) object.nonSharedData = message.nonSharedData; if (message.linkedRecordData && message.linkedRecordData.length) { object.linkedRecordData = []; @@ -146756,25 +147628,25 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.fileId.length; ++j) object.fileId[j] = options.bytes === String ? $util.base64.encode(message.fileId[j], 0, message.fileId[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.fileId[j]) : message.fileId[j]; } - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fileSize = typeof message.fileSize === "number" ? BigInt(message.fileSize) : $util.Long.fromBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0, false).toBigInt(); else if (typeof message.fileSize === "number") object.fileSize = options.longs === String ? String(message.fileSize) : message.fileSize; else object.fileSize = options.longs === String ? $util.Long.prototype.toString.call(message.fileSize) : options.longs === Number ? new $util.LongBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0).toNumber() : message.fileSize; - if (message.thumbnailSize != null && message.hasOwnProperty("thumbnailSize")) + if (message.thumbnailSize != null && Object.hasOwnProperty.call(message, "thumbnailSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.thumbnailSize = typeof message.thumbnailSize === "number" ? BigInt(message.thumbnailSize) : $util.Long.fromBits(message.thumbnailSize.low >>> 0, message.thumbnailSize.high >>> 0, false).toBigInt(); else if (typeof message.thumbnailSize === "number") object.thumbnailSize = options.longs === String ? String(message.thumbnailSize) : message.thumbnailSize; else object.thumbnailSize = options.longs === String ? $util.Long.prototype.toString.call(message.thumbnailSize) : options.longs === Number ? new $util.LongBits(message.thumbnailSize.low >>> 0, message.thumbnailSize.high >>> 0).toNumber() : message.thumbnailSize; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) object.recordKeyType = options.enums === String ? $root.Records.RecordKeyType[message.recordKeyType] === undefined ? message.recordKeyType : $root.Records.RecordKeyType[message.recordKeyType] : message.recordKeyType; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; return object; }; @@ -146920,7 +147792,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordDataWithAccessInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -147006,15 +147878,15 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordData != null && message.hasOwnProperty("recordData")) { + if (message.recordData != null && Object.hasOwnProperty.call(message, "recordData")) { let error = $root.Records.RecordData.verify(message.recordData, long + 1); if (error) return "recordData." + error; } - if (message.userPermission != null && message.hasOwnProperty("userPermission")) { + if (message.userPermission != null && Object.hasOwnProperty.call(message, "userPermission")) { if (!Array.isArray(message.userPermission)) return "userPermission: array expected"; for (let i = 0; i < message.userPermission.length; ++i) { @@ -147023,7 +147895,7 @@ export const Records = $root.Records = (() => { return "userPermission." + error; } } - if (message.sharedFolderPermission != null && message.hasOwnProperty("sharedFolderPermission")) { + if (message.sharedFolderPermission != null && Object.hasOwnProperty.call(message, "sharedFolderPermission")) { if (!Array.isArray(message.sharedFolderPermission)) return "sharedFolderPermission: array expected"; for (let i = 0; i < message.sharedFolderPermission.length; ++i) { @@ -147046,6 +147918,8 @@ export const Records = $root.Records = (() => { RecordDataWithAccessInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordDataWithAccessInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordDataWithAccessInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -147057,7 +147931,7 @@ export const Records = $root.Records = (() => { else if (object.recordUid.length >= 0) message.recordUid = object.recordUid; if (object.recordData != null) { - if (typeof object.recordData !== "object") + if (!$util.isObject(object.recordData)) throw TypeError(".Records.RecordDataWithAccessInfo.recordData: object expected"); message.recordData = $root.Records.RecordData.fromObject(object.recordData, long + 1); } @@ -147066,7 +147940,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordDataWithAccessInfo.userPermission: array expected"); message.userPermission = []; for (let i = 0; i < object.userPermission.length; ++i) { - if (typeof object.userPermission[i] !== "object") + if (!$util.isObject(object.userPermission[i])) throw TypeError(".Records.RecordDataWithAccessInfo.userPermission: object expected"); message.userPermission[i] = $root.Records.UserPermission.fromObject(object.userPermission[i], long + 1); } @@ -147076,7 +147950,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordDataWithAccessInfo.sharedFolderPermission: array expected"); message.sharedFolderPermission = []; for (let i = 0; i < object.sharedFolderPermission.length; ++i) { - if (typeof object.sharedFolderPermission[i] !== "object") + if (!$util.isObject(object.sharedFolderPermission[i])) throw TypeError(".Records.RecordDataWithAccessInfo.sharedFolderPermission: object expected"); message.sharedFolderPermission[i] = $root.Records.SharedFolderPermission.fromObject(object.sharedFolderPermission[i], long + 1); } @@ -147115,9 +147989,9 @@ export const Records = $root.Records = (() => { } object.recordData = null; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordData != null && message.hasOwnProperty("recordData")) + if (message.recordData != null && Object.hasOwnProperty.call(message, "recordData")) object.recordData = $root.Records.RecordData.toObject(message.recordData, options, q + 1); if (message.userPermission && message.userPermission.length) { object.userPermission = []; @@ -147251,7 +148125,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ GetRecordDataWithAccessInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -147329,7 +148203,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordDataWithAccessInfo != null && message.hasOwnProperty("recordDataWithAccessInfo")) { + if (message.recordDataWithAccessInfo != null && Object.hasOwnProperty.call(message, "recordDataWithAccessInfo")) { if (!Array.isArray(message.recordDataWithAccessInfo)) return "recordDataWithAccessInfo: array expected"; for (let i = 0; i < message.recordDataWithAccessInfo.length; ++i) { @@ -147338,7 +148212,7 @@ export const Records = $root.Records = (() => { return "recordDataWithAccessInfo." + error; } } - if (message.noPermissionRecordUid != null && message.hasOwnProperty("noPermissionRecordUid")) { + if (message.noPermissionRecordUid != null && Object.hasOwnProperty.call(message, "noPermissionRecordUid")) { if (!Array.isArray(message.noPermissionRecordUid)) return "noPermissionRecordUid: array expected"; for (let i = 0; i < message.noPermissionRecordUid.length; ++i) @@ -147359,6 +148233,8 @@ export const Records = $root.Records = (() => { GetRecordDataWithAccessInfoResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.GetRecordDataWithAccessInfoResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.GetRecordDataWithAccessInfoResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -147369,7 +148245,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetRecordDataWithAccessInfoResponse.recordDataWithAccessInfo: array expected"); message.recordDataWithAccessInfo = []; for (let i = 0; i < object.recordDataWithAccessInfo.length; ++i) { - if (typeof object.recordDataWithAccessInfo[i] !== "object") + if (!$util.isObject(object.recordDataWithAccessInfo[i])) throw TypeError(".Records.GetRecordDataWithAccessInfoResponse.recordDataWithAccessInfo: object expected"); message.recordDataWithAccessInfo[i] = $root.Records.RecordDataWithAccessInfo.fromObject(object.recordDataWithAccessInfo[i], long + 1); } @@ -147563,7 +148439,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ IsObjectShareAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -147641,13 +148517,13 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.isAdmin != null && message.hasOwnProperty("isAdmin")) + if (message.isAdmin != null && Object.hasOwnProperty.call(message, "isAdmin")) if (typeof message.isAdmin !== "boolean") return "isAdmin: boolean expected"; - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) switch (message.objectType) { default: return "objectType: enum value expected"; @@ -147670,6 +148546,8 @@ export const Records = $root.Records = (() => { IsObjectShareAdmin.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.IsObjectShareAdmin) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.IsObjectShareAdmin: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -147733,11 +148611,11 @@ export const Records = $root.Records = (() => { object.isAdmin = false; object.objectType = options.enums === String ? "CHECK_SA_INVALID_TYPE" : 0; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.isAdmin != null && message.hasOwnProperty("isAdmin")) + if (message.isAdmin != null && Object.hasOwnProperty.call(message, "isAdmin")) object.isAdmin = message.isAdmin; - if (message.objectType != null && message.hasOwnProperty("objectType")) + if (message.objectType != null && Object.hasOwnProperty.call(message, "objectType")) object.objectType = options.enums === String ? $root.Records.CheckShareAdminObjectType[message.objectType] === undefined ? message.objectType : $root.Records.CheckShareAdminObjectType[message.objectType] : message.objectType; return object; }; @@ -147848,7 +148726,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ AmIShareAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -147920,7 +148798,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.isObjectShareAdmin != null && message.hasOwnProperty("isObjectShareAdmin")) { + if (message.isObjectShareAdmin != null && Object.hasOwnProperty.call(message, "isObjectShareAdmin")) { if (!Array.isArray(message.isObjectShareAdmin)) return "isObjectShareAdmin: array expected"; for (let i = 0; i < message.isObjectShareAdmin.length; ++i) { @@ -147943,6 +148821,8 @@ export const Records = $root.Records = (() => { AmIShareAdmin.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.AmIShareAdmin) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.AmIShareAdmin: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -147953,7 +148833,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.AmIShareAdmin.isObjectShareAdmin: array expected"); message.isObjectShareAdmin = []; for (let i = 0; i < object.isObjectShareAdmin.length; ++i) { - if (typeof object.isObjectShareAdmin[i] !== "object") + if (!$util.isObject(object.isObjectShareAdmin[i])) throw TypeError(".Records.AmIShareAdmin.isObjectShareAdmin: object expected"); message.isObjectShareAdmin[i] = $root.Records.IsObjectShareAdmin.fromObject(object.isObjectShareAdmin[i], long + 1); } @@ -148131,7 +149011,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordShareUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -148219,7 +149099,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.addSharedRecord != null && message.hasOwnProperty("addSharedRecord")) { + if (message.addSharedRecord != null && Object.hasOwnProperty.call(message, "addSharedRecord")) { if (!Array.isArray(message.addSharedRecord)) return "addSharedRecord: array expected"; for (let i = 0; i < message.addSharedRecord.length; ++i) { @@ -148228,7 +149108,7 @@ export const Records = $root.Records = (() => { return "addSharedRecord." + error; } } - if (message.updateSharedRecord != null && message.hasOwnProperty("updateSharedRecord")) { + if (message.updateSharedRecord != null && Object.hasOwnProperty.call(message, "updateSharedRecord")) { if (!Array.isArray(message.updateSharedRecord)) return "updateSharedRecord: array expected"; for (let i = 0; i < message.updateSharedRecord.length; ++i) { @@ -148237,7 +149117,7 @@ export const Records = $root.Records = (() => { return "updateSharedRecord." + error; } } - if (message.removeSharedRecord != null && message.hasOwnProperty("removeSharedRecord")) { + if (message.removeSharedRecord != null && Object.hasOwnProperty.call(message, "removeSharedRecord")) { if (!Array.isArray(message.removeSharedRecord)) return "removeSharedRecord: array expected"; for (let i = 0; i < message.removeSharedRecord.length; ++i) { @@ -148246,7 +149126,7 @@ export const Records = $root.Records = (() => { return "removeSharedRecord." + error; } } - if (message.pt != null && message.hasOwnProperty("pt")) + if (message.pt != null && Object.hasOwnProperty.call(message, "pt")) if (!$util.isString(message.pt)) return "pt: string expected"; return null; @@ -148263,6 +149143,8 @@ export const Records = $root.Records = (() => { RecordShareUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordShareUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordShareUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -148273,7 +149155,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordShareUpdateRequest.addSharedRecord: array expected"); message.addSharedRecord = []; for (let i = 0; i < object.addSharedRecord.length; ++i) { - if (typeof object.addSharedRecord[i] !== "object") + if (!$util.isObject(object.addSharedRecord[i])) throw TypeError(".Records.RecordShareUpdateRequest.addSharedRecord: object expected"); message.addSharedRecord[i] = $root.Records.SharedRecord.fromObject(object.addSharedRecord[i], long + 1); } @@ -148283,7 +149165,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordShareUpdateRequest.updateSharedRecord: array expected"); message.updateSharedRecord = []; for (let i = 0; i < object.updateSharedRecord.length; ++i) { - if (typeof object.updateSharedRecord[i] !== "object") + if (!$util.isObject(object.updateSharedRecord[i])) throw TypeError(".Records.RecordShareUpdateRequest.updateSharedRecord: object expected"); message.updateSharedRecord[i] = $root.Records.SharedRecord.fromObject(object.updateSharedRecord[i], long + 1); } @@ -148293,7 +149175,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordShareUpdateRequest.removeSharedRecord: array expected"); message.removeSharedRecord = []; for (let i = 0; i < object.removeSharedRecord.length; ++i) { - if (typeof object.removeSharedRecord[i] !== "object") + if (!$util.isObject(object.removeSharedRecord[i])) throw TypeError(".Records.RecordShareUpdateRequest.removeSharedRecord: object expected"); message.removeSharedRecord[i] = $root.Records.SharedRecord.fromObject(object.removeSharedRecord[i], long + 1); } @@ -148342,7 +149224,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.removeSharedRecord.length; ++j) object.removeSharedRecord[j] = $root.Records.SharedRecord.toObject(message.removeSharedRecord[j], options, q + 1); } - if (message.pt != null && message.hasOwnProperty("pt")) + if (message.pt != null && Object.hasOwnProperty.call(message, "pt")) object.pt = message.pt; return object; }; @@ -148583,7 +149465,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ SharedRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -148701,40 +149583,40 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.toUsername != null && message.hasOwnProperty("toUsername")) + if (message.toUsername != null && Object.hasOwnProperty.call(message, "toUsername")) if (!$util.isString(message.toUsername)) return "toUsername: string expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) if (typeof message.editable !== "boolean") return "editable: boolean expected"; - if (message.shareable != null && message.hasOwnProperty("shareable")) + if (message.shareable != null && Object.hasOwnProperty.call(message, "shareable")) if (typeof message.shareable !== "boolean") return "shareable: boolean expected"; - if (message.transfer != null && message.hasOwnProperty("transfer")) + if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer")) if (typeof message.transfer !== "boolean") return "transfer: boolean expected"; - if (message.useEccKey != null && message.hasOwnProperty("useEccKey")) + if (message.useEccKey != null && Object.hasOwnProperty.call(message, "useEccKey")) if (typeof message.useEccKey !== "boolean") return "useEccKey: boolean expected"; - if (message.removeVaultData != null && message.hasOwnProperty("removeVaultData")) + if (message.removeVaultData != null && Object.hasOwnProperty.call(message, "removeVaultData")) if (typeof message.removeVaultData !== "boolean") return "removeVaultData: boolean expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -148743,7 +149625,7 @@ export const Records = $root.Records = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -148760,6 +149642,8 @@ export const Records = $root.Records = (() => { SharedRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.SharedRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.SharedRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -148891,36 +149775,36 @@ export const Records = $root.Records = (() => { object.timerNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.toUsername != null && message.hasOwnProperty("toUsername")) + if (message.toUsername != null && Object.hasOwnProperty.call(message, "toUsername")) object.toUsername = message.toUsername; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) object.editable = message.editable; - if (message.shareable != null && message.hasOwnProperty("shareable")) + if (message.shareable != null && Object.hasOwnProperty.call(message, "shareable")) object.shareable = message.shareable; - if (message.transfer != null && message.hasOwnProperty("transfer")) + if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer")) object.transfer = message.transfer; - if (message.useEccKey != null && message.hasOwnProperty("useEccKey")) + if (message.useEccKey != null && Object.hasOwnProperty.call(message, "useEccKey")) object.useEccKey = message.useEccKey; - if (message.removeVaultData != null && message.hasOwnProperty("removeVaultData")) + if (message.removeVaultData != null && Object.hasOwnProperty.call(message, "removeVaultData")) object.removeVaultData = message.removeVaultData; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -149057,7 +149941,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordShareUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -149141,7 +150025,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.addSharedRecordStatus != null && message.hasOwnProperty("addSharedRecordStatus")) { + if (message.addSharedRecordStatus != null && Object.hasOwnProperty.call(message, "addSharedRecordStatus")) { if (!Array.isArray(message.addSharedRecordStatus)) return "addSharedRecordStatus: array expected"; for (let i = 0; i < message.addSharedRecordStatus.length; ++i) { @@ -149150,7 +150034,7 @@ export const Records = $root.Records = (() => { return "addSharedRecordStatus." + error; } } - if (message.updateSharedRecordStatus != null && message.hasOwnProperty("updateSharedRecordStatus")) { + if (message.updateSharedRecordStatus != null && Object.hasOwnProperty.call(message, "updateSharedRecordStatus")) { if (!Array.isArray(message.updateSharedRecordStatus)) return "updateSharedRecordStatus: array expected"; for (let i = 0; i < message.updateSharedRecordStatus.length; ++i) { @@ -149159,7 +150043,7 @@ export const Records = $root.Records = (() => { return "updateSharedRecordStatus." + error; } } - if (message.removeSharedRecordStatus != null && message.hasOwnProperty("removeSharedRecordStatus")) { + if (message.removeSharedRecordStatus != null && Object.hasOwnProperty.call(message, "removeSharedRecordStatus")) { if (!Array.isArray(message.removeSharedRecordStatus)) return "removeSharedRecordStatus: array expected"; for (let i = 0; i < message.removeSharedRecordStatus.length; ++i) { @@ -149182,6 +150066,8 @@ export const Records = $root.Records = (() => { RecordShareUpdateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordShareUpdateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordShareUpdateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -149192,7 +150078,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordShareUpdateResponse.addSharedRecordStatus: array expected"); message.addSharedRecordStatus = []; for (let i = 0; i < object.addSharedRecordStatus.length; ++i) { - if (typeof object.addSharedRecordStatus[i] !== "object") + if (!$util.isObject(object.addSharedRecordStatus[i])) throw TypeError(".Records.RecordShareUpdateResponse.addSharedRecordStatus: object expected"); message.addSharedRecordStatus[i] = $root.Records.SharedRecordStatus.fromObject(object.addSharedRecordStatus[i], long + 1); } @@ -149202,7 +150088,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordShareUpdateResponse.updateSharedRecordStatus: array expected"); message.updateSharedRecordStatus = []; for (let i = 0; i < object.updateSharedRecordStatus.length; ++i) { - if (typeof object.updateSharedRecordStatus[i] !== "object") + if (!$util.isObject(object.updateSharedRecordStatus[i])) throw TypeError(".Records.RecordShareUpdateResponse.updateSharedRecordStatus: object expected"); message.updateSharedRecordStatus[i] = $root.Records.SharedRecordStatus.fromObject(object.updateSharedRecordStatus[i], long + 1); } @@ -149212,7 +150098,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordShareUpdateResponse.removeSharedRecordStatus: array expected"); message.removeSharedRecordStatus = []; for (let i = 0; i < object.removeSharedRecordStatus.length; ++i) { - if (typeof object.removeSharedRecordStatus[i] !== "object") + if (!$util.isObject(object.removeSharedRecordStatus[i])) throw TypeError(".Records.RecordShareUpdateResponse.removeSharedRecordStatus: object expected"); message.removeSharedRecordStatus[i] = $root.Records.SharedRecordStatus.fromObject(object.removeSharedRecordStatus[i], long + 1); } @@ -149397,7 +150283,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ SharedRecordStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -149479,16 +150365,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -149505,6 +150391,8 @@ export const Records = $root.Records = (() => { SharedRecordStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.SharedRecordStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.SharedRecordStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -149553,13 +150441,13 @@ export const Records = $root.Records = (() => { object.message = ""; object.username = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -149681,7 +150569,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ GetRecordPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -149757,14 +150645,14 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) if (!(message.recordUids[i] && typeof message.recordUids[i].length === "number" || $util.isString(message.recordUids[i]))) return "recordUids: buffer[] expected"; } - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) if (typeof message.isShareAdmin !== "boolean") return "isShareAdmin: boolean expected"; return null; @@ -149781,6 +150669,8 @@ export const Records = $root.Records = (() => { GetRecordPermissionsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.GetRecordPermissionsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.GetRecordPermissionsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -149827,7 +150717,7 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordUids.length; ++j) object.recordUids[j] = options.bytes === String ? $util.base64.encode(message.recordUids[j], 0, message.recordUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUids[j]) : message.recordUids[j]; } - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) object.isShareAdmin = message.isShareAdmin; return object; }; @@ -149938,7 +150828,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ GetRecordPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -150010,7 +150900,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordPermissions != null && message.hasOwnProperty("recordPermissions")) { + if (message.recordPermissions != null && Object.hasOwnProperty.call(message, "recordPermissions")) { if (!Array.isArray(message.recordPermissions)) return "recordPermissions: array expected"; for (let i = 0; i < message.recordPermissions.length; ++i) { @@ -150033,6 +150923,8 @@ export const Records = $root.Records = (() => { GetRecordPermissionsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.GetRecordPermissionsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.GetRecordPermissionsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -150043,7 +150935,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetRecordPermissionsResponse.recordPermissions: array expected"); message.recordPermissions = []; for (let i = 0; i < object.recordPermissions.length; ++i) { - if (typeof object.recordPermissions[i] !== "object") + if (!$util.isObject(object.recordPermissions[i])) throw TypeError(".Records.GetRecordPermissionsResponse.recordPermissions: object expected"); message.recordPermissions[i] = $root.Records.RecordPermission.fromObject(object.recordPermissions[i], long + 1); } @@ -150226,7 +151118,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordPermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -150312,19 +151204,19 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (typeof message.owner !== "boolean") return "owner: boolean expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) if (typeof message.canShare !== "boolean") return "canShare: boolean expected"; - if (message.canTransfer != null && message.hasOwnProperty("canTransfer")) + if (message.canTransfer != null && Object.hasOwnProperty.call(message, "canTransfer")) if (typeof message.canTransfer !== "boolean") return "canTransfer: boolean expected"; return null; @@ -150341,6 +151233,8 @@ export const Records = $root.Records = (() => { RecordPermission.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordPermission) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordPermission: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -150392,15 +151286,15 @@ export const Records = $root.Records = (() => { object.canShare = false; object.canTransfer = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) object.canShare = message.canShare; - if (message.canTransfer != null && message.hasOwnProperty("canTransfer")) + if (message.canTransfer != null && Object.hasOwnProperty.call(message, "canTransfer")) object.canTransfer = message.canTransfer; return object; }; @@ -150542,7 +151436,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ GetShareObjectsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -150624,16 +151518,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startWith != null && message.hasOwnProperty("startWith")) + if (message.startWith != null && Object.hasOwnProperty.call(message, "startWith")) if (!$util.isString(message.startWith)) return "startWith: string expected"; - if (message.contains != null && message.hasOwnProperty("contains")) + if (message.contains != null && Object.hasOwnProperty.call(message, "contains")) if (!$util.isString(message.contains)) return "contains: string expected"; - if (message.filtered != null && message.hasOwnProperty("filtered")) + if (message.filtered != null && Object.hasOwnProperty.call(message, "filtered")) if (typeof message.filtered !== "boolean") return "filtered: boolean expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; return null; @@ -150650,6 +151544,8 @@ export const Records = $root.Records = (() => { GetShareObjectsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.GetShareObjectsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.GetShareObjectsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -150698,13 +151594,13 @@ export const Records = $root.Records = (() => { object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } } - if (message.startWith != null && message.hasOwnProperty("startWith")) + if (message.startWith != null && Object.hasOwnProperty.call(message, "startWith")) object.startWith = message.startWith; - if (message.contains != null && message.hasOwnProperty("contains")) + if (message.contains != null && Object.hasOwnProperty.call(message, "contains")) object.contains = message.contains; - if (message.filtered != null && message.hasOwnProperty("filtered")) + if (message.filtered != null && Object.hasOwnProperty.call(message, "filtered")) object.filtered = message.filtered; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; return object; }; @@ -150893,7 +151789,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ GetShareObjectsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -151001,7 +151897,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.shareRelationships != null && message.hasOwnProperty("shareRelationships")) { + if (message.shareRelationships != null && Object.hasOwnProperty.call(message, "shareRelationships")) { if (!Array.isArray(message.shareRelationships)) return "shareRelationships: array expected"; for (let i = 0; i < message.shareRelationships.length; ++i) { @@ -151010,7 +151906,7 @@ export const Records = $root.Records = (() => { return "shareRelationships." + error; } } - if (message.shareFamilyUsers != null && message.hasOwnProperty("shareFamilyUsers")) { + if (message.shareFamilyUsers != null && Object.hasOwnProperty.call(message, "shareFamilyUsers")) { if (!Array.isArray(message.shareFamilyUsers)) return "shareFamilyUsers: array expected"; for (let i = 0; i < message.shareFamilyUsers.length; ++i) { @@ -151019,7 +151915,7 @@ export const Records = $root.Records = (() => { return "shareFamilyUsers." + error; } } - if (message.shareEnterpriseUsers != null && message.hasOwnProperty("shareEnterpriseUsers")) { + if (message.shareEnterpriseUsers != null && Object.hasOwnProperty.call(message, "shareEnterpriseUsers")) { if (!Array.isArray(message.shareEnterpriseUsers)) return "shareEnterpriseUsers: array expected"; for (let i = 0; i < message.shareEnterpriseUsers.length; ++i) { @@ -151028,7 +151924,7 @@ export const Records = $root.Records = (() => { return "shareEnterpriseUsers." + error; } } - if (message.shareTeams != null && message.hasOwnProperty("shareTeams")) { + if (message.shareTeams != null && Object.hasOwnProperty.call(message, "shareTeams")) { if (!Array.isArray(message.shareTeams)) return "shareTeams: array expected"; for (let i = 0; i < message.shareTeams.length; ++i) { @@ -151037,7 +151933,7 @@ export const Records = $root.Records = (() => { return "shareTeams." + error; } } - if (message.shareMCTeams != null && message.hasOwnProperty("shareMCTeams")) { + if (message.shareMCTeams != null && Object.hasOwnProperty.call(message, "shareMCTeams")) { if (!Array.isArray(message.shareMCTeams)) return "shareMCTeams: array expected"; for (let i = 0; i < message.shareMCTeams.length; ++i) { @@ -151046,7 +151942,7 @@ export const Records = $root.Records = (() => { return "shareMCTeams." + error; } } - if (message.shareMCEnterpriseUsers != null && message.hasOwnProperty("shareMCEnterpriseUsers")) { + if (message.shareMCEnterpriseUsers != null && Object.hasOwnProperty.call(message, "shareMCEnterpriseUsers")) { if (!Array.isArray(message.shareMCEnterpriseUsers)) return "shareMCEnterpriseUsers: array expected"; for (let i = 0; i < message.shareMCEnterpriseUsers.length; ++i) { @@ -151055,7 +151951,7 @@ export const Records = $root.Records = (() => { return "shareMCEnterpriseUsers." + error; } } - if (message.shareEnterpriseNames != null && message.hasOwnProperty("shareEnterpriseNames")) { + if (message.shareEnterpriseNames != null && Object.hasOwnProperty.call(message, "shareEnterpriseNames")) { if (!Array.isArray(message.shareEnterpriseNames)) return "shareEnterpriseNames: array expected"; for (let i = 0; i < message.shareEnterpriseNames.length; ++i) { @@ -151078,6 +151974,8 @@ export const Records = $root.Records = (() => { GetShareObjectsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.GetShareObjectsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.GetShareObjectsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -151088,7 +151986,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareRelationships: array expected"); message.shareRelationships = []; for (let i = 0; i < object.shareRelationships.length; ++i) { - if (typeof object.shareRelationships[i] !== "object") + if (!$util.isObject(object.shareRelationships[i])) throw TypeError(".Records.GetShareObjectsResponse.shareRelationships: object expected"); message.shareRelationships[i] = $root.Records.ShareUser.fromObject(object.shareRelationships[i], long + 1); } @@ -151098,7 +151996,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareFamilyUsers: array expected"); message.shareFamilyUsers = []; for (let i = 0; i < object.shareFamilyUsers.length; ++i) { - if (typeof object.shareFamilyUsers[i] !== "object") + if (!$util.isObject(object.shareFamilyUsers[i])) throw TypeError(".Records.GetShareObjectsResponse.shareFamilyUsers: object expected"); message.shareFamilyUsers[i] = $root.Records.ShareUser.fromObject(object.shareFamilyUsers[i], long + 1); } @@ -151108,7 +152006,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareEnterpriseUsers: array expected"); message.shareEnterpriseUsers = []; for (let i = 0; i < object.shareEnterpriseUsers.length; ++i) { - if (typeof object.shareEnterpriseUsers[i] !== "object") + if (!$util.isObject(object.shareEnterpriseUsers[i])) throw TypeError(".Records.GetShareObjectsResponse.shareEnterpriseUsers: object expected"); message.shareEnterpriseUsers[i] = $root.Records.ShareUser.fromObject(object.shareEnterpriseUsers[i], long + 1); } @@ -151118,7 +152016,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareTeams: array expected"); message.shareTeams = []; for (let i = 0; i < object.shareTeams.length; ++i) { - if (typeof object.shareTeams[i] !== "object") + if (!$util.isObject(object.shareTeams[i])) throw TypeError(".Records.GetShareObjectsResponse.shareTeams: object expected"); message.shareTeams[i] = $root.Records.ShareTeam.fromObject(object.shareTeams[i], long + 1); } @@ -151128,7 +152026,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareMCTeams: array expected"); message.shareMCTeams = []; for (let i = 0; i < object.shareMCTeams.length; ++i) { - if (typeof object.shareMCTeams[i] !== "object") + if (!$util.isObject(object.shareMCTeams[i])) throw TypeError(".Records.GetShareObjectsResponse.shareMCTeams: object expected"); message.shareMCTeams[i] = $root.Records.ShareTeam.fromObject(object.shareMCTeams[i], long + 1); } @@ -151138,7 +152036,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareMCEnterpriseUsers: array expected"); message.shareMCEnterpriseUsers = []; for (let i = 0; i < object.shareMCEnterpriseUsers.length; ++i) { - if (typeof object.shareMCEnterpriseUsers[i] !== "object") + if (!$util.isObject(object.shareMCEnterpriseUsers[i])) throw TypeError(".Records.GetShareObjectsResponse.shareMCEnterpriseUsers: object expected"); message.shareMCEnterpriseUsers[i] = $root.Records.ShareUser.fromObject(object.shareMCEnterpriseUsers[i], long + 1); } @@ -151148,7 +152046,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.GetShareObjectsResponse.shareEnterpriseNames: array expected"); message.shareEnterpriseNames = []; for (let i = 0; i < object.shareEnterpriseNames.length; ++i) { - if (typeof object.shareEnterpriseNames[i] !== "object") + if (!$util.isObject(object.shareEnterpriseNames[i])) throw TypeError(".Records.GetShareObjectsResponse.shareEnterpriseNames: object expected"); message.shareEnterpriseNames[i] = $root.Records.ShareEnterprise.fromObject(object.shareEnterpriseNames[i], long + 1); } @@ -151390,7 +152288,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ ShareUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -151484,16 +152382,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.fullname != null && message.hasOwnProperty("fullname")) + if (message.fullname != null && Object.hasOwnProperty.call(message, "fullname")) if (!$util.isString(message.fullname)) return "fullname: string expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -151502,13 +152400,13 @@ export const Records = $root.Records = (() => { case 2: break; } - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) if (typeof message.isShareAdmin !== "boolean") return "isShareAdmin: boolean expected"; - if (message.isAdminOfSharedFolderOwner != null && message.hasOwnProperty("isAdminOfSharedFolderOwner")) + if (message.isAdminOfSharedFolderOwner != null && Object.hasOwnProperty.call(message, "isAdminOfSharedFolderOwner")) if (typeof message.isAdminOfSharedFolderOwner !== "boolean") return "isAdminOfSharedFolderOwner: boolean expected"; - if (message.userAccountUid != null && message.hasOwnProperty("userAccountUid")) + if (message.userAccountUid != null && Object.hasOwnProperty.call(message, "userAccountUid")) if (!(message.userAccountUid && typeof message.userAccountUid.length === "number" || $util.isString(message.userAccountUid))) return "userAccountUid: buffer expected"; return null; @@ -151525,6 +152423,8 @@ export const Records = $root.Records = (() => { ShareUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.ShareUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.ShareUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -151600,19 +152500,19 @@ export const Records = $root.Records = (() => { object.userAccountUid = $util.newBuffer(object.userAccountUid); } } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.fullname != null && message.hasOwnProperty("fullname")) + if (message.fullname != null && Object.hasOwnProperty.call(message, "fullname")) object.fullname = message.fullname; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Records.ShareStatus[message.status] === undefined ? message.status : $root.Records.ShareStatus[message.status] : message.status; - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) object.isShareAdmin = message.isShareAdmin; - if (message.isAdminOfSharedFolderOwner != null && message.hasOwnProperty("isAdminOfSharedFolderOwner")) + if (message.isAdminOfSharedFolderOwner != null && Object.hasOwnProperty.call(message, "isAdminOfSharedFolderOwner")) object.isAdminOfSharedFolderOwner = message.isAdminOfSharedFolderOwner; - if (message.userAccountUid != null && message.hasOwnProperty("userAccountUid")) + if (message.userAccountUid != null && Object.hasOwnProperty.call(message, "userAccountUid")) object.userAccountUid = options.bytes === String ? $util.base64.encode(message.userAccountUid, 0, message.userAccountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.userAccountUid) : message.userAccountUid; return object; }; @@ -151743,7 +152643,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ ShareTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -151821,13 +152721,13 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamname != null && message.hasOwnProperty("teamname")) + if (message.teamname != null && Object.hasOwnProperty.call(message, "teamname")) if (!$util.isString(message.teamname)) return "teamname: string expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; return null; @@ -151844,6 +152744,8 @@ export const Records = $root.Records = (() => { ShareTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.ShareTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.ShareTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -151889,11 +152791,11 @@ export const Records = $root.Records = (() => { object.teamUid = $util.newBuffer(object.teamUid); } } - if (message.teamname != null && message.hasOwnProperty("teamname")) + if (message.teamname != null && Object.hasOwnProperty.call(message, "teamname")) object.teamname = message.teamname; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; return object; }; @@ -152013,7 +152915,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ ShareEnterprise.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -152087,10 +152989,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterprisename != null && message.hasOwnProperty("enterprisename")) + if (message.enterprisename != null && Object.hasOwnProperty.call(message, "enterprisename")) if (!$util.isString(message.enterprisename)) return "enterprisename: string expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; return null; @@ -152107,6 +153009,8 @@ export const Records = $root.Records = (() => { ShareEnterprise.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.ShareEnterprise) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.ShareEnterprise: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -152140,9 +153044,9 @@ export const Records = $root.Records = (() => { object.enterprisename = ""; object.enterpriseId = 0; } - if (message.enterprisename != null && message.hasOwnProperty("enterprisename")) + if (message.enterprisename != null && Object.hasOwnProperty.call(message, "enterprisename")) object.enterprisename = message.enterprisename; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; return object; }; @@ -152269,7 +153173,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsOnwershipTransferRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -152341,7 +153245,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transferRecords != null && message.hasOwnProperty("transferRecords")) { + if (message.transferRecords != null && Object.hasOwnProperty.call(message, "transferRecords")) { if (!Array.isArray(message.transferRecords)) return "transferRecords: array expected"; for (let i = 0; i < message.transferRecords.length; ++i) { @@ -152364,6 +153268,8 @@ export const Records = $root.Records = (() => { RecordsOnwershipTransferRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsOnwershipTransferRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsOnwershipTransferRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -152374,7 +153280,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsOnwershipTransferRequest.transferRecords: array expected"); message.transferRecords = []; for (let i = 0; i < object.transferRecords.length; ++i) { - if (typeof object.transferRecords[i] !== "object") + if (!$util.isObject(object.transferRecords[i])) throw TypeError(".Records.RecordsOnwershipTransferRequest.transferRecords: object expected"); message.transferRecords[i] = $root.Records.TransferRecord.fromObject(object.transferRecords[i], long + 1); } @@ -152546,7 +153452,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ TransferRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -152628,16 +153534,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.useEccKey != null && message.hasOwnProperty("useEccKey")) + if (message.useEccKey != null && Object.hasOwnProperty.call(message, "useEccKey")) if (typeof message.useEccKey !== "boolean") return "useEccKey: boolean expected"; return null; @@ -152654,6 +153560,8 @@ export const Records = $root.Records = (() => { TransferRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.TransferRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.TransferRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -152711,13 +153619,13 @@ export const Records = $root.Records = (() => { } object.useEccKey = false; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.useEccKey != null && message.hasOwnProperty("useEccKey")) + if (message.useEccKey != null && Object.hasOwnProperty.call(message, "useEccKey")) object.useEccKey = message.useEccKey; return object; }; @@ -152828,7 +153736,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsOnwershipTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -152900,7 +153808,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transferRecordStatus != null && message.hasOwnProperty("transferRecordStatus")) { + if (message.transferRecordStatus != null && Object.hasOwnProperty.call(message, "transferRecordStatus")) { if (!Array.isArray(message.transferRecordStatus)) return "transferRecordStatus: array expected"; for (let i = 0; i < message.transferRecordStatus.length; ++i) { @@ -152923,6 +153831,8 @@ export const Records = $root.Records = (() => { RecordsOnwershipTransferResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsOnwershipTransferResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsOnwershipTransferResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -152933,7 +153843,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsOnwershipTransferResponse.transferRecordStatus: array expected"); message.transferRecordStatus = []; for (let i = 0; i < object.transferRecordStatus.length; ++i) { - if (typeof object.transferRecordStatus[i] !== "object") + if (!$util.isObject(object.transferRecordStatus[i])) throw TypeError(".Records.RecordsOnwershipTransferResponse.transferRecordStatus: object expected"); message.transferRecordStatus[i] = $root.Records.TransferRecordStatus.fromObject(object.transferRecordStatus[i], long + 1); } @@ -153105,7 +154015,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ TransferRecordStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -153187,16 +154097,16 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -153213,6 +154123,8 @@ export const Records = $root.Records = (() => { TransferRecordStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.TransferRecordStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.TransferRecordStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -153261,13 +154173,13 @@ export const Records = $root.Records = (() => { object.status = ""; object.message = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -153391,7 +154303,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUnshareRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -153469,7 +154381,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolders != null && message.hasOwnProperty("sharedFolders")) { + if (message.sharedFolders != null && Object.hasOwnProperty.call(message, "sharedFolders")) { if (!Array.isArray(message.sharedFolders)) return "sharedFolders: array expected"; for (let i = 0; i < message.sharedFolders.length; ++i) { @@ -153478,7 +154390,7 @@ export const Records = $root.Records = (() => { return "sharedFolders." + error; } } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -153501,6 +154413,8 @@ export const Records = $root.Records = (() => { RecordsUnshareRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUnshareRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUnshareRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -153511,7 +154425,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsUnshareRequest.sharedFolders: array expected"); message.sharedFolders = []; for (let i = 0; i < object.sharedFolders.length; ++i) { - if (typeof object.sharedFolders[i] !== "object") + if (!$util.isObject(object.sharedFolders[i])) throw TypeError(".Records.RecordsUnshareRequest.sharedFolders: object expected"); message.sharedFolders[i] = $root.Records.RecordsUnshareFolder.fromObject(object.sharedFolders[i], long + 1); } @@ -153521,7 +154435,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsUnshareRequest.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Records.RecordsUnshareRequest.users: object expected"); message.users[i] = $root.Records.RecordsUnshareUser.fromObject(object.users[i], long + 1); } @@ -153682,7 +154596,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUnshareResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -153760,7 +154674,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolders != null && message.hasOwnProperty("sharedFolders")) { + if (message.sharedFolders != null && Object.hasOwnProperty.call(message, "sharedFolders")) { if (!Array.isArray(message.sharedFolders)) return "sharedFolders: array expected"; for (let i = 0; i < message.sharedFolders.length; ++i) { @@ -153769,7 +154683,7 @@ export const Records = $root.Records = (() => { return "sharedFolders." + error; } } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -153792,6 +154706,8 @@ export const Records = $root.Records = (() => { RecordsUnshareResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUnshareResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUnshareResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -153802,7 +154718,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsUnshareResponse.sharedFolders: array expected"); message.sharedFolders = []; for (let i = 0; i < object.sharedFolders.length; ++i) { - if (typeof object.sharedFolders[i] !== "object") + if (!$util.isObject(object.sharedFolders[i])) throw TypeError(".Records.RecordsUnshareResponse.sharedFolders: object expected"); message.sharedFolders[i] = $root.Records.RecordsUnshareFolderStatus.fromObject(object.sharedFolders[i], long + 1); } @@ -153812,7 +154728,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.RecordsUnshareResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Records.RecordsUnshareResponse.users: object expected"); message.users[i] = $root.Records.RecordsUnshareUserStatus.fromObject(object.users[i], long + 1); } @@ -153969,7 +154885,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUnshareFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -154043,10 +154959,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; return null; @@ -154063,6 +154979,8 @@ export const Records = $root.Records = (() => { RecordsUnshareFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUnshareFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUnshareFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -154114,9 +155032,9 @@ export const Records = $root.Records = (() => { object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; return object; }; @@ -154236,7 +155154,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUnshareUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -154310,10 +155228,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; return null; @@ -154330,6 +155248,8 @@ export const Records = $root.Records = (() => { RecordsUnshareUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUnshareUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUnshareUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -154381,9 +155301,9 @@ export const Records = $root.Records = (() => { object.accountUid = $util.newBuffer(object.accountUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; return object; }; @@ -154503,7 +155423,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUnshareFolderStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -154577,10 +155497,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; return null; @@ -154597,6 +155517,8 @@ export const Records = $root.Records = (() => { RecordsUnshareFolderStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUnshareFolderStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUnshareFolderStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -154648,9 +155570,9 @@ export const Records = $root.Records = (() => { object.sharedFolderUid = $util.newBuffer(object.sharedFolderUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; return object; }; @@ -154770,7 +155692,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ RecordsUnshareUserStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -154844,10 +155766,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; return null; @@ -154864,6 +155786,8 @@ export const Records = $root.Records = (() => { RecordsUnshareUserStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.RecordsUnshareUserStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.RecordsUnshareUserStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -154915,9 +155839,9 @@ export const Records = $root.Records = (() => { object.accountUid = $util.newBuffer(object.accountUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; return object; }; @@ -155086,7 +156010,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ TimedAccessCallbackPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -155156,7 +156080,7 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.timeLimitedAccessType != null && message.hasOwnProperty("timeLimitedAccessType")) + if (message.timeLimitedAccessType != null && Object.hasOwnProperty.call(message, "timeLimitedAccessType")) switch (message.timeLimitedAccessType) { default: return "timeLimitedAccessType: enum value expected"; @@ -155186,6 +156110,8 @@ export const Records = $root.Records = (() => { TimedAccessCallbackPayload.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.TimedAccessCallbackPayload) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.TimedAccessCallbackPayload: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -155261,7 +156187,7 @@ export const Records = $root.Records = (() => { let object = {}; if (options.defaults) object.timeLimitedAccessType = options.enums === String ? "INVALID_TIME_LIMITED_ACCESS_TYPE" : 0; - if (message.timeLimitedAccessType != null && message.hasOwnProperty("timeLimitedAccessType")) + if (message.timeLimitedAccessType != null && Object.hasOwnProperty.call(message, "timeLimitedAccessType")) object.timeLimitedAccessType = options.enums === String ? $root.Records.TimeLimitedAccessType[message.timeLimitedAccessType] === undefined ? message.timeLimitedAccessType : $root.Records.TimeLimitedAccessType[message.timeLimitedAccessType] : message.timeLimitedAccessType; return object; }; @@ -155442,7 +156368,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ TimeLimitedAccessRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -155542,31 +156468,31 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) { + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) { if (!Array.isArray(message.accountUid)) return "accountUid: array expected"; for (let i = 0; i < message.accountUid.length; ++i) if (!(message.accountUid[i] && typeof message.accountUid[i].length === "number" || $util.isString(message.accountUid[i]))) return "accountUid: buffer[] expected"; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) { + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) { if (!Array.isArray(message.teamUid)) return "teamUid: array expected"; for (let i = 0; i < message.teamUid.length; ++i) if (!(message.teamUid[i] && typeof message.teamUid[i].length === "number" || $util.isString(message.teamUid[i]))) return "teamUid: buffer[] expected"; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) { + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) { if (!Array.isArray(message.recordUid)) return "recordUid: array expected"; for (let i = 0; i < message.recordUid.length; ++i) if (!(message.recordUid[i] && typeof message.recordUid[i].length === "number" || $util.isString(message.recordUid[i]))) return "recordUid: buffer[] expected"; } - if (message.sharedObjectUid != null && message.hasOwnProperty("sharedObjectUid")) + if (message.sharedObjectUid != null && Object.hasOwnProperty.call(message, "sharedObjectUid")) if (!(message.sharedObjectUid && typeof message.sharedObjectUid.length === "number" || $util.isString(message.sharedObjectUid))) return "sharedObjectUid: buffer expected"; - if (message.timeLimitedAccessType != null && message.hasOwnProperty("timeLimitedAccessType")) + if (message.timeLimitedAccessType != null && Object.hasOwnProperty.call(message, "timeLimitedAccessType")) switch (message.timeLimitedAccessType) { default: return "timeLimitedAccessType: enum value expected"; @@ -155582,10 +156508,10 @@ export const Records = $root.Records = (() => { case 9: break; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -155608,6 +156534,8 @@ export const Records = $root.Records = (() => { TimeLimitedAccessRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.TimeLimitedAccessRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.TimeLimitedAccessRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -155781,18 +156709,18 @@ export const Records = $root.Records = (() => { for (let j = 0; j < message.recordUid.length; ++j) object.recordUid[j] = options.bytes === String ? $util.base64.encode(message.recordUid[j], 0, message.recordUid[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid[j]) : message.recordUid[j]; } - if (message.sharedObjectUid != null && message.hasOwnProperty("sharedObjectUid")) + if (message.sharedObjectUid != null && Object.hasOwnProperty.call(message, "sharedObjectUid")) object.sharedObjectUid = options.bytes === String ? $util.base64.encode(message.sharedObjectUid, 0, message.sharedObjectUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedObjectUid) : message.sharedObjectUid; - if (message.timeLimitedAccessType != null && message.hasOwnProperty("timeLimitedAccessType")) + if (message.timeLimitedAccessType != null && Object.hasOwnProperty.call(message, "timeLimitedAccessType")) object.timeLimitedAccessType = options.enums === String ? $root.Records.TimeLimitedAccessType[message.timeLimitedAccessType] === undefined ? message.timeLimitedAccessType : $root.Records.TimeLimitedAccessType[message.timeLimitedAccessType] : message.timeLimitedAccessType; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.Records.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; return object; }; @@ -155912,7 +156840,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ TimeLimitedAccessStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -155986,10 +156914,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -156006,6 +156934,8 @@ export const Records = $root.Records = (() => { TimeLimitedAccessStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.TimeLimitedAccessStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.TimeLimitedAccessStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -156048,9 +156978,9 @@ export const Records = $root.Records = (() => { } object.message = ""; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -156198,7 +157128,7 @@ export const Records = $root.Records = (() => { * @returns {$protobuf.Writer} Writer */ TimeLimitedAccessResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -156286,10 +157216,10 @@ export const Records = $root.Records = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.userAccessStatus != null && message.hasOwnProperty("userAccessStatus")) { + if (message.userAccessStatus != null && Object.hasOwnProperty.call(message, "userAccessStatus")) { if (!Array.isArray(message.userAccessStatus)) return "userAccessStatus: array expected"; for (let i = 0; i < message.userAccessStatus.length; ++i) { @@ -156298,7 +157228,7 @@ export const Records = $root.Records = (() => { return "userAccessStatus." + error; } } - if (message.teamAccessStatus != null && message.hasOwnProperty("teamAccessStatus")) { + if (message.teamAccessStatus != null && Object.hasOwnProperty.call(message, "teamAccessStatus")) { if (!Array.isArray(message.teamAccessStatus)) return "teamAccessStatus: array expected"; for (let i = 0; i < message.teamAccessStatus.length; ++i) { @@ -156307,7 +157237,7 @@ export const Records = $root.Records = (() => { return "teamAccessStatus." + error; } } - if (message.recordAccessStatus != null && message.hasOwnProperty("recordAccessStatus")) { + if (message.recordAccessStatus != null && Object.hasOwnProperty.call(message, "recordAccessStatus")) { if (!Array.isArray(message.recordAccessStatus)) return "recordAccessStatus: array expected"; for (let i = 0; i < message.recordAccessStatus.length; ++i) { @@ -156330,6 +157260,8 @@ export const Records = $root.Records = (() => { TimeLimitedAccessResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Records.TimeLimitedAccessResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Records.TimeLimitedAccessResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -156349,7 +157281,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.TimeLimitedAccessResponse.userAccessStatus: array expected"); message.userAccessStatus = []; for (let i = 0; i < object.userAccessStatus.length; ++i) { - if (typeof object.userAccessStatus[i] !== "object") + if (!$util.isObject(object.userAccessStatus[i])) throw TypeError(".Records.TimeLimitedAccessResponse.userAccessStatus: object expected"); message.userAccessStatus[i] = $root.Records.TimeLimitedAccessStatus.fromObject(object.userAccessStatus[i], long + 1); } @@ -156359,7 +157291,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.TimeLimitedAccessResponse.teamAccessStatus: array expected"); message.teamAccessStatus = []; for (let i = 0; i < object.teamAccessStatus.length; ++i) { - if (typeof object.teamAccessStatus[i] !== "object") + if (!$util.isObject(object.teamAccessStatus[i])) throw TypeError(".Records.TimeLimitedAccessResponse.teamAccessStatus: object expected"); message.teamAccessStatus[i] = $root.Records.TimeLimitedAccessStatus.fromObject(object.teamAccessStatus[i], long + 1); } @@ -156369,7 +157301,7 @@ export const Records = $root.Records = (() => { throw TypeError(".Records.TimeLimitedAccessResponse.recordAccessStatus: array expected"); message.recordAccessStatus = []; for (let i = 0; i < object.recordAccessStatus.length; ++i) { - if (typeof object.recordAccessStatus[i] !== "object") + if (!$util.isObject(object.recordAccessStatus[i])) throw TypeError(".Records.TimeLimitedAccessResponse.recordAccessStatus: object expected"); message.recordAccessStatus[i] = $root.Records.TimeLimitedAccessStatus.fromObject(object.recordAccessStatus[i], long + 1); } @@ -156405,7 +157337,7 @@ export const Records = $root.Records = (() => { object.revision = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -156586,7 +157518,7 @@ export const common = $root.common = (() => { * @returns {$protobuf.Writer} Writer */ TLAProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -156664,10 +157596,10 @@ export const common = $root.common = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) switch (message.timerNotificationType) { default: return "timerNotificationType: enum value expected"; @@ -156676,7 +157608,7 @@ export const common = $root.common = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -156693,6 +157625,8 @@ export const common = $root.common = (() => { TLAProperties.fromObject = function fromObject(object, long) { if (object instanceof $root.common.tla.TLAProperties) return object; + if (!$util.isObject(object)) + throw TypeError(".common.tla.TLAProperties: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -156758,16 +157692,16 @@ export const common = $root.common = (() => { object.timerNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.timerNotificationType != null && message.hasOwnProperty("timerNotificationType")) + if (message.timerNotificationType != null && Object.hasOwnProperty.call(message, "timerNotificationType")) object.timerNotificationType = options.enums === String ? $root.common.tla.TimerNotificationType[message.timerNotificationType] === undefined ? message.timerNotificationType : $root.common.tla.TimerNotificationType[message.timerNotificationType] : message.timerNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -156918,7 +157852,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ AccountSummaryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -156992,10 +157926,10 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.summaryVersion != null && message.hasOwnProperty("summaryVersion")) + if (message.summaryVersion != null && Object.hasOwnProperty.call(message, "summaryVersion")) if (!$util.isInteger(message.summaryVersion)) return "summaryVersion: integer expected"; - if (message.includeRecentActivity != null && message.hasOwnProperty("includeRecentActivity")) + if (message.includeRecentActivity != null && Object.hasOwnProperty.call(message, "includeRecentActivity")) if (typeof message.includeRecentActivity !== "boolean") return "includeRecentActivity: boolean expected"; return null; @@ -157012,6 +157946,8 @@ export const AccountSummary = $root.AccountSummary = (() => { AccountSummaryRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.AccountSummaryRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.AccountSummaryRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -157045,9 +157981,9 @@ export const AccountSummary = $root.AccountSummary = (() => { object.summaryVersion = 0; object.includeRecentActivity = false; } - if (message.summaryVersion != null && message.hasOwnProperty("summaryVersion")) + if (message.summaryVersion != null && Object.hasOwnProperty.call(message, "summaryVersion")) object.summaryVersion = message.summaryVersion; - if (message.includeRecentActivity != null && message.hasOwnProperty("includeRecentActivity")) + if (message.includeRecentActivity != null && Object.hasOwnProperty.call(message, "includeRecentActivity")) object.includeRecentActivity = message.includeRecentActivity; return object; }; @@ -157375,7 +158311,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ AccountSummaryElements.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -157531,20 +158467,20 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) if (!(message.clientKey && typeof message.clientKey.length === "number" || $util.isString(message.clientKey))) return "clientKey: buffer expected"; - if (message.settings != null && message.hasOwnProperty("settings")) { + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) { let error = $root.AccountSummary.Settings.verify(message.settings, long + 1); if (error) return "settings." + error; } - if (message.keysInfo != null && message.hasOwnProperty("keysInfo")) { + if (message.keysInfo != null && Object.hasOwnProperty.call(message, "keysInfo")) { let error = $root.AccountSummary.KeysInfo.verify(message.keysInfo, long + 1); if (error) return "keysInfo." + error; } - if (message.syncLogs != null && message.hasOwnProperty("syncLogs")) { + if (message.syncLogs != null && Object.hasOwnProperty.call(message, "syncLogs")) { if (!Array.isArray(message.syncLogs)) return "syncLogs: array expected"; for (let i = 0; i < message.syncLogs.length; ++i) { @@ -157553,25 +158489,25 @@ export const AccountSummary = $root.AccountSummary = (() => { return "syncLogs." + error; } } - if (message.isEnterpriseAdmin != null && message.hasOwnProperty("isEnterpriseAdmin")) + if (message.isEnterpriseAdmin != null && Object.hasOwnProperty.call(message, "isEnterpriseAdmin")) if (typeof message.isEnterpriseAdmin !== "boolean") return "isEnterpriseAdmin: boolean expected"; - if (message.license != null && message.hasOwnProperty("license")) { + if (message.license != null && Object.hasOwnProperty.call(message, "license")) { let error = $root.AccountSummary.License.verify(message.license, long + 1); if (error) return "license." + error; } - if (message.group != null && message.hasOwnProperty("group")) { + if (message.group != null && Object.hasOwnProperty.call(message, "group")) { let error = $root.AccountSummary.Group.verify(message.group, long + 1); if (error) return "group." + error; } - if (message.Enforcements != null && message.hasOwnProperty("Enforcements")) { + if (message.Enforcements != null && Object.hasOwnProperty.call(message, "Enforcements")) { let error = $root.AccountSummary.Enforcements.verify(message.Enforcements, long + 1); if (error) return "Enforcements." + error; } - if (message.Images != null && message.hasOwnProperty("Images")) { + if (message.Images != null && Object.hasOwnProperty.call(message, "Images")) { if (!Array.isArray(message.Images)) return "Images: array expected"; for (let i = 0; i < message.Images.length; ++i) { @@ -157580,22 +158516,22 @@ export const AccountSummary = $root.AccountSummary = (() => { return "Images." + error; } } - if (message.personalLicense != null && message.hasOwnProperty("personalLicense")) { + if (message.personalLicense != null && Object.hasOwnProperty.call(message, "personalLicense")) { let error = $root.AccountSummary.License.verify(message.personalLicense, long + 1); if (error) return "personalLicense." + error; } - if (message.fixSharedFolderRecords != null && message.hasOwnProperty("fixSharedFolderRecords")) + if (message.fixSharedFolderRecords != null && Object.hasOwnProperty.call(message, "fixSharedFolderRecords")) if (typeof message.fixSharedFolderRecords !== "boolean") return "fixSharedFolderRecords: boolean expected"; - if (message.usernames != null && message.hasOwnProperty("usernames")) { + if (message.usernames != null && Object.hasOwnProperty.call(message, "usernames")) { if (!Array.isArray(message.usernames)) return "usernames: array expected"; for (let i = 0; i < message.usernames.length; ++i) if (!$util.isString(message.usernames[i])) return "usernames: string[] expected"; } - if (message.devices != null && message.hasOwnProperty("devices")) { + if (message.devices != null && Object.hasOwnProperty.call(message, "devices")) { if (!Array.isArray(message.devices)) return "devices: array expected"; for (let i = 0; i < message.devices.length; ++i) { @@ -157604,25 +158540,25 @@ export const AccountSummary = $root.AccountSummary = (() => { return "devices." + error; } } - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) if (typeof message.isShareAdmin !== "boolean") return "isShareAdmin: boolean expected"; - if (message.accountRecovery != null && message.hasOwnProperty("accountRecovery")) + if (message.accountRecovery != null && Object.hasOwnProperty.call(message, "accountRecovery")) if (typeof message.accountRecovery !== "boolean") return "accountRecovery: boolean expected"; - if (message.accountRecoveryPrompt != null && message.hasOwnProperty("accountRecoveryPrompt")) + if (message.accountRecoveryPrompt != null && Object.hasOwnProperty.call(message, "accountRecoveryPrompt")) if (typeof message.accountRecoveryPrompt !== "boolean") return "accountRecoveryPrompt: boolean expected"; - if (message.minMasterPasswordLengthNoPrompt != null && message.hasOwnProperty("minMasterPasswordLengthNoPrompt")) + if (message.minMasterPasswordLengthNoPrompt != null && Object.hasOwnProperty.call(message, "minMasterPasswordLengthNoPrompt")) if (!$util.isInteger(message.minMasterPasswordLengthNoPrompt)) return "minMasterPasswordLengthNoPrompt: integer expected"; - if (message.forbidKeyType2 != null && message.hasOwnProperty("forbidKeyType2")) + if (message.forbidKeyType2 != null && Object.hasOwnProperty.call(message, "forbidKeyType2")) if (typeof message.forbidKeyType2 !== "boolean") return "forbidKeyType2: boolean expected"; - if (message.forbidKeyType1 != null && message.hasOwnProperty("forbidKeyType1")) + if (message.forbidKeyType1 != null && Object.hasOwnProperty.call(message, "forbidKeyType1")) if (typeof message.forbidKeyType1 !== "boolean") return "forbidKeyType1: boolean expected"; - if (message.disallowedFeatures != null && message.hasOwnProperty("disallowedFeatures")) { + if (message.disallowedFeatures != null && Object.hasOwnProperty.call(message, "disallowedFeatures")) { if (!Array.isArray(message.disallowedFeatures)) return "disallowedFeatures: array expected"; for (let i = 0; i < message.disallowedFeatures.length; ++i) @@ -157643,6 +158579,8 @@ export const AccountSummary = $root.AccountSummary = (() => { AccountSummaryElements.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.AccountSummaryElements) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.AccountSummaryElements: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -157654,12 +158592,12 @@ export const AccountSummary = $root.AccountSummary = (() => { else if (object.clientKey.length >= 0) message.clientKey = object.clientKey; if (object.settings != null) { - if (typeof object.settings !== "object") + if (!$util.isObject(object.settings)) throw TypeError(".AccountSummary.AccountSummaryElements.settings: object expected"); message.settings = $root.AccountSummary.Settings.fromObject(object.settings, long + 1); } if (object.keysInfo != null) { - if (typeof object.keysInfo !== "object") + if (!$util.isObject(object.keysInfo)) throw TypeError(".AccountSummary.AccountSummaryElements.keysInfo: object expected"); message.keysInfo = $root.AccountSummary.KeysInfo.fromObject(object.keysInfo, long + 1); } @@ -157668,7 +158606,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.AccountSummaryElements.syncLogs: array expected"); message.syncLogs = []; for (let i = 0; i < object.syncLogs.length; ++i) { - if (typeof object.syncLogs[i] !== "object") + if (!$util.isObject(object.syncLogs[i])) throw TypeError(".AccountSummary.AccountSummaryElements.syncLogs: object expected"); message.syncLogs[i] = $root.AccountSummary.SyncLog.fromObject(object.syncLogs[i], long + 1); } @@ -157676,17 +158614,17 @@ export const AccountSummary = $root.AccountSummary = (() => { if (object.isEnterpriseAdmin != null) message.isEnterpriseAdmin = Boolean(object.isEnterpriseAdmin); if (object.license != null) { - if (typeof object.license !== "object") + if (!$util.isObject(object.license)) throw TypeError(".AccountSummary.AccountSummaryElements.license: object expected"); message.license = $root.AccountSummary.License.fromObject(object.license, long + 1); } if (object.group != null) { - if (typeof object.group !== "object") + if (!$util.isObject(object.group)) throw TypeError(".AccountSummary.AccountSummaryElements.group: object expected"); message.group = $root.AccountSummary.Group.fromObject(object.group, long + 1); } if (object.Enforcements != null) { - if (typeof object.Enforcements !== "object") + if (!$util.isObject(object.Enforcements)) throw TypeError(".AccountSummary.AccountSummaryElements.Enforcements: object expected"); message.Enforcements = $root.AccountSummary.Enforcements.fromObject(object.Enforcements, long + 1); } @@ -157695,13 +158633,13 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.AccountSummaryElements.Images: array expected"); message.Images = []; for (let i = 0; i < object.Images.length; ++i) { - if (typeof object.Images[i] !== "object") + if (!$util.isObject(object.Images[i])) throw TypeError(".AccountSummary.AccountSummaryElements.Images: object expected"); message.Images[i] = $root.AccountSummary.KeyValue.fromObject(object.Images[i], long + 1); } } if (object.personalLicense != null) { - if (typeof object.personalLicense !== "object") + if (!$util.isObject(object.personalLicense)) throw TypeError(".AccountSummary.AccountSummaryElements.personalLicense: object expected"); message.personalLicense = $root.AccountSummary.License.fromObject(object.personalLicense, long + 1); } @@ -157719,7 +158657,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.AccountSummaryElements.devices: array expected"); message.devices = []; for (let i = 0; i < object.devices.length; ++i) { - if (typeof object.devices[i] !== "object") + if (!$util.isObject(object.devices[i])) throw TypeError(".AccountSummary.AccountSummaryElements.devices: object expected"); message.devices[i] = $root.AccountSummary.DeviceInfo.fromObject(object.devices[i], long + 1); } @@ -157793,33 +158731,33 @@ export const AccountSummary = $root.AccountSummary = (() => { object.forbidKeyType2 = false; object.forbidKeyType1 = false; } - if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) object.clientKey = options.bytes === String ? $util.base64.encode(message.clientKey, 0, message.clientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientKey) : message.clientKey; - if (message.settings != null && message.hasOwnProperty("settings")) + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) object.settings = $root.AccountSummary.Settings.toObject(message.settings, options, q + 1); - if (message.keysInfo != null && message.hasOwnProperty("keysInfo")) + if (message.keysInfo != null && Object.hasOwnProperty.call(message, "keysInfo")) object.keysInfo = $root.AccountSummary.KeysInfo.toObject(message.keysInfo, options, q + 1); if (message.syncLogs && message.syncLogs.length) { object.syncLogs = []; for (let j = 0; j < message.syncLogs.length; ++j) object.syncLogs[j] = $root.AccountSummary.SyncLog.toObject(message.syncLogs[j], options, q + 1); } - if (message.isEnterpriseAdmin != null && message.hasOwnProperty("isEnterpriseAdmin")) + if (message.isEnterpriseAdmin != null && Object.hasOwnProperty.call(message, "isEnterpriseAdmin")) object.isEnterpriseAdmin = message.isEnterpriseAdmin; - if (message.license != null && message.hasOwnProperty("license")) + if (message.license != null && Object.hasOwnProperty.call(message, "license")) object.license = $root.AccountSummary.License.toObject(message.license, options, q + 1); - if (message.group != null && message.hasOwnProperty("group")) + if (message.group != null && Object.hasOwnProperty.call(message, "group")) object.group = $root.AccountSummary.Group.toObject(message.group, options, q + 1); - if (message.Enforcements != null && message.hasOwnProperty("Enforcements")) + if (message.Enforcements != null && Object.hasOwnProperty.call(message, "Enforcements")) object.Enforcements = $root.AccountSummary.Enforcements.toObject(message.Enforcements, options, q + 1); if (message.Images && message.Images.length) { object.Images = []; for (let j = 0; j < message.Images.length; ++j) object.Images[j] = $root.AccountSummary.KeyValue.toObject(message.Images[j], options, q + 1); } - if (message.personalLicense != null && message.hasOwnProperty("personalLicense")) + if (message.personalLicense != null && Object.hasOwnProperty.call(message, "personalLicense")) object.personalLicense = $root.AccountSummary.License.toObject(message.personalLicense, options, q + 1); - if (message.fixSharedFolderRecords != null && message.hasOwnProperty("fixSharedFolderRecords")) + if (message.fixSharedFolderRecords != null && Object.hasOwnProperty.call(message, "fixSharedFolderRecords")) object.fixSharedFolderRecords = message.fixSharedFolderRecords; if (message.usernames && message.usernames.length) { object.usernames = []; @@ -157831,17 +158769,17 @@ export const AccountSummary = $root.AccountSummary = (() => { for (let j = 0; j < message.devices.length; ++j) object.devices[j] = $root.AccountSummary.DeviceInfo.toObject(message.devices[j], options, q + 1); } - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) object.isShareAdmin = message.isShareAdmin; - if (message.accountRecovery != null && message.hasOwnProperty("accountRecovery")) + if (message.accountRecovery != null && Object.hasOwnProperty.call(message, "accountRecovery")) object.accountRecovery = message.accountRecovery; - if (message.accountRecoveryPrompt != null && message.hasOwnProperty("accountRecoveryPrompt")) + if (message.accountRecoveryPrompt != null && Object.hasOwnProperty.call(message, "accountRecoveryPrompt")) object.accountRecoveryPrompt = message.accountRecoveryPrompt; - if (message.minMasterPasswordLengthNoPrompt != null && message.hasOwnProperty("minMasterPasswordLengthNoPrompt")) + if (message.minMasterPasswordLengthNoPrompt != null && Object.hasOwnProperty.call(message, "minMasterPasswordLengthNoPrompt")) object.minMasterPasswordLengthNoPrompt = message.minMasterPasswordLengthNoPrompt; - if (message.forbidKeyType2 != null && message.hasOwnProperty("forbidKeyType2")) + if (message.forbidKeyType2 != null && Object.hasOwnProperty.call(message, "forbidKeyType2")) object.forbidKeyType2 = message.forbidKeyType2; - if (message.forbidKeyType1 != null && message.hasOwnProperty("forbidKeyType1")) + if (message.forbidKeyType1 != null && Object.hasOwnProperty.call(message, "forbidKeyType1")) object.forbidKeyType1 = message.forbidKeyType1; if (message.disallowedFeatures && message.disallowedFeatures.length) { object.disallowedFeatures = []; @@ -158087,7 +159025,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ DeviceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -158205,13 +159143,13 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) switch (message.deviceStatus) { default: return "deviceStatus: enum value expected"; @@ -158221,34 +159159,34 @@ export const AccountSummary = $root.AccountSummary = (() => { case 3: break; } - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.encryptedDataKeyDoNotUse != null && message.hasOwnProperty("encryptedDataKeyDoNotUse")) + if (message.encryptedDataKeyDoNotUse != null && Object.hasOwnProperty.call(message, "encryptedDataKeyDoNotUse")) if (!(message.encryptedDataKeyDoNotUse && typeof message.encryptedDataKeyDoNotUse.length === "number" || $util.isString(message.encryptedDataKeyDoNotUse))) return "encryptedDataKeyDoNotUse: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.approveRequestTime != null && message.hasOwnProperty("approveRequestTime")) + if (message.approveRequestTime != null && Object.hasOwnProperty.call(message, "approveRequestTime")) if (!$util.isInteger(message.approveRequestTime) && !(message.approveRequestTime && $util.isInteger(message.approveRequestTime.low) && $util.isInteger(message.approveRequestTime.high))) return "approveRequestTime: integer|Long expected"; - if (message.encryptedDataKeyPresent != null && message.hasOwnProperty("encryptedDataKeyPresent")) + if (message.encryptedDataKeyPresent != null && Object.hasOwnProperty.call(message, "encryptedDataKeyPresent")) if (typeof message.encryptedDataKeyPresent !== "boolean") return "encryptedDataKeyPresent: boolean expected"; - if (message.groupId != null && message.hasOwnProperty("groupId")) + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) if (!$util.isInteger(message.groupId) && !(message.groupId && $util.isInteger(message.groupId.low) && $util.isInteger(message.groupId.high))) return "groupId: integer|Long expected"; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) if (!$util.isString(message.devicePlatform)) return "devicePlatform: string expected"; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) switch (message.clientFormFactor) { default: return "clientFormFactor: enum value expected"; @@ -158272,6 +159210,8 @@ export const AccountSummary = $root.AccountSummary = (() => { DeviceInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.DeviceInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.DeviceInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -158431,41 +159371,41 @@ export const AccountSummary = $root.AccountSummary = (() => { object.devicePlatform = ""; object.clientFormFactor = options.enums === String ? "FF_EMPTY" : 0; } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.deviceStatus != null && message.hasOwnProperty("deviceStatus")) + if (message.deviceStatus != null && Object.hasOwnProperty.call(message, "deviceStatus")) object.deviceStatus = options.enums === String ? $root.Authentication.DeviceStatus[message.deviceStatus] === undefined ? message.deviceStatus : $root.Authentication.DeviceStatus[message.deviceStatus] : message.deviceStatus; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.encryptedDataKeyDoNotUse != null && message.hasOwnProperty("encryptedDataKeyDoNotUse")) + if (message.encryptedDataKeyDoNotUse != null && Object.hasOwnProperty.call(message, "encryptedDataKeyDoNotUse")) object.encryptedDataKeyDoNotUse = options.bytes === String ? $util.base64.encode(message.encryptedDataKeyDoNotUse, 0, message.encryptedDataKeyDoNotUse.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDataKeyDoNotUse) : message.encryptedDataKeyDoNotUse; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.approveRequestTime != null && message.hasOwnProperty("approveRequestTime")) + if (message.approveRequestTime != null && Object.hasOwnProperty.call(message, "approveRequestTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.approveRequestTime = typeof message.approveRequestTime === "number" ? BigInt(message.approveRequestTime) : $util.Long.fromBits(message.approveRequestTime.low >>> 0, message.approveRequestTime.high >>> 0, false).toBigInt(); else if (typeof message.approveRequestTime === "number") object.approveRequestTime = options.longs === String ? String(message.approveRequestTime) : message.approveRequestTime; else object.approveRequestTime = options.longs === String ? $util.Long.prototype.toString.call(message.approveRequestTime) : options.longs === Number ? new $util.LongBits(message.approveRequestTime.low >>> 0, message.approveRequestTime.high >>> 0).toNumber() : message.approveRequestTime; - if (message.encryptedDataKeyPresent != null && message.hasOwnProperty("encryptedDataKeyPresent")) + if (message.encryptedDataKeyPresent != null && Object.hasOwnProperty.call(message, "encryptedDataKeyPresent")) object.encryptedDataKeyPresent = message.encryptedDataKeyPresent; - if (message.groupId != null && message.hasOwnProperty("groupId")) + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.groupId = typeof message.groupId === "number" ? BigInt(message.groupId) : $util.Long.fromBits(message.groupId.low >>> 0, message.groupId.high >>> 0, false).toBigInt(); else if (typeof message.groupId === "number") object.groupId = options.longs === String ? String(message.groupId) : message.groupId; else object.groupId = options.longs === String ? $util.Long.prototype.toString.call(message.groupId) : options.longs === Number ? new $util.LongBits(message.groupId.low >>> 0, message.groupId.high >>> 0).toNumber() : message.groupId; - if (message.devicePlatform != null && message.hasOwnProperty("devicePlatform")) + if (message.devicePlatform != null && Object.hasOwnProperty.call(message, "devicePlatform")) object.devicePlatform = message.devicePlatform; - if (message.clientFormFactor != null && message.hasOwnProperty("clientFormFactor")) + if (message.clientFormFactor != null && Object.hasOwnProperty.call(message, "clientFormFactor")) object.clientFormFactor = options.enums === String ? $root.Authentication.ClientFormFactor[message.clientFormFactor] === undefined ? message.clientFormFactor : $root.Authentication.ClientFormFactor[message.clientFormFactor] : message.clientFormFactor; return object; }; @@ -158640,7 +159580,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ KeysInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -158734,25 +159674,25 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) if (!(message.encryptionParams && typeof message.encryptionParams.length === "number" || $util.isString(message.encryptionParams))) return "encryptionParams: buffer expected"; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) if (!(message.encryptedDataKey && typeof message.encryptedDataKey.length === "number" || $util.isString(message.encryptedDataKey))) return "encryptedDataKey: buffer expected"; - if (message.dataKeyBackupDate != null && message.hasOwnProperty("dataKeyBackupDate")) + if (message.dataKeyBackupDate != null && Object.hasOwnProperty.call(message, "dataKeyBackupDate")) if (typeof message.dataKeyBackupDate !== "number") return "dataKeyBackupDate: number expected"; - if (message.userAuthUid != null && message.hasOwnProperty("userAuthUid")) + if (message.userAuthUid != null && Object.hasOwnProperty.call(message, "userAuthUid")) if (!(message.userAuthUid && typeof message.userAuthUid.length === "number" || $util.isString(message.userAuthUid))) return "userAuthUid: buffer expected"; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) if (!(message.encryptedPrivateKey && typeof message.encryptedPrivateKey.length === "number" || $util.isString(message.encryptedPrivateKey))) return "encryptedPrivateKey: buffer expected"; - if (message.encryptedEccPrivateKey != null && message.hasOwnProperty("encryptedEccPrivateKey")) + if (message.encryptedEccPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEccPrivateKey")) if (!(message.encryptedEccPrivateKey && typeof message.encryptedEccPrivateKey.length === "number" || $util.isString(message.encryptedEccPrivateKey))) return "encryptedEccPrivateKey: buffer expected"; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) if (!(message.eccPublicKey && typeof message.eccPublicKey.length === "number" || $util.isString(message.eccPublicKey))) return "eccPublicKey: buffer expected"; return null; @@ -158769,6 +159709,8 @@ export const AccountSummary = $root.AccountSummary = (() => { KeysInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.KeysInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.KeysInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -158871,19 +159813,19 @@ export const AccountSummary = $root.AccountSummary = (() => { object.eccPublicKey = $util.newBuffer(object.eccPublicKey); } } - if (message.encryptionParams != null && message.hasOwnProperty("encryptionParams")) + if (message.encryptionParams != null && Object.hasOwnProperty.call(message, "encryptionParams")) object.encryptionParams = options.bytes === String ? $util.base64.encode(message.encryptionParams, 0, message.encryptionParams.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptionParams) : message.encryptionParams; - if (message.encryptedDataKey != null && message.hasOwnProperty("encryptedDataKey")) + if (message.encryptedDataKey != null && Object.hasOwnProperty.call(message, "encryptedDataKey")) object.encryptedDataKey = options.bytes === String ? $util.base64.encode(message.encryptedDataKey, 0, message.encryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDataKey) : message.encryptedDataKey; - if (message.dataKeyBackupDate != null && message.hasOwnProperty("dataKeyBackupDate")) + if (message.dataKeyBackupDate != null && Object.hasOwnProperty.call(message, "dataKeyBackupDate")) object.dataKeyBackupDate = options.json && !isFinite(message.dataKeyBackupDate) ? String(message.dataKeyBackupDate) : message.dataKeyBackupDate; - if (message.userAuthUid != null && message.hasOwnProperty("userAuthUid")) + if (message.userAuthUid != null && Object.hasOwnProperty.call(message, "userAuthUid")) object.userAuthUid = options.bytes === String ? $util.base64.encode(message.userAuthUid, 0, message.userAuthUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.userAuthUid) : message.userAuthUid; - if (message.encryptedPrivateKey != null && message.hasOwnProperty("encryptedPrivateKey")) + if (message.encryptedPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedPrivateKey")) object.encryptedPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedPrivateKey, 0, message.encryptedPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPrivateKey) : message.encryptedPrivateKey; - if (message.encryptedEccPrivateKey != null && message.hasOwnProperty("encryptedEccPrivateKey")) + if (message.encryptedEccPrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEccPrivateKey")) object.encryptedEccPrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedEccPrivateKey, 0, message.encryptedEccPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedEccPrivateKey) : message.encryptedEccPrivateKey; - if (message.eccPublicKey != null && message.hasOwnProperty("eccPublicKey")) + if (message.eccPublicKey != null && Object.hasOwnProperty.call(message, "eccPublicKey")) object.eccPublicKey = options.bytes === String ? $util.base64.encode(message.eccPublicKey, 0, message.eccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.eccPublicKey) : message.eccPublicKey; return object; }; @@ -159047,7 +159989,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ SyncLog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -159137,22 +160079,22 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.countryName != null && message.hasOwnProperty("countryName")) + if (message.countryName != null && Object.hasOwnProperty.call(message, "countryName")) if (!$util.isString(message.countryName)) return "countryName: string expected"; - if (message.secondsAgo != null && message.hasOwnProperty("secondsAgo")) + if (message.secondsAgo != null && Object.hasOwnProperty.call(message, "secondsAgo")) if (!$util.isInteger(message.secondsAgo) && !(message.secondsAgo && $util.isInteger(message.secondsAgo.low) && $util.isInteger(message.secondsAgo.high))) return "secondsAgo: integer|Long expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.countryCode != null && message.hasOwnProperty("countryCode")) + if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode")) if (!$util.isString(message.countryCode)) return "countryCode: string expected"; - if (message.deviceUID != null && message.hasOwnProperty("deviceUID")) + if (message.deviceUID != null && Object.hasOwnProperty.call(message, "deviceUID")) if (!(message.deviceUID && typeof message.deviceUID.length === "number" || $util.isString(message.deviceUID))) return "deviceUID: buffer expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; return null; @@ -159169,6 +160111,8 @@ export const AccountSummary = $root.AccountSummary = (() => { SyncLog.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.SyncLog) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.SyncLog: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -159234,22 +160178,22 @@ export const AccountSummary = $root.AccountSummary = (() => { } object.ipAddress = ""; } - if (message.countryName != null && message.hasOwnProperty("countryName")) + if (message.countryName != null && Object.hasOwnProperty.call(message, "countryName")) object.countryName = message.countryName; - if (message.secondsAgo != null && message.hasOwnProperty("secondsAgo")) + if (message.secondsAgo != null && Object.hasOwnProperty.call(message, "secondsAgo")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.secondsAgo = typeof message.secondsAgo === "number" ? BigInt(message.secondsAgo) : $util.Long.fromBits(message.secondsAgo.low >>> 0, message.secondsAgo.high >>> 0, false).toBigInt(); else if (typeof message.secondsAgo === "number") object.secondsAgo = options.longs === String ? String(message.secondsAgo) : message.secondsAgo; else object.secondsAgo = options.longs === String ? $util.Long.prototype.toString.call(message.secondsAgo) : options.longs === Number ? new $util.LongBits(message.secondsAgo.low >>> 0, message.secondsAgo.high >>> 0).toNumber() : message.secondsAgo; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.countryCode != null && message.hasOwnProperty("countryCode")) + if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode")) object.countryCode = message.countryCode; - if (message.deviceUID != null && message.hasOwnProperty("deviceUID")) + if (message.deviceUID != null && Object.hasOwnProperty.call(message, "deviceUID")) object.deviceUID = options.bytes === String ? $util.base64.encode(message.deviceUID, 0, message.deviceUID.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceUID) : message.deviceUID; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; return object; }; @@ -159721,7 +160665,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ License.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -159923,108 +160867,108 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.subscriptionCode != null && message.hasOwnProperty("subscriptionCode")) + if (message.subscriptionCode != null && Object.hasOwnProperty.call(message, "subscriptionCode")) if (!$util.isString(message.subscriptionCode)) return "subscriptionCode: string expected"; - if (message.productTypeId != null && message.hasOwnProperty("productTypeId")) + if (message.productTypeId != null && Object.hasOwnProperty.call(message, "productTypeId")) if (!$util.isInteger(message.productTypeId)) return "productTypeId: integer expected"; - if (message.productTypeName != null && message.hasOwnProperty("productTypeName")) + if (message.productTypeName != null && Object.hasOwnProperty.call(message, "productTypeName")) if (!$util.isString(message.productTypeName)) return "productTypeName: string expected"; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) if (!$util.isString(message.expirationDate)) return "expirationDate: string expected"; - if (message.secondsUntilExpiration != null && message.hasOwnProperty("secondsUntilExpiration")) + if (message.secondsUntilExpiration != null && Object.hasOwnProperty.call(message, "secondsUntilExpiration")) if (!$util.isInteger(message.secondsUntilExpiration) && !(message.secondsUntilExpiration && $util.isInteger(message.secondsUntilExpiration.low) && $util.isInteger(message.secondsUntilExpiration.high))) return "secondsUntilExpiration: integer|Long expected"; - if (message.maxDevices != null && message.hasOwnProperty("maxDevices")) + if (message.maxDevices != null && Object.hasOwnProperty.call(message, "maxDevices")) if (!$util.isInteger(message.maxDevices)) return "maxDevices: integer expected"; - if (message.filePlanType != null && message.hasOwnProperty("filePlanType")) + if (message.filePlanType != null && Object.hasOwnProperty.call(message, "filePlanType")) if (!$util.isInteger(message.filePlanType)) return "filePlanType: integer expected"; - if (message.bytesUsed != null && message.hasOwnProperty("bytesUsed")) + if (message.bytesUsed != null && Object.hasOwnProperty.call(message, "bytesUsed")) if (!$util.isInteger(message.bytesUsed) && !(message.bytesUsed && $util.isInteger(message.bytesUsed.low) && $util.isInteger(message.bytesUsed.high))) return "bytesUsed: integer|Long expected"; - if (message.bytesTotal != null && message.hasOwnProperty("bytesTotal")) + if (message.bytesTotal != null && Object.hasOwnProperty.call(message, "bytesTotal")) if (!$util.isInteger(message.bytesTotal) && !(message.bytesTotal && $util.isInteger(message.bytesTotal.low) && $util.isInteger(message.bytesTotal.high))) return "bytesTotal: integer|Long expected"; - if (message.secondsUntilStorageExpiration != null && message.hasOwnProperty("secondsUntilStorageExpiration")) + if (message.secondsUntilStorageExpiration != null && Object.hasOwnProperty.call(message, "secondsUntilStorageExpiration")) if (!$util.isInteger(message.secondsUntilStorageExpiration) && !(message.secondsUntilStorageExpiration && $util.isInteger(message.secondsUntilStorageExpiration.low) && $util.isInteger(message.secondsUntilStorageExpiration.high))) return "secondsUntilStorageExpiration: integer|Long expected"; - if (message.storageExpirationDate != null && message.hasOwnProperty("storageExpirationDate")) + if (message.storageExpirationDate != null && Object.hasOwnProperty.call(message, "storageExpirationDate")) if (!$util.isString(message.storageExpirationDate)) return "storageExpirationDate: string expected"; - if (message.hasAutoRenewableAppstoreSubscription != null && message.hasOwnProperty("hasAutoRenewableAppstoreSubscription")) + if (message.hasAutoRenewableAppstoreSubscription != null && Object.hasOwnProperty.call(message, "hasAutoRenewableAppstoreSubscription")) if (typeof message.hasAutoRenewableAppstoreSubscription !== "boolean") return "hasAutoRenewableAppstoreSubscription: boolean expected"; - if (message.accountType != null && message.hasOwnProperty("accountType")) + if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) if (!$util.isInteger(message.accountType)) return "accountType: integer expected"; - if (message.uploadsRemaining != null && message.hasOwnProperty("uploadsRemaining")) + if (message.uploadsRemaining != null && Object.hasOwnProperty.call(message, "uploadsRemaining")) if (!$util.isInteger(message.uploadsRemaining)) return "uploadsRemaining: integer expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.chatEnabled != null && message.hasOwnProperty("chatEnabled")) + if (message.chatEnabled != null && Object.hasOwnProperty.call(message, "chatEnabled")) if (typeof message.chatEnabled !== "boolean") return "chatEnabled: boolean expected"; - if (message.auditAndReportingEnabled != null && message.hasOwnProperty("auditAndReportingEnabled")) + if (message.auditAndReportingEnabled != null && Object.hasOwnProperty.call(message, "auditAndReportingEnabled")) if (typeof message.auditAndReportingEnabled !== "boolean") return "auditAndReportingEnabled: boolean expected"; - if (message.breachWatchFeatureDisable != null && message.hasOwnProperty("breachWatchFeatureDisable")) + if (message.breachWatchFeatureDisable != null && Object.hasOwnProperty.call(message, "breachWatchFeatureDisable")) if (typeof message.breachWatchFeatureDisable !== "boolean") return "breachWatchFeatureDisable: boolean expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.allowPersonalLicense != null && message.hasOwnProperty("allowPersonalLicense")) + if (message.allowPersonalLicense != null && Object.hasOwnProperty.call(message, "allowPersonalLicense")) if (typeof message.allowPersonalLicense !== "boolean") return "allowPersonalLicense: boolean expected"; - if (message.licensedBy != null && message.hasOwnProperty("licensedBy")) + if (message.licensedBy != null && Object.hasOwnProperty.call(message, "licensedBy")) if (!$util.isString(message.licensedBy)) return "licensedBy: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.breachWatchEnabled != null && message.hasOwnProperty("breachWatchEnabled")) + if (message.breachWatchEnabled != null && Object.hasOwnProperty.call(message, "breachWatchEnabled")) if (typeof message.breachWatchEnabled !== "boolean") return "breachWatchEnabled: boolean expected"; - if (message.breachWatchScanned != null && message.hasOwnProperty("breachWatchScanned")) + if (message.breachWatchScanned != null && Object.hasOwnProperty.call(message, "breachWatchScanned")) if (typeof message.breachWatchScanned !== "boolean") return "breachWatchScanned: boolean expected"; - if (message.breachWatchExpiration != null && message.hasOwnProperty("breachWatchExpiration")) + if (message.breachWatchExpiration != null && Object.hasOwnProperty.call(message, "breachWatchExpiration")) if (!$util.isInteger(message.breachWatchExpiration) && !(message.breachWatchExpiration && $util.isInteger(message.breachWatchExpiration.low) && $util.isInteger(message.breachWatchExpiration.high))) return "breachWatchExpiration: integer|Long expected"; - if (message.breachWatchDateCreated != null && message.hasOwnProperty("breachWatchDateCreated")) + if (message.breachWatchDateCreated != null && Object.hasOwnProperty.call(message, "breachWatchDateCreated")) if (!$util.isInteger(message.breachWatchDateCreated) && !(message.breachWatchDateCreated && $util.isInteger(message.breachWatchDateCreated.low) && $util.isInteger(message.breachWatchDateCreated.high))) return "breachWatchDateCreated: integer|Long expected"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { let error = $root.AccountSummary.Result.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.storageExpiration != null && message.hasOwnProperty("storageExpiration")) + if (message.storageExpiration != null && Object.hasOwnProperty.call(message, "storageExpiration")) if (!$util.isInteger(message.storageExpiration) && !(message.storageExpiration && $util.isInteger(message.storageExpiration.low) && $util.isInteger(message.storageExpiration.high))) return "storageExpiration: integer|Long expected"; - if (message.uploadsCount != null && message.hasOwnProperty("uploadsCount")) + if (message.uploadsCount != null && Object.hasOwnProperty.call(message, "uploadsCount")) if (!$util.isInteger(message.uploadsCount)) return "uploadsCount: integer expected"; - if (message.units != null && message.hasOwnProperty("units")) + if (message.units != null && Object.hasOwnProperty.call(message, "units")) if (!$util.isInteger(message.units)) return "units: integer expected"; - if (message.pendingEnterprise != null && message.hasOwnProperty("pendingEnterprise")) + if (message.pendingEnterprise != null && Object.hasOwnProperty.call(message, "pendingEnterprise")) if (typeof message.pendingEnterprise !== "boolean") return "pendingEnterprise: boolean expected"; - if (message.isPamEnabled != null && message.hasOwnProperty("isPamEnabled")) + if (message.isPamEnabled != null && Object.hasOwnProperty.call(message, "isPamEnabled")) if (typeof message.isPamEnabled !== "boolean") return "isPamEnabled: boolean expected"; - if (message.isKsmEnabled != null && message.hasOwnProperty("isKsmEnabled")) + if (message.isKsmEnabled != null && Object.hasOwnProperty.call(message, "isKsmEnabled")) if (typeof message.isKsmEnabled !== "boolean") return "isKsmEnabled: boolean expected"; return null; @@ -160041,6 +160985,8 @@ export const AccountSummary = $root.AccountSummary = (() => { License.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.License) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.License: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -160144,7 +161090,7 @@ export const AccountSummary = $root.AccountSummary = (() => { else if (typeof object.breachWatchDateCreated === "object") message.breachWatchDateCreated = new $util.LongBits(object.breachWatchDateCreated.low >>> 0, object.breachWatchDateCreated.high >>> 0).toNumber(); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".AccountSummary.License.error: object expected"); message.error = $root.AccountSummary.Result.fromObject(object.error, long + 1); } @@ -160270,113 +161216,113 @@ export const AccountSummary = $root.AccountSummary = (() => { object.isPamEnabled = false; object.isKsmEnabled = false; } - if (message.subscriptionCode != null && message.hasOwnProperty("subscriptionCode")) + if (message.subscriptionCode != null && Object.hasOwnProperty.call(message, "subscriptionCode")) object.subscriptionCode = message.subscriptionCode; - if (message.productTypeId != null && message.hasOwnProperty("productTypeId")) + if (message.productTypeId != null && Object.hasOwnProperty.call(message, "productTypeId")) object.productTypeId = message.productTypeId; - if (message.productTypeName != null && message.hasOwnProperty("productTypeName")) + if (message.productTypeName != null && Object.hasOwnProperty.call(message, "productTypeName")) object.productTypeName = message.productTypeName; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) object.expirationDate = message.expirationDate; - if (message.secondsUntilExpiration != null && message.hasOwnProperty("secondsUntilExpiration")) + if (message.secondsUntilExpiration != null && Object.hasOwnProperty.call(message, "secondsUntilExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.secondsUntilExpiration = typeof message.secondsUntilExpiration === "number" ? BigInt(message.secondsUntilExpiration) : $util.Long.fromBits(message.secondsUntilExpiration.low >>> 0, message.secondsUntilExpiration.high >>> 0, false).toBigInt(); else if (typeof message.secondsUntilExpiration === "number") object.secondsUntilExpiration = options.longs === String ? String(message.secondsUntilExpiration) : message.secondsUntilExpiration; else object.secondsUntilExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.secondsUntilExpiration) : options.longs === Number ? new $util.LongBits(message.secondsUntilExpiration.low >>> 0, message.secondsUntilExpiration.high >>> 0).toNumber() : message.secondsUntilExpiration; - if (message.maxDevices != null && message.hasOwnProperty("maxDevices")) + if (message.maxDevices != null && Object.hasOwnProperty.call(message, "maxDevices")) object.maxDevices = message.maxDevices; - if (message.filePlanType != null && message.hasOwnProperty("filePlanType")) + if (message.filePlanType != null && Object.hasOwnProperty.call(message, "filePlanType")) object.filePlanType = message.filePlanType; - if (message.bytesUsed != null && message.hasOwnProperty("bytesUsed")) + if (message.bytesUsed != null && Object.hasOwnProperty.call(message, "bytesUsed")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.bytesUsed = typeof message.bytesUsed === "number" ? BigInt(message.bytesUsed) : $util.Long.fromBits(message.bytesUsed.low >>> 0, message.bytesUsed.high >>> 0, false).toBigInt(); else if (typeof message.bytesUsed === "number") object.bytesUsed = options.longs === String ? String(message.bytesUsed) : message.bytesUsed; else object.bytesUsed = options.longs === String ? $util.Long.prototype.toString.call(message.bytesUsed) : options.longs === Number ? new $util.LongBits(message.bytesUsed.low >>> 0, message.bytesUsed.high >>> 0).toNumber() : message.bytesUsed; - if (message.bytesTotal != null && message.hasOwnProperty("bytesTotal")) + if (message.bytesTotal != null && Object.hasOwnProperty.call(message, "bytesTotal")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.bytesTotal = typeof message.bytesTotal === "number" ? BigInt(message.bytesTotal) : $util.Long.fromBits(message.bytesTotal.low >>> 0, message.bytesTotal.high >>> 0, false).toBigInt(); else if (typeof message.bytesTotal === "number") object.bytesTotal = options.longs === String ? String(message.bytesTotal) : message.bytesTotal; else object.bytesTotal = options.longs === String ? $util.Long.prototype.toString.call(message.bytesTotal) : options.longs === Number ? new $util.LongBits(message.bytesTotal.low >>> 0, message.bytesTotal.high >>> 0).toNumber() : message.bytesTotal; - if (message.secondsUntilStorageExpiration != null && message.hasOwnProperty("secondsUntilStorageExpiration")) + if (message.secondsUntilStorageExpiration != null && Object.hasOwnProperty.call(message, "secondsUntilStorageExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.secondsUntilStorageExpiration = typeof message.secondsUntilStorageExpiration === "number" ? BigInt(message.secondsUntilStorageExpiration) : $util.Long.fromBits(message.secondsUntilStorageExpiration.low >>> 0, message.secondsUntilStorageExpiration.high >>> 0, false).toBigInt(); else if (typeof message.secondsUntilStorageExpiration === "number") object.secondsUntilStorageExpiration = options.longs === String ? String(message.secondsUntilStorageExpiration) : message.secondsUntilStorageExpiration; else object.secondsUntilStorageExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.secondsUntilStorageExpiration) : options.longs === Number ? new $util.LongBits(message.secondsUntilStorageExpiration.low >>> 0, message.secondsUntilStorageExpiration.high >>> 0).toNumber() : message.secondsUntilStorageExpiration; - if (message.storageExpirationDate != null && message.hasOwnProperty("storageExpirationDate")) + if (message.storageExpirationDate != null && Object.hasOwnProperty.call(message, "storageExpirationDate")) object.storageExpirationDate = message.storageExpirationDate; - if (message.hasAutoRenewableAppstoreSubscription != null && message.hasOwnProperty("hasAutoRenewableAppstoreSubscription")) + if (message.hasAutoRenewableAppstoreSubscription != null && Object.hasOwnProperty.call(message, "hasAutoRenewableAppstoreSubscription")) object.hasAutoRenewableAppstoreSubscription = message.hasAutoRenewableAppstoreSubscription; - if (message.accountType != null && message.hasOwnProperty("accountType")) + if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) object.accountType = message.accountType; - if (message.uploadsRemaining != null && message.hasOwnProperty("uploadsRemaining")) + if (message.uploadsRemaining != null && Object.hasOwnProperty.call(message, "uploadsRemaining")) object.uploadsRemaining = message.uploadsRemaining; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.chatEnabled != null && message.hasOwnProperty("chatEnabled")) + if (message.chatEnabled != null && Object.hasOwnProperty.call(message, "chatEnabled")) object.chatEnabled = message.chatEnabled; - if (message.auditAndReportingEnabled != null && message.hasOwnProperty("auditAndReportingEnabled")) + if (message.auditAndReportingEnabled != null && Object.hasOwnProperty.call(message, "auditAndReportingEnabled")) object.auditAndReportingEnabled = message.auditAndReportingEnabled; - if (message.breachWatchFeatureDisable != null && message.hasOwnProperty("breachWatchFeatureDisable")) + if (message.breachWatchFeatureDisable != null && Object.hasOwnProperty.call(message, "breachWatchFeatureDisable")) object.breachWatchFeatureDisable = message.breachWatchFeatureDisable; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.allowPersonalLicense != null && message.hasOwnProperty("allowPersonalLicense")) + if (message.allowPersonalLicense != null && Object.hasOwnProperty.call(message, "allowPersonalLicense")) object.allowPersonalLicense = message.allowPersonalLicense; - if (message.licensedBy != null && message.hasOwnProperty("licensedBy")) + if (message.licensedBy != null && Object.hasOwnProperty.call(message, "licensedBy")) object.licensedBy = message.licensedBy; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.breachWatchEnabled != null && message.hasOwnProperty("breachWatchEnabled")) + if (message.breachWatchEnabled != null && Object.hasOwnProperty.call(message, "breachWatchEnabled")) object.breachWatchEnabled = message.breachWatchEnabled; - if (message.breachWatchScanned != null && message.hasOwnProperty("breachWatchScanned")) + if (message.breachWatchScanned != null && Object.hasOwnProperty.call(message, "breachWatchScanned")) object.breachWatchScanned = message.breachWatchScanned; - if (message.breachWatchExpiration != null && message.hasOwnProperty("breachWatchExpiration")) + if (message.breachWatchExpiration != null && Object.hasOwnProperty.call(message, "breachWatchExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.breachWatchExpiration = typeof message.breachWatchExpiration === "number" ? BigInt(message.breachWatchExpiration) : $util.Long.fromBits(message.breachWatchExpiration.low >>> 0, message.breachWatchExpiration.high >>> 0, false).toBigInt(); else if (typeof message.breachWatchExpiration === "number") object.breachWatchExpiration = options.longs === String ? String(message.breachWatchExpiration) : message.breachWatchExpiration; else object.breachWatchExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.breachWatchExpiration) : options.longs === Number ? new $util.LongBits(message.breachWatchExpiration.low >>> 0, message.breachWatchExpiration.high >>> 0).toNumber() : message.breachWatchExpiration; - if (message.breachWatchDateCreated != null && message.hasOwnProperty("breachWatchDateCreated")) + if (message.breachWatchDateCreated != null && Object.hasOwnProperty.call(message, "breachWatchDateCreated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.breachWatchDateCreated = typeof message.breachWatchDateCreated === "number" ? BigInt(message.breachWatchDateCreated) : $util.Long.fromBits(message.breachWatchDateCreated.low >>> 0, message.breachWatchDateCreated.high >>> 0, false).toBigInt(); else if (typeof message.breachWatchDateCreated === "number") object.breachWatchDateCreated = options.longs === String ? String(message.breachWatchDateCreated) : message.breachWatchDateCreated; else object.breachWatchDateCreated = options.longs === String ? $util.Long.prototype.toString.call(message.breachWatchDateCreated) : options.longs === Number ? new $util.LongBits(message.breachWatchDateCreated.low >>> 0, message.breachWatchDateCreated.high >>> 0).toNumber() : message.breachWatchDateCreated; - if (message.error != null && message.hasOwnProperty("error")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) object.error = $root.AccountSummary.Result.toObject(message.error, options, q + 1); - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.storageExpiration != null && message.hasOwnProperty("storageExpiration")) + if (message.storageExpiration != null && Object.hasOwnProperty.call(message, "storageExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.storageExpiration = typeof message.storageExpiration === "number" ? BigInt(message.storageExpiration) : $util.Long.fromBits(message.storageExpiration.low >>> 0, message.storageExpiration.high >>> 0, false).toBigInt(); else if (typeof message.storageExpiration === "number") object.storageExpiration = options.longs === String ? String(message.storageExpiration) : message.storageExpiration; else object.storageExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.storageExpiration) : options.longs === Number ? new $util.LongBits(message.storageExpiration.low >>> 0, message.storageExpiration.high >>> 0).toNumber() : message.storageExpiration; - if (message.uploadsCount != null && message.hasOwnProperty("uploadsCount")) + if (message.uploadsCount != null && Object.hasOwnProperty.call(message, "uploadsCount")) object.uploadsCount = message.uploadsCount; - if (message.units != null && message.hasOwnProperty("units")) + if (message.units != null && Object.hasOwnProperty.call(message, "units")) object.units = message.units; - if (message.pendingEnterprise != null && message.hasOwnProperty("pendingEnterprise")) + if (message.pendingEnterprise != null && Object.hasOwnProperty.call(message, "pendingEnterprise")) object.pendingEnterprise = message.pendingEnterprise; - if (message.isPamEnabled != null && message.hasOwnProperty("isPamEnabled")) + if (message.isPamEnabled != null && Object.hasOwnProperty.call(message, "isPamEnabled")) object.isPamEnabled = message.isPamEnabled; - if (message.isKsmEnabled != null && message.hasOwnProperty("isKsmEnabled")) + if (message.isKsmEnabled != null && Object.hasOwnProperty.call(message, "isKsmEnabled")) object.isKsmEnabled = message.isKsmEnabled; return object; }; @@ -160562,7 +161508,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ AddOn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -160660,28 +161606,28 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.licenseKeyId != null && message.hasOwnProperty("licenseKeyId")) + if (message.licenseKeyId != null && Object.hasOwnProperty.call(message, "licenseKeyId")) if (!$util.isInteger(message.licenseKeyId)) return "licenseKeyId: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) if (!$util.isInteger(message.expirationDate) && !(message.expirationDate && $util.isInteger(message.expirationDate.low) && $util.isInteger(message.expirationDate.high))) return "expirationDate: integer|Long expected"; - if (message.createdDate != null && message.hasOwnProperty("createdDate")) + if (message.createdDate != null && Object.hasOwnProperty.call(message, "createdDate")) if (!$util.isInteger(message.createdDate) && !(message.createdDate && $util.isInteger(message.createdDate.low) && $util.isInteger(message.createdDate.high))) return "createdDate: integer|Long expected"; - if (message.isTrial != null && message.hasOwnProperty("isTrial")) + if (message.isTrial != null && Object.hasOwnProperty.call(message, "isTrial")) if (typeof message.isTrial !== "boolean") return "isTrial: boolean expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; - if (message.scanned != null && message.hasOwnProperty("scanned")) + if (message.scanned != null && Object.hasOwnProperty.call(message, "scanned")) if (typeof message.scanned !== "boolean") return "scanned: boolean expected"; - if (message.featureDisable != null && message.hasOwnProperty("featureDisable")) + if (message.featureDisable != null && Object.hasOwnProperty.call(message, "featureDisable")) if (typeof message.featureDisable !== "boolean") return "featureDisable: boolean expected"; return null; @@ -160698,6 +161644,8 @@ export const AccountSummary = $root.AccountSummary = (() => { AddOn.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.AddOn) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.AddOn: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -160771,31 +161719,31 @@ export const AccountSummary = $root.AccountSummary = (() => { object.scanned = false; object.featureDisable = false; } - if (message.licenseKeyId != null && message.hasOwnProperty("licenseKeyId")) + if (message.licenseKeyId != null && Object.hasOwnProperty.call(message, "licenseKeyId")) object.licenseKeyId = message.licenseKeyId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expirationDate = typeof message.expirationDate === "number" ? BigInt(message.expirationDate) : $util.Long.fromBits(message.expirationDate.low >>> 0, message.expirationDate.high >>> 0, false).toBigInt(); else if (typeof message.expirationDate === "number") object.expirationDate = options.longs === String ? String(message.expirationDate) : message.expirationDate; else object.expirationDate = options.longs === String ? $util.Long.prototype.toString.call(message.expirationDate) : options.longs === Number ? new $util.LongBits(message.expirationDate.low >>> 0, message.expirationDate.high >>> 0).toNumber() : message.expirationDate; - if (message.createdDate != null && message.hasOwnProperty("createdDate")) + if (message.createdDate != null && Object.hasOwnProperty.call(message, "createdDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.createdDate = typeof message.createdDate === "number" ? BigInt(message.createdDate) : $util.Long.fromBits(message.createdDate.low >>> 0, message.createdDate.high >>> 0, false).toBigInt(); else if (typeof message.createdDate === "number") object.createdDate = options.longs === String ? String(message.createdDate) : message.createdDate; else object.createdDate = options.longs === String ? $util.Long.prototype.toString.call(message.createdDate) : options.longs === Number ? new $util.LongBits(message.createdDate.low >>> 0, message.createdDate.high >>> 0).toNumber() : message.createdDate; - if (message.isTrial != null && message.hasOwnProperty("isTrial")) + if (message.isTrial != null && Object.hasOwnProperty.call(message, "isTrial")) object.isTrial = message.isTrial; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) object.enabled = message.enabled; - if (message.scanned != null && message.hasOwnProperty("scanned")) + if (message.scanned != null && Object.hasOwnProperty.call(message, "scanned")) object.scanned = message.scanned; - if (message.featureDisable != null && message.hasOwnProperty("featureDisable")) + if (message.featureDisable != null && Object.hasOwnProperty.call(message, "featureDisable")) object.featureDisable = message.featureDisable; return object; }; @@ -161359,7 +162307,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ Settings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -161606,13 +162554,13 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) if (typeof message.audit !== "boolean") return "audit: boolean expected"; - if (message.mustPerformAccountShareBy != null && message.hasOwnProperty("mustPerformAccountShareBy")) + if (message.mustPerformAccountShareBy != null && Object.hasOwnProperty.call(message, "mustPerformAccountShareBy")) if (!$util.isInteger(message.mustPerformAccountShareBy) && !(message.mustPerformAccountShareBy && $util.isInteger(message.mustPerformAccountShareBy.low) && $util.isInteger(message.mustPerformAccountShareBy.high))) return "mustPerformAccountShareBy: integer|Long expected"; - if (message.shareAccountTo != null && message.hasOwnProperty("shareAccountTo")) { + if (message.shareAccountTo != null && Object.hasOwnProperty.call(message, "shareAccountTo")) { if (!Array.isArray(message.shareAccountTo)) return "shareAccountTo: array expected"; for (let i = 0; i < message.shareAccountTo.length; ++i) { @@ -161621,7 +162569,7 @@ export const AccountSummary = $root.AccountSummary = (() => { return "shareAccountTo." + error; } } - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (let i = 0; i < message.rules.length; ++i) { @@ -161630,34 +162578,34 @@ export const AccountSummary = $root.AccountSummary = (() => { return "rules." + error; } } - if (message.passwordRulesIntro != null && message.hasOwnProperty("passwordRulesIntro")) + if (message.passwordRulesIntro != null && Object.hasOwnProperty.call(message, "passwordRulesIntro")) if (!$util.isString(message.passwordRulesIntro)) return "passwordRulesIntro: string expected"; - if (message.autoBackupDays != null && message.hasOwnProperty("autoBackupDays")) + if (message.autoBackupDays != null && Object.hasOwnProperty.call(message, "autoBackupDays")) if (!$util.isInteger(message.autoBackupDays)) return "autoBackupDays: integer expected"; - if (message.theme != null && message.hasOwnProperty("theme")) + if (message.theme != null && Object.hasOwnProperty.call(message, "theme")) if (!$util.isString(message.theme)) return "theme: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) if (!$util.isString(message.channel)) return "channel: string expected"; - if (message.channelValue != null && message.hasOwnProperty("channelValue")) + if (message.channelValue != null && Object.hasOwnProperty.call(message, "channelValue")) if (!$util.isString(message.channelValue)) return "channelValue: string expected"; - if (message.rsaConfigured != null && message.hasOwnProperty("rsaConfigured")) + if (message.rsaConfigured != null && Object.hasOwnProperty.call(message, "rsaConfigured")) if (typeof message.rsaConfigured !== "boolean") return "rsaConfigured: boolean expected"; - if (message.emailVerified != null && message.hasOwnProperty("emailVerified")) + if (message.emailVerified != null && Object.hasOwnProperty.call(message, "emailVerified")) if (typeof message.emailVerified !== "boolean") return "emailVerified: boolean expected"; - if (message.masterPasswordLastModified != null && message.hasOwnProperty("masterPasswordLastModified")) + if (message.masterPasswordLastModified != null && Object.hasOwnProperty.call(message, "masterPasswordLastModified")) if (typeof message.masterPasswordLastModified !== "number") return "masterPasswordLastModified: number expected"; - if (message.accountFolderKey != null && message.hasOwnProperty("accountFolderKey")) + if (message.accountFolderKey != null && Object.hasOwnProperty.call(message, "accountFolderKey")) if (!(message.accountFolderKey && typeof message.accountFolderKey.length === "number" || $util.isString(message.accountFolderKey))) return "accountFolderKey: buffer expected"; - if (message.securityKeys != null && message.hasOwnProperty("securityKeys")) { + if (message.securityKeys != null && Object.hasOwnProperty.call(message, "securityKeys")) { if (!Array.isArray(message.securityKeys)) return "securityKeys: array expected"; for (let i = 0; i < message.securityKeys.length; ++i) { @@ -161666,7 +162614,7 @@ export const AccountSummary = $root.AccountSummary = (() => { return "securityKeys." + error; } } - if (message.keyValues != null && message.hasOwnProperty("keyValues")) { + if (message.keyValues != null && Object.hasOwnProperty.call(message, "keyValues")) { if (!Array.isArray(message.keyValues)) return "keyValues: array expected"; for (let i = 0; i < message.keyValues.length; ++i) { @@ -161675,73 +162623,73 @@ export const AccountSummary = $root.AccountSummary = (() => { return "keyValues." + error; } } - if (message.ssoUser != null && message.hasOwnProperty("ssoUser")) + if (message.ssoUser != null && Object.hasOwnProperty.call(message, "ssoUser")) if (typeof message.ssoUser !== "boolean") return "ssoUser: boolean expected"; - if (message.onlineAccessOnly != null && message.hasOwnProperty("onlineAccessOnly")) + if (message.onlineAccessOnly != null && Object.hasOwnProperty.call(message, "onlineAccessOnly")) if (typeof message.onlineAccessOnly !== "boolean") return "onlineAccessOnly: boolean expected"; - if (message.masterPasswordExpiry != null && message.hasOwnProperty("masterPasswordExpiry")) + if (message.masterPasswordExpiry != null && Object.hasOwnProperty.call(message, "masterPasswordExpiry")) if (!$util.isInteger(message.masterPasswordExpiry)) return "masterPasswordExpiry: integer expected"; - if (message.twoFactorRequired != null && message.hasOwnProperty("twoFactorRequired")) + if (message.twoFactorRequired != null && Object.hasOwnProperty.call(message, "twoFactorRequired")) if (typeof message.twoFactorRequired !== "boolean") return "twoFactorRequired: boolean expected"; - if (message.disallowExport != null && message.hasOwnProperty("disallowExport")) + if (message.disallowExport != null && Object.hasOwnProperty.call(message, "disallowExport")) if (typeof message.disallowExport !== "boolean") return "disallowExport: boolean expected"; - if (message.restrictFiles != null && message.hasOwnProperty("restrictFiles")) + if (message.restrictFiles != null && Object.hasOwnProperty.call(message, "restrictFiles")) if (typeof message.restrictFiles !== "boolean") return "restrictFiles: boolean expected"; - if (message.restrictAllSharing != null && message.hasOwnProperty("restrictAllSharing")) + if (message.restrictAllSharing != null && Object.hasOwnProperty.call(message, "restrictAllSharing")) if (typeof message.restrictAllSharing !== "boolean") return "restrictAllSharing: boolean expected"; - if (message.restrictSharing != null && message.hasOwnProperty("restrictSharing")) + if (message.restrictSharing != null && Object.hasOwnProperty.call(message, "restrictSharing")) if (typeof message.restrictSharing !== "boolean") return "restrictSharing: boolean expected"; - if (message.restrictSharingIncomingAll != null && message.hasOwnProperty("restrictSharingIncomingAll")) + if (message.restrictSharingIncomingAll != null && Object.hasOwnProperty.call(message, "restrictSharingIncomingAll")) if (typeof message.restrictSharingIncomingAll !== "boolean") return "restrictSharingIncomingAll: boolean expected"; - if (message.restrictSharingIncomingEnterprise != null && message.hasOwnProperty("restrictSharingIncomingEnterprise")) + if (message.restrictSharingIncomingEnterprise != null && Object.hasOwnProperty.call(message, "restrictSharingIncomingEnterprise")) if (typeof message.restrictSharingIncomingEnterprise !== "boolean") return "restrictSharingIncomingEnterprise: boolean expected"; - if (message.logoutTimer != null && message.hasOwnProperty("logoutTimer")) + if (message.logoutTimer != null && Object.hasOwnProperty.call(message, "logoutTimer")) if (!$util.isInteger(message.logoutTimer) && !(message.logoutTimer && $util.isInteger(message.logoutTimer.low) && $util.isInteger(message.logoutTimer.high))) return "logoutTimer: integer|Long expected"; - if (message.persistentLogin != null && message.hasOwnProperty("persistentLogin")) + if (message.persistentLogin != null && Object.hasOwnProperty.call(message, "persistentLogin")) if (typeof message.persistentLogin !== "boolean") return "persistentLogin: boolean expected"; - if (message.ipDisableAutoApprove != null && message.hasOwnProperty("ipDisableAutoApprove")) + if (message.ipDisableAutoApprove != null && Object.hasOwnProperty.call(message, "ipDisableAutoApprove")) if (typeof message.ipDisableAutoApprove !== "boolean") return "ipDisableAutoApprove: boolean expected"; - if (message.shareDataKeyWithEccPublicKey != null && message.hasOwnProperty("shareDataKeyWithEccPublicKey")) + if (message.shareDataKeyWithEccPublicKey != null && Object.hasOwnProperty.call(message, "shareDataKeyWithEccPublicKey")) if (typeof message.shareDataKeyWithEccPublicKey !== "boolean") return "shareDataKeyWithEccPublicKey: boolean expected"; - if (message.shareDataKeyWithDevicePublicKey != null && message.hasOwnProperty("shareDataKeyWithDevicePublicKey")) + if (message.shareDataKeyWithDevicePublicKey != null && Object.hasOwnProperty.call(message, "shareDataKeyWithDevicePublicKey")) if (typeof message.shareDataKeyWithDevicePublicKey !== "boolean") return "shareDataKeyWithDevicePublicKey: boolean expected"; - if (message.RecordTypesCounter != null && message.hasOwnProperty("RecordTypesCounter")) + if (message.RecordTypesCounter != null && Object.hasOwnProperty.call(message, "RecordTypesCounter")) if (!$util.isInteger(message.RecordTypesCounter)) return "RecordTypesCounter: integer expected"; - if (message.RecordTypesEnterpriseCounter != null && message.hasOwnProperty("RecordTypesEnterpriseCounter")) + if (message.RecordTypesEnterpriseCounter != null && Object.hasOwnProperty.call(message, "RecordTypesEnterpriseCounter")) if (!$util.isInteger(message.RecordTypesEnterpriseCounter)) return "RecordTypesEnterpriseCounter: integer expected"; - if (message.recordTypesEnabled != null && message.hasOwnProperty("recordTypesEnabled")) + if (message.recordTypesEnabled != null && Object.hasOwnProperty.call(message, "recordTypesEnabled")) if (typeof message.recordTypesEnabled !== "boolean") return "recordTypesEnabled: boolean expected"; - if (message.canManageRecordTypes != null && message.hasOwnProperty("canManageRecordTypes")) + if (message.canManageRecordTypes != null && Object.hasOwnProperty.call(message, "canManageRecordTypes")) if (typeof message.canManageRecordTypes !== "boolean") return "canManageRecordTypes: boolean expected"; - if (message.recordTypesPAMCounter != null && message.hasOwnProperty("recordTypesPAMCounter")) + if (message.recordTypesPAMCounter != null && Object.hasOwnProperty.call(message, "recordTypesPAMCounter")) if (!$util.isInteger(message.recordTypesPAMCounter)) return "recordTypesPAMCounter: integer expected"; - if (message.logoutTimerMinutes != null && message.hasOwnProperty("logoutTimerMinutes")) + if (message.logoutTimerMinutes != null && Object.hasOwnProperty.call(message, "logoutTimerMinutes")) if (!$util.isInteger(message.logoutTimerMinutes)) return "logoutTimerMinutes: integer expected"; - if (message.securityKeysNoUserVerify != null && message.hasOwnProperty("securityKeysNoUserVerify")) + if (message.securityKeysNoUserVerify != null && Object.hasOwnProperty.call(message, "securityKeysNoUserVerify")) if (typeof message.securityKeysNoUserVerify !== "boolean") return "securityKeysNoUserVerify: boolean expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { + if (message.channels != null && Object.hasOwnProperty.call(message, "channels")) { if (!Array.isArray(message.channels)) return "channels: array expected"; for (let i = 0; i < message.channels.length; ++i) @@ -161761,17 +162709,17 @@ export const AccountSummary = $root.AccountSummary = (() => { break; } } - if (message.personalUsernames != null && message.hasOwnProperty("personalUsernames")) { + if (message.personalUsernames != null && Object.hasOwnProperty.call(message, "personalUsernames")) { if (!Array.isArray(message.personalUsernames)) return "personalUsernames: array expected"; for (let i = 0; i < message.personalUsernames.length; ++i) if (!$util.isString(message.personalUsernames[i])) return "personalUsernames: string[] expected"; } - if (message.maxIpDistance != null && message.hasOwnProperty("maxIpDistance")) + if (message.maxIpDistance != null && Object.hasOwnProperty.call(message, "maxIpDistance")) if (!$util.isInteger(message.maxIpDistance)) return "maxIpDistance: integer expected"; - if (message.maxIpDistanceEffective != null && message.hasOwnProperty("maxIpDistanceEffective")) + if (message.maxIpDistanceEffective != null && Object.hasOwnProperty.call(message, "maxIpDistanceEffective")) if (!$util.isInteger(message.maxIpDistanceEffective)) return "maxIpDistanceEffective: integer expected"; return null; @@ -161788,6 +162736,8 @@ export const AccountSummary = $root.AccountSummary = (() => { Settings.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.Settings) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.Settings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -161809,7 +162759,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Settings.shareAccountTo: array expected"); message.shareAccountTo = []; for (let i = 0; i < object.shareAccountTo.length; ++i) { - if (typeof object.shareAccountTo[i] !== "object") + if (!$util.isObject(object.shareAccountTo[i])) throw TypeError(".AccountSummary.Settings.shareAccountTo: object expected"); message.shareAccountTo[i] = $root.AccountSummary.MissingAccountShareKey.fromObject(object.shareAccountTo[i], long + 1); } @@ -161819,7 +162769,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Settings.rules: array expected"); message.rules = []; for (let i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".AccountSummary.Settings.rules: object expected"); message.rules[i] = $root.AccountSummary.PasswordRule.fromObject(object.rules[i], long + 1); } @@ -161850,7 +162800,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Settings.securityKeys: array expected"); message.securityKeys = []; for (let i = 0; i < object.securityKeys.length; ++i) { - if (typeof object.securityKeys[i] !== "object") + if (!$util.isObject(object.securityKeys[i])) throw TypeError(".AccountSummary.Settings.securityKeys: object expected"); message.securityKeys[i] = $root.AccountSummary.SecurityKey.fromObject(object.securityKeys[i], long + 1); } @@ -161860,7 +162810,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Settings.keyValues: array expected"); message.keyValues = []; for (let i = 0; i < object.keyValues.length; ++i) { - if (typeof object.keyValues[i] !== "object") + if (!$util.isObject(object.keyValues[i])) throw TypeError(".AccountSummary.Settings.keyValues: object expected"); message.keyValues[i] = $root.AccountSummary.KeyValue.fromObject(object.keyValues[i], long + 1); } @@ -162059,9 +163009,9 @@ export const AccountSummary = $root.AccountSummary = (() => { object.maxIpDistance = 0; object.maxIpDistanceEffective = 0; } - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = message.audit; - if (message.mustPerformAccountShareBy != null && message.hasOwnProperty("mustPerformAccountShareBy")) + if (message.mustPerformAccountShareBy != null && Object.hasOwnProperty.call(message, "mustPerformAccountShareBy")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.mustPerformAccountShareBy = typeof message.mustPerformAccountShareBy === "number" ? BigInt(message.mustPerformAccountShareBy) : $util.Long.fromBits(message.mustPerformAccountShareBy.low >>> 0, message.mustPerformAccountShareBy.high >>> 0, false).toBigInt(); else if (typeof message.mustPerformAccountShareBy === "number") @@ -162078,23 +163028,23 @@ export const AccountSummary = $root.AccountSummary = (() => { for (let j = 0; j < message.rules.length; ++j) object.rules[j] = $root.AccountSummary.PasswordRule.toObject(message.rules[j], options, q + 1); } - if (message.passwordRulesIntro != null && message.hasOwnProperty("passwordRulesIntro")) + if (message.passwordRulesIntro != null && Object.hasOwnProperty.call(message, "passwordRulesIntro")) object.passwordRulesIntro = message.passwordRulesIntro; - if (message.autoBackupDays != null && message.hasOwnProperty("autoBackupDays")) + if (message.autoBackupDays != null && Object.hasOwnProperty.call(message, "autoBackupDays")) object.autoBackupDays = message.autoBackupDays; - if (message.theme != null && message.hasOwnProperty("theme")) + if (message.theme != null && Object.hasOwnProperty.call(message, "theme")) object.theme = message.theme; - if (message.channel != null && message.hasOwnProperty("channel")) + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) object.channel = message.channel; - if (message.channelValue != null && message.hasOwnProperty("channelValue")) + if (message.channelValue != null && Object.hasOwnProperty.call(message, "channelValue")) object.channelValue = message.channelValue; - if (message.rsaConfigured != null && message.hasOwnProperty("rsaConfigured")) + if (message.rsaConfigured != null && Object.hasOwnProperty.call(message, "rsaConfigured")) object.rsaConfigured = message.rsaConfigured; - if (message.emailVerified != null && message.hasOwnProperty("emailVerified")) + if (message.emailVerified != null && Object.hasOwnProperty.call(message, "emailVerified")) object.emailVerified = message.emailVerified; - if (message.masterPasswordLastModified != null && message.hasOwnProperty("masterPasswordLastModified")) + if (message.masterPasswordLastModified != null && Object.hasOwnProperty.call(message, "masterPasswordLastModified")) object.masterPasswordLastModified = options.json && !isFinite(message.masterPasswordLastModified) ? String(message.masterPasswordLastModified) : message.masterPasswordLastModified; - if (message.accountFolderKey != null && message.hasOwnProperty("accountFolderKey")) + if (message.accountFolderKey != null && Object.hasOwnProperty.call(message, "accountFolderKey")) object.accountFolderKey = options.bytes === String ? $util.base64.encode(message.accountFolderKey, 0, message.accountFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountFolderKey) : message.accountFolderKey; if (message.securityKeys && message.securityKeys.length) { object.securityKeys = []; @@ -162106,54 +163056,54 @@ export const AccountSummary = $root.AccountSummary = (() => { for (let j = 0; j < message.keyValues.length; ++j) object.keyValues[j] = $root.AccountSummary.KeyValue.toObject(message.keyValues[j], options, q + 1); } - if (message.ssoUser != null && message.hasOwnProperty("ssoUser")) + if (message.ssoUser != null && Object.hasOwnProperty.call(message, "ssoUser")) object.ssoUser = message.ssoUser; - if (message.onlineAccessOnly != null && message.hasOwnProperty("onlineAccessOnly")) + if (message.onlineAccessOnly != null && Object.hasOwnProperty.call(message, "onlineAccessOnly")) object.onlineAccessOnly = message.onlineAccessOnly; - if (message.masterPasswordExpiry != null && message.hasOwnProperty("masterPasswordExpiry")) + if (message.masterPasswordExpiry != null && Object.hasOwnProperty.call(message, "masterPasswordExpiry")) object.masterPasswordExpiry = message.masterPasswordExpiry; - if (message.twoFactorRequired != null && message.hasOwnProperty("twoFactorRequired")) + if (message.twoFactorRequired != null && Object.hasOwnProperty.call(message, "twoFactorRequired")) object.twoFactorRequired = message.twoFactorRequired; - if (message.disallowExport != null && message.hasOwnProperty("disallowExport")) + if (message.disallowExport != null && Object.hasOwnProperty.call(message, "disallowExport")) object.disallowExport = message.disallowExport; - if (message.restrictFiles != null && message.hasOwnProperty("restrictFiles")) + if (message.restrictFiles != null && Object.hasOwnProperty.call(message, "restrictFiles")) object.restrictFiles = message.restrictFiles; - if (message.restrictAllSharing != null && message.hasOwnProperty("restrictAllSharing")) + if (message.restrictAllSharing != null && Object.hasOwnProperty.call(message, "restrictAllSharing")) object.restrictAllSharing = message.restrictAllSharing; - if (message.restrictSharing != null && message.hasOwnProperty("restrictSharing")) + if (message.restrictSharing != null && Object.hasOwnProperty.call(message, "restrictSharing")) object.restrictSharing = message.restrictSharing; - if (message.restrictSharingIncomingAll != null && message.hasOwnProperty("restrictSharingIncomingAll")) + if (message.restrictSharingIncomingAll != null && Object.hasOwnProperty.call(message, "restrictSharingIncomingAll")) object.restrictSharingIncomingAll = message.restrictSharingIncomingAll; - if (message.restrictSharingIncomingEnterprise != null && message.hasOwnProperty("restrictSharingIncomingEnterprise")) + if (message.restrictSharingIncomingEnterprise != null && Object.hasOwnProperty.call(message, "restrictSharingIncomingEnterprise")) object.restrictSharingIncomingEnterprise = message.restrictSharingIncomingEnterprise; - if (message.logoutTimer != null && message.hasOwnProperty("logoutTimer")) + if (message.logoutTimer != null && Object.hasOwnProperty.call(message, "logoutTimer")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.logoutTimer = typeof message.logoutTimer === "number" ? BigInt(message.logoutTimer) : $util.Long.fromBits(message.logoutTimer.low >>> 0, message.logoutTimer.high >>> 0, false).toBigInt(); else if (typeof message.logoutTimer === "number") object.logoutTimer = options.longs === String ? String(message.logoutTimer) : message.logoutTimer; else object.logoutTimer = options.longs === String ? $util.Long.prototype.toString.call(message.logoutTimer) : options.longs === Number ? new $util.LongBits(message.logoutTimer.low >>> 0, message.logoutTimer.high >>> 0).toNumber() : message.logoutTimer; - if (message.persistentLogin != null && message.hasOwnProperty("persistentLogin")) + if (message.persistentLogin != null && Object.hasOwnProperty.call(message, "persistentLogin")) object.persistentLogin = message.persistentLogin; - if (message.ipDisableAutoApprove != null && message.hasOwnProperty("ipDisableAutoApprove")) + if (message.ipDisableAutoApprove != null && Object.hasOwnProperty.call(message, "ipDisableAutoApprove")) object.ipDisableAutoApprove = message.ipDisableAutoApprove; - if (message.shareDataKeyWithEccPublicKey != null && message.hasOwnProperty("shareDataKeyWithEccPublicKey")) + if (message.shareDataKeyWithEccPublicKey != null && Object.hasOwnProperty.call(message, "shareDataKeyWithEccPublicKey")) object.shareDataKeyWithEccPublicKey = message.shareDataKeyWithEccPublicKey; - if (message.shareDataKeyWithDevicePublicKey != null && message.hasOwnProperty("shareDataKeyWithDevicePublicKey")) + if (message.shareDataKeyWithDevicePublicKey != null && Object.hasOwnProperty.call(message, "shareDataKeyWithDevicePublicKey")) object.shareDataKeyWithDevicePublicKey = message.shareDataKeyWithDevicePublicKey; - if (message.RecordTypesCounter != null && message.hasOwnProperty("RecordTypesCounter")) + if (message.RecordTypesCounter != null && Object.hasOwnProperty.call(message, "RecordTypesCounter")) object.RecordTypesCounter = message.RecordTypesCounter; - if (message.RecordTypesEnterpriseCounter != null && message.hasOwnProperty("RecordTypesEnterpriseCounter")) + if (message.RecordTypesEnterpriseCounter != null && Object.hasOwnProperty.call(message, "RecordTypesEnterpriseCounter")) object.RecordTypesEnterpriseCounter = message.RecordTypesEnterpriseCounter; - if (message.recordTypesEnabled != null && message.hasOwnProperty("recordTypesEnabled")) + if (message.recordTypesEnabled != null && Object.hasOwnProperty.call(message, "recordTypesEnabled")) object.recordTypesEnabled = message.recordTypesEnabled; - if (message.canManageRecordTypes != null && message.hasOwnProperty("canManageRecordTypes")) + if (message.canManageRecordTypes != null && Object.hasOwnProperty.call(message, "canManageRecordTypes")) object.canManageRecordTypes = message.canManageRecordTypes; - if (message.recordTypesPAMCounter != null && message.hasOwnProperty("recordTypesPAMCounter")) + if (message.recordTypesPAMCounter != null && Object.hasOwnProperty.call(message, "recordTypesPAMCounter")) object.recordTypesPAMCounter = message.recordTypesPAMCounter; - if (message.logoutTimerMinutes != null && message.hasOwnProperty("logoutTimerMinutes")) + if (message.logoutTimerMinutes != null && Object.hasOwnProperty.call(message, "logoutTimerMinutes")) object.logoutTimerMinutes = message.logoutTimerMinutes; - if (message.securityKeysNoUserVerify != null && message.hasOwnProperty("securityKeysNoUserVerify")) + if (message.securityKeysNoUserVerify != null && Object.hasOwnProperty.call(message, "securityKeysNoUserVerify")) object.securityKeysNoUserVerify = message.securityKeysNoUserVerify; if (message.channels && message.channels.length) { object.channels = []; @@ -162165,9 +163115,9 @@ export const AccountSummary = $root.AccountSummary = (() => { for (let j = 0; j < message.personalUsernames.length; ++j) object.personalUsernames[j] = message.personalUsernames[j]; } - if (message.maxIpDistance != null && message.hasOwnProperty("maxIpDistance")) + if (message.maxIpDistance != null && Object.hasOwnProperty.call(message, "maxIpDistance")) object.maxIpDistance = message.maxIpDistance; - if (message.maxIpDistanceEffective != null && message.hasOwnProperty("maxIpDistanceEffective")) + if (message.maxIpDistanceEffective != null && Object.hasOwnProperty.call(message, "maxIpDistanceEffective")) object.maxIpDistanceEffective = message.maxIpDistanceEffective; return object; }; @@ -162287,7 +163237,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ KeyValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -162361,10 +163311,10 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -162381,6 +163331,8 @@ export const AccountSummary = $root.AccountSummary = (() => { KeyValue.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.KeyValue) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.KeyValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -162414,9 +163366,9 @@ export const AccountSummary = $root.AccountSummary = (() => { object.key = ""; object.value = ""; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -162536,7 +163488,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ KeyValueBoolean.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -162610,10 +163562,10 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "boolean") return "value: boolean expected"; return null; @@ -162630,6 +163582,8 @@ export const AccountSummary = $root.AccountSummary = (() => { KeyValueBoolean.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.KeyValueBoolean) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.KeyValueBoolean: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -162663,9 +163617,9 @@ export const AccountSummary = $root.AccountSummary = (() => { object.key = ""; object.value = false; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -162785,7 +163739,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ KeyValueLong.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -162859,10 +163813,10 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -162879,6 +163833,8 @@ export const AccountSummary = $root.AccountSummary = (() => { KeyValueLong.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.KeyValueLong) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.KeyValueLong: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -162923,9 +163879,9 @@ export const AccountSummary = $root.AccountSummary = (() => { } else object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, false).toBigInt(); else if (typeof message.value === "number") @@ -163061,7 +164017,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ Result.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -163139,13 +164095,13 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) if (!$util.isString(message.resultCode)) return "resultCode: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) if (!$util.isString(message.result)) return "result: string expected"; return null; @@ -163162,6 +164118,8 @@ export const AccountSummary = $root.AccountSummary = (() => { Result.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.Result) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.Result: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -163198,11 +164156,11 @@ export const AccountSummary = $root.AccountSummary = (() => { object.message = ""; object.result = ""; } - if (message.resultCode != null && message.hasOwnProperty("resultCode")) + if (message.resultCode != null && Object.hasOwnProperty.call(message, "resultCode")) object.resultCode = message.resultCode; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -163352,7 +164310,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ Enforcements.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -163442,7 +164400,7 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.strings != null && message.hasOwnProperty("strings")) { + if (message.strings != null && Object.hasOwnProperty.call(message, "strings")) { if (!Array.isArray(message.strings)) return "strings: array expected"; for (let i = 0; i < message.strings.length; ++i) { @@ -163451,7 +164409,7 @@ export const AccountSummary = $root.AccountSummary = (() => { return "strings." + error; } } - if (message.booleans != null && message.hasOwnProperty("booleans")) { + if (message.booleans != null && Object.hasOwnProperty.call(message, "booleans")) { if (!Array.isArray(message.booleans)) return "booleans: array expected"; for (let i = 0; i < message.booleans.length; ++i) { @@ -163460,7 +164418,7 @@ export const AccountSummary = $root.AccountSummary = (() => { return "booleans." + error; } } - if (message.longs != null && message.hasOwnProperty("longs")) { + if (message.longs != null && Object.hasOwnProperty.call(message, "longs")) { if (!Array.isArray(message.longs)) return "longs: array expected"; for (let i = 0; i < message.longs.length; ++i) { @@ -163469,7 +164427,7 @@ export const AccountSummary = $root.AccountSummary = (() => { return "longs." + error; } } - if (message.jsons != null && message.hasOwnProperty("jsons")) { + if (message.jsons != null && Object.hasOwnProperty.call(message, "jsons")) { if (!Array.isArray(message.jsons)) return "jsons: array expected"; for (let i = 0; i < message.jsons.length; ++i) { @@ -163492,6 +164450,8 @@ export const AccountSummary = $root.AccountSummary = (() => { Enforcements.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.Enforcements) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.Enforcements: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -163502,7 +164462,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Enforcements.strings: array expected"); message.strings = []; for (let i = 0; i < object.strings.length; ++i) { - if (typeof object.strings[i] !== "object") + if (!$util.isObject(object.strings[i])) throw TypeError(".AccountSummary.Enforcements.strings: object expected"); message.strings[i] = $root.AccountSummary.KeyValue.fromObject(object.strings[i], long + 1); } @@ -163512,7 +164472,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Enforcements.booleans: array expected"); message.booleans = []; for (let i = 0; i < object.booleans.length; ++i) { - if (typeof object.booleans[i] !== "object") + if (!$util.isObject(object.booleans[i])) throw TypeError(".AccountSummary.Enforcements.booleans: object expected"); message.booleans[i] = $root.AccountSummary.KeyValueBoolean.fromObject(object.booleans[i], long + 1); } @@ -163522,7 +164482,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Enforcements.longs: array expected"); message.longs = []; for (let i = 0; i < object.longs.length; ++i) { - if (typeof object.longs[i] !== "object") + if (!$util.isObject(object.longs[i])) throw TypeError(".AccountSummary.Enforcements.longs: object expected"); message.longs[i] = $root.AccountSummary.KeyValueLong.fromObject(object.longs[i], long + 1); } @@ -163532,7 +164492,7 @@ export const AccountSummary = $root.AccountSummary = (() => { throw TypeError(".AccountSummary.Enforcements.jsons: array expected"); message.jsons = []; for (let i = 0; i < object.jsons.length; ++i) { - if (typeof object.jsons[i] !== "object") + if (!$util.isObject(object.jsons[i])) throw TypeError(".AccountSummary.Enforcements.jsons: object expected"); message.jsons[i] = $root.AccountSummary.KeyValue.fromObject(object.jsons[i], long + 1); } @@ -163701,7 +164661,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ MissingAccountShareKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -163775,10 +164735,10 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (!$util.isInteger(message.roleId) && !(message.roleId && $util.isInteger(message.roleId.low) && $util.isInteger(message.roleId.high))) return "roleId: integer|Long expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; return null; @@ -163795,6 +164755,8 @@ export const AccountSummary = $root.AccountSummary = (() => { MissingAccountShareKey.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.MissingAccountShareKey) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.MissingAccountShareKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -163848,14 +164810,14 @@ export const AccountSummary = $root.AccountSummary = (() => { object.publicKey = $util.newBuffer(object.publicKey); } } - if (message.roleId != null && message.hasOwnProperty("roleId")) + if (message.roleId != null && Object.hasOwnProperty.call(message, "roleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.roleId = typeof message.roleId === "number" ? BigInt(message.roleId) : $util.Long.fromBits(message.roleId.low >>> 0, message.roleId.high >>> 0, false).toBigInt(); else if (typeof message.roleId === "number") object.roleId = options.longs === String ? String(message.roleId) : message.roleId; else object.roleId = options.longs === String ? $util.Long.prototype.toString.call(message.roleId) : options.longs === Number ? new $util.LongBits(message.roleId.low >>> 0, message.roleId.high >>> 0).toNumber() : message.roleId; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; return object; }; @@ -164019,7 +164981,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ PasswordRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -164109,22 +165071,22 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ruleType != null && message.hasOwnProperty("ruleType")) + if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) if (!$util.isString(message.ruleType)) return "ruleType: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) if (!$util.isString(message.pattern)) return "pattern: string expected"; - if (message.match != null && message.hasOwnProperty("match")) + if (message.match != null && Object.hasOwnProperty.call(message, "match")) if (typeof message.match !== "boolean") return "match: boolean expected"; - if (message.minimum != null && message.hasOwnProperty("minimum")) + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) if (!$util.isInteger(message.minimum)) return "minimum: integer expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -164141,6 +165103,8 @@ export const AccountSummary = $root.AccountSummary = (() => { PasswordRule.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.PasswordRule) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.PasswordRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -164186,17 +165150,17 @@ export const AccountSummary = $root.AccountSummary = (() => { object.description = ""; object.value = ""; } - if (message.ruleType != null && message.hasOwnProperty("ruleType")) + if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) object.ruleType = message.ruleType; - if (message.pattern != null && message.hasOwnProperty("pattern")) + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) object.pattern = message.pattern; - if (message.match != null && message.hasOwnProperty("match")) + if (message.match != null && Object.hasOwnProperty.call(message, "match")) object.match = message.match; - if (message.minimum != null && message.hasOwnProperty("minimum")) + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) object.minimum = message.minimum; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -164349,7 +165313,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ SecurityKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -164435,19 +165399,19 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.dateAdded != null && message.hasOwnProperty("dateAdded")) + if (message.dateAdded != null && Object.hasOwnProperty.call(message, "dateAdded")) if (!$util.isInteger(message.dateAdded) && !(message.dateAdded && $util.isInteger(message.dateAdded.low) && $util.isInteger(message.dateAdded.high))) return "dateAdded: integer|Long expected"; - if (message.isValid != null && message.hasOwnProperty("isValid")) + if (message.isValid != null && Object.hasOwnProperty.call(message, "isValid")) if (typeof message.isValid !== "boolean") return "isValid: boolean expected"; - if (message.deviceRegistration != null && message.hasOwnProperty("deviceRegistration")) { + if (message.deviceRegistration != null && Object.hasOwnProperty.call(message, "deviceRegistration")) { let error = $root.AccountSummary.DeviceRegistration.verify(message.deviceRegistration, long + 1); if (error) return "deviceRegistration." + error; @@ -164466,6 +165430,8 @@ export const AccountSummary = $root.AccountSummary = (() => { SecurityKey.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.SecurityKey) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.SecurityKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -164494,7 +165460,7 @@ export const AccountSummary = $root.AccountSummary = (() => { if (object.isValid != null) message.isValid = Boolean(object.isValid); if (object.deviceRegistration != null) { - if (typeof object.deviceRegistration !== "object") + if (!$util.isObject(object.deviceRegistration)) throw TypeError(".AccountSummary.SecurityKey.deviceRegistration: object expected"); message.deviceRegistration = $root.AccountSummary.DeviceRegistration.fromObject(object.deviceRegistration, long + 1); } @@ -164533,25 +165499,25 @@ export const AccountSummary = $root.AccountSummary = (() => { object.isValid = false; object.deviceRegistration = null; } - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.dateAdded != null && message.hasOwnProperty("dateAdded")) + if (message.dateAdded != null && Object.hasOwnProperty.call(message, "dateAdded")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateAdded = typeof message.dateAdded === "number" ? BigInt(message.dateAdded) : $util.Long.fromBits(message.dateAdded.low >>> 0, message.dateAdded.high >>> 0, false).toBigInt(); else if (typeof message.dateAdded === "number") object.dateAdded = options.longs === String ? String(message.dateAdded) : message.dateAdded; else object.dateAdded = options.longs === String ? $util.Long.prototype.toString.call(message.dateAdded) : options.longs === Number ? new $util.LongBits(message.dateAdded.low >>> 0, message.dateAdded.high >>> 0).toNumber() : message.dateAdded; - if (message.isValid != null && message.hasOwnProperty("isValid")) + if (message.isValid != null && Object.hasOwnProperty.call(message, "isValid")) object.isValid = message.isValid; - if (message.deviceRegistration != null && message.hasOwnProperty("deviceRegistration")) + if (message.deviceRegistration != null && Object.hasOwnProperty.call(message, "deviceRegistration")) object.deviceRegistration = $root.AccountSummary.DeviceRegistration.toObject(message.deviceRegistration, options, q + 1); return object; }; @@ -164704,7 +165670,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ DeviceRegistration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -164790,19 +165756,19 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.keyHandle != null && message.hasOwnProperty("keyHandle")) + if (message.keyHandle != null && Object.hasOwnProperty.call(message, "keyHandle")) if (!$util.isString(message.keyHandle)) return "keyHandle: string expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.attestationCert != null && message.hasOwnProperty("attestationCert")) + if (message.attestationCert != null && Object.hasOwnProperty.call(message, "attestationCert")) if (!$util.isString(message.attestationCert)) return "attestationCert: string expected"; - if (message.counter != null && message.hasOwnProperty("counter")) + if (message.counter != null && Object.hasOwnProperty.call(message, "counter")) if (!$util.isInteger(message.counter) && !(message.counter && $util.isInteger(message.counter.low) && $util.isInteger(message.counter.high))) return "counter: integer|Long expected"; - if (message.compromised != null && message.hasOwnProperty("compromised")) + if (message.compromised != null && Object.hasOwnProperty.call(message, "compromised")) if (typeof message.compromised !== "boolean") return "compromised: boolean expected"; return null; @@ -164819,6 +165785,8 @@ export const AccountSummary = $root.AccountSummary = (() => { DeviceRegistration.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.DeviceRegistration) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.DeviceRegistration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -164881,20 +165849,20 @@ export const AccountSummary = $root.AccountSummary = (() => { object.counter = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.compromised = false; } - if (message.keyHandle != null && message.hasOwnProperty("keyHandle")) + if (message.keyHandle != null && Object.hasOwnProperty.call(message, "keyHandle")) object.keyHandle = message.keyHandle; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.attestationCert != null && message.hasOwnProperty("attestationCert")) + if (message.attestationCert != null && Object.hasOwnProperty.call(message, "attestationCert")) object.attestationCert = message.attestationCert; - if (message.counter != null && message.hasOwnProperty("counter")) + if (message.counter != null && Object.hasOwnProperty.call(message, "counter")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.counter = typeof message.counter === "number" ? BigInt(message.counter) : $util.Long.fromBits(message.counter.low >>> 0, message.counter.high >>> 0, false).toBigInt(); else if (typeof message.counter === "number") object.counter = options.longs === String ? String(message.counter) : message.counter; else object.counter = options.longs === String ? $util.Long.prototype.toString.call(message.counter) : options.longs === Number ? new $util.LongBits(message.counter.low >>> 0, message.counter.high >>> 0).toNumber() : message.counter; - if (message.compromised != null && message.hasOwnProperty("compromised")) + if (message.compromised != null && Object.hasOwnProperty.call(message, "compromised")) object.compromised = message.compromised; return object; }; @@ -165025,7 +165993,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ Group.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -165103,13 +166071,13 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.admin != null && message.hasOwnProperty("admin")) + if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) if (typeof message.admin !== "boolean") return "admin: boolean expected"; - if (message.groupVerificationCode != null && message.hasOwnProperty("groupVerificationCode")) + if (message.groupVerificationCode != null && Object.hasOwnProperty.call(message, "groupVerificationCode")) if (!$util.isString(message.groupVerificationCode)) return "groupVerificationCode: string expected"; - if (message.administrator != null && message.hasOwnProperty("administrator")) { + if (message.administrator != null && Object.hasOwnProperty.call(message, "administrator")) { let error = $root.AccountSummary.Administrator.verify(message.administrator, long + 1); if (error) return "administrator." + error; @@ -165128,6 +166096,8 @@ export const AccountSummary = $root.AccountSummary = (() => { Group.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.Group) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.Group: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -165138,7 +166108,7 @@ export const AccountSummary = $root.AccountSummary = (() => { if (object.groupVerificationCode != null) message.groupVerificationCode = String(object.groupVerificationCode); if (object.administrator != null) { - if (typeof object.administrator !== "object") + if (!$util.isObject(object.administrator)) throw TypeError(".AccountSummary.Group.administrator: object expected"); message.administrator = $root.AccountSummary.Administrator.fromObject(object.administrator, long + 1); } @@ -165167,11 +166137,11 @@ export const AccountSummary = $root.AccountSummary = (() => { object.groupVerificationCode = ""; object.administrator = null; } - if (message.admin != null && message.hasOwnProperty("admin")) + if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) object.admin = message.admin; - if (message.groupVerificationCode != null && message.hasOwnProperty("groupVerificationCode")) + if (message.groupVerificationCode != null && Object.hasOwnProperty.call(message, "groupVerificationCode")) object.groupVerificationCode = message.groupVerificationCode; - if (message.administrator != null && message.hasOwnProperty("administrator")) + if (message.administrator != null && Object.hasOwnProperty.call(message, "administrator")) object.administrator = $root.AccountSummary.Administrator.toObject(message.administrator, options, q + 1); return object; }; @@ -165357,7 +166327,7 @@ export const AccountSummary = $root.AccountSummary = (() => { * @returns {$protobuf.Writer} Writer */ Administrator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -165455,28 +166425,28 @@ export const AccountSummary = $root.AccountSummary = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.firstName != null && message.hasOwnProperty("firstName")) + if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName")) if (!$util.isString(message.firstName)) return "firstName: string expected"; - if (message.lastName != null && message.hasOwnProperty("lastName")) + if (message.lastName != null && Object.hasOwnProperty.call(message, "lastName")) if (!$util.isString(message.lastName)) return "lastName: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.currentNumberOfUsers != null && message.hasOwnProperty("currentNumberOfUsers")) + if (message.currentNumberOfUsers != null && Object.hasOwnProperty.call(message, "currentNumberOfUsers")) if (!$util.isInteger(message.currentNumberOfUsers)) return "currentNumberOfUsers: integer expected"; - if (message.numberOfUsers != null && message.hasOwnProperty("numberOfUsers")) + if (message.numberOfUsers != null && Object.hasOwnProperty.call(message, "numberOfUsers")) if (!$util.isInteger(message.numberOfUsers)) return "numberOfUsers: integer expected"; - if (message.subscriptionCode != null && message.hasOwnProperty("subscriptionCode")) + if (message.subscriptionCode != null && Object.hasOwnProperty.call(message, "subscriptionCode")) if (!$util.isString(message.subscriptionCode)) return "subscriptionCode: string expected"; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) if (!$util.isString(message.expirationDate)) return "expirationDate: string expected"; - if (message.purchaseDate != null && message.hasOwnProperty("purchaseDate")) + if (message.purchaseDate != null && Object.hasOwnProperty.call(message, "purchaseDate")) if (!$util.isString(message.purchaseDate)) return "purchaseDate: string expected"; return null; @@ -165493,6 +166463,8 @@ export const AccountSummary = $root.AccountSummary = (() => { Administrator.fromObject = function fromObject(object, long) { if (object instanceof $root.AccountSummary.Administrator) return object; + if (!$util.isObject(object)) + throw TypeError(".AccountSummary.Administrator: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -165544,21 +166516,21 @@ export const AccountSummary = $root.AccountSummary = (() => { object.expirationDate = ""; object.purchaseDate = ""; } - if (message.firstName != null && message.hasOwnProperty("firstName")) + if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName")) object.firstName = message.firstName; - if (message.lastName != null && message.hasOwnProperty("lastName")) + if (message.lastName != null && Object.hasOwnProperty.call(message, "lastName")) object.lastName = message.lastName; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.currentNumberOfUsers != null && message.hasOwnProperty("currentNumberOfUsers")) + if (message.currentNumberOfUsers != null && Object.hasOwnProperty.call(message, "currentNumberOfUsers")) object.currentNumberOfUsers = message.currentNumberOfUsers; - if (message.numberOfUsers != null && message.hasOwnProperty("numberOfUsers")) + if (message.numberOfUsers != null && Object.hasOwnProperty.call(message, "numberOfUsers")) object.numberOfUsers = message.numberOfUsers; - if (message.subscriptionCode != null && message.hasOwnProperty("subscriptionCode")) + if (message.subscriptionCode != null && Object.hasOwnProperty.call(message, "subscriptionCode")) object.subscriptionCode = message.subscriptionCode; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) object.expirationDate = message.expirationDate; - if (message.purchaseDate != null && message.hasOwnProperty("purchaseDate")) + if (message.purchaseDate != null && Object.hasOwnProperty.call(message, "purchaseDate")) object.purchaseDate = message.purchaseDate; return object; }; @@ -165859,7 +166831,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AutomatorSettingValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -165981,22 +166953,22 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.settingId != null && message.hasOwnProperty("settingId")) + if (message.settingId != null && Object.hasOwnProperty.call(message, "settingId")) if (!$util.isInteger(message.settingId) && !(message.settingId && $util.isInteger(message.settingId.low) && $util.isInteger(message.settingId.high))) return "settingId: integer|Long expected"; - if (message.settingTypeId != null && message.hasOwnProperty("settingTypeId")) + if (message.settingTypeId != null && Object.hasOwnProperty.call(message, "settingTypeId")) if (!$util.isInteger(message.settingTypeId)) return "settingTypeId: integer expected"; - if (message.settingTag != null && message.hasOwnProperty("settingTag")) + if (message.settingTag != null && Object.hasOwnProperty.call(message, "settingTag")) if (!$util.isString(message.settingTag)) return "settingTag: string expected"; - if (message.settingName != null && message.hasOwnProperty("settingName")) + if (message.settingName != null && Object.hasOwnProperty.call(message, "settingName")) if (!$util.isString(message.settingName)) return "settingName: string expected"; - if (message.settingValue != null && message.hasOwnProperty("settingValue")) + if (message.settingValue != null && Object.hasOwnProperty.call(message, "settingValue")) if (!$util.isString(message.settingValue)) return "settingValue: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) switch (message.dataType) { default: return "dataType: enum value expected"; @@ -166013,28 +166985,28 @@ export const Automator = $root.Automator = (() => { case 10: break; } - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isString(message.lastModified)) return "lastModified: string expected"; - if (message.fromFile != null && message.hasOwnProperty("fromFile")) + if (message.fromFile != null && Object.hasOwnProperty.call(message, "fromFile")) if (typeof message.fromFile !== "boolean") return "fromFile: boolean expected"; - if (message.encrypted != null && message.hasOwnProperty("encrypted")) + if (message.encrypted != null && Object.hasOwnProperty.call(message, "encrypted")) if (typeof message.encrypted !== "boolean") return "encrypted: boolean expected"; - if (message.encoded != null && message.hasOwnProperty("encoded")) + if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded")) if (typeof message.encoded !== "boolean") return "encoded: boolean expected"; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) if (typeof message.editable !== "boolean") return "editable: boolean expected"; - if (message.translated != null && message.hasOwnProperty("translated")) + if (message.translated != null && Object.hasOwnProperty.call(message, "translated")) if (typeof message.translated !== "boolean") return "translated: boolean expected"; - if (message.userVisible != null && message.hasOwnProperty("userVisible")) + if (message.userVisible != null && Object.hasOwnProperty.call(message, "userVisible")) if (typeof message.userVisible !== "boolean") return "userVisible: boolean expected"; - if (message.required != null && message.hasOwnProperty("required")) + if (message.required != null && Object.hasOwnProperty.call(message, "required")) if (typeof message.required !== "boolean") return "required: boolean expected"; return null; @@ -166051,6 +167023,8 @@ export const Automator = $root.Automator = (() => { AutomatorSettingValue.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AutomatorSettingValue) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AutomatorSettingValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -166181,38 +167155,38 @@ export const Automator = $root.Automator = (() => { object.userVisible = false; object.required = false; } - if (message.settingId != null && message.hasOwnProperty("settingId")) + if (message.settingId != null && Object.hasOwnProperty.call(message, "settingId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.settingId = typeof message.settingId === "number" ? BigInt(message.settingId) : $util.Long.fromBits(message.settingId.low >>> 0, message.settingId.high >>> 0, false).toBigInt(); else if (typeof message.settingId === "number") object.settingId = options.longs === String ? String(message.settingId) : message.settingId; else object.settingId = options.longs === String ? $util.Long.prototype.toString.call(message.settingId) : options.longs === Number ? new $util.LongBits(message.settingId.low >>> 0, message.settingId.high >>> 0).toNumber() : message.settingId; - if (message.settingTypeId != null && message.hasOwnProperty("settingTypeId")) + if (message.settingTypeId != null && Object.hasOwnProperty.call(message, "settingTypeId")) object.settingTypeId = message.settingTypeId; - if (message.settingTag != null && message.hasOwnProperty("settingTag")) + if (message.settingTag != null && Object.hasOwnProperty.call(message, "settingTag")) object.settingTag = message.settingTag; - if (message.settingName != null && message.hasOwnProperty("settingName")) + if (message.settingName != null && Object.hasOwnProperty.call(message, "settingName")) object.settingName = message.settingName; - if (message.settingValue != null && message.hasOwnProperty("settingValue")) + if (message.settingValue != null && Object.hasOwnProperty.call(message, "settingValue")) object.settingValue = message.settingValue; - if (message.dataType != null && message.hasOwnProperty("dataType")) + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) object.dataType = options.enums === String ? $root.SsoCloud.DataType[message.dataType] === undefined ? message.dataType : $root.SsoCloud.DataType[message.dataType] : message.dataType; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) object.lastModified = message.lastModified; - if (message.fromFile != null && message.hasOwnProperty("fromFile")) + if (message.fromFile != null && Object.hasOwnProperty.call(message, "fromFile")) object.fromFile = message.fromFile; - if (message.encrypted != null && message.hasOwnProperty("encrypted")) + if (message.encrypted != null && Object.hasOwnProperty.call(message, "encrypted")) object.encrypted = message.encrypted; - if (message.encoded != null && message.hasOwnProperty("encoded")) + if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded")) object.encoded = message.encoded; - if (message.editable != null && message.hasOwnProperty("editable")) + if (message.editable != null && Object.hasOwnProperty.call(message, "editable")) object.editable = message.editable; - if (message.translated != null && message.hasOwnProperty("translated")) + if (message.translated != null && Object.hasOwnProperty.call(message, "translated")) object.translated = message.translated; - if (message.userVisible != null && message.hasOwnProperty("userVisible")) + if (message.userVisible != null && Object.hasOwnProperty.call(message, "userVisible")) object.userVisible = message.userVisible; - if (message.required != null && message.hasOwnProperty("required")) + if (message.required != null && Object.hasOwnProperty.call(message, "required")) object.required = message.required; return object; }; @@ -166435,7 +167409,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveDeviceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -166545,10 +167519,10 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.ssoAuthenticationProtocolType != null && message.hasOwnProperty("ssoAuthenticationProtocolType")) + if (message.ssoAuthenticationProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthenticationProtocolType")) switch (message.ssoAuthenticationProtocolType) { default: return "ssoAuthenticationProtocolType: enum value expected"; @@ -166557,22 +167531,22 @@ export const Automator = $root.Automator = (() => { case 2: break; } - if (message.authMessage != null && message.hasOwnProperty("authMessage")) + if (message.authMessage != null && Object.hasOwnProperty.call(message, "authMessage")) if (!$util.isString(message.authMessage)) return "authMessage: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) if (!(message.devicePublicKey && typeof message.devicePublicKey.length === "number" || $util.isString(message.devicePublicKey))) return "devicePublicKey: buffer expected"; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) if (!$util.isInteger(message.serverEccPublicKeyId)) return "serverEccPublicKeyId: integer expected"; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) if (!(message.userEncryptedDataKey && typeof message.userEncryptedDataKey.length === "number" || $util.isString(message.userEncryptedDataKey))) return "userEncryptedDataKey: buffer expected"; - if (message.userEncryptedDataKeyType != null && message.hasOwnProperty("userEncryptedDataKeyType")) + if (message.userEncryptedDataKeyType != null && Object.hasOwnProperty.call(message, "userEncryptedDataKeyType")) switch (message.userEncryptedDataKeyType) { default: return "userEncryptedDataKeyType: enum value expected"; @@ -166583,13 +167557,13 @@ export const Automator = $root.Automator = (() => { case 4: break; } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.isTesting != null && message.hasOwnProperty("isTesting")) + if (message.isTesting != null && Object.hasOwnProperty.call(message, "isTesting")) if (typeof message.isTesting !== "boolean") return "isTesting: boolean expected"; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) if (typeof message.isEccOnly !== "boolean") return "isEccOnly: boolean expected"; return null; @@ -166606,6 +167580,8 @@ export const Automator = $root.Automator = (() => { ApproveDeviceRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveDeviceRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveDeviceRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -166739,32 +167715,32 @@ export const Automator = $root.Automator = (() => { object.isTesting = false; object.isEccOnly = false; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.ssoAuthenticationProtocolType != null && message.hasOwnProperty("ssoAuthenticationProtocolType")) + if (message.ssoAuthenticationProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthenticationProtocolType")) object.ssoAuthenticationProtocolType = options.enums === String ? $root.Automator.SsoAuthenticationProtocolType[message.ssoAuthenticationProtocolType] === undefined ? message.ssoAuthenticationProtocolType : $root.Automator.SsoAuthenticationProtocolType[message.ssoAuthenticationProtocolType] : message.ssoAuthenticationProtocolType; - if (message.authMessage != null && message.hasOwnProperty("authMessage")) + if (message.authMessage != null && Object.hasOwnProperty.call(message, "authMessage")) object.authMessage = message.authMessage; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.devicePublicKey != null && message.hasOwnProperty("devicePublicKey")) + if (message.devicePublicKey != null && Object.hasOwnProperty.call(message, "devicePublicKey")) object.devicePublicKey = options.bytes === String ? $util.base64.encode(message.devicePublicKey, 0, message.devicePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.devicePublicKey) : message.devicePublicKey; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) object.serverEccPublicKeyId = message.serverEccPublicKeyId; - if (message.userEncryptedDataKey != null && message.hasOwnProperty("userEncryptedDataKey")) + if (message.userEncryptedDataKey != null && Object.hasOwnProperty.call(message, "userEncryptedDataKey")) object.userEncryptedDataKey = options.bytes === String ? $util.base64.encode(message.userEncryptedDataKey, 0, message.userEncryptedDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEncryptedDataKey) : message.userEncryptedDataKey; - if (message.userEncryptedDataKeyType != null && message.hasOwnProperty("userEncryptedDataKeyType")) + if (message.userEncryptedDataKeyType != null && Object.hasOwnProperty.call(message, "userEncryptedDataKeyType")) object.userEncryptedDataKeyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.userEncryptedDataKeyType] === undefined ? message.userEncryptedDataKeyType : $root.Enterprise.EncryptedKeyType[message.userEncryptedDataKeyType] : message.userEncryptedDataKeyType; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.isTesting != null && message.hasOwnProperty("isTesting")) + if (message.isTesting != null && Object.hasOwnProperty.call(message, "isTesting")) object.isTesting = message.isTesting; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) object.isEccOnly = message.isEccOnly; return object; }; @@ -166958,7 +167934,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ SetupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -167058,13 +168034,13 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) if (!$util.isInteger(message.serverEccPublicKeyId)) return "serverEccPublicKeyId: integer expected"; - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) switch (message.automatorState) { default: return "automatorState: enum value expected"; @@ -167076,13 +168052,13 @@ export const Automator = $root.Automator = (() => { case 5: break; } - if (message.encryptedEnterprisePrivateEccKey != null && message.hasOwnProperty("encryptedEnterprisePrivateEccKey")) + if (message.encryptedEnterprisePrivateEccKey != null && Object.hasOwnProperty.call(message, "encryptedEnterprisePrivateEccKey")) if (!(message.encryptedEnterprisePrivateEccKey && typeof message.encryptedEnterprisePrivateEccKey.length === "number" || $util.isString(message.encryptedEnterprisePrivateEccKey))) return "encryptedEnterprisePrivateEccKey: buffer expected"; - if (message.encryptedEnterprisePrivateRsaKey != null && message.hasOwnProperty("encryptedEnterprisePrivateRsaKey")) + if (message.encryptedEnterprisePrivateRsaKey != null && Object.hasOwnProperty.call(message, "encryptedEnterprisePrivateRsaKey")) if (!(message.encryptedEnterprisePrivateRsaKey && typeof message.encryptedEnterprisePrivateRsaKey.length === "number" || $util.isString(message.encryptedEnterprisePrivateRsaKey))) return "encryptedEnterprisePrivateRsaKey: buffer expected"; - if (message.automatorSkills != null && message.hasOwnProperty("automatorSkills")) { + if (message.automatorSkills != null && Object.hasOwnProperty.call(message, "automatorSkills")) { if (!Array.isArray(message.automatorSkills)) return "automatorSkills: array expected"; for (let i = 0; i < message.automatorSkills.length; ++i) { @@ -167091,10 +168067,10 @@ export const Automator = $root.Automator = (() => { return "automatorSkills." + error; } } - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) if (!(message.encryptedTreeKey && typeof message.encryptedTreeKey.length === "number" || $util.isString(message.encryptedTreeKey))) return "encryptedTreeKey: buffer expected"; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) if (typeof message.isEccOnly !== "boolean") return "isEccOnly: boolean expected"; return null; @@ -167111,6 +168087,8 @@ export const Automator = $root.Automator = (() => { SetupRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.SetupRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.SetupRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -167174,7 +168152,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.SetupRequest.automatorSkills: array expected"); message.automatorSkills = []; for (let i = 0; i < object.automatorSkills.length; ++i) { - if (typeof object.automatorSkills[i] !== "object") + if (!$util.isObject(object.automatorSkills[i])) throw TypeError(".Automator.SetupRequest.automatorSkills: object expected"); message.automatorSkills[i] = $root.Automator.AutomatorSkill.fromObject(object.automatorSkills[i], long + 1); } @@ -167239,29 +168217,29 @@ export const Automator = $root.Automator = (() => { } object.isEccOnly = false; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) object.serverEccPublicKeyId = message.serverEccPublicKeyId; - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) object.automatorState = options.enums === String ? $root.Automator.AutomatorState[message.automatorState] === undefined ? message.automatorState : $root.Automator.AutomatorState[message.automatorState] : message.automatorState; - if (message.encryptedEnterprisePrivateEccKey != null && message.hasOwnProperty("encryptedEnterprisePrivateEccKey")) + if (message.encryptedEnterprisePrivateEccKey != null && Object.hasOwnProperty.call(message, "encryptedEnterprisePrivateEccKey")) object.encryptedEnterprisePrivateEccKey = options.bytes === String ? $util.base64.encode(message.encryptedEnterprisePrivateEccKey, 0, message.encryptedEnterprisePrivateEccKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedEnterprisePrivateEccKey) : message.encryptedEnterprisePrivateEccKey; - if (message.encryptedEnterprisePrivateRsaKey != null && message.hasOwnProperty("encryptedEnterprisePrivateRsaKey")) + if (message.encryptedEnterprisePrivateRsaKey != null && Object.hasOwnProperty.call(message, "encryptedEnterprisePrivateRsaKey")) object.encryptedEnterprisePrivateRsaKey = options.bytes === String ? $util.base64.encode(message.encryptedEnterprisePrivateRsaKey, 0, message.encryptedEnterprisePrivateRsaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedEnterprisePrivateRsaKey) : message.encryptedEnterprisePrivateRsaKey; if (message.automatorSkills && message.automatorSkills.length) { object.automatorSkills = []; for (let j = 0; j < message.automatorSkills.length; ++j) object.automatorSkills[j] = $root.Automator.AutomatorSkill.toObject(message.automatorSkills[j], options, q + 1); } - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) object.encryptedTreeKey = options.bytes === String ? $util.base64.encode(message.encryptedTreeKey, 0, message.encryptedTreeKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTreeKey) : message.encryptedTreeKey; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) object.isEccOnly = message.isEccOnly; return object; }; @@ -167394,7 +168372,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ StatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -167472,13 +168450,13 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) if (!$util.isInteger(message.serverEccPublicKeyId)) return "serverEccPublicKeyId: integer expected"; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) if (typeof message.isEccOnly !== "boolean") return "isEccOnly: boolean expected"; return null; @@ -167495,6 +168473,8 @@ export const Automator = $root.Automator = (() => { StatusRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.StatusRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.StatusRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -167542,16 +168522,16 @@ export const Automator = $root.Automator = (() => { object.serverEccPublicKeyId = 0; object.isEccOnly = false; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) object.serverEccPublicKeyId = message.serverEccPublicKeyId; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) object.isEccOnly = message.isEccOnly; return object; }; @@ -167896,7 +168876,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ InitializeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -168050,70 +169030,70 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.idpMetadata != null && message.hasOwnProperty("idpMetadata")) + if (message.idpMetadata != null && Object.hasOwnProperty.call(message, "idpMetadata")) if (!$util.isString(message.idpMetadata)) return "idpMetadata: string expected"; - if (message.idpSigningCertificate != null && message.hasOwnProperty("idpSigningCertificate")) + if (message.idpSigningCertificate != null && Object.hasOwnProperty.call(message, "idpSigningCertificate")) if (!(message.idpSigningCertificate && typeof message.idpSigningCertificate.length === "number" || $util.isString(message.idpSigningCertificate))) return "idpSigningCertificate: buffer expected"; - if (message.ssoEntityId != null && message.hasOwnProperty("ssoEntityId")) + if (message.ssoEntityId != null && Object.hasOwnProperty.call(message, "ssoEntityId")) if (!$util.isString(message.ssoEntityId)) return "ssoEntityId: string expected"; - if (message.emailMapping != null && message.hasOwnProperty("emailMapping")) + if (message.emailMapping != null && Object.hasOwnProperty.call(message, "emailMapping")) if (!$util.isString(message.emailMapping)) return "emailMapping: string expected"; - if (message.firstnameMapping != null && message.hasOwnProperty("firstnameMapping")) + if (message.firstnameMapping != null && Object.hasOwnProperty.call(message, "firstnameMapping")) if (!$util.isString(message.firstnameMapping)) return "firstnameMapping: string expected"; - if (message.lastnameMapping != null && message.hasOwnProperty("lastnameMapping")) + if (message.lastnameMapping != null && Object.hasOwnProperty.call(message, "lastnameMapping")) if (!$util.isString(message.lastnameMapping)) return "lastnameMapping: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) if (typeof message.disabled !== "boolean") return "disabled: boolean expected"; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) if (!$util.isInteger(message.serverEccPublicKeyId)) return "serverEccPublicKeyId: integer expected"; - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) if (!(message.config && typeof message.config.length === "number" || $util.isString(message.config))) return "config: buffer expected"; - if (message.sslMode != null && message.hasOwnProperty("sslMode")) + if (message.sslMode != null && Object.hasOwnProperty.call(message, "sslMode")) if (!$util.isString(message.sslMode)) return "sslMode: string expected"; - if (message.persistState != null && message.hasOwnProperty("persistState")) + if (message.persistState != null && Object.hasOwnProperty.call(message, "persistState")) if (typeof message.persistState !== "boolean") return "persistState: boolean expected"; - if (message.disableSniCheck != null && message.hasOwnProperty("disableSniCheck")) + if (message.disableSniCheck != null && Object.hasOwnProperty.call(message, "disableSniCheck")) if (typeof message.disableSniCheck !== "boolean") return "disableSniCheck: boolean expected"; - if (message.sslCertificateFilename != null && message.hasOwnProperty("sslCertificateFilename")) + if (message.sslCertificateFilename != null && Object.hasOwnProperty.call(message, "sslCertificateFilename")) if (!$util.isString(message.sslCertificateFilename)) return "sslCertificateFilename: string expected"; - if (message.sslCertificateFilePassword != null && message.hasOwnProperty("sslCertificateFilePassword")) + if (message.sslCertificateFilePassword != null && Object.hasOwnProperty.call(message, "sslCertificateFilePassword")) if (!$util.isString(message.sslCertificateFilePassword)) return "sslCertificateFilePassword: string expected"; - if (message.sslCertificateKeyPassword != null && message.hasOwnProperty("sslCertificateKeyPassword")) + if (message.sslCertificateKeyPassword != null && Object.hasOwnProperty.call(message, "sslCertificateKeyPassword")) if (!$util.isString(message.sslCertificateKeyPassword)) return "sslCertificateKeyPassword: string expected"; - if (message.sslCertificateContents != null && message.hasOwnProperty("sslCertificateContents")) + if (message.sslCertificateContents != null && Object.hasOwnProperty.call(message, "sslCertificateContents")) if (!(message.sslCertificateContents && typeof message.sslCertificateContents.length === "number" || $util.isString(message.sslCertificateContents))) return "sslCertificateContents: buffer expected"; - if (message.automatorHost != null && message.hasOwnProperty("automatorHost")) + if (message.automatorHost != null && Object.hasOwnProperty.call(message, "automatorHost")) if (!$util.isString(message.automatorHost)) return "automatorHost: string expected"; - if (message.automatorPort != null && message.hasOwnProperty("automatorPort")) + if (message.automatorPort != null && Object.hasOwnProperty.call(message, "automatorPort")) if (!$util.isString(message.automatorPort)) return "automatorPort: string expected"; - if (message.ipAllow != null && message.hasOwnProperty("ipAllow")) + if (message.ipAllow != null && Object.hasOwnProperty.call(message, "ipAllow")) if (!$util.isString(message.ipAllow)) return "ipAllow: string expected"; - if (message.ipDeny != null && message.hasOwnProperty("ipDeny")) + if (message.ipDeny != null && Object.hasOwnProperty.call(message, "ipDeny")) if (!$util.isString(message.ipDeny)) return "ipDeny: string expected"; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) if (typeof message.isEccOnly !== "boolean") return "isEccOnly: boolean expected"; return null; @@ -168130,6 +169110,8 @@ export const Automator = $root.Automator = (() => { InitializeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.InitializeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.InitializeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -168261,54 +169243,54 @@ export const Automator = $root.Automator = (() => { object.ipDeny = ""; object.isEccOnly = false; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.idpMetadata != null && message.hasOwnProperty("idpMetadata")) + if (message.idpMetadata != null && Object.hasOwnProperty.call(message, "idpMetadata")) object.idpMetadata = message.idpMetadata; - if (message.idpSigningCertificate != null && message.hasOwnProperty("idpSigningCertificate")) + if (message.idpSigningCertificate != null && Object.hasOwnProperty.call(message, "idpSigningCertificate")) object.idpSigningCertificate = options.bytes === String ? $util.base64.encode(message.idpSigningCertificate, 0, message.idpSigningCertificate.length) : options.bytes === Array ? Array.prototype.slice.call(message.idpSigningCertificate) : message.idpSigningCertificate; - if (message.ssoEntityId != null && message.hasOwnProperty("ssoEntityId")) + if (message.ssoEntityId != null && Object.hasOwnProperty.call(message, "ssoEntityId")) object.ssoEntityId = message.ssoEntityId; - if (message.emailMapping != null && message.hasOwnProperty("emailMapping")) + if (message.emailMapping != null && Object.hasOwnProperty.call(message, "emailMapping")) object.emailMapping = message.emailMapping; - if (message.firstnameMapping != null && message.hasOwnProperty("firstnameMapping")) + if (message.firstnameMapping != null && Object.hasOwnProperty.call(message, "firstnameMapping")) object.firstnameMapping = message.firstnameMapping; - if (message.lastnameMapping != null && message.hasOwnProperty("lastnameMapping")) + if (message.lastnameMapping != null && Object.hasOwnProperty.call(message, "lastnameMapping")) object.lastnameMapping = message.lastnameMapping; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) object.disabled = message.disabled; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) object.serverEccPublicKeyId = message.serverEccPublicKeyId; - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) object.config = options.bytes === String ? $util.base64.encode(message.config, 0, message.config.length) : options.bytes === Array ? Array.prototype.slice.call(message.config) : message.config; - if (message.sslMode != null && message.hasOwnProperty("sslMode")) + if (message.sslMode != null && Object.hasOwnProperty.call(message, "sslMode")) object.sslMode = message.sslMode; - if (message.persistState != null && message.hasOwnProperty("persistState")) + if (message.persistState != null && Object.hasOwnProperty.call(message, "persistState")) object.persistState = message.persistState; - if (message.disableSniCheck != null && message.hasOwnProperty("disableSniCheck")) + if (message.disableSniCheck != null && Object.hasOwnProperty.call(message, "disableSniCheck")) object.disableSniCheck = message.disableSniCheck; - if (message.sslCertificateFilename != null && message.hasOwnProperty("sslCertificateFilename")) + if (message.sslCertificateFilename != null && Object.hasOwnProperty.call(message, "sslCertificateFilename")) object.sslCertificateFilename = message.sslCertificateFilename; - if (message.sslCertificateFilePassword != null && message.hasOwnProperty("sslCertificateFilePassword")) + if (message.sslCertificateFilePassword != null && Object.hasOwnProperty.call(message, "sslCertificateFilePassword")) object.sslCertificateFilePassword = message.sslCertificateFilePassword; - if (message.sslCertificateKeyPassword != null && message.hasOwnProperty("sslCertificateKeyPassword")) + if (message.sslCertificateKeyPassword != null && Object.hasOwnProperty.call(message, "sslCertificateKeyPassword")) object.sslCertificateKeyPassword = message.sslCertificateKeyPassword; - if (message.sslCertificateContents != null && message.hasOwnProperty("sslCertificateContents")) + if (message.sslCertificateContents != null && Object.hasOwnProperty.call(message, "sslCertificateContents")) object.sslCertificateContents = options.bytes === String ? $util.base64.encode(message.sslCertificateContents, 0, message.sslCertificateContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.sslCertificateContents) : message.sslCertificateContents; - if (message.automatorHost != null && message.hasOwnProperty("automatorHost")) + if (message.automatorHost != null && Object.hasOwnProperty.call(message, "automatorHost")) object.automatorHost = message.automatorHost; - if (message.automatorPort != null && message.hasOwnProperty("automatorPort")) + if (message.automatorPort != null && Object.hasOwnProperty.call(message, "automatorPort")) object.automatorPort = message.automatorPort; - if (message.ipAllow != null && message.hasOwnProperty("ipAllow")) + if (message.ipAllow != null && Object.hasOwnProperty.call(message, "ipAllow")) object.ipAllow = message.ipAllow; - if (message.ipDeny != null && message.hasOwnProperty("ipDeny")) + if (message.ipDeny != null && Object.hasOwnProperty.call(message, "ipDeny")) object.ipDeny = message.ipDeny; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) object.isEccOnly = message.isEccOnly; return object; }; @@ -168500,7 +169482,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ NotInitializedResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -168598,22 +169580,22 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorTransmissionKey != null && message.hasOwnProperty("automatorTransmissionKey")) + if (message.automatorTransmissionKey != null && Object.hasOwnProperty.call(message, "automatorTransmissionKey")) if (!(message.automatorTransmissionKey && typeof message.automatorTransmissionKey.length === "number" || $util.isString(message.automatorTransmissionKey))) return "automatorTransmissionKey: buffer expected"; - if (message.signingCertificate != null && message.hasOwnProperty("signingCertificate")) + if (message.signingCertificate != null && Object.hasOwnProperty.call(message, "signingCertificate")) if (!(message.signingCertificate && typeof message.signingCertificate.length === "number" || $util.isString(message.signingCertificate))) return "signingCertificate: buffer expected"; - if (message.signingCertificateFilename != null && message.hasOwnProperty("signingCertificateFilename")) + if (message.signingCertificateFilename != null && Object.hasOwnProperty.call(message, "signingCertificateFilename")) if (!$util.isString(message.signingCertificateFilename)) return "signingCertificateFilename: string expected"; - if (message.signingCertificatePassword != null && message.hasOwnProperty("signingCertificatePassword")) + if (message.signingCertificatePassword != null && Object.hasOwnProperty.call(message, "signingCertificatePassword")) if (!$util.isString(message.signingCertificatePassword)) return "signingCertificatePassword: string expected"; - if (message.signingKeyPassword != null && message.hasOwnProperty("signingKeyPassword")) + if (message.signingKeyPassword != null && Object.hasOwnProperty.call(message, "signingKeyPassword")) if (!$util.isString(message.signingKeyPassword)) return "signingKeyPassword: string expected"; - if (message.signingCertificateFormat != null && message.hasOwnProperty("signingCertificateFormat")) + if (message.signingCertificateFormat != null && Object.hasOwnProperty.call(message, "signingCertificateFormat")) switch (message.signingCertificateFormat) { default: return "signingCertificateFormat: enum value expected"; @@ -168622,10 +169604,10 @@ export const Automator = $root.Automator = (() => { case 2: break; } - if (message.automatorPublicKey != null && message.hasOwnProperty("automatorPublicKey")) + if (message.automatorPublicKey != null && Object.hasOwnProperty.call(message, "automatorPublicKey")) if (!(message.automatorPublicKey && typeof message.automatorPublicKey.length === "number" || $util.isString(message.automatorPublicKey))) return "automatorPublicKey: buffer expected"; - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) if (!(message.config && typeof message.config.length === "number" || $util.isString(message.config))) return "config: buffer expected"; return null; @@ -168642,6 +169624,8 @@ export const Automator = $root.Automator = (() => { NotInitializedResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.NotInitializedResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.NotInitializedResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -168747,21 +169731,21 @@ export const Automator = $root.Automator = (() => { object.config = $util.newBuffer(object.config); } } - if (message.automatorTransmissionKey != null && message.hasOwnProperty("automatorTransmissionKey")) + if (message.automatorTransmissionKey != null && Object.hasOwnProperty.call(message, "automatorTransmissionKey")) object.automatorTransmissionKey = options.bytes === String ? $util.base64.encode(message.automatorTransmissionKey, 0, message.automatorTransmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.automatorTransmissionKey) : message.automatorTransmissionKey; - if (message.signingCertificate != null && message.hasOwnProperty("signingCertificate")) + if (message.signingCertificate != null && Object.hasOwnProperty.call(message, "signingCertificate")) object.signingCertificate = options.bytes === String ? $util.base64.encode(message.signingCertificate, 0, message.signingCertificate.length) : options.bytes === Array ? Array.prototype.slice.call(message.signingCertificate) : message.signingCertificate; - if (message.signingCertificateFilename != null && message.hasOwnProperty("signingCertificateFilename")) + if (message.signingCertificateFilename != null && Object.hasOwnProperty.call(message, "signingCertificateFilename")) object.signingCertificateFilename = message.signingCertificateFilename; - if (message.signingCertificatePassword != null && message.hasOwnProperty("signingCertificatePassword")) + if (message.signingCertificatePassword != null && Object.hasOwnProperty.call(message, "signingCertificatePassword")) object.signingCertificatePassword = message.signingCertificatePassword; - if (message.signingKeyPassword != null && message.hasOwnProperty("signingKeyPassword")) + if (message.signingKeyPassword != null && Object.hasOwnProperty.call(message, "signingKeyPassword")) object.signingKeyPassword = message.signingKeyPassword; - if (message.signingCertificateFormat != null && message.hasOwnProperty("signingCertificateFormat")) + if (message.signingCertificateFormat != null && Object.hasOwnProperty.call(message, "signingCertificateFormat")) object.signingCertificateFormat = options.enums === String ? $root.Automator.CertificateFormat[message.signingCertificateFormat] === undefined ? message.signingCertificateFormat : $root.Automator.CertificateFormat[message.signingCertificateFormat] : message.signingCertificateFormat; - if (message.automatorPublicKey != null && message.hasOwnProperty("automatorPublicKey")) + if (message.automatorPublicKey != null && Object.hasOwnProperty.call(message, "automatorPublicKey")) object.automatorPublicKey = options.bytes === String ? $util.base64.encode(message.automatorPublicKey, 0, message.automatorPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.automatorPublicKey) : message.automatorPublicKey; - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) object.config = options.bytes === String ? $util.base64.encode(message.config, 0, message.config.length) : options.bytes === Array ? Array.prototype.slice.call(message.config) : message.config; return object; }; @@ -169007,7 +169991,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AutomatorResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -169122,16 +170106,16 @@ export const Automator = $root.Automator = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; - if (message.approveDevice != null && message.hasOwnProperty("approveDevice")) { + if (message.approveDevice != null && Object.hasOwnProperty.call(message, "approveDevice")) { properties.response = 1; { let error = $root.Automator.ApproveDeviceResponse.verify(message.approveDevice, long + 1); @@ -169139,7 +170123,7 @@ export const Automator = $root.Automator = (() => { return "approveDevice." + error; } } - if (message.status != null && message.hasOwnProperty("status")) { + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { if (properties.response === 1) return "response: multiple values"; properties.response = 1; @@ -169149,7 +170133,7 @@ export const Automator = $root.Automator = (() => { return "status." + error; } } - if (message.notInitialized != null && message.hasOwnProperty("notInitialized")) { + if (message.notInitialized != null && Object.hasOwnProperty.call(message, "notInitialized")) { if (properties.response === 1) return "response: multiple values"; properties.response = 1; @@ -169159,7 +170143,7 @@ export const Automator = $root.Automator = (() => { return "notInitialized." + error; } } - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { if (properties.response === 1) return "response: multiple values"; properties.response = 1; @@ -169169,7 +170153,7 @@ export const Automator = $root.Automator = (() => { return "error." + error; } } - if (message.approveTeamsForUser != null && message.hasOwnProperty("approveTeamsForUser")) { + if (message.approveTeamsForUser != null && Object.hasOwnProperty.call(message, "approveTeamsForUser")) { if (properties.response === 1) return "response: multiple values"; properties.response = 1; @@ -169179,7 +170163,7 @@ export const Automator = $root.Automator = (() => { return "approveTeamsForUser." + error; } } - if (message.approveTeams != null && message.hasOwnProperty("approveTeams")) { + if (message.approveTeams != null && Object.hasOwnProperty.call(message, "approveTeams")) { if (properties.response === 1) return "response: multiple values"; properties.response = 1; @@ -169189,7 +170173,7 @@ export const Automator = $root.Automator = (() => { return "approveTeams." + error; } } - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) switch (message.automatorState) { default: return "automatorState: enum value expected"; @@ -169201,10 +170185,10 @@ export const Automator = $root.Automator = (() => { case 5: break; } - if (message.automatorPublicEccKey != null && message.hasOwnProperty("automatorPublicEccKey")) + if (message.automatorPublicEccKey != null && Object.hasOwnProperty.call(message, "automatorPublicEccKey")) if (!(message.automatorPublicEccKey && typeof message.automatorPublicEccKey.length === "number" || $util.isString(message.automatorPublicEccKey))) return "automatorPublicEccKey: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) { + if (message.version != null && Object.hasOwnProperty.call(message, "version")) { let error = $root.SemanticVersion.Version.verify(message.version, long + 1); if (error) return "version." + error; @@ -169223,6 +170207,8 @@ export const Automator = $root.Automator = (() => { AutomatorResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AutomatorResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AutomatorResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -169249,32 +170235,32 @@ export const Automator = $root.Automator = (() => { else if (typeof object.timestamp === "object") message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); if (object.approveDevice != null) { - if (typeof object.approveDevice !== "object") + if (!$util.isObject(object.approveDevice)) throw TypeError(".Automator.AutomatorResponse.approveDevice: object expected"); message.approveDevice = $root.Automator.ApproveDeviceResponse.fromObject(object.approveDevice, long + 1); } if (object.status != null) { - if (typeof object.status !== "object") + if (!$util.isObject(object.status)) throw TypeError(".Automator.AutomatorResponse.status: object expected"); message.status = $root.Automator.StatusResponse.fromObject(object.status, long + 1); } if (object.notInitialized != null) { - if (typeof object.notInitialized !== "object") + if (!$util.isObject(object.notInitialized)) throw TypeError(".Automator.AutomatorResponse.notInitialized: object expected"); message.notInitialized = $root.Automator.NotInitializedResponse.fromObject(object.notInitialized, long + 1); } if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".Automator.AutomatorResponse.error: object expected"); message.error = $root.Automator.ErrorResponse.fromObject(object.error, long + 1); } if (object.approveTeamsForUser != null) { - if (typeof object.approveTeamsForUser !== "object") + if (!$util.isObject(object.approveTeamsForUser)) throw TypeError(".Automator.AutomatorResponse.approveTeamsForUser: object expected"); message.approveTeamsForUser = $root.Automator.ApproveTeamsForUserResponse.fromObject(object.approveTeamsForUser, long + 1); } if (object.approveTeams != null) { - if (typeof object.approveTeams !== "object") + if (!$util.isObject(object.approveTeams)) throw TypeError(".Automator.AutomatorResponse.approveTeams: object expected"); message.approveTeams = $root.Automator.ApproveTeamsResponse.fromObject(object.approveTeams, long + 1); } @@ -169316,7 +170302,7 @@ export const Automator = $root.Automator = (() => { else if (object.automatorPublicEccKey.length >= 0) message.automatorPublicEccKey = object.automatorPublicEccKey; if (object.version != null) { - if (typeof object.version !== "object") + if (!$util.isObject(object.version)) throw TypeError(".Automator.AutomatorResponse.version: object expected"); message.version = $root.SemanticVersion.Version.fromObject(object.version, long + 1); } @@ -169362,57 +170348,57 @@ export const Automator = $root.Automator = (() => { } object.version = null; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) object.enabled = message.enabled; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, false).toBigInt(); else if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.approveDevice != null && message.hasOwnProperty("approveDevice")) { + if (message.approveDevice != null && Object.hasOwnProperty.call(message, "approveDevice")) { object.approveDevice = $root.Automator.ApproveDeviceResponse.toObject(message.approveDevice, options, q + 1); if (options.oneofs) object.response = "approveDevice"; } - if (message.status != null && message.hasOwnProperty("status")) { + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { object.status = $root.Automator.StatusResponse.toObject(message.status, options, q + 1); if (options.oneofs) object.response = "status"; } - if (message.notInitialized != null && message.hasOwnProperty("notInitialized")) { + if (message.notInitialized != null && Object.hasOwnProperty.call(message, "notInitialized")) { object.notInitialized = $root.Automator.NotInitializedResponse.toObject(message.notInitialized, options, q + 1); if (options.oneofs) object.response = "notInitialized"; } - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { object.error = $root.Automator.ErrorResponse.toObject(message.error, options, q + 1); if (options.oneofs) object.response = "error"; } - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) object.automatorState = options.enums === String ? $root.Automator.AutomatorState[message.automatorState] === undefined ? message.automatorState : $root.Automator.AutomatorState[message.automatorState] : message.automatorState; - if (message.automatorPublicEccKey != null && message.hasOwnProperty("automatorPublicEccKey")) + if (message.automatorPublicEccKey != null && Object.hasOwnProperty.call(message, "automatorPublicEccKey")) object.automatorPublicEccKey = options.bytes === String ? $util.base64.encode(message.automatorPublicEccKey, 0, message.automatorPublicEccKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.automatorPublicEccKey) : message.automatorPublicEccKey; - if (message.approveTeamsForUser != null && message.hasOwnProperty("approveTeamsForUser")) { + if (message.approveTeamsForUser != null && Object.hasOwnProperty.call(message, "approveTeamsForUser")) { object.approveTeamsForUser = $root.Automator.ApproveTeamsForUserResponse.toObject(message.approveTeamsForUser, options, q + 1); if (options.oneofs) object.response = "approveTeamsForUser"; } - if (message.approveTeams != null && message.hasOwnProperty("approveTeams")) { + if (message.approveTeams != null && Object.hasOwnProperty.call(message, "approveTeams")) { object.approveTeams = $root.Automator.ApproveTeamsResponse.toObject(message.approveTeams, options, q + 1); if (options.oneofs) object.response = "approveTeams"; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = $root.SemanticVersion.Version.toObject(message.version, options, q + 1); return object; }; @@ -169556,7 +170542,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveDeviceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -169638,16 +170624,16 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.approved != null && message.hasOwnProperty("approved")) + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) if (typeof message.approved !== "boolean") return "approved: boolean expected"; - if (message.encryptedUserDataKey != null && message.hasOwnProperty("encryptedUserDataKey")) + if (message.encryptedUserDataKey != null && Object.hasOwnProperty.call(message, "encryptedUserDataKey")) if (!(message.encryptedUserDataKey && typeof message.encryptedUserDataKey.length === "number" || $util.isString(message.encryptedUserDataKey))) return "encryptedUserDataKey: buffer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.encryptedUserDataKeyType != null && message.hasOwnProperty("encryptedUserDataKeyType")) + if (message.encryptedUserDataKeyType != null && Object.hasOwnProperty.call(message, "encryptedUserDataKeyType")) switch (message.encryptedUserDataKeyType) { default: return "encryptedUserDataKeyType: enum value expected"; @@ -169672,6 +170658,8 @@ export const Automator = $root.Automator = (() => { ApproveDeviceResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveDeviceResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveDeviceResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -169746,13 +170734,13 @@ export const Automator = $root.Automator = (() => { object.message = ""; object.encryptedUserDataKeyType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.approved != null && message.hasOwnProperty("approved")) + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) object.approved = message.approved; - if (message.encryptedUserDataKey != null && message.hasOwnProperty("encryptedUserDataKey")) + if (message.encryptedUserDataKey != null && Object.hasOwnProperty.call(message, "encryptedUserDataKey")) object.encryptedUserDataKey = options.bytes === String ? $util.base64.encode(message.encryptedUserDataKey, 0, message.encryptedUserDataKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedUserDataKey) : message.encryptedUserDataKey; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.encryptedUserDataKeyType != null && message.hasOwnProperty("encryptedUserDataKeyType")) + if (message.encryptedUserDataKeyType != null && Object.hasOwnProperty.call(message, "encryptedUserDataKeyType")) object.encryptedUserDataKeyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedUserDataKeyType] === undefined ? message.encryptedUserDataKeyType : $root.Enterprise.EncryptedKeyType[message.encryptedUserDataKeyType] : message.encryptedUserDataKeyType; return object; }; @@ -170021,7 +171009,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ StatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -170149,51 +171137,51 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.initialized != null && message.hasOwnProperty("initialized")) + if (message.initialized != null && Object.hasOwnProperty.call(message, "initialized")) if (typeof message.initialized !== "boolean") return "initialized: boolean expected"; - if (message.enabledTimestamp != null && message.hasOwnProperty("enabledTimestamp")) + if (message.enabledTimestamp != null && Object.hasOwnProperty.call(message, "enabledTimestamp")) if (!$util.isInteger(message.enabledTimestamp) && !(message.enabledTimestamp && $util.isInteger(message.enabledTimestamp.low) && $util.isInteger(message.enabledTimestamp.high))) return "enabledTimestamp: integer|Long expected"; - if (message.initializedTimestamp != null && message.hasOwnProperty("initializedTimestamp")) + if (message.initializedTimestamp != null && Object.hasOwnProperty.call(message, "initializedTimestamp")) if (!$util.isInteger(message.initializedTimestamp) && !(message.initializedTimestamp && $util.isInteger(message.initializedTimestamp.low) && $util.isInteger(message.initializedTimestamp.high))) return "initializedTimestamp: integer|Long expected"; - if (message.updatedTimestamp != null && message.hasOwnProperty("updatedTimestamp")) + if (message.updatedTimestamp != null && Object.hasOwnProperty.call(message, "updatedTimestamp")) if (!$util.isInteger(message.updatedTimestamp) && !(message.updatedTimestamp && $util.isInteger(message.updatedTimestamp.low) && $util.isInteger(message.updatedTimestamp.high))) return "updatedTimestamp: integer|Long expected"; - if (message.numberOfDevicesApproved != null && message.hasOwnProperty("numberOfDevicesApproved")) + if (message.numberOfDevicesApproved != null && Object.hasOwnProperty.call(message, "numberOfDevicesApproved")) if (!$util.isInteger(message.numberOfDevicesApproved) && !(message.numberOfDevicesApproved && $util.isInteger(message.numberOfDevicesApproved.low) && $util.isInteger(message.numberOfDevicesApproved.high))) return "numberOfDevicesApproved: integer|Long expected"; - if (message.numberOfDevicesDenied != null && message.hasOwnProperty("numberOfDevicesDenied")) + if (message.numberOfDevicesDenied != null && Object.hasOwnProperty.call(message, "numberOfDevicesDenied")) if (!$util.isInteger(message.numberOfDevicesDenied) && !(message.numberOfDevicesDenied && $util.isInteger(message.numberOfDevicesDenied.low) && $util.isInteger(message.numberOfDevicesDenied.high))) return "numberOfDevicesDenied: integer|Long expected"; - if (message.numberOfErrors != null && message.hasOwnProperty("numberOfErrors")) + if (message.numberOfErrors != null && Object.hasOwnProperty.call(message, "numberOfErrors")) if (!$util.isInteger(message.numberOfErrors) && !(message.numberOfErrors && $util.isInteger(message.numberOfErrors.low) && $util.isInteger(message.numberOfErrors.high))) return "numberOfErrors: integer|Long expected"; - if (message.sslCertificateExpiration != null && message.hasOwnProperty("sslCertificateExpiration")) + if (message.sslCertificateExpiration != null && Object.hasOwnProperty.call(message, "sslCertificateExpiration")) if (!$util.isInteger(message.sslCertificateExpiration) && !(message.sslCertificateExpiration && $util.isInteger(message.sslCertificateExpiration.low) && $util.isInteger(message.sslCertificateExpiration.high))) return "sslCertificateExpiration: integer|Long expected"; - if (message.notInitializedResponse != null && message.hasOwnProperty("notInitializedResponse")) { + if (message.notInitializedResponse != null && Object.hasOwnProperty.call(message, "notInitializedResponse")) { let error = $root.Automator.NotInitializedResponse.verify(message.notInitializedResponse, long + 1); if (error) return "notInitializedResponse." + error; } - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) if (!(message.config && typeof message.config.length === "number" || $util.isString(message.config))) return "config: buffer expected"; - if (message.numberOfTeamMembershipsApproved != null && message.hasOwnProperty("numberOfTeamMembershipsApproved")) + if (message.numberOfTeamMembershipsApproved != null && Object.hasOwnProperty.call(message, "numberOfTeamMembershipsApproved")) if (!$util.isInteger(message.numberOfTeamMembershipsApproved) && !(message.numberOfTeamMembershipsApproved && $util.isInteger(message.numberOfTeamMembershipsApproved.low) && $util.isInteger(message.numberOfTeamMembershipsApproved.high))) return "numberOfTeamMembershipsApproved: integer|Long expected"; - if (message.numberOfTeamMembershipsDenied != null && message.hasOwnProperty("numberOfTeamMembershipsDenied")) + if (message.numberOfTeamMembershipsDenied != null && Object.hasOwnProperty.call(message, "numberOfTeamMembershipsDenied")) if (!$util.isInteger(message.numberOfTeamMembershipsDenied) && !(message.numberOfTeamMembershipsDenied && $util.isInteger(message.numberOfTeamMembershipsDenied.low) && $util.isInteger(message.numberOfTeamMembershipsDenied.high))) return "numberOfTeamMembershipsDenied: integer|Long expected"; - if (message.numberOfTeamsApproved != null && message.hasOwnProperty("numberOfTeamsApproved")) + if (message.numberOfTeamsApproved != null && Object.hasOwnProperty.call(message, "numberOfTeamsApproved")) if (!$util.isInteger(message.numberOfTeamsApproved) && !(message.numberOfTeamsApproved && $util.isInteger(message.numberOfTeamsApproved.low) && $util.isInteger(message.numberOfTeamsApproved.high))) return "numberOfTeamsApproved: integer|Long expected"; - if (message.numberOfTeamsDenied != null && message.hasOwnProperty("numberOfTeamsDenied")) + if (message.numberOfTeamsDenied != null && Object.hasOwnProperty.call(message, "numberOfTeamsDenied")) if (!$util.isInteger(message.numberOfTeamsDenied) && !(message.numberOfTeamsDenied && $util.isInteger(message.numberOfTeamsDenied.low) && $util.isInteger(message.numberOfTeamsDenied.high))) return "numberOfTeamsDenied: integer|Long expected"; - if (message.sslCertificateInfo != null && message.hasOwnProperty("sslCertificateInfo")) { + if (message.sslCertificateInfo != null && Object.hasOwnProperty.call(message, "sslCertificateInfo")) { if (!Array.isArray(message.sslCertificateInfo)) return "sslCertificateInfo: array expected"; for (let i = 0; i < message.sslCertificateInfo.length; ++i) { @@ -170216,6 +171204,8 @@ export const Automator = $root.Automator = (() => { StatusResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.StatusResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.StatusResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -170287,7 +171277,7 @@ export const Automator = $root.Automator = (() => { else if (typeof object.sslCertificateExpiration === "object") message.sslCertificateExpiration = new $util.LongBits(object.sslCertificateExpiration.low >>> 0, object.sslCertificateExpiration.high >>> 0).toNumber(); if (object.notInitializedResponse != null) { - if (typeof object.notInitializedResponse !== "object") + if (!$util.isObject(object.notInitializedResponse)) throw TypeError(".Automator.StatusResponse.notInitializedResponse: object expected"); message.notInitializedResponse = $root.Automator.NotInitializedResponse.fromObject(object.notInitializedResponse, long + 1); } @@ -170337,7 +171327,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.StatusResponse.sslCertificateInfo: array expected"); message.sslCertificateInfo = []; for (let i = 0; i < object.sslCertificateInfo.length; ++i) { - if (typeof object.sslCertificateInfo[i] !== "object") + if (!$util.isObject(object.sslCertificateInfo[i])) throw TypeError(".Automator.StatusResponse.sslCertificateInfo: object expected"); message.sslCertificateInfo[i] = $root.Automator.SSLCertificateInfo.fromObject(object.sslCertificateInfo[i], long + 1); } @@ -170430,83 +171420,83 @@ export const Automator = $root.Automator = (() => { } else object.numberOfTeamsDenied = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.initialized != null && message.hasOwnProperty("initialized")) + if (message.initialized != null && Object.hasOwnProperty.call(message, "initialized")) object.initialized = message.initialized; - if (message.enabledTimestamp != null && message.hasOwnProperty("enabledTimestamp")) + if (message.enabledTimestamp != null && Object.hasOwnProperty.call(message, "enabledTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enabledTimestamp = typeof message.enabledTimestamp === "number" ? BigInt(message.enabledTimestamp) : $util.Long.fromBits(message.enabledTimestamp.low >>> 0, message.enabledTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.enabledTimestamp === "number") object.enabledTimestamp = options.longs === String ? String(message.enabledTimestamp) : message.enabledTimestamp; else object.enabledTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.enabledTimestamp) : options.longs === Number ? new $util.LongBits(message.enabledTimestamp.low >>> 0, message.enabledTimestamp.high >>> 0).toNumber() : message.enabledTimestamp; - if (message.initializedTimestamp != null && message.hasOwnProperty("initializedTimestamp")) + if (message.initializedTimestamp != null && Object.hasOwnProperty.call(message, "initializedTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.initializedTimestamp = typeof message.initializedTimestamp === "number" ? BigInt(message.initializedTimestamp) : $util.Long.fromBits(message.initializedTimestamp.low >>> 0, message.initializedTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.initializedTimestamp === "number") object.initializedTimestamp = options.longs === String ? String(message.initializedTimestamp) : message.initializedTimestamp; else object.initializedTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.initializedTimestamp) : options.longs === Number ? new $util.LongBits(message.initializedTimestamp.low >>> 0, message.initializedTimestamp.high >>> 0).toNumber() : message.initializedTimestamp; - if (message.updatedTimestamp != null && message.hasOwnProperty("updatedTimestamp")) + if (message.updatedTimestamp != null && Object.hasOwnProperty.call(message, "updatedTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.updatedTimestamp = typeof message.updatedTimestamp === "number" ? BigInt(message.updatedTimestamp) : $util.Long.fromBits(message.updatedTimestamp.low >>> 0, message.updatedTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.updatedTimestamp === "number") object.updatedTimestamp = options.longs === String ? String(message.updatedTimestamp) : message.updatedTimestamp; else object.updatedTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.updatedTimestamp) : options.longs === Number ? new $util.LongBits(message.updatedTimestamp.low >>> 0, message.updatedTimestamp.high >>> 0).toNumber() : message.updatedTimestamp; - if (message.numberOfDevicesApproved != null && message.hasOwnProperty("numberOfDevicesApproved")) + if (message.numberOfDevicesApproved != null && Object.hasOwnProperty.call(message, "numberOfDevicesApproved")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfDevicesApproved = typeof message.numberOfDevicesApproved === "number" ? BigInt(message.numberOfDevicesApproved) : $util.Long.fromBits(message.numberOfDevicesApproved.low >>> 0, message.numberOfDevicesApproved.high >>> 0, false).toBigInt(); else if (typeof message.numberOfDevicesApproved === "number") object.numberOfDevicesApproved = options.longs === String ? String(message.numberOfDevicesApproved) : message.numberOfDevicesApproved; else object.numberOfDevicesApproved = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfDevicesApproved) : options.longs === Number ? new $util.LongBits(message.numberOfDevicesApproved.low >>> 0, message.numberOfDevicesApproved.high >>> 0).toNumber() : message.numberOfDevicesApproved; - if (message.numberOfDevicesDenied != null && message.hasOwnProperty("numberOfDevicesDenied")) + if (message.numberOfDevicesDenied != null && Object.hasOwnProperty.call(message, "numberOfDevicesDenied")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfDevicesDenied = typeof message.numberOfDevicesDenied === "number" ? BigInt(message.numberOfDevicesDenied) : $util.Long.fromBits(message.numberOfDevicesDenied.low >>> 0, message.numberOfDevicesDenied.high >>> 0, false).toBigInt(); else if (typeof message.numberOfDevicesDenied === "number") object.numberOfDevicesDenied = options.longs === String ? String(message.numberOfDevicesDenied) : message.numberOfDevicesDenied; else object.numberOfDevicesDenied = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfDevicesDenied) : options.longs === Number ? new $util.LongBits(message.numberOfDevicesDenied.low >>> 0, message.numberOfDevicesDenied.high >>> 0).toNumber() : message.numberOfDevicesDenied; - if (message.numberOfErrors != null && message.hasOwnProperty("numberOfErrors")) + if (message.numberOfErrors != null && Object.hasOwnProperty.call(message, "numberOfErrors")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfErrors = typeof message.numberOfErrors === "number" ? BigInt(message.numberOfErrors) : $util.Long.fromBits(message.numberOfErrors.low >>> 0, message.numberOfErrors.high >>> 0, false).toBigInt(); else if (typeof message.numberOfErrors === "number") object.numberOfErrors = options.longs === String ? String(message.numberOfErrors) : message.numberOfErrors; else object.numberOfErrors = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfErrors) : options.longs === Number ? new $util.LongBits(message.numberOfErrors.low >>> 0, message.numberOfErrors.high >>> 0).toNumber() : message.numberOfErrors; - if (message.sslCertificateExpiration != null && message.hasOwnProperty("sslCertificateExpiration")) + if (message.sslCertificateExpiration != null && Object.hasOwnProperty.call(message, "sslCertificateExpiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.sslCertificateExpiration = typeof message.sslCertificateExpiration === "number" ? BigInt(message.sslCertificateExpiration) : $util.Long.fromBits(message.sslCertificateExpiration.low >>> 0, message.sslCertificateExpiration.high >>> 0, false).toBigInt(); else if (typeof message.sslCertificateExpiration === "number") object.sslCertificateExpiration = options.longs === String ? String(message.sslCertificateExpiration) : message.sslCertificateExpiration; else object.sslCertificateExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.sslCertificateExpiration) : options.longs === Number ? new $util.LongBits(message.sslCertificateExpiration.low >>> 0, message.sslCertificateExpiration.high >>> 0).toNumber() : message.sslCertificateExpiration; - if (message.notInitializedResponse != null && message.hasOwnProperty("notInitializedResponse")) + if (message.notInitializedResponse != null && Object.hasOwnProperty.call(message, "notInitializedResponse")) object.notInitializedResponse = $root.Automator.NotInitializedResponse.toObject(message.notInitializedResponse, options, q + 1); - if (message.config != null && message.hasOwnProperty("config")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) object.config = options.bytes === String ? $util.base64.encode(message.config, 0, message.config.length) : options.bytes === Array ? Array.prototype.slice.call(message.config) : message.config; - if (message.numberOfTeamMembershipsApproved != null && message.hasOwnProperty("numberOfTeamMembershipsApproved")) + if (message.numberOfTeamMembershipsApproved != null && Object.hasOwnProperty.call(message, "numberOfTeamMembershipsApproved")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfTeamMembershipsApproved = typeof message.numberOfTeamMembershipsApproved === "number" ? BigInt(message.numberOfTeamMembershipsApproved) : $util.Long.fromBits(message.numberOfTeamMembershipsApproved.low >>> 0, message.numberOfTeamMembershipsApproved.high >>> 0, false).toBigInt(); else if (typeof message.numberOfTeamMembershipsApproved === "number") object.numberOfTeamMembershipsApproved = options.longs === String ? String(message.numberOfTeamMembershipsApproved) : message.numberOfTeamMembershipsApproved; else object.numberOfTeamMembershipsApproved = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfTeamMembershipsApproved) : options.longs === Number ? new $util.LongBits(message.numberOfTeamMembershipsApproved.low >>> 0, message.numberOfTeamMembershipsApproved.high >>> 0).toNumber() : message.numberOfTeamMembershipsApproved; - if (message.numberOfTeamMembershipsDenied != null && message.hasOwnProperty("numberOfTeamMembershipsDenied")) + if (message.numberOfTeamMembershipsDenied != null && Object.hasOwnProperty.call(message, "numberOfTeamMembershipsDenied")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfTeamMembershipsDenied = typeof message.numberOfTeamMembershipsDenied === "number" ? BigInt(message.numberOfTeamMembershipsDenied) : $util.Long.fromBits(message.numberOfTeamMembershipsDenied.low >>> 0, message.numberOfTeamMembershipsDenied.high >>> 0, false).toBigInt(); else if (typeof message.numberOfTeamMembershipsDenied === "number") object.numberOfTeamMembershipsDenied = options.longs === String ? String(message.numberOfTeamMembershipsDenied) : message.numberOfTeamMembershipsDenied; else object.numberOfTeamMembershipsDenied = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfTeamMembershipsDenied) : options.longs === Number ? new $util.LongBits(message.numberOfTeamMembershipsDenied.low >>> 0, message.numberOfTeamMembershipsDenied.high >>> 0).toNumber() : message.numberOfTeamMembershipsDenied; - if (message.numberOfTeamsApproved != null && message.hasOwnProperty("numberOfTeamsApproved")) + if (message.numberOfTeamsApproved != null && Object.hasOwnProperty.call(message, "numberOfTeamsApproved")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfTeamsApproved = typeof message.numberOfTeamsApproved === "number" ? BigInt(message.numberOfTeamsApproved) : $util.Long.fromBits(message.numberOfTeamsApproved.low >>> 0, message.numberOfTeamsApproved.high >>> 0, false).toBigInt(); else if (typeof message.numberOfTeamsApproved === "number") object.numberOfTeamsApproved = options.longs === String ? String(message.numberOfTeamsApproved) : message.numberOfTeamsApproved; else object.numberOfTeamsApproved = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfTeamsApproved) : options.longs === Number ? new $util.LongBits(message.numberOfTeamsApproved.low >>> 0, message.numberOfTeamsApproved.high >>> 0).toNumber() : message.numberOfTeamsApproved; - if (message.numberOfTeamsDenied != null && message.hasOwnProperty("numberOfTeamsDenied")) + if (message.numberOfTeamsDenied != null && Object.hasOwnProperty.call(message, "numberOfTeamsDenied")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.numberOfTeamsDenied = typeof message.numberOfTeamsDenied === "number" ? BigInt(message.numberOfTeamsDenied) : $util.Long.fromBits(message.numberOfTeamsDenied.low >>> 0, message.numberOfTeamsDenied.high >>> 0, false).toBigInt(); else if (typeof message.numberOfTeamsDenied === "number") @@ -170626,7 +171616,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ErrorResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -170696,7 +171686,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -170713,6 +171703,8 @@ export const Automator = $root.Automator = (() => { ErrorResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ErrorResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ErrorResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -170742,7 +171734,7 @@ export const Automator = $root.Automator = (() => { let object = {}; if (options.defaults) object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -170905,7 +171897,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ LogEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -170987,16 +171979,16 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serverTime != null && message.hasOwnProperty("serverTime")) + if (message.serverTime != null && Object.hasOwnProperty.call(message, "serverTime")) if (!$util.isString(message.serverTime)) return "serverTime: string expected"; - if (message.messageLevel != null && message.hasOwnProperty("messageLevel")) + if (message.messageLevel != null && Object.hasOwnProperty.call(message, "messageLevel")) if (!$util.isString(message.messageLevel)) return "messageLevel: string expected"; - if (message.component != null && message.hasOwnProperty("component")) + if (message.component != null && Object.hasOwnProperty.call(message, "component")) if (!$util.isString(message.component)) return "component: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -171013,6 +172005,8 @@ export const Automator = $root.Automator = (() => { LogEntry.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.LogEntry) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.LogEntry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -171052,13 +172046,13 @@ export const Automator = $root.Automator = (() => { object.component = ""; object.message = ""; } - if (message.serverTime != null && message.hasOwnProperty("serverTime")) + if (message.serverTime != null && Object.hasOwnProperty.call(message, "serverTime")) object.serverTime = message.serverTime; - if (message.messageLevel != null && message.hasOwnProperty("messageLevel")) + if (message.messageLevel != null && Object.hasOwnProperty.call(message, "messageLevel")) object.messageLevel = message.messageLevel; - if (message.component != null && message.hasOwnProperty("component")) + if (message.component != null && Object.hasOwnProperty.call(message, "component")) object.component = message.component; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -171218,7 +172212,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -171298,13 +172292,13 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.automatorInfo != null && message.hasOwnProperty("automatorInfo")) { + if (message.automatorInfo != null && Object.hasOwnProperty.call(message, "automatorInfo")) { if (!Array.isArray(message.automatorInfo)) return "automatorInfo: array expected"; for (let i = 0; i < message.automatorInfo.length; ++i) { @@ -171327,6 +172321,8 @@ export const Automator = $root.Automator = (() => { AdminResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -171341,7 +172337,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.AdminResponse.automatorInfo: array expected"); message.automatorInfo = []; for (let i = 0; i < object.automatorInfo.length; ++i) { - if (typeof object.automatorInfo[i] !== "object") + if (!$util.isObject(object.automatorInfo[i])) throw TypeError(".Automator.AdminResponse.automatorInfo: object expected"); message.automatorInfo[i] = $root.Automator.AutomatorInfo.fromObject(object.automatorInfo[i], long + 1); } @@ -171372,9 +172368,9 @@ export const Automator = $root.Automator = (() => { object.success = false; object.message = ""; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.automatorInfo && message.automatorInfo.length) { object.automatorInfo = []; @@ -171615,7 +172611,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AutomatorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -171735,22 +172731,22 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.automatorSkills != null && message.hasOwnProperty("automatorSkills")) { + if (message.automatorSkills != null && Object.hasOwnProperty.call(message, "automatorSkills")) { if (!Array.isArray(message.automatorSkills)) return "automatorSkills: array expected"; for (let i = 0; i < message.automatorSkills.length; ++i) { @@ -171759,7 +172755,7 @@ export const Automator = $root.Automator = (() => { return "automatorSkills." + error; } } - if (message.automatorSettingValues != null && message.hasOwnProperty("automatorSettingValues")) { + if (message.automatorSettingValues != null && Object.hasOwnProperty.call(message, "automatorSettingValues")) { if (!Array.isArray(message.automatorSettingValues)) return "automatorSettingValues: array expected"; for (let i = 0; i < message.automatorSettingValues.length; ++i) { @@ -171768,12 +172764,12 @@ export const Automator = $root.Automator = (() => { return "automatorSettingValues." + error; } } - if (message.status != null && message.hasOwnProperty("status")) { + if (message.status != null && Object.hasOwnProperty.call(message, "status")) { let error = $root.Automator.StatusResponse.verify(message.status, long + 1); if (error) return "status." + error; } - if (message.logEntries != null && message.hasOwnProperty("logEntries")) { + if (message.logEntries != null && Object.hasOwnProperty.call(message, "logEntries")) { if (!Array.isArray(message.logEntries)) return "logEntries: array expected"; for (let i = 0; i < message.logEntries.length; ++i) { @@ -171782,7 +172778,7 @@ export const Automator = $root.Automator = (() => { return "logEntries." + error; } } - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) switch (message.automatorState) { default: return "automatorState: enum value expected"; @@ -171794,10 +172790,10 @@ export const Automator = $root.Automator = (() => { case 5: break; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isString(message.version)) return "version: string expected"; - if (message.sslCertificateExpirationDate != null && message.hasOwnProperty("sslCertificateExpirationDate")) + if (message.sslCertificateExpirationDate != null && Object.hasOwnProperty.call(message, "sslCertificateExpirationDate")) if (!$util.isString(message.sslCertificateExpirationDate)) return "sslCertificateExpirationDate: string expected"; return null; @@ -171814,6 +172810,8 @@ export const Automator = $root.Automator = (() => { AutomatorInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AutomatorInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AutomatorInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -171848,7 +172846,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.AutomatorInfo.automatorSkills: array expected"); message.automatorSkills = []; for (let i = 0; i < object.automatorSkills.length; ++i) { - if (typeof object.automatorSkills[i] !== "object") + if (!$util.isObject(object.automatorSkills[i])) throw TypeError(".Automator.AutomatorInfo.automatorSkills: object expected"); message.automatorSkills[i] = $root.Automator.AutomatorSkill.fromObject(object.automatorSkills[i], long + 1); } @@ -171858,13 +172856,13 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.AutomatorInfo.automatorSettingValues: array expected"); message.automatorSettingValues = []; for (let i = 0; i < object.automatorSettingValues.length; ++i) { - if (typeof object.automatorSettingValues[i] !== "object") + if (!$util.isObject(object.automatorSettingValues[i])) throw TypeError(".Automator.AutomatorInfo.automatorSettingValues: object expected"); message.automatorSettingValues[i] = $root.Automator.AutomatorSettingValue.fromObject(object.automatorSettingValues[i], long + 1); } } if (object.status != null) { - if (typeof object.status !== "object") + if (!$util.isObject(object.status)) throw TypeError(".Automator.AutomatorInfo.status: object expected"); message.status = $root.Automator.StatusResponse.fromObject(object.status, long + 1); } @@ -171873,7 +172871,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.AutomatorInfo.logEntries: array expected"); message.logEntries = []; for (let i = 0; i < object.logEntries.length; ++i) { - if (typeof object.logEntries[i] !== "object") + if (!$util.isObject(object.logEntries[i])) throw TypeError(".Automator.AutomatorInfo.logEntries: object expected"); message.logEntries[i] = $root.Automator.LogEntry.fromObject(object.logEntries[i], long + 1); } @@ -171958,25 +172956,25 @@ export const Automator = $root.Automator = (() => { object.version = ""; object.sslCertificateExpirationDate = ""; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) object.enabled = message.enabled; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.automatorSkills && message.automatorSkills.length) { object.automatorSkills = []; @@ -171988,18 +172986,18 @@ export const Automator = $root.Automator = (() => { for (let j = 0; j < message.automatorSettingValues.length; ++j) object.automatorSettingValues[j] = $root.Automator.AutomatorSettingValue.toObject(message.automatorSettingValues[j], options, q + 1); } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = $root.Automator.StatusResponse.toObject(message.status, options, q + 1); if (message.logEntries && message.logEntries.length) { object.logEntries = []; for (let j = 0; j < message.logEntries.length; ++j) object.logEntries[j] = $root.Automator.LogEntry.toObject(message.logEntries[j], options, q + 1); } - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) object.automatorState = options.enums === String ? $root.Automator.AutomatorState[message.automatorState] === undefined ? message.automatorState : $root.Automator.AutomatorState[message.automatorState] : message.automatorState; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.sslCertificateExpirationDate != null && message.hasOwnProperty("sslCertificateExpirationDate")) + if (message.sslCertificateExpirationDate != null && Object.hasOwnProperty.call(message, "sslCertificateExpirationDate")) object.sslCertificateExpirationDate = message.sslCertificateExpirationDate; return object; }; @@ -172133,7 +173131,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminCreateAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -172211,13 +173209,13 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.skill != null && message.hasOwnProperty("skill")) { + if (message.skill != null && Object.hasOwnProperty.call(message, "skill")) { let error = $root.Automator.AutomatorSkill.verify(message.skill, long + 1); if (error) return "skill." + error; @@ -172236,6 +173234,8 @@ export const Automator = $root.Automator = (() => { AdminCreateAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminCreateAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminCreateAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -172253,7 +173253,7 @@ export const Automator = $root.Automator = (() => { if (object.name != null) message.name = String(object.name); if (object.skill != null) { - if (typeof object.skill !== "object") + if (!$util.isObject(object.skill)) throw TypeError(".Automator.AdminCreateAutomatorRequest.skill: object expected"); message.skill = $root.Automator.AutomatorSkill.fromObject(object.skill, long + 1); } @@ -172286,16 +173286,16 @@ export const Automator = $root.Automator = (() => { object.name = ""; object.skill = null; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.skill != null && message.hasOwnProperty("skill")) + if (message.skill != null && Object.hasOwnProperty.call(message, "skill")) object.skill = $root.Automator.AutomatorSkill.toObject(message.skill, options, q + 1); return object; }; @@ -172409,7 +173409,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminDeleteAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -172479,7 +173479,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -172496,6 +173496,8 @@ export const Automator = $root.Automator = (() => { AdminDeleteAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminDeleteAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminDeleteAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -172536,7 +173538,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -172654,7 +173656,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminGetAutomatorsOnNodeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -172724,7 +173726,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; return null; @@ -172741,6 +173743,8 @@ export const Automator = $root.Automator = (() => { AdminGetAutomatorsOnNodeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminGetAutomatorsOnNodeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminGetAutomatorsOnNodeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -172781,7 +173785,7 @@ export const Automator = $root.Automator = (() => { object.nodeId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.nodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") @@ -172900,7 +173904,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminGetAutomatorsForEnterpriseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -172970,7 +173974,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; return null; @@ -172987,6 +173991,8 @@ export const Automator = $root.Automator = (() => { AdminGetAutomatorsForEnterpriseRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminGetAutomatorsForEnterpriseRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminGetAutomatorsForEnterpriseRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -173016,7 +174022,7 @@ export const Automator = $root.Automator = (() => { let object = {}; if (options.defaults) object.enterpriseId = 0; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; return object; }; @@ -173127,7 +174133,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminGetAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -173197,7 +174203,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -173214,6 +174220,8 @@ export const Automator = $root.Automator = (() => { AdminGetAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminGetAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminGetAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -173254,7 +174262,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -173381,7 +174389,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminEnableAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -173455,10 +174463,10 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; return null; @@ -173475,6 +174483,8 @@ export const Automator = $root.Automator = (() => { AdminEnableAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminEnableAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminEnableAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -173519,14 +174529,14 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.enabled = false; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) object.enabled = message.enabled; return object; }; @@ -173701,7 +174711,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminEditAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -173800,19 +174810,19 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.skillTypes != null && message.hasOwnProperty("skillTypes")) { + if (message.skillTypes != null && Object.hasOwnProperty.call(message, "skillTypes")) { if (!Array.isArray(message.skillTypes)) return "skillTypes: array expected"; for (let i = 0; i < message.skillTypes.length; ++i) @@ -173826,7 +174836,7 @@ export const Automator = $root.Automator = (() => { break; } } - if (message.automatorSettingValues != null && message.hasOwnProperty("automatorSettingValues")) { + if (message.automatorSettingValues != null && Object.hasOwnProperty.call(message, "automatorSettingValues")) { if (!Array.isArray(message.automatorSettingValues)) return "automatorSettingValues: array expected"; for (let i = 0; i < message.automatorSettingValues.length; ++i) { @@ -173849,6 +174859,8 @@ export const Automator = $root.Automator = (() => { AdminEditAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminEditAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminEditAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -173903,7 +174915,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.AdminEditAutomatorRequest.automatorSettingValues: array expected"); message.automatorSettingValues = []; for (let i = 0; i < object.automatorSettingValues.length; ++i) { - if (typeof object.automatorSettingValues[i] !== "object") + if (!$util.isObject(object.automatorSettingValues[i])) throw TypeError(".Automator.AdminEditAutomatorRequest.automatorSettingValues: object expected"); message.automatorSettingValues[i] = $root.Automator.AutomatorSettingValue.fromObject(object.automatorSettingValues[i], long + 1); } @@ -173942,18 +174954,18 @@ export const Automator = $root.Automator = (() => { object.enabled = false; object.url = ""; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) object.enabled = message.enabled; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.skillTypes && message.skillTypes.length) { object.skillTypes = []; @@ -174136,7 +175148,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminSetupAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -174233,10 +175245,10 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) switch (message.automatorState) { default: return "automatorState: enum value expected"; @@ -174248,13 +175260,13 @@ export const Automator = $root.Automator = (() => { case 5: break; } - if (message.encryptedEccEnterprisePrivateKey != null && message.hasOwnProperty("encryptedEccEnterprisePrivateKey")) + if (message.encryptedEccEnterprisePrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEccEnterprisePrivateKey")) if (!(message.encryptedEccEnterprisePrivateKey && typeof message.encryptedEccEnterprisePrivateKey.length === "number" || $util.isString(message.encryptedEccEnterprisePrivateKey))) return "encryptedEccEnterprisePrivateKey: buffer expected"; - if (message.encryptedRsaEnterprisePrivateKey != null && message.hasOwnProperty("encryptedRsaEnterprisePrivateKey")) + if (message.encryptedRsaEnterprisePrivateKey != null && Object.hasOwnProperty.call(message, "encryptedRsaEnterprisePrivateKey")) if (!(message.encryptedRsaEnterprisePrivateKey && typeof message.encryptedRsaEnterprisePrivateKey.length === "number" || $util.isString(message.encryptedRsaEnterprisePrivateKey))) return "encryptedRsaEnterprisePrivateKey: buffer expected"; - if (message.skillTypes != null && message.hasOwnProperty("skillTypes")) { + if (message.skillTypes != null && Object.hasOwnProperty.call(message, "skillTypes")) { if (!Array.isArray(message.skillTypes)) return "skillTypes: array expected"; for (let i = 0; i < message.skillTypes.length; ++i) @@ -174268,7 +175280,7 @@ export const Automator = $root.Automator = (() => { break; } } - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) if (!(message.encryptedTreeKey && typeof message.encryptedTreeKey.length === "number" || $util.isString(message.encryptedTreeKey))) return "encryptedTreeKey: buffer expected"; return null; @@ -174285,6 +175297,8 @@ export const Automator = $root.Automator = (() => { AdminSetupAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminSetupAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminSetupAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -174426,25 +175440,25 @@ export const Automator = $root.Automator = (() => { object.encryptedTreeKey = $util.newBuffer(object.encryptedTreeKey); } } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) object.automatorState = options.enums === String ? $root.Automator.AutomatorState[message.automatorState] === undefined ? message.automatorState : $root.Automator.AutomatorState[message.automatorState] : message.automatorState; - if (message.encryptedEccEnterprisePrivateKey != null && message.hasOwnProperty("encryptedEccEnterprisePrivateKey")) + if (message.encryptedEccEnterprisePrivateKey != null && Object.hasOwnProperty.call(message, "encryptedEccEnterprisePrivateKey")) object.encryptedEccEnterprisePrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedEccEnterprisePrivateKey, 0, message.encryptedEccEnterprisePrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedEccEnterprisePrivateKey) : message.encryptedEccEnterprisePrivateKey; - if (message.encryptedRsaEnterprisePrivateKey != null && message.hasOwnProperty("encryptedRsaEnterprisePrivateKey")) + if (message.encryptedRsaEnterprisePrivateKey != null && Object.hasOwnProperty.call(message, "encryptedRsaEnterprisePrivateKey")) object.encryptedRsaEnterprisePrivateKey = options.bytes === String ? $util.base64.encode(message.encryptedRsaEnterprisePrivateKey, 0, message.encryptedRsaEnterprisePrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRsaEnterprisePrivateKey) : message.encryptedRsaEnterprisePrivateKey; if (message.skillTypes && message.skillTypes.length) { object.skillTypes = []; for (let j = 0; j < message.skillTypes.length; ++j) object.skillTypes[j] = options.enums === String ? $root.Automator.SkillType[message.skillTypes[j]] === undefined ? message.skillTypes[j] : $root.Automator.SkillType[message.skillTypes[j]] : message.skillTypes[j]; } - if (message.encryptedTreeKey != null && message.hasOwnProperty("encryptedTreeKey")) + if (message.encryptedTreeKey != null && Object.hasOwnProperty.call(message, "encryptedTreeKey")) object.encryptedTreeKey = options.bytes === String ? $util.base64.encode(message.encryptedTreeKey, 0, message.encryptedTreeKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTreeKey) : message.encryptedTreeKey; return object; }; @@ -174598,7 +175612,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminSetupAutomatorResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -174684,16 +175698,16 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) switch (message.automatorState) { default: return "automatorState: enum value expected"; @@ -174705,7 +175719,7 @@ export const Automator = $root.Automator = (() => { case 5: break; } - if (message.automatorEccPublicKey != null && message.hasOwnProperty("automatorEccPublicKey")) + if (message.automatorEccPublicKey != null && Object.hasOwnProperty.call(message, "automatorEccPublicKey")) if (!(message.automatorEccPublicKey && typeof message.automatorEccPublicKey.length === "number" || $util.isString(message.automatorEccPublicKey))) return "automatorEccPublicKey: buffer expected"; return null; @@ -174722,6 +175736,8 @@ export const Automator = $root.Automator = (() => { AdminSetupAutomatorResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminSetupAutomatorResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminSetupAutomatorResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -174814,20 +175830,20 @@ export const Automator = $root.Automator = (() => { object.automatorEccPublicKey = $util.newBuffer(object.automatorEccPublicKey); } } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.automatorState != null && message.hasOwnProperty("automatorState")) + if (message.automatorState != null && Object.hasOwnProperty.call(message, "automatorState")) object.automatorState = options.enums === String ? $root.Automator.AutomatorState[message.automatorState] === undefined ? message.automatorState : $root.Automator.AutomatorState[message.automatorState] : message.automatorState; - if (message.automatorEccPublicKey != null && message.hasOwnProperty("automatorEccPublicKey")) + if (message.automatorEccPublicKey != null && Object.hasOwnProperty.call(message, "automatorEccPublicKey")) object.automatorEccPublicKey = options.bytes === String ? $util.base64.encode(message.automatorEccPublicKey, 0, message.automatorEccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.automatorEccPublicKey) : message.automatorEccPublicKey; return object; }; @@ -174939,7 +175955,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminAutomatorSkillsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -175009,7 +176025,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -175026,6 +176042,8 @@ export const Automator = $root.Automator = (() => { AdminAutomatorSkillsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminAutomatorSkillsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminAutomatorSkillsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -175066,7 +176084,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -175202,7 +176220,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AutomatorSkill.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -175280,7 +176298,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.skillType != null && message.hasOwnProperty("skillType")) + if (message.skillType != null && Object.hasOwnProperty.call(message, "skillType")) switch (message.skillType) { default: return "skillType: enum value expected"; @@ -175290,10 +176308,10 @@ export const Automator = $root.Automator = (() => { case 3: break; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.translatedName != null && message.hasOwnProperty("translatedName")) + if (message.translatedName != null && Object.hasOwnProperty.call(message, "translatedName")) if (!$util.isString(message.translatedName)) return "translatedName: string expected"; return null; @@ -175310,6 +176328,8 @@ export const Automator = $root.Automator = (() => { AutomatorSkill.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AutomatorSkill) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AutomatorSkill: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -175368,11 +176388,11 @@ export const Automator = $root.Automator = (() => { object.name = ""; object.translatedName = ""; } - if (message.skillType != null && message.hasOwnProperty("skillType")) + if (message.skillType != null && Object.hasOwnProperty.call(message, "skillType")) object.skillType = options.enums === String ? $root.Automator.SkillType[message.skillType] === undefined ? message.skillType : $root.Automator.SkillType[message.skillType] : message.skillType; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.translatedName != null && message.hasOwnProperty("translatedName")) + if (message.translatedName != null && Object.hasOwnProperty.call(message, "translatedName")) object.translatedName = message.translatedName; return object; }; @@ -175505,7 +176525,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminAutomatorSkillsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -175585,13 +176605,13 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.automatorSkills != null && message.hasOwnProperty("automatorSkills")) { + if (message.automatorSkills != null && Object.hasOwnProperty.call(message, "automatorSkills")) { if (!Array.isArray(message.automatorSkills)) return "automatorSkills: array expected"; for (let i = 0; i < message.automatorSkills.length; ++i) { @@ -175614,6 +176634,8 @@ export const Automator = $root.Automator = (() => { AdminAutomatorSkillsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminAutomatorSkillsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminAutomatorSkillsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -175628,7 +176650,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.AdminAutomatorSkillsResponse.automatorSkills: array expected"); message.automatorSkills = []; for (let i = 0; i < object.automatorSkills.length; ++i) { - if (typeof object.automatorSkills[i] !== "object") + if (!$util.isObject(object.automatorSkills[i])) throw TypeError(".Automator.AdminAutomatorSkillsResponse.automatorSkills: object expected"); message.automatorSkills[i] = $root.Automator.AutomatorSkill.fromObject(object.automatorSkills[i], long + 1); } @@ -175659,9 +176681,9 @@ export const Automator = $root.Automator = (() => { object.success = false; object.message = ""; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.automatorSkills && message.automatorSkills.length) { object.automatorSkills = []; @@ -175779,7 +176801,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminResetAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -175849,7 +176871,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -175866,6 +176888,8 @@ export const Automator = $root.Automator = (() => { AdminResetAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminResetAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminResetAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -175906,7 +176930,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -176023,7 +177047,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminInitializeAutomatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -176093,7 +177117,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -176110,6 +177134,8 @@ export const Automator = $root.Automator = (() => { AdminInitializeAutomatorRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminInitializeAutomatorRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminInitializeAutomatorRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -176150,7 +177176,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -176269,7 +177295,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminAutomatorLogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -176339,7 +177365,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -176356,6 +177382,8 @@ export const Automator = $root.Automator = (() => { AdminAutomatorLogRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminAutomatorLogRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminAutomatorLogRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -176396,7 +177424,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -176515,7 +177543,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ AdminAutomatorLogClearRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -176585,7 +177613,7 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; return null; @@ -176602,6 +177630,8 @@ export const Automator = $root.Automator = (() => { AdminAutomatorLogClearRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.AdminAutomatorLogClearRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.AdminAutomatorLogClearRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -176642,7 +177672,7 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") @@ -176872,7 +177902,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveTeamsForUserRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -176984,10 +178014,10 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.ssoAuthenticationProtocolType != null && message.hasOwnProperty("ssoAuthenticationProtocolType")) + if (message.ssoAuthenticationProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthenticationProtocolType")) switch (message.ssoAuthenticationProtocolType) { default: return "ssoAuthenticationProtocolType: enum value expected"; @@ -176996,22 +178026,22 @@ export const Automator = $root.Automator = (() => { case 2: break; } - if (message.authMessage != null && message.hasOwnProperty("authMessage")) + if (message.authMessage != null && Object.hasOwnProperty.call(message, "authMessage")) if (!$util.isString(message.authMessage)) return "authMessage: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) if (!$util.isInteger(message.serverEccPublicKeyId)) return "serverEccPublicKeyId: integer expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.userPublicKey != null && message.hasOwnProperty("userPublicKey")) + if (message.userPublicKey != null && Object.hasOwnProperty.call(message, "userPublicKey")) if (!(message.userPublicKey && typeof message.userPublicKey.length === "number" || $util.isString(message.userPublicKey))) return "userPublicKey: buffer expected"; - if (message.teamDescription != null && message.hasOwnProperty("teamDescription")) { + if (message.teamDescription != null && Object.hasOwnProperty.call(message, "teamDescription")) { if (!Array.isArray(message.teamDescription)) return "teamDescription: array expected"; for (let i = 0; i < message.teamDescription.length; ++i) { @@ -177020,13 +178050,13 @@ export const Automator = $root.Automator = (() => { return "teamDescription." + error; } } - if (message.isTesting != null && message.hasOwnProperty("isTesting")) + if (message.isTesting != null && Object.hasOwnProperty.call(message, "isTesting")) if (typeof message.isTesting !== "boolean") return "isTesting: boolean expected"; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) if (typeof message.isEccOnly !== "boolean") return "isEccOnly: boolean expected"; - if (message.userPublicKeyEcc != null && message.hasOwnProperty("userPublicKeyEcc")) + if (message.userPublicKeyEcc != null && Object.hasOwnProperty.call(message, "userPublicKeyEcc")) if (!(message.userPublicKeyEcc && typeof message.userPublicKeyEcc.length === "number" || $util.isString(message.userPublicKeyEcc))) return "userPublicKeyEcc: buffer expected"; return null; @@ -177043,6 +178073,8 @@ export const Automator = $root.Automator = (() => { ApproveTeamsForUserRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveTeamsForUserRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveTeamsForUserRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -177095,7 +178127,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.ApproveTeamsForUserRequest.teamDescription: array expected"); message.teamDescription = []; for (let i = 0; i < object.teamDescription.length; ++i) { - if (typeof object.teamDescription[i] !== "object") + if (!$util.isObject(object.teamDescription[i])) throw TypeError(".Automator.ApproveTeamsForUserRequest.teamDescription: object expected"); message.teamDescription[i] = $root.Automator.TeamDescription.fromObject(object.teamDescription[i], long + 1); } @@ -177159,35 +178191,35 @@ export const Automator = $root.Automator = (() => { object.userPublicKeyEcc = $util.newBuffer(object.userPublicKeyEcc); } } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.ssoAuthenticationProtocolType != null && message.hasOwnProperty("ssoAuthenticationProtocolType")) + if (message.ssoAuthenticationProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthenticationProtocolType")) object.ssoAuthenticationProtocolType = options.enums === String ? $root.Automator.SsoAuthenticationProtocolType[message.ssoAuthenticationProtocolType] === undefined ? message.ssoAuthenticationProtocolType : $root.Automator.SsoAuthenticationProtocolType[message.ssoAuthenticationProtocolType] : message.ssoAuthenticationProtocolType; - if (message.authMessage != null && message.hasOwnProperty("authMessage")) + if (message.authMessage != null && Object.hasOwnProperty.call(message, "authMessage")) object.authMessage = message.authMessage; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) object.serverEccPublicKeyId = message.serverEccPublicKeyId; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.userPublicKey != null && message.hasOwnProperty("userPublicKey")) + if (message.userPublicKey != null && Object.hasOwnProperty.call(message, "userPublicKey")) object.userPublicKey = options.bytes === String ? $util.base64.encode(message.userPublicKey, 0, message.userPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userPublicKey) : message.userPublicKey; if (message.teamDescription && message.teamDescription.length) { object.teamDescription = []; for (let j = 0; j < message.teamDescription.length; ++j) object.teamDescription[j] = $root.Automator.TeamDescription.toObject(message.teamDescription[j], options, q + 1); } - if (message.isTesting != null && message.hasOwnProperty("isTesting")) + if (message.isTesting != null && Object.hasOwnProperty.call(message, "isTesting")) object.isTesting = message.isTesting; - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) object.isEccOnly = message.isEccOnly; - if (message.userPublicKeyEcc != null && message.hasOwnProperty("userPublicKeyEcc")) + if (message.userPublicKeyEcc != null && Object.hasOwnProperty.call(message, "userPublicKeyEcc")) object.userPublicKeyEcc = options.bytes === String ? $util.base64.encode(message.userPublicKeyEcc, 0, message.userPublicKeyEcc.length) : options.bytes === Array ? Array.prototype.slice.call(message.userPublicKeyEcc) : message.userPublicKeyEcc; return object; }; @@ -177332,7 +178364,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ TeamDescription.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -177414,16 +178446,16 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) if (!$util.isString(message.teamName)) return "teamName: string expected"; - if (message.encryptedTeamKey != null && message.hasOwnProperty("encryptedTeamKey")) + if (message.encryptedTeamKey != null && Object.hasOwnProperty.call(message, "encryptedTeamKey")) if (!(message.encryptedTeamKey && typeof message.encryptedTeamKey.length === "number" || $util.isString(message.encryptedTeamKey))) return "encryptedTeamKey: buffer expected"; - if (message.encryptedTeamKeyType != null && message.hasOwnProperty("encryptedTeamKeyType")) + if (message.encryptedTeamKeyType != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyType")) switch (message.encryptedTeamKeyType) { default: return "encryptedTeamKeyType: enum value expected"; @@ -177448,6 +178480,8 @@ export const Automator = $root.Automator = (() => { TeamDescription.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.TeamDescription) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.TeamDescription: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -177531,13 +178565,13 @@ export const Automator = $root.Automator = (() => { } object.encryptedTeamKeyType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) object.teamName = message.teamName; - if (message.encryptedTeamKey != null && message.hasOwnProperty("encryptedTeamKey")) + if (message.encryptedTeamKey != null && Object.hasOwnProperty.call(message, "encryptedTeamKey")) object.encryptedTeamKey = options.bytes === String ? $util.base64.encode(message.encryptedTeamKey, 0, message.encryptedTeamKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamKey) : message.encryptedTeamKey; - if (message.encryptedTeamKeyType != null && message.hasOwnProperty("encryptedTeamKeyType")) + if (message.encryptedTeamKeyType != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyType")) object.encryptedTeamKeyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedTeamKeyType] === undefined ? message.encryptedTeamKeyType : $root.Enterprise.EncryptedKeyType[message.encryptedTeamKeyType] : message.encryptedTeamKeyType; return object; }; @@ -177684,7 +178718,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveTeamsForUserResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -177768,16 +178802,16 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.approveTeamResponse != null && message.hasOwnProperty("approveTeamResponse")) { + if (message.approveTeamResponse != null && Object.hasOwnProperty.call(message, "approveTeamResponse")) { if (!Array.isArray(message.approveTeamResponse)) return "approveTeamResponse: array expected"; for (let i = 0; i < message.approveTeamResponse.length; ++i) { @@ -177800,6 +178834,8 @@ export const Automator = $root.Automator = (() => { ApproveTeamsForUserResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveTeamsForUserResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveTeamsForUserResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -177823,7 +178859,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.ApproveTeamsForUserResponse.approveTeamResponse: array expected"); message.approveTeamResponse = []; for (let i = 0; i < object.approveTeamResponse.length; ++i) { - if (typeof object.approveTeamResponse[i] !== "object") + if (!$util.isObject(object.approveTeamResponse[i])) throw TypeError(".Automator.ApproveTeamsForUserResponse.approveTeamResponse: object expected"); message.approveTeamResponse[i] = $root.Automator.ApproveOneTeamForUserResponse.fromObject(object.approveTeamResponse[i], long + 1); } @@ -177859,16 +178895,16 @@ export const Automator = $root.Automator = (() => { object.email = ""; object.message = ""; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.approveTeamResponse && message.approveTeamResponse.length) { object.approveTeamResponse = []; @@ -178062,7 +179098,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveOneTeamForUserResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -178160,22 +179196,22 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.approved != null && message.hasOwnProperty("approved")) + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) if (typeof message.approved !== "boolean") return "approved: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) if (!$util.isString(message.teamName)) return "teamName: string expected"; - if (message.userEncryptedTeamKey != null && message.hasOwnProperty("userEncryptedTeamKey")) + if (message.userEncryptedTeamKey != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKey")) if (!(message.userEncryptedTeamKey && typeof message.userEncryptedTeamKey.length === "number" || $util.isString(message.userEncryptedTeamKey))) return "userEncryptedTeamKey: buffer expected"; - if (message.userEncryptedTeamKeyType != null && message.hasOwnProperty("userEncryptedTeamKeyType")) + if (message.userEncryptedTeamKeyType != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKeyType")) switch (message.userEncryptedTeamKeyType) { default: return "userEncryptedTeamKeyType: enum value expected"; @@ -178186,10 +179222,10 @@ export const Automator = $root.Automator = (() => { case 4: break; } - if (message.userEncryptedTeamKeyByEcc != null && message.hasOwnProperty("userEncryptedTeamKeyByEcc")) + if (message.userEncryptedTeamKeyByEcc != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKeyByEcc")) if (!(message.userEncryptedTeamKeyByEcc && typeof message.userEncryptedTeamKeyByEcc.length === "number" || $util.isString(message.userEncryptedTeamKeyByEcc))) return "userEncryptedTeamKeyByEcc: buffer expected"; - if (message.userEncryptedTeamKeyByEccType != null && message.hasOwnProperty("userEncryptedTeamKeyByEccType")) + if (message.userEncryptedTeamKeyByEccType != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKeyByEccType")) switch (message.userEncryptedTeamKeyByEccType) { default: return "userEncryptedTeamKeyByEccType: enum value expected"; @@ -178214,6 +179250,8 @@ export const Automator = $root.Automator = (() => { ApproveOneTeamForUserResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveOneTeamForUserResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveOneTeamForUserResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -178344,21 +179382,21 @@ export const Automator = $root.Automator = (() => { } object.userEncryptedTeamKeyByEccType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.approved != null && message.hasOwnProperty("approved")) + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) object.approved = message.approved; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) object.teamName = message.teamName; - if (message.userEncryptedTeamKey != null && message.hasOwnProperty("userEncryptedTeamKey")) + if (message.userEncryptedTeamKey != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKey")) object.userEncryptedTeamKey = options.bytes === String ? $util.base64.encode(message.userEncryptedTeamKey, 0, message.userEncryptedTeamKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEncryptedTeamKey) : message.userEncryptedTeamKey; - if (message.userEncryptedTeamKeyType != null && message.hasOwnProperty("userEncryptedTeamKeyType")) + if (message.userEncryptedTeamKeyType != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKeyType")) object.userEncryptedTeamKeyType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.userEncryptedTeamKeyType] === undefined ? message.userEncryptedTeamKeyType : $root.Enterprise.EncryptedKeyType[message.userEncryptedTeamKeyType] : message.userEncryptedTeamKeyType; - if (message.userEncryptedTeamKeyByEcc != null && message.hasOwnProperty("userEncryptedTeamKeyByEcc")) + if (message.userEncryptedTeamKeyByEcc != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKeyByEcc")) object.userEncryptedTeamKeyByEcc = options.bytes === String ? $util.base64.encode(message.userEncryptedTeamKeyByEcc, 0, message.userEncryptedTeamKeyByEcc.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEncryptedTeamKeyByEcc) : message.userEncryptedTeamKeyByEcc; - if (message.userEncryptedTeamKeyByEccType != null && message.hasOwnProperty("userEncryptedTeamKeyByEccType")) + if (message.userEncryptedTeamKeyByEccType != null && Object.hasOwnProperty.call(message, "userEncryptedTeamKeyByEccType")) object.userEncryptedTeamKeyByEccType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.userEncryptedTeamKeyByEccType] === undefined ? message.userEncryptedTeamKeyByEccType : $root.Enterprise.EncryptedKeyType[message.userEncryptedTeamKeyByEccType] : message.userEncryptedTeamKeyByEccType; return object; }; @@ -178561,7 +179599,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -178665,10 +179703,10 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.ssoAuthenticationProtocolType != null && message.hasOwnProperty("ssoAuthenticationProtocolType")) + if (message.ssoAuthenticationProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthenticationProtocolType")) switch (message.ssoAuthenticationProtocolType) { default: return "ssoAuthenticationProtocolType: enum value expected"; @@ -178677,19 +179715,19 @@ export const Automator = $root.Automator = (() => { case 2: break; } - if (message.authMessage != null && message.hasOwnProperty("authMessage")) + if (message.authMessage != null && Object.hasOwnProperty.call(message, "authMessage")) if (!$util.isString(message.authMessage)) return "authMessage: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) if (!$util.isInteger(message.serverEccPublicKeyId)) return "serverEccPublicKeyId: integer expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.teamDescription != null && message.hasOwnProperty("teamDescription")) { + if (message.teamDescription != null && Object.hasOwnProperty.call(message, "teamDescription")) { if (!Array.isArray(message.teamDescription)) return "teamDescription: array expected"; for (let i = 0; i < message.teamDescription.length; ++i) { @@ -178698,10 +179736,10 @@ export const Automator = $root.Automator = (() => { return "teamDescription." + error; } } - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) if (typeof message.isEccOnly !== "boolean") return "isEccOnly: boolean expected"; - if (message.isTesting != null && message.hasOwnProperty("isTesting")) + if (message.isTesting != null && Object.hasOwnProperty.call(message, "isTesting")) if (typeof message.isTesting !== "boolean") return "isTesting: boolean expected"; return null; @@ -178718,6 +179756,8 @@ export const Automator = $root.Automator = (() => { ApproveTeamsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveTeamsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveTeamsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -178765,7 +179805,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.ApproveTeamsRequest.teamDescription: array expected"); message.teamDescription = []; for (let i = 0; i < object.teamDescription.length; ++i) { - if (typeof object.teamDescription[i] !== "object") + if (!$util.isObject(object.teamDescription[i])) throw TypeError(".Automator.ApproveTeamsRequest.teamDescription: object expected"); message.teamDescription[i] = $root.Automator.TeamDescription.fromObject(object.teamDescription[i], long + 1); } @@ -178810,31 +179850,31 @@ export const Automator = $root.Automator = (() => { object.isEccOnly = false; object.isTesting = false; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.ssoAuthenticationProtocolType != null && message.hasOwnProperty("ssoAuthenticationProtocolType")) + if (message.ssoAuthenticationProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthenticationProtocolType")) object.ssoAuthenticationProtocolType = options.enums === String ? $root.Automator.SsoAuthenticationProtocolType[message.ssoAuthenticationProtocolType] === undefined ? message.ssoAuthenticationProtocolType : $root.Automator.SsoAuthenticationProtocolType[message.ssoAuthenticationProtocolType] : message.ssoAuthenticationProtocolType; - if (message.authMessage != null && message.hasOwnProperty("authMessage")) + if (message.authMessage != null && Object.hasOwnProperty.call(message, "authMessage")) object.authMessage = message.authMessage; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.serverEccPublicKeyId != null && message.hasOwnProperty("serverEccPublicKeyId")) + if (message.serverEccPublicKeyId != null && Object.hasOwnProperty.call(message, "serverEccPublicKeyId")) object.serverEccPublicKeyId = message.serverEccPublicKeyId; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; if (message.teamDescription && message.teamDescription.length) { object.teamDescription = []; for (let j = 0; j < message.teamDescription.length; ++j) object.teamDescription[j] = $root.Automator.TeamDescription.toObject(message.teamDescription[j], options, q + 1); } - if (message.isEccOnly != null && message.hasOwnProperty("isEccOnly")) + if (message.isEccOnly != null && Object.hasOwnProperty.call(message, "isEccOnly")) object.isEccOnly = message.isEccOnly; - if (message.isTesting != null && message.hasOwnProperty("isTesting")) + if (message.isTesting != null && Object.hasOwnProperty.call(message, "isTesting")) object.isTesting = message.isTesting; return object; }; @@ -178970,7 +180010,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -179050,13 +180090,13 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.approveTeamResponse != null && message.hasOwnProperty("approveTeamResponse")) { + if (message.approveTeamResponse != null && Object.hasOwnProperty.call(message, "approveTeamResponse")) { if (!Array.isArray(message.approveTeamResponse)) return "approveTeamResponse: array expected"; for (let i = 0; i < message.approveTeamResponse.length; ++i) { @@ -179079,6 +180119,8 @@ export const Automator = $root.Automator = (() => { ApproveTeamsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveTeamsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveTeamsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -179100,7 +180142,7 @@ export const Automator = $root.Automator = (() => { throw TypeError(".Automator.ApproveTeamsResponse.approveTeamResponse: array expected"); message.approveTeamResponse = []; for (let i = 0; i < object.approveTeamResponse.length; ++i) { - if (typeof object.approveTeamResponse[i] !== "object") + if (!$util.isObject(object.approveTeamResponse[i])) throw TypeError(".Automator.ApproveTeamsResponse.approveTeamResponse: object expected"); message.approveTeamResponse[i] = $root.Automator.ApproveOneTeamResponse.fromObject(object.approveTeamResponse[i], long + 1); } @@ -179135,14 +180177,14 @@ export const Automator = $root.Automator = (() => { object.automatorId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.message = ""; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, false).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber() : message.automatorId; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.approveTeamResponse && message.approveTeamResponse.length) { object.approveTeamResponse = []; @@ -179403,7 +180445,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ ApproveOneTeamResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -179525,22 +180567,22 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.approved != null && message.hasOwnProperty("approved")) + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) if (typeof message.approved !== "boolean") return "approved: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) if (!$util.isString(message.teamName)) return "teamName: string expected"; - if (message.encryptedTeamKeyCbc != null && message.hasOwnProperty("encryptedTeamKeyCbc")) + if (message.encryptedTeamKeyCbc != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyCbc")) if (!(message.encryptedTeamKeyCbc && typeof message.encryptedTeamKeyCbc.length === "number" || $util.isString(message.encryptedTeamKeyCbc))) return "encryptedTeamKeyCbc: buffer expected"; - if (message.encryptedTeamKeyCbcType != null && message.hasOwnProperty("encryptedTeamKeyCbcType")) + if (message.encryptedTeamKeyCbcType != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyCbcType")) switch (message.encryptedTeamKeyCbcType) { default: return "encryptedTeamKeyCbcType: enum value expected"; @@ -179551,10 +180593,10 @@ export const Automator = $root.Automator = (() => { case 4: break; } - if (message.encryptedTeamKeyGcm != null && message.hasOwnProperty("encryptedTeamKeyGcm")) + if (message.encryptedTeamKeyGcm != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyGcm")) if (!(message.encryptedTeamKeyGcm && typeof message.encryptedTeamKeyGcm.length === "number" || $util.isString(message.encryptedTeamKeyGcm))) return "encryptedTeamKeyGcm: buffer expected"; - if (message.encryptedTeamKeyGcmType != null && message.hasOwnProperty("encryptedTeamKeyGcmType")) + if (message.encryptedTeamKeyGcmType != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyGcmType")) switch (message.encryptedTeamKeyGcmType) { default: return "encryptedTeamKeyGcmType: enum value expected"; @@ -179565,13 +180607,13 @@ export const Automator = $root.Automator = (() => { case 4: break; } - if (message.teamPublicKeyRsa != null && message.hasOwnProperty("teamPublicKeyRsa")) + if (message.teamPublicKeyRsa != null && Object.hasOwnProperty.call(message, "teamPublicKeyRsa")) if (!(message.teamPublicKeyRsa && typeof message.teamPublicKeyRsa.length === "number" || $util.isString(message.teamPublicKeyRsa))) return "teamPublicKeyRsa: buffer expected"; - if (message.encryptedTeamPrivateKeyRsa != null && message.hasOwnProperty("encryptedTeamPrivateKeyRsa")) + if (message.encryptedTeamPrivateKeyRsa != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyRsa")) if (!(message.encryptedTeamPrivateKeyRsa && typeof message.encryptedTeamPrivateKeyRsa.length === "number" || $util.isString(message.encryptedTeamPrivateKeyRsa))) return "encryptedTeamPrivateKeyRsa: buffer expected"; - if (message.encryptedTeamPrivateKeyRsaType != null && message.hasOwnProperty("encryptedTeamPrivateKeyRsaType")) + if (message.encryptedTeamPrivateKeyRsaType != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyRsaType")) switch (message.encryptedTeamPrivateKeyRsaType) { default: return "encryptedTeamPrivateKeyRsaType: enum value expected"; @@ -179582,13 +180624,13 @@ export const Automator = $root.Automator = (() => { case 4: break; } - if (message.teamPublicKeyEcc != null && message.hasOwnProperty("teamPublicKeyEcc")) + if (message.teamPublicKeyEcc != null && Object.hasOwnProperty.call(message, "teamPublicKeyEcc")) if (!(message.teamPublicKeyEcc && typeof message.teamPublicKeyEcc.length === "number" || $util.isString(message.teamPublicKeyEcc))) return "teamPublicKeyEcc: buffer expected"; - if (message.encryptedTeamPrivateKeyEcc != null && message.hasOwnProperty("encryptedTeamPrivateKeyEcc")) + if (message.encryptedTeamPrivateKeyEcc != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyEcc")) if (!(message.encryptedTeamPrivateKeyEcc && typeof message.encryptedTeamPrivateKeyEcc.length === "number" || $util.isString(message.encryptedTeamPrivateKeyEcc))) return "encryptedTeamPrivateKeyEcc: buffer expected"; - if (message.encryptedTeamPrivateKeyEccType != null && message.hasOwnProperty("encryptedTeamPrivateKeyEccType")) + if (message.encryptedTeamPrivateKeyEccType != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyEccType")) switch (message.encryptedTeamPrivateKeyEccType) { default: return "encryptedTeamPrivateKeyEccType: enum value expected"; @@ -179613,6 +180655,8 @@ export const Automator = $root.Automator = (() => { ApproveOneTeamResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.ApproveOneTeamResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.ApproveOneTeamResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -179849,33 +180893,33 @@ export const Automator = $root.Automator = (() => { } object.encryptedTeamPrivateKeyEccType = options.enums === String ? "KT_NO_KEY" : 0; } - if (message.approved != null && message.hasOwnProperty("approved")) + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) object.approved = message.approved; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.teamName != null && message.hasOwnProperty("teamName")) + if (message.teamName != null && Object.hasOwnProperty.call(message, "teamName")) object.teamName = message.teamName; - if (message.encryptedTeamKeyCbc != null && message.hasOwnProperty("encryptedTeamKeyCbc")) + if (message.encryptedTeamKeyCbc != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyCbc")) object.encryptedTeamKeyCbc = options.bytes === String ? $util.base64.encode(message.encryptedTeamKeyCbc, 0, message.encryptedTeamKeyCbc.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamKeyCbc) : message.encryptedTeamKeyCbc; - if (message.encryptedTeamKeyCbcType != null && message.hasOwnProperty("encryptedTeamKeyCbcType")) + if (message.encryptedTeamKeyCbcType != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyCbcType")) object.encryptedTeamKeyCbcType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedTeamKeyCbcType] === undefined ? message.encryptedTeamKeyCbcType : $root.Enterprise.EncryptedKeyType[message.encryptedTeamKeyCbcType] : message.encryptedTeamKeyCbcType; - if (message.encryptedTeamKeyGcm != null && message.hasOwnProperty("encryptedTeamKeyGcm")) + if (message.encryptedTeamKeyGcm != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyGcm")) object.encryptedTeamKeyGcm = options.bytes === String ? $util.base64.encode(message.encryptedTeamKeyGcm, 0, message.encryptedTeamKeyGcm.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamKeyGcm) : message.encryptedTeamKeyGcm; - if (message.encryptedTeamKeyGcmType != null && message.hasOwnProperty("encryptedTeamKeyGcmType")) + if (message.encryptedTeamKeyGcmType != null && Object.hasOwnProperty.call(message, "encryptedTeamKeyGcmType")) object.encryptedTeamKeyGcmType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedTeamKeyGcmType] === undefined ? message.encryptedTeamKeyGcmType : $root.Enterprise.EncryptedKeyType[message.encryptedTeamKeyGcmType] : message.encryptedTeamKeyGcmType; - if (message.teamPublicKeyRsa != null && message.hasOwnProperty("teamPublicKeyRsa")) + if (message.teamPublicKeyRsa != null && Object.hasOwnProperty.call(message, "teamPublicKeyRsa")) object.teamPublicKeyRsa = options.bytes === String ? $util.base64.encode(message.teamPublicKeyRsa, 0, message.teamPublicKeyRsa.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamPublicKeyRsa) : message.teamPublicKeyRsa; - if (message.encryptedTeamPrivateKeyRsa != null && message.hasOwnProperty("encryptedTeamPrivateKeyRsa")) + if (message.encryptedTeamPrivateKeyRsa != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyRsa")) object.encryptedTeamPrivateKeyRsa = options.bytes === String ? $util.base64.encode(message.encryptedTeamPrivateKeyRsa, 0, message.encryptedTeamPrivateKeyRsa.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamPrivateKeyRsa) : message.encryptedTeamPrivateKeyRsa; - if (message.encryptedTeamPrivateKeyRsaType != null && message.hasOwnProperty("encryptedTeamPrivateKeyRsaType")) + if (message.encryptedTeamPrivateKeyRsaType != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyRsaType")) object.encryptedTeamPrivateKeyRsaType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedTeamPrivateKeyRsaType] === undefined ? message.encryptedTeamPrivateKeyRsaType : $root.Enterprise.EncryptedKeyType[message.encryptedTeamPrivateKeyRsaType] : message.encryptedTeamPrivateKeyRsaType; - if (message.teamPublicKeyEcc != null && message.hasOwnProperty("teamPublicKeyEcc")) + if (message.teamPublicKeyEcc != null && Object.hasOwnProperty.call(message, "teamPublicKeyEcc")) object.teamPublicKeyEcc = options.bytes === String ? $util.base64.encode(message.teamPublicKeyEcc, 0, message.teamPublicKeyEcc.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamPublicKeyEcc) : message.teamPublicKeyEcc; - if (message.encryptedTeamPrivateKeyEcc != null && message.hasOwnProperty("encryptedTeamPrivateKeyEcc")) + if (message.encryptedTeamPrivateKeyEcc != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyEcc")) object.encryptedTeamPrivateKeyEcc = options.bytes === String ? $util.base64.encode(message.encryptedTeamPrivateKeyEcc, 0, message.encryptedTeamPrivateKeyEcc.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedTeamPrivateKeyEcc) : message.encryptedTeamPrivateKeyEcc; - if (message.encryptedTeamPrivateKeyEccType != null && message.hasOwnProperty("encryptedTeamPrivateKeyEccType")) + if (message.encryptedTeamPrivateKeyEccType != null && Object.hasOwnProperty.call(message, "encryptedTeamPrivateKeyEccType")) object.encryptedTeamPrivateKeyEccType = options.enums === String ? $root.Enterprise.EncryptedKeyType[message.encryptedTeamPrivateKeyEccType] === undefined ? message.encryptedTeamPrivateKeyEccType : $root.Enterprise.EncryptedKeyType[message.encryptedTeamPrivateKeyEccType] : message.encryptedTeamPrivateKeyEccType; return object; }; @@ -180051,7 +181095,7 @@ export const Automator = $root.Automator = (() => { * @returns {$protobuf.Writer} Writer */ SSLCertificateInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -180145,25 +181189,25 @@ export const Automator = $root.Automator = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (!$util.isInteger(message.automatorId) && !(message.automatorId && $util.isInteger(message.automatorId.low) && $util.isInteger(message.automatorId.high))) return "automatorId: integer|Long expected"; - if (message.hostUrl != null && message.hasOwnProperty("hostUrl")) + if (message.hostUrl != null && Object.hasOwnProperty.call(message, "hostUrl")) if (!$util.isString(message.hostUrl)) return "hostUrl: string expected"; - if (message.subject != null && message.hasOwnProperty("subject")) + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) if (!$util.isString(message.subject)) return "subject: string expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) if (!$util.isString(message.issuer)) return "issuer: string expected"; - if (message.issuedOn != null && message.hasOwnProperty("issuedOn")) + if (message.issuedOn != null && Object.hasOwnProperty.call(message, "issuedOn")) if (!$util.isInteger(message.issuedOn) && !(message.issuedOn && $util.isInteger(message.issuedOn.low) && $util.isInteger(message.issuedOn.high))) return "issuedOn: integer|Long expected"; - if (message.expiresOn != null && message.hasOwnProperty("expiresOn")) + if (message.expiresOn != null && Object.hasOwnProperty.call(message, "expiresOn")) if (!$util.isInteger(message.expiresOn) && !(message.expiresOn && $util.isInteger(message.expiresOn.low) && $util.isInteger(message.expiresOn.high))) return "expiresOn: integer|Long expected"; - if (message.checkedOn != null && message.hasOwnProperty("checkedOn")) + if (message.checkedOn != null && Object.hasOwnProperty.call(message, "checkedOn")) if (!$util.isInteger(message.checkedOn) && !(message.checkedOn && $util.isInteger(message.checkedOn.low) && $util.isInteger(message.checkedOn.high))) return "checkedOn: integer|Long expected"; return null; @@ -180180,6 +181224,8 @@ export const Automator = $root.Automator = (() => { SSLCertificateInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Automator.SSLCertificateInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Automator.SSLCertificateInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -180272,34 +181318,34 @@ export const Automator = $root.Automator = (() => { } else object.checkedOn = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.automatorId != null && message.hasOwnProperty("automatorId")) + if (message.automatorId != null && Object.hasOwnProperty.call(message, "automatorId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.automatorId = typeof message.automatorId === "number" ? BigInt(message.automatorId) : $util.Long.fromBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0, true).toBigInt(); else if (typeof message.automatorId === "number") object.automatorId = options.longs === String ? String(message.automatorId) : message.automatorId; else object.automatorId = options.longs === String ? $util.Long.prototype.toString.call(message.automatorId) : options.longs === Number ? new $util.LongBits(message.automatorId.low >>> 0, message.automatorId.high >>> 0).toNumber(true) : message.automatorId; - if (message.hostUrl != null && message.hasOwnProperty("hostUrl")) + if (message.hostUrl != null && Object.hasOwnProperty.call(message, "hostUrl")) object.hostUrl = message.hostUrl; - if (message.subject != null && message.hasOwnProperty("subject")) + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) object.subject = message.subject; - if (message.issuer != null && message.hasOwnProperty("issuer")) + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) object.issuer = message.issuer; - if (message.issuedOn != null && message.hasOwnProperty("issuedOn")) + if (message.issuedOn != null && Object.hasOwnProperty.call(message, "issuedOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.issuedOn = typeof message.issuedOn === "number" ? BigInt(message.issuedOn) : $util.Long.fromBits(message.issuedOn.low >>> 0, message.issuedOn.high >>> 0, true).toBigInt(); else if (typeof message.issuedOn === "number") object.issuedOn = options.longs === String ? String(message.issuedOn) : message.issuedOn; else object.issuedOn = options.longs === String ? $util.Long.prototype.toString.call(message.issuedOn) : options.longs === Number ? new $util.LongBits(message.issuedOn.low >>> 0, message.issuedOn.high >>> 0).toNumber(true) : message.issuedOn; - if (message.expiresOn != null && message.hasOwnProperty("expiresOn")) + if (message.expiresOn != null && Object.hasOwnProperty.call(message, "expiresOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiresOn = typeof message.expiresOn === "number" ? BigInt(message.expiresOn) : $util.Long.fromBits(message.expiresOn.low >>> 0, message.expiresOn.high >>> 0, true).toBigInt(); else if (typeof message.expiresOn === "number") object.expiresOn = options.longs === String ? String(message.expiresOn) : message.expiresOn; else object.expiresOn = options.longs === String ? $util.Long.prototype.toString.call(message.expiresOn) : options.longs === Number ? new $util.LongBits(message.expiresOn.low >>> 0, message.expiresOn.high >>> 0).toNumber(true) : message.expiresOn; - if (message.checkedOn != null && message.hasOwnProperty("checkedOn")) + if (message.checkedOn != null && Object.hasOwnProperty.call(message, "checkedOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.checkedOn = typeof message.checkedOn === "number" ? BigInt(message.checkedOn) : $util.Long.fromBits(message.checkedOn.low >>> 0, message.checkedOn.high >>> 0, true).toBigInt(); else if (typeof message.checkedOn === "number") @@ -180643,7 +181689,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudSettingValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -180745,19 +181791,19 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.settingId != null && message.hasOwnProperty("settingId")) + if (message.settingId != null && Object.hasOwnProperty.call(message, "settingId")) if (!$util.isInteger(message.settingId) && !(message.settingId && $util.isInteger(message.settingId.low) && $util.isInteger(message.settingId.high))) return "settingId: integer|Long expected"; - if (message.settingName != null && message.hasOwnProperty("settingName")) + if (message.settingName != null && Object.hasOwnProperty.call(message, "settingName")) if (!$util.isString(message.settingName)) return "settingName: string expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) if (!$util.isString(message.label)) return "label: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) switch (message.valueType) { default: return "valueType: enum value expected"; @@ -180774,16 +181820,16 @@ export const SsoCloud = $root.SsoCloud = (() => { case 10: break; } - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isString(message.lastModified)) return "lastModified: string expected"; - if (message.isFromFile != null && message.hasOwnProperty("isFromFile")) + if (message.isFromFile != null && Object.hasOwnProperty.call(message, "isFromFile")) if (typeof message.isFromFile !== "boolean") return "isFromFile: boolean expected"; - if (message.isEditable != null && message.hasOwnProperty("isEditable")) + if (message.isEditable != null && Object.hasOwnProperty.call(message, "isEditable")) if (typeof message.isEditable !== "boolean") return "isEditable: boolean expected"; - if (message.isRequired != null && message.hasOwnProperty("isRequired")) + if (message.isRequired != null && Object.hasOwnProperty.call(message, "isRequired")) if (typeof message.isRequired !== "boolean") return "isRequired: boolean expected"; return null; @@ -180800,6 +181846,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudSettingValue.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudSettingValue) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudSettingValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -180915,28 +181963,28 @@ export const SsoCloud = $root.SsoCloud = (() => { object.isEditable = false; object.isRequired = false; } - if (message.settingId != null && message.hasOwnProperty("settingId")) + if (message.settingId != null && Object.hasOwnProperty.call(message, "settingId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.settingId = typeof message.settingId === "number" ? BigInt(message.settingId) : $util.Long.fromBits(message.settingId.low >>> 0, message.settingId.high >>> 0, true).toBigInt(); else if (typeof message.settingId === "number") object.settingId = options.longs === String ? String(message.settingId) : message.settingId; else object.settingId = options.longs === String ? $util.Long.prototype.toString.call(message.settingId) : options.longs === Number ? new $util.LongBits(message.settingId.low >>> 0, message.settingId.high >>> 0).toNumber(true) : message.settingId; - if (message.settingName != null && message.hasOwnProperty("settingName")) + if (message.settingName != null && Object.hasOwnProperty.call(message, "settingName")) object.settingName = message.settingName; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) object.label = message.label; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.valueType != null && message.hasOwnProperty("valueType")) + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) object.valueType = options.enums === String ? $root.SsoCloud.DataType[message.valueType] === undefined ? message.valueType : $root.SsoCloud.DataType[message.valueType] : message.valueType; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) object.lastModified = message.lastModified; - if (message.isFromFile != null && message.hasOwnProperty("isFromFile")) + if (message.isFromFile != null && Object.hasOwnProperty.call(message, "isFromFile")) object.isFromFile = message.isFromFile; - if (message.isEditable != null && message.hasOwnProperty("isEditable")) + if (message.isEditable != null && Object.hasOwnProperty.call(message, "isEditable")) object.isEditable = message.isEditable; - if (message.isRequired != null && message.hasOwnProperty("isRequired")) + if (message.isRequired != null && Object.hasOwnProperty.call(message, "isRequired")) object.isRequired = message.isRequired; return object; }; @@ -181078,7 +182126,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudSettingAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -181160,13 +182208,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.settingId != null && message.hasOwnProperty("settingId")) + if (message.settingId != null && Object.hasOwnProperty.call(message, "settingId")) if (!$util.isInteger(message.settingId) && !(message.settingId && $util.isInteger(message.settingId.low) && $util.isInteger(message.settingId.high))) return "settingId: integer|Long expected"; - if (message.settingName != null && message.hasOwnProperty("settingName")) + if (message.settingName != null && Object.hasOwnProperty.call(message, "settingName")) if (!$util.isString(message.settingName)) return "settingName: string expected"; - if (message.operation != null && message.hasOwnProperty("operation")) + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) switch (message.operation) { default: return "operation: enum value expected"; @@ -181176,7 +182224,7 @@ export const SsoCloud = $root.SsoCloud = (() => { case 3: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -181193,6 +182241,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudSettingAction.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudSettingAction) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudSettingAction: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -181265,18 +182315,18 @@ export const SsoCloud = $root.SsoCloud = (() => { object.operation = options.enums === String ? "SET" : 0; object.value = ""; } - if (message.settingId != null && message.hasOwnProperty("settingId")) + if (message.settingId != null && Object.hasOwnProperty.call(message, "settingId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.settingId = typeof message.settingId === "number" ? BigInt(message.settingId) : $util.Long.fromBits(message.settingId.low >>> 0, message.settingId.high >>> 0, true).toBigInt(); else if (typeof message.settingId === "number") object.settingId = options.longs === String ? String(message.settingId) : message.settingId; else object.settingId = options.longs === String ? $util.Long.prototype.toString.call(message.settingId) : options.longs === Number ? new $util.LongBits(message.settingId.low >>> 0, message.settingId.high >>> 0).toNumber(true) : message.settingId; - if (message.settingName != null && message.hasOwnProperty("settingName")) + if (message.settingName != null && Object.hasOwnProperty.call(message, "settingName")) object.settingName = message.settingName; - if (message.operation != null && message.hasOwnProperty("operation")) + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) object.operation = options.enums === String ? $root.SsoCloud.SsoCloudSettingOperationType[message.operation] === undefined ? message.operation : $root.SsoCloud.SsoCloudSettingOperationType[message.operation] : message.operation; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -181431,7 +182481,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -181519,16 +182569,16 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.ssoAuthProtocolType != null && message.hasOwnProperty("ssoAuthProtocolType")) + if (message.ssoAuthProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthProtocolType")) switch (message.ssoAuthProtocolType) { default: return "ssoAuthProtocolType: enum value expected"; @@ -181536,7 +182586,7 @@ export const SsoCloud = $root.SsoCloud = (() => { case 1: break; } - if (message.ssoCloudSettingAction != null && message.hasOwnProperty("ssoCloudSettingAction")) { + if (message.ssoCloudSettingAction != null && Object.hasOwnProperty.call(message, "ssoCloudSettingAction")) { if (!Array.isArray(message.ssoCloudSettingAction)) return "ssoCloudSettingAction: array expected"; for (let i = 0; i < message.ssoCloudSettingAction.length; ++i) { @@ -181559,6 +182609,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudConfigurationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudConfigurationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudConfigurationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -181605,7 +182657,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudConfigurationRequest.ssoCloudSettingAction: array expected"); message.ssoCloudSettingAction = []; for (let i = 0; i < object.ssoCloudSettingAction.length; ++i) { - if (typeof object.ssoCloudSettingAction[i] !== "object") + if (!$util.isObject(object.ssoCloudSettingAction[i])) throw TypeError(".SsoCloud.SsoCloudConfigurationRequest.ssoCloudSettingAction: object expected"); message.ssoCloudSettingAction[i] = $root.SsoCloud.SsoCloudSettingAction.fromObject(object.ssoCloudSettingAction[i], long + 1); } @@ -181646,23 +182698,23 @@ export const SsoCloud = $root.SsoCloud = (() => { object.name = ""; object.ssoAuthProtocolType = options.enums === String ? "SAML2" : 0; } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber(true) : message.ssoServiceProviderId; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.ssoAuthProtocolType != null && message.hasOwnProperty("ssoAuthProtocolType")) + if (message.ssoAuthProtocolType != null && Object.hasOwnProperty.call(message, "ssoAuthProtocolType")) object.ssoAuthProtocolType = options.enums === String ? $root.SsoCloud.AuthProtocolType[message.ssoAuthProtocolType] === undefined ? message.ssoAuthProtocolType : $root.SsoCloud.AuthProtocolType[message.ssoAuthProtocolType] : message.ssoAuthProtocolType; if (message.ssoCloudSettingAction && message.ssoCloudSettingAction.length) { object.ssoCloudSettingAction = []; @@ -181798,7 +182850,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoSharedConfigItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -181876,13 +182928,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.ssoNodeId != null && message.hasOwnProperty("ssoNodeId")) + if (message.ssoNodeId != null && Object.hasOwnProperty.call(message, "ssoNodeId")) if (!$util.isInteger(message.ssoNodeId) && !(message.ssoNodeId && $util.isInteger(message.ssoNodeId.low) && $util.isInteger(message.ssoNodeId.high))) return "ssoNodeId: integer|Long expected"; return null; @@ -181899,6 +182951,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoSharedConfigItem.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoSharedConfigItem) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoSharedConfigItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -181968,21 +183022,21 @@ export const SsoCloud = $root.SsoCloud = (() => { } else object.ssoNodeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber(true) : message.ssoServiceProviderId; - if (message.ssoNodeId != null && message.hasOwnProperty("ssoNodeId")) + if (message.ssoNodeId != null && Object.hasOwnProperty.call(message, "ssoNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoNodeId = typeof message.ssoNodeId === "number" ? BigInt(message.ssoNodeId) : $util.Long.fromBits(message.ssoNodeId.low >>> 0, message.ssoNodeId.high >>> 0, true).toBigInt(); else if (typeof message.ssoNodeId === "number") @@ -182188,7 +183242,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudConfigurationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -182294,25 +183348,25 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId) && !(message.enterpriseId && $util.isInteger(message.enterpriseId.low) && $util.isInteger(message.enterpriseId.high))) return "enterpriseId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) if (!$util.isString(message.protocol)) return "protocol: string expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isString(message.lastModified)) return "lastModified: string expected"; - if (message.ssoCloudSettingValue != null && message.hasOwnProperty("ssoCloudSettingValue")) { + if (message.ssoCloudSettingValue != null && Object.hasOwnProperty.call(message, "ssoCloudSettingValue")) { if (!Array.isArray(message.ssoCloudSettingValue)) return "ssoCloudSettingValue: array expected"; for (let i = 0; i < message.ssoCloudSettingValue.length; ++i) { @@ -182321,10 +183375,10 @@ export const SsoCloud = $root.SsoCloud = (() => { return "ssoCloudSettingValue." + error; } } - if (message.isShared != null && message.hasOwnProperty("isShared")) + if (message.isShared != null && Object.hasOwnProperty.call(message, "isShared")) if (typeof message.isShared !== "boolean") return "isShared: boolean expected"; - if (message.sharedConfigs != null && message.hasOwnProperty("sharedConfigs")) { + if (message.sharedConfigs != null && Object.hasOwnProperty.call(message, "sharedConfigs")) { if (!Array.isArray(message.sharedConfigs)) return "sharedConfigs: array expected"; for (let i = 0; i < message.sharedConfigs.length; ++i) { @@ -182347,6 +183401,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudConfigurationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudConfigurationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudConfigurationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -182390,7 +183446,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudConfigurationResponse.ssoCloudSettingValue: array expected"); message.ssoCloudSettingValue = []; for (let i = 0; i < object.ssoCloudSettingValue.length; ++i) { - if (typeof object.ssoCloudSettingValue[i] !== "object") + if (!$util.isObject(object.ssoCloudSettingValue[i])) throw TypeError(".SsoCloud.SsoCloudConfigurationResponse.ssoCloudSettingValue: object expected"); message.ssoCloudSettingValue[i] = $root.SsoCloud.SsoCloudSettingValue.fromObject(object.ssoCloudSettingValue[i], long + 1); } @@ -182402,7 +183458,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudConfigurationResponse.sharedConfigs: array expected"); message.sharedConfigs = []; for (let i = 0; i < object.sharedConfigs.length; ++i) { - if (typeof object.sharedConfigs[i] !== "object") + if (!$util.isObject(object.sharedConfigs[i])) throw TypeError(".SsoCloud.SsoCloudConfigurationResponse.sharedConfigs: object expected"); message.sharedConfigs[i] = $root.SsoCloud.SsoSharedConfigItem.fromObject(object.sharedConfigs[i], long + 1); } @@ -182452,39 +183508,39 @@ export const SsoCloud = $root.SsoCloud = (() => { object.lastModified = ""; object.isShared = false; } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber(true) : message.ssoServiceProviderId; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseId = typeof message.enterpriseId === "number" ? BigInt(message.enterpriseId) : $util.Long.fromBits(message.enterpriseId.low >>> 0, message.enterpriseId.high >>> 0, true).toBigInt(); else if (typeof message.enterpriseId === "number") object.enterpriseId = options.longs === String ? String(message.enterpriseId) : message.enterpriseId; else object.enterpriseId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseId) : options.longs === Number ? new $util.LongBits(message.enterpriseId.low >>> 0, message.enterpriseId.high >>> 0).toNumber(true) : message.enterpriseId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.protocol != null && message.hasOwnProperty("protocol")) + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) object.protocol = message.protocol; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) object.lastModified = message.lastModified; if (message.ssoCloudSettingValue && message.ssoCloudSettingValue.length) { object.ssoCloudSettingValue = []; for (let j = 0; j < message.ssoCloudSettingValue.length; ++j) object.ssoCloudSettingValue[j] = $root.SsoCloud.SsoCloudSettingValue.toObject(message.ssoCloudSettingValue[j], options, q + 1); } - if (message.isShared != null && message.hasOwnProperty("isShared")) + if (message.isShared != null && Object.hasOwnProperty.call(message, "isShared")) object.isShared = message.isShared; if (message.sharedConfigs && message.sharedConfigs.length) { object.sharedConfigs = []; @@ -182620,7 +183676,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoIdpTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -182698,13 +183754,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoIdpTypeId != null && message.hasOwnProperty("ssoIdpTypeId")) + if (message.ssoIdpTypeId != null && Object.hasOwnProperty.call(message, "ssoIdpTypeId")) if (!$util.isInteger(message.ssoIdpTypeId)) return "ssoIdpTypeId: integer expected"; - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) if (!$util.isString(message.tag)) return "tag: string expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) if (!$util.isString(message.label)) return "label: string expected"; return null; @@ -182721,6 +183777,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoIdpTypeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoIdpTypeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoIdpTypeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -182757,11 +183815,11 @@ export const SsoCloud = $root.SsoCloud = (() => { object.tag = ""; object.label = ""; } - if (message.ssoIdpTypeId != null && message.hasOwnProperty("ssoIdpTypeId")) + if (message.ssoIdpTypeId != null && Object.hasOwnProperty.call(message, "ssoIdpTypeId")) object.ssoIdpTypeId = message.ssoIdpTypeId; - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) object.tag = message.tag; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) object.label = message.label; return object; }; @@ -182892,7 +183950,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoIdpTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -182970,13 +184028,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoIdpTypeId != null && message.hasOwnProperty("ssoIdpTypeId")) + if (message.ssoIdpTypeId != null && Object.hasOwnProperty.call(message, "ssoIdpTypeId")) if (!$util.isInteger(message.ssoIdpTypeId)) return "ssoIdpTypeId: integer expected"; - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) if (!$util.isInteger(message.tag)) return "tag: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) if (!$util.isInteger(message.label)) return "label: integer expected"; return null; @@ -182993,6 +184051,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoIdpTypeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoIdpTypeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoIdpTypeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -183029,11 +184089,11 @@ export const SsoCloud = $root.SsoCloud = (() => { object.tag = 0; object.label = 0; } - if (message.ssoIdpTypeId != null && message.hasOwnProperty("ssoIdpTypeId")) + if (message.ssoIdpTypeId != null && Object.hasOwnProperty.call(message, "ssoIdpTypeId")) object.ssoIdpTypeId = message.ssoIdpTypeId; - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) object.tag = message.tag; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) object.label = message.label; return object; }; @@ -183142,7 +184202,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudSAMLLogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -183212,7 +184272,7 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; return null; @@ -183229,6 +184289,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudSAMLLogRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudSAMLLogRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudSAMLLogRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -183269,7 +184331,7 @@ export const SsoCloud = $root.SsoCloud = (() => { object.ssoServiceProviderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.ssoServiceProviderId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") @@ -183482,7 +184544,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudSAMLLogEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -183588,34 +184650,34 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serverTime != null && message.hasOwnProperty("serverTime")) + if (message.serverTime != null && Object.hasOwnProperty.call(message, "serverTime")) if (!$util.isString(message.serverTime)) return "serverTime: string expected"; - if (message.direction != null && message.hasOwnProperty("direction")) + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) if (!$util.isString(message.direction)) return "direction: string expected"; - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) if (!$util.isString(message.messageType)) return "messageType: string expected"; - if (message.messageIssued != null && message.hasOwnProperty("messageIssued")) + if (message.messageIssued != null && Object.hasOwnProperty.call(message, "messageIssued")) if (!$util.isString(message.messageIssued)) return "messageIssued: string expected"; - if (message.fromEntityId != null && message.hasOwnProperty("fromEntityId")) + if (message.fromEntityId != null && Object.hasOwnProperty.call(message, "fromEntityId")) if (!$util.isString(message.fromEntityId)) return "fromEntityId: string expected"; - if (message.samlStatus != null && message.hasOwnProperty("samlStatus")) + if (message.samlStatus != null && Object.hasOwnProperty.call(message, "samlStatus")) if (!$util.isString(message.samlStatus)) return "samlStatus: string expected"; - if (message.relayState != null && message.hasOwnProperty("relayState")) + if (message.relayState != null && Object.hasOwnProperty.call(message, "relayState")) if (!$util.isString(message.relayState)) return "relayState: string expected"; - if (message.samlContent != null && message.hasOwnProperty("samlContent")) + if (message.samlContent != null && Object.hasOwnProperty.call(message, "samlContent")) if (!$util.isString(message.samlContent)) return "samlContent: string expected"; - if (message.isSigned != null && message.hasOwnProperty("isSigned")) + if (message.isSigned != null && Object.hasOwnProperty.call(message, "isSigned")) if (typeof message.isSigned !== "boolean") return "isSigned: boolean expected"; - if (message.isOK != null && message.hasOwnProperty("isOK")) + if (message.isOK != null && Object.hasOwnProperty.call(message, "isOK")) if (typeof message.isOK !== "boolean") return "isOK: boolean expected"; return null; @@ -183632,6 +184694,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudSAMLLogEntry.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudSAMLLogEntry) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudSAMLLogEntry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -183689,25 +184753,25 @@ export const SsoCloud = $root.SsoCloud = (() => { object.isSigned = false; object.isOK = false; } - if (message.serverTime != null && message.hasOwnProperty("serverTime")) + if (message.serverTime != null && Object.hasOwnProperty.call(message, "serverTime")) object.serverTime = message.serverTime; - if (message.direction != null && message.hasOwnProperty("direction")) + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) object.direction = message.direction; - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) object.messageType = message.messageType; - if (message.messageIssued != null && message.hasOwnProperty("messageIssued")) + if (message.messageIssued != null && Object.hasOwnProperty.call(message, "messageIssued")) object.messageIssued = message.messageIssued; - if (message.fromEntityId != null && message.hasOwnProperty("fromEntityId")) + if (message.fromEntityId != null && Object.hasOwnProperty.call(message, "fromEntityId")) object.fromEntityId = message.fromEntityId; - if (message.samlStatus != null && message.hasOwnProperty("samlStatus")) + if (message.samlStatus != null && Object.hasOwnProperty.call(message, "samlStatus")) object.samlStatus = message.samlStatus; - if (message.relayState != null && message.hasOwnProperty("relayState")) + if (message.relayState != null && Object.hasOwnProperty.call(message, "relayState")) object.relayState = message.relayState; - if (message.samlContent != null && message.hasOwnProperty("samlContent")) + if (message.samlContent != null && Object.hasOwnProperty.call(message, "samlContent")) object.samlContent = message.samlContent; - if (message.isSigned != null && message.hasOwnProperty("isSigned")) + if (message.isSigned != null && Object.hasOwnProperty.call(message, "isSigned")) object.isSigned = message.isSigned; - if (message.isOK != null && message.hasOwnProperty("isOK")) + if (message.isOK != null && Object.hasOwnProperty.call(message, "isOK")) object.isOK = message.isOK; return object; }; @@ -183829,7 +184893,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudSAMLLogResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -183905,10 +184969,10 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) { if (!Array.isArray(message.entry)) return "entry: array expected"; for (let i = 0; i < message.entry.length; ++i) { @@ -183931,6 +184995,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudSAMLLogResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudSAMLLogResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudSAMLLogResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -183950,7 +185016,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudSAMLLogResponse.entry: array expected"); message.entry = []; for (let i = 0; i < object.entry.length; ++i) { - if (typeof object.entry[i] !== "object") + if (!$util.isObject(object.entry[i])) throw TypeError(".SsoCloud.SsoCloudSAMLLogResponse.entry: object expected"); message.entry[i] = $root.SsoCloud.SsoCloudSAMLLogEntry.fromObject(object.entry[i], long + 1); } @@ -183983,7 +185049,7 @@ export const SsoCloud = $root.SsoCloud = (() => { object.ssoServiceProviderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.ssoServiceProviderId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") @@ -184114,7 +185180,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudServiceProviderUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -184188,10 +185254,10 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; return null; @@ -184208,6 +185274,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudServiceProviderUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudServiceProviderUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudServiceProviderUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -184263,14 +185331,14 @@ export const SsoCloud = $root.SsoCloud = (() => { } else object.ssoSpConfigurationId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber(true) : message.ssoServiceProviderId; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") @@ -184407,7 +185475,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudIdpMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -184485,13 +185553,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.filename != null && message.hasOwnProperty("filename")) + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) if (!$util.isString(message.filename)) return "filename: string expected"; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; return null; @@ -184508,6 +185576,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudIdpMetadataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudIdpMetadataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudIdpMetadataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -184564,16 +185634,16 @@ export const SsoCloud = $root.SsoCloud = (() => { object.content = $util.newBuffer(object.content); } } - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.filename != null && message.hasOwnProperty("filename")) + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) object.filename = message.filename; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; return object; }; @@ -184727,7 +185797,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudIdpMetadataSupportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -184813,19 +185883,19 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.ssoEnterpriseId != null && message.hasOwnProperty("ssoEnterpriseId")) + if (message.ssoEnterpriseId != null && Object.hasOwnProperty.call(message, "ssoEnterpriseId")) if (!$util.isInteger(message.ssoEnterpriseId) && !(message.ssoEnterpriseId && $util.isInteger(message.ssoEnterpriseId.low) && $util.isInteger(message.ssoEnterpriseId.high))) return "ssoEnterpriseId: integer|Long expected"; - if (message.filename != null && message.hasOwnProperty("filename")) + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) if (!$util.isString(message.filename)) return "filename: string expected"; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; return null; @@ -184842,6 +185912,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudIdpMetadataSupportRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudIdpMetadataSupportRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudIdpMetadataSupportRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -184926,30 +185998,30 @@ export const SsoCloud = $root.SsoCloud = (() => { object.content = $util.newBuffer(object.content); } } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber(true) : message.ssoServiceProviderId; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.ssoEnterpriseId != null && message.hasOwnProperty("ssoEnterpriseId")) + if (message.ssoEnterpriseId != null && Object.hasOwnProperty.call(message, "ssoEnterpriseId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoEnterpriseId = typeof message.ssoEnterpriseId === "number" ? BigInt(message.ssoEnterpriseId) : $util.Long.fromBits(message.ssoEnterpriseId.low >>> 0, message.ssoEnterpriseId.high >>> 0, true).toBigInt(); else if (typeof message.ssoEnterpriseId === "number") object.ssoEnterpriseId = options.longs === String ? String(message.ssoEnterpriseId) : message.ssoEnterpriseId; else object.ssoEnterpriseId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoEnterpriseId) : options.longs === Number ? new $util.LongBits(message.ssoEnterpriseId.low >>> 0, message.ssoEnterpriseId.high >>> 0).toNumber(true) : message.ssoEnterpriseId; - if (message.filename != null && message.hasOwnProperty("filename")) + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) object.filename = message.filename; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; return object; }; @@ -185064,7 +186136,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudConfigurationValidationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -185141,7 +186213,7 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) { + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) { if (!Array.isArray(message.ssoSpConfigurationId)) return "ssoSpConfigurationId: array expected"; for (let i = 0; i < message.ssoSpConfigurationId.length; ++i) @@ -185162,6 +186234,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudConfigurationValidationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudConfigurationValidationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudConfigurationValidationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -185344,7 +186418,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ ValidationContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -185424,13 +186498,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.isSuccessful != null && message.hasOwnProperty("isSuccessful")) + if (message.isSuccessful != null && Object.hasOwnProperty.call(message, "isSuccessful")) if (typeof message.isSuccessful !== "boolean") return "isSuccessful: boolean expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) { + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) { if (!Array.isArray(message.errorMessage)) return "errorMessage: array expected"; for (let i = 0; i < message.errorMessage.length; ++i) @@ -185451,6 +186525,8 @@ export const SsoCloud = $root.SsoCloud = (() => { ValidationContent.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.ValidationContent) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.ValidationContent: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -185504,14 +186580,14 @@ export const SsoCloud = $root.SsoCloud = (() => { object.ssoSpConfigurationId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.isSuccessful = false; } - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.isSuccessful != null && message.hasOwnProperty("isSuccessful")) + if (message.isSuccessful != null && Object.hasOwnProperty.call(message, "isSuccessful")) object.isSuccessful = message.isSuccessful; if (message.errorMessage && message.errorMessage.length) { object.errorMessage = []; @@ -185627,7 +186703,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudConfigurationValidationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -185699,7 +186775,7 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.validationContent != null && message.hasOwnProperty("validationContent")) { + if (message.validationContent != null && Object.hasOwnProperty.call(message, "validationContent")) { if (!Array.isArray(message.validationContent)) return "validationContent: array expected"; for (let i = 0; i < message.validationContent.length; ++i) { @@ -185722,6 +186798,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudConfigurationValidationResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudConfigurationValidationResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudConfigurationValidationResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -185732,7 +186810,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudConfigurationValidationResponse.validationContent: array expected"); message.validationContent = []; for (let i = 0; i < object.validationContent.length; ++i) { - if (typeof object.validationContent[i] !== "object") + if (!$util.isObject(object.validationContent[i])) throw TypeError(".SsoCloud.SsoCloudConfigurationValidationResponse.validationContent: object expected"); message.validationContent[i] = $root.SsoCloud.ValidationContent.fromObject(object.validationContent[i], long + 1); } @@ -185871,7 +186949,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudServiceProviderConfigurationListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -185941,7 +187019,7 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; return null; @@ -185958,6 +187036,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudServiceProviderConfigurationListRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudServiceProviderConfigurationListRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudServiceProviderConfigurationListRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -185998,7 +187078,7 @@ export const SsoCloud = $root.SsoCloud = (() => { object.ssoServiceProviderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.ssoServiceProviderId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") @@ -186151,7 +187231,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ ConfigurationListItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -186240,16 +187320,16 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (!$util.isInteger(message.ssoSpConfigurationId) && !(message.ssoSpConfigurationId && $util.isInteger(message.ssoSpConfigurationId.low) && $util.isInteger(message.ssoSpConfigurationId.high))) return "ssoSpConfigurationId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.isSelected != null && message.hasOwnProperty("isSelected")) + if (message.isSelected != null && Object.hasOwnProperty.call(message, "isSelected")) if (typeof message.isSelected !== "boolean") return "isSelected: boolean expected"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) { + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) { if (!Array.isArray(message.ssoServiceProviderId)) return "ssoServiceProviderId: array expected"; for (let i = 0; i < message.ssoServiceProviderId.length; ++i) @@ -186270,6 +187350,8 @@ export const SsoCloud = $root.SsoCloud = (() => { ConfigurationListItem.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.ConfigurationListItem) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.ConfigurationListItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -186333,16 +187415,16 @@ export const SsoCloud = $root.SsoCloud = (() => { object.name = ""; object.isSelected = false; } - if (message.ssoSpConfigurationId != null && message.hasOwnProperty("ssoSpConfigurationId")) + if (message.ssoSpConfigurationId != null && Object.hasOwnProperty.call(message, "ssoSpConfigurationId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoSpConfigurationId = typeof message.ssoSpConfigurationId === "number" ? BigInt(message.ssoSpConfigurationId) : $util.Long.fromBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0, true).toBigInt(); else if (typeof message.ssoSpConfigurationId === "number") object.ssoSpConfigurationId = options.longs === String ? String(message.ssoSpConfigurationId) : message.ssoSpConfigurationId; else object.ssoSpConfigurationId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoSpConfigurationId) : options.longs === Number ? new $util.LongBits(message.ssoSpConfigurationId.low >>> 0, message.ssoSpConfigurationId.high >>> 0).toNumber(true) : message.ssoSpConfigurationId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.isSelected != null && message.hasOwnProperty("isSelected")) + if (message.isSelected != null && Object.hasOwnProperty.call(message, "isSelected")) object.isSelected = message.isSelected; if (message.ssoServiceProviderId && message.ssoServiceProviderId.length) { object.ssoServiceProviderId = []; @@ -186463,7 +187545,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudServiceProviderConfigurationListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -186535,7 +187617,7 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.configurationItem != null && message.hasOwnProperty("configurationItem")) { + if (message.configurationItem != null && Object.hasOwnProperty.call(message, "configurationItem")) { if (!Array.isArray(message.configurationItem)) return "configurationItem: array expected"; for (let i = 0; i < message.configurationItem.length; ++i) { @@ -186558,6 +187640,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudServiceProviderConfigurationListResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudServiceProviderConfigurationListResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudServiceProviderConfigurationListResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -186568,7 +187652,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudServiceProviderConfigurationListResponse.configurationItem: array expected"); message.configurationItem = []; for (let i = 0; i < object.configurationItem.length; ++i) { - if (typeof object.configurationItem[i] !== "object") + if (!$util.isObject(object.configurationItem[i])) throw TypeError(".SsoCloud.SsoCloudServiceProviderConfigurationListResponse.configurationItem: object expected"); message.configurationItem[i] = $root.SsoCloud.ConfigurationListItem.fromObject(object.configurationItem[i], long + 1); } @@ -186796,7 +187880,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -186898,31 +187982,31 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.embedded != null && message.hasOwnProperty("embedded")) + if (message.embedded != null && Object.hasOwnProperty.call(message, "embedded")) if (typeof message.embedded !== "boolean") return "embedded: boolean expected"; - if (message.json != null && message.hasOwnProperty("json")) + if (message.json != null && Object.hasOwnProperty.call(message, "json")) if (typeof message.json !== "boolean") return "json: boolean expected"; - if (message.dest != null && message.hasOwnProperty("dest")) + if (message.dest != null && Object.hasOwnProperty.call(message, "dest")) if (!$util.isString(message.dest)) return "dest: string expected"; - if (message.idpSessionId != null && message.hasOwnProperty("idpSessionId")) + if (message.idpSessionId != null && Object.hasOwnProperty.call(message, "idpSessionId")) if (!$util.isString(message.idpSessionId)) return "idpSessionId: string expected"; - if (message.forceLogin != null && message.hasOwnProperty("forceLogin")) + if (message.forceLogin != null && Object.hasOwnProperty.call(message, "forceLogin")) if (typeof message.forceLogin !== "boolean") return "forceLogin: boolean expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.detached != null && message.hasOwnProperty("detached")) + if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) if (typeof message.detached !== "boolean") return "detached: boolean expected"; return null; @@ -186939,6 +188023,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -187002,23 +188088,23 @@ export const SsoCloud = $root.SsoCloud = (() => { object.username = ""; object.detached = false; } - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.embedded != null && message.hasOwnProperty("embedded")) + if (message.embedded != null && Object.hasOwnProperty.call(message, "embedded")) object.embedded = message.embedded; - if (message.json != null && message.hasOwnProperty("json")) + if (message.json != null && Object.hasOwnProperty.call(message, "json")) object.json = message.json; - if (message.dest != null && message.hasOwnProperty("dest")) + if (message.dest != null && Object.hasOwnProperty.call(message, "dest")) object.dest = message.dest; - if (message.idpSessionId != null && message.hasOwnProperty("idpSessionId")) + if (message.idpSessionId != null && Object.hasOwnProperty.call(message, "idpSessionId")) object.idpSessionId = message.idpSessionId; - if (message.forceLogin != null && message.hasOwnProperty("forceLogin")) + if (message.forceLogin != null && Object.hasOwnProperty.call(message, "forceLogin")) object.forceLogin = message.forceLogin; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.detached != null && message.hasOwnProperty("detached")) + if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) object.detached = message.detached; return object; }; @@ -187205,7 +188291,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -187303,28 +188389,28 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.command != null && message.hasOwnProperty("command")) + if (message.command != null && Object.hasOwnProperty.call(message, "command")) if (!$util.isString(message.command)) return "command: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) if (!(message.encryptedLoginToken && typeof message.encryptedLoginToken.length === "number" || $util.isString(message.encryptedLoginToken))) return "encryptedLoginToken: buffer expected"; - if (message.providerName != null && message.hasOwnProperty("providerName")) + if (message.providerName != null && Object.hasOwnProperty.call(message, "providerName")) if (!$util.isString(message.providerName)) return "providerName: string expected"; - if (message.idpSessionId != null && message.hasOwnProperty("idpSessionId")) + if (message.idpSessionId != null && Object.hasOwnProperty.call(message, "idpSessionId")) if (!$util.isString(message.idpSessionId)) return "idpSessionId: string expected"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.errorToken != null && message.hasOwnProperty("errorToken")) + if (message.errorToken != null && Object.hasOwnProperty.call(message, "errorToken")) if (!$util.isString(message.errorToken)) return "errorToken: string expected"; return null; @@ -187341,6 +188427,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -187419,21 +188507,21 @@ export const SsoCloud = $root.SsoCloud = (() => { } object.errorToken = ""; } - if (message.command != null && message.hasOwnProperty("command")) + if (message.command != null && Object.hasOwnProperty.call(message, "command")) object.command = message.command; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.encryptedLoginToken != null && message.hasOwnProperty("encryptedLoginToken")) + if (message.encryptedLoginToken != null && Object.hasOwnProperty.call(message, "encryptedLoginToken")) object.encryptedLoginToken = options.bytes === String ? $util.base64.encode(message.encryptedLoginToken, 0, message.encryptedLoginToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLoginToken) : message.encryptedLoginToken; - if (message.providerName != null && message.hasOwnProperty("providerName")) + if (message.providerName != null && Object.hasOwnProperty.call(message, "providerName")) object.providerName = message.providerName; - if (message.idpSessionId != null && message.hasOwnProperty("idpSessionId")) + if (message.idpSessionId != null && Object.hasOwnProperty.call(message, "idpSessionId")) object.idpSessionId = message.idpSessionId; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; - if (message.errorToken != null && message.hasOwnProperty("errorToken")) + if (message.errorToken != null && Object.hasOwnProperty.call(message, "errorToken")) object.errorToken = message.errorToken; return object; }; @@ -187564,7 +188652,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudLogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -187642,13 +188730,13 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) if (!$util.isString(message.serviceName)) return "serviceName: string expected"; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) if (!$util.isInteger(message.serviceId)) return "serviceId: integer expected"; return null; @@ -187665,6 +188753,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudLogRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudLogRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudLogRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -187712,16 +188802,16 @@ export const SsoCloud = $root.SsoCloud = (() => { object.serviceName = ""; object.serviceId = 0; } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, true).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber(true) : message.ssoServiceProviderId; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) object.serviceName = message.serviceName; - if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) object.serviceId = message.serviceId; return object; }; @@ -187940,7 +189030,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SamlRelayState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -188050,25 +189140,25 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.embedded != null && message.hasOwnProperty("embedded")) + if (message.embedded != null && Object.hasOwnProperty.call(message, "embedded")) if (typeof message.embedded !== "boolean") return "embedded: boolean expected"; - if (message.json != null && message.hasOwnProperty("json")) + if (message.json != null && Object.hasOwnProperty.call(message, "json")) if (typeof message.json !== "boolean") return "json: boolean expected"; - if (message.destId != null && message.hasOwnProperty("destId")) + if (message.destId != null && Object.hasOwnProperty.call(message, "destId")) if (!$util.isInteger(message.destId)) return "destId: integer expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) if (!$util.isInteger(message.keyId)) return "keyId: integer expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -188097,16 +189187,16 @@ export const SsoCloud = $root.SsoCloud = (() => { case 22: break; } - if (message.checksum != null && message.hasOwnProperty("checksum")) + if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) if (!$util.isInteger(message.checksum) && !(message.checksum && $util.isInteger(message.checksum.low) && $util.isInteger(message.checksum.high))) return "checksum: integer|Long expected"; - if (message.isGeneratedUid != null && message.hasOwnProperty("isGeneratedUid")) + if (message.isGeneratedUid != null && Object.hasOwnProperty.call(message, "isGeneratedUid")) if (typeof message.isGeneratedUid !== "boolean") return "isGeneratedUid: boolean expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.detached != null && message.hasOwnProperty("detached")) + if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) if (typeof message.detached !== "boolean") return "detached: boolean expected"; return null; @@ -188123,6 +189213,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SamlRelayState.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SamlRelayState) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SamlRelayState: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -188312,37 +189404,37 @@ export const SsoCloud = $root.SsoCloud = (() => { object.deviceId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.detached = false; } - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.embedded != null && message.hasOwnProperty("embedded")) + if (message.embedded != null && Object.hasOwnProperty.call(message, "embedded")) object.embedded = message.embedded; - if (message.json != null && message.hasOwnProperty("json")) + if (message.json != null && Object.hasOwnProperty.call(message, "json")) object.json = message.json; - if (message.destId != null && message.hasOwnProperty("destId")) + if (message.destId != null && Object.hasOwnProperty.call(message, "destId")) object.destId = message.destId; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) object.keyId = message.keyId; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.checksum != null && message.hasOwnProperty("checksum")) + if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.checksum = typeof message.checksum === "number" ? BigInt(message.checksum) : $util.Long.fromBits(message.checksum.low >>> 0, message.checksum.high >>> 0, true).toBigInt(); else if (typeof message.checksum === "number") object.checksum = options.longs === String ? String(message.checksum) : message.checksum; else object.checksum = options.longs === String ? $util.Long.prototype.toString.call(message.checksum) : options.longs === Number ? new $util.LongBits(message.checksum.low >>> 0, message.checksum.high >>> 0).toNumber(true) : message.checksum; - if (message.isGeneratedUid != null && message.hasOwnProperty("isGeneratedUid")) + if (message.isGeneratedUid != null && Object.hasOwnProperty.call(message, "isGeneratedUid")) object.isGeneratedUid = message.isGeneratedUid; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.detached != null && message.hasOwnProperty("detached")) + if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) object.detached = message.detached; return object; }; @@ -188498,7 +189590,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudMigrationStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -188580,16 +189672,16 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.fullStatus != null && message.hasOwnProperty("fullStatus")) + if (message.fullStatus != null && Object.hasOwnProperty.call(message, "fullStatus")) if (typeof message.fullStatus !== "boolean") return "fullStatus: boolean expected"; - if (message.includeMigratedUsers != null && message.hasOwnProperty("includeMigratedUsers")) + if (message.includeMigratedUsers != null && Object.hasOwnProperty.call(message, "includeMigratedUsers")) if (typeof message.includeMigratedUsers !== "boolean") return "includeMigratedUsers: boolean expected"; - if (message.limit != null && message.hasOwnProperty("limit")) + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) if (!$util.isInteger(message.limit)) return "limit: integer expected"; return null; @@ -188606,6 +189698,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudMigrationStatusRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudMigrationStatusRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudMigrationStatusRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -188656,18 +189750,18 @@ export const SsoCloud = $root.SsoCloud = (() => { object.includeMigratedUsers = false; object.limit = 0; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, true).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber(true) : message.nodeId; - if (message.fullStatus != null && message.hasOwnProperty("fullStatus")) + if (message.fullStatus != null && Object.hasOwnProperty.call(message, "fullStatus")) object.fullStatus = message.fullStatus; - if (message.includeMigratedUsers != null && message.hasOwnProperty("includeMigratedUsers")) + if (message.includeMigratedUsers != null && Object.hasOwnProperty.call(message, "includeMigratedUsers")) object.includeMigratedUsers = message.includeMigratedUsers; - if (message.limit != null && message.hasOwnProperty("limit")) + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) object.limit = message.limit; return object; }; @@ -188895,7 +189989,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudMigrationStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -189009,34 +190103,34 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.ssoConnectId != null && message.hasOwnProperty("ssoConnectId")) + if (message.ssoConnectId != null && Object.hasOwnProperty.call(message, "ssoConnectId")) if (!$util.isInteger(message.ssoConnectId) && !(message.ssoConnectId && $util.isInteger(message.ssoConnectId.low) && $util.isInteger(message.ssoConnectId.high))) return "ssoConnectId: integer|Long expected"; - if (message.ssoConnectName != null && message.hasOwnProperty("ssoConnectName")) + if (message.ssoConnectName != null && Object.hasOwnProperty.call(message, "ssoConnectName")) if (!$util.isString(message.ssoConnectName)) return "ssoConnectName: string expected"; - if (message.ssoConnectCloudId != null && message.hasOwnProperty("ssoConnectCloudId")) + if (message.ssoConnectCloudId != null && Object.hasOwnProperty.call(message, "ssoConnectCloudId")) if (!$util.isInteger(message.ssoConnectCloudId) && !(message.ssoConnectCloudId && $util.isInteger(message.ssoConnectCloudId.low) && $util.isInteger(message.ssoConnectCloudId.high))) return "ssoConnectCloudId: integer|Long expected"; - if (message.ssoConnectCloudName != null && message.hasOwnProperty("ssoConnectCloudName")) + if (message.ssoConnectCloudName != null && Object.hasOwnProperty.call(message, "ssoConnectCloudName")) if (!$util.isString(message.ssoConnectCloudName)) return "ssoConnectCloudName: string expected"; - if (message.totalUsersCount != null && message.hasOwnProperty("totalUsersCount")) + if (message.totalUsersCount != null && Object.hasOwnProperty.call(message, "totalUsersCount")) if (!$util.isInteger(message.totalUsersCount)) return "totalUsersCount: integer expected"; - if (message.usersMigratedCount != null && message.hasOwnProperty("usersMigratedCount")) + if (message.usersMigratedCount != null && Object.hasOwnProperty.call(message, "usersMigratedCount")) if (!$util.isInteger(message.usersMigratedCount)) return "usersMigratedCount: integer expected"; - if (message.migratedUsers != null && message.hasOwnProperty("migratedUsers")) { + if (message.migratedUsers != null && Object.hasOwnProperty.call(message, "migratedUsers")) { if (!Array.isArray(message.migratedUsers)) return "migratedUsers: array expected"; for (let i = 0; i < message.migratedUsers.length; ++i) { @@ -189045,7 +190139,7 @@ export const SsoCloud = $root.SsoCloud = (() => { return "migratedUsers." + error; } } - if (message.unmigratedUsers != null && message.hasOwnProperty("unmigratedUsers")) { + if (message.unmigratedUsers != null && Object.hasOwnProperty.call(message, "unmigratedUsers")) { if (!Array.isArray(message.unmigratedUsers)) return "unmigratedUsers: array expected"; for (let i = 0; i < message.unmigratedUsers.length; ++i) { @@ -189068,6 +190162,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudMigrationStatusResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudMigrationStatusResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudMigrationStatusResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -189117,7 +190213,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudMigrationStatusResponse.migratedUsers: array expected"); message.migratedUsers = []; for (let i = 0; i < object.migratedUsers.length; ++i) { - if (typeof object.migratedUsers[i] !== "object") + if (!$util.isObject(object.migratedUsers[i])) throw TypeError(".SsoCloud.SsoCloudMigrationStatusResponse.migratedUsers: object expected"); message.migratedUsers[i] = $root.SsoCloud.SsoCloudMigrationUserInfo.fromObject(object.migratedUsers[i], long + 1); } @@ -189127,7 +190223,7 @@ export const SsoCloud = $root.SsoCloud = (() => { throw TypeError(".SsoCloud.SsoCloudMigrationStatusResponse.unmigratedUsers: array expected"); message.unmigratedUsers = []; for (let i = 0; i < object.unmigratedUsers.length; ++i) { - if (typeof object.unmigratedUsers[i] !== "object") + if (!$util.isObject(object.unmigratedUsers[i])) throw TypeError(".SsoCloud.SsoCloudMigrationStatusResponse.unmigratedUsers: object expected"); message.unmigratedUsers[i] = $root.SsoCloud.SsoCloudMigrationUserInfo.fromObject(object.unmigratedUsers[i], long + 1); } @@ -189179,38 +190275,38 @@ export const SsoCloud = $root.SsoCloud = (() => { object.totalUsersCount = 0; object.usersMigratedCount = 0; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, true).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber(true) : message.nodeId; - if (message.ssoConnectId != null && message.hasOwnProperty("ssoConnectId")) + if (message.ssoConnectId != null && Object.hasOwnProperty.call(message, "ssoConnectId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoConnectId = typeof message.ssoConnectId === "number" ? BigInt(message.ssoConnectId) : $util.Long.fromBits(message.ssoConnectId.low >>> 0, message.ssoConnectId.high >>> 0, true).toBigInt(); else if (typeof message.ssoConnectId === "number") object.ssoConnectId = options.longs === String ? String(message.ssoConnectId) : message.ssoConnectId; else object.ssoConnectId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoConnectId) : options.longs === Number ? new $util.LongBits(message.ssoConnectId.low >>> 0, message.ssoConnectId.high >>> 0).toNumber(true) : message.ssoConnectId; - if (message.ssoConnectName != null && message.hasOwnProperty("ssoConnectName")) + if (message.ssoConnectName != null && Object.hasOwnProperty.call(message, "ssoConnectName")) object.ssoConnectName = message.ssoConnectName; - if (message.ssoConnectCloudId != null && message.hasOwnProperty("ssoConnectCloudId")) + if (message.ssoConnectCloudId != null && Object.hasOwnProperty.call(message, "ssoConnectCloudId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoConnectCloudId = typeof message.ssoConnectCloudId === "number" ? BigInt(message.ssoConnectCloudId) : $util.Long.fromBits(message.ssoConnectCloudId.low >>> 0, message.ssoConnectCloudId.high >>> 0, true).toBigInt(); else if (typeof message.ssoConnectCloudId === "number") object.ssoConnectCloudId = options.longs === String ? String(message.ssoConnectCloudId) : message.ssoConnectCloudId; else object.ssoConnectCloudId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoConnectCloudId) : options.longs === Number ? new $util.LongBits(message.ssoConnectCloudId.low >>> 0, message.ssoConnectCloudId.high >>> 0).toNumber(true) : message.ssoConnectCloudId; - if (message.ssoConnectCloudName != null && message.hasOwnProperty("ssoConnectCloudName")) + if (message.ssoConnectCloudName != null && Object.hasOwnProperty.call(message, "ssoConnectCloudName")) object.ssoConnectCloudName = message.ssoConnectCloudName; - if (message.totalUsersCount != null && message.hasOwnProperty("totalUsersCount")) + if (message.totalUsersCount != null && Object.hasOwnProperty.call(message, "totalUsersCount")) object.totalUsersCount = message.totalUsersCount; - if (message.usersMigratedCount != null && message.hasOwnProperty("usersMigratedCount")) + if (message.usersMigratedCount != null && Object.hasOwnProperty.call(message, "usersMigratedCount")) object.usersMigratedCount = message.usersMigratedCount; if (message.migratedUsers && message.migratedUsers.length) { object.migratedUsers = []; @@ -189362,7 +190458,7 @@ export const SsoCloud = $root.SsoCloud = (() => { * @returns {$protobuf.Writer} Writer */ SsoCloudMigrationUserInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -189444,16 +190540,16 @@ export const SsoCloud = $root.SsoCloud = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.isMigrated != null && message.hasOwnProperty("isMigrated")) + if (message.isMigrated != null && Object.hasOwnProperty.call(message, "isMigrated")) if (typeof message.isMigrated !== "boolean") return "isMigrated: boolean expected"; return null; @@ -189470,6 +190566,8 @@ export const SsoCloud = $root.SsoCloud = (() => { SsoCloudMigrationUserInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.SsoCloud.SsoCloudMigrationUserInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".SsoCloud.SsoCloudMigrationUserInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -189509,13 +190607,13 @@ export const SsoCloud = $root.SsoCloud = (() => { object.fullName = ""; object.isMigrated = false; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.isMigrated != null && message.hasOwnProperty("isMigrated")) + if (message.isMigrated != null && Object.hasOwnProperty.call(message, "isMigrated")) object.isMigrated = message.isMigrated; return object; }; @@ -189669,7 +190767,7 @@ export const SemanticVersion = $root.SemanticVersion = (() => { * @returns {$protobuf.Writer} Writer */ Version.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -189751,16 +190849,16 @@ export const SemanticVersion = $root.SemanticVersion = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.major != null && message.hasOwnProperty("major")) + if (message.major != null && Object.hasOwnProperty.call(message, "major")) if (!$util.isInteger(message.major)) return "major: integer expected"; - if (message.minor != null && message.hasOwnProperty("minor")) + if (message.minor != null && Object.hasOwnProperty.call(message, "minor")) if (!$util.isInteger(message.minor)) return "minor: integer expected"; - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) if (!$util.isInteger(message.patch)) return "patch: integer expected"; - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) if (!$util.isInteger(message.build)) return "build: integer expected"; return null; @@ -189777,6 +190875,8 @@ export const SemanticVersion = $root.SemanticVersion = (() => { Version.fromObject = function fromObject(object, long) { if (object instanceof $root.SemanticVersion.Version) return object; + if (!$util.isObject(object)) + throw TypeError(".SemanticVersion.Version: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -189816,13 +190916,13 @@ export const SemanticVersion = $root.SemanticVersion = (() => { object.patch = 0; object.build = 0; } - if (message.major != null && message.hasOwnProperty("major")) + if (message.major != null && Object.hasOwnProperty.call(message, "major")) object.major = message.major; - if (message.minor != null && message.hasOwnProperty("minor")) + if (message.minor != null && Object.hasOwnProperty.call(message, "minor")) object.minor = message.minor; - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) object.patch = message.patch; - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) object.build = message.build; return object; }; @@ -189990,7 +191090,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -190072,13 +191172,13 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; - if (message.breachWatchInfoType != null && message.hasOwnProperty("breachWatchInfoType")) + if (message.breachWatchInfoType != null && Object.hasOwnProperty.call(message, "breachWatchInfoType")) switch (message.breachWatchInfoType) { default: return "breachWatchInfoType: enum value expected"; @@ -190086,7 +191186,7 @@ export const BreachWatch = $root.BreachWatch = (() => { case 1: break; } - if (message.updateUserWhoScanned != null && message.hasOwnProperty("updateUserWhoScanned")) + if (message.updateUserWhoScanned != null && Object.hasOwnProperty.call(message, "updateUserWhoScanned")) if (typeof message.updateUserWhoScanned !== "boolean") return "updateUserWhoScanned: boolean expected"; return null; @@ -190103,6 +191203,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchRecordRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchRecordRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchRecordRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -190174,13 +191276,13 @@ export const BreachWatch = $root.BreachWatch = (() => { object.breachWatchInfoType = options.enums === String ? "RECORD" : 0; object.updateUserWhoScanned = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; - if (message.breachWatchInfoType != null && message.hasOwnProperty("breachWatchInfoType")) + if (message.breachWatchInfoType != null && Object.hasOwnProperty.call(message, "breachWatchInfoType")) object.breachWatchInfoType = options.enums === String ? $root.BreachWatch.BreachWatchInfoType[message.breachWatchInfoType] === undefined ? message.breachWatchInfoType : $root.BreachWatch.BreachWatchInfoType[message.breachWatchInfoType] : message.breachWatchInfoType; - if (message.updateUserWhoScanned != null && message.hasOwnProperty("updateUserWhoScanned")) + if (message.updateUserWhoScanned != null && Object.hasOwnProperty.call(message, "updateUserWhoScanned")) object.updateUserWhoScanned = message.updateUserWhoScanned; return object; }; @@ -190302,7 +191404,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -190378,7 +191480,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.breachWatchRecordRequest != null && message.hasOwnProperty("breachWatchRecordRequest")) { + if (message.breachWatchRecordRequest != null && Object.hasOwnProperty.call(message, "breachWatchRecordRequest")) { if (!Array.isArray(message.breachWatchRecordRequest)) return "breachWatchRecordRequest: array expected"; for (let i = 0; i < message.breachWatchRecordRequest.length; ++i) { @@ -190387,7 +191489,7 @@ export const BreachWatch = $root.BreachWatch = (() => { return "breachWatchRecordRequest." + error; } } - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; return null; @@ -190404,6 +191506,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -190414,7 +191518,7 @@ export const BreachWatch = $root.BreachWatch = (() => { throw TypeError(".BreachWatch.BreachWatchUpdateRequest.breachWatchRecordRequest: array expected"); message.breachWatchRecordRequest = []; for (let i = 0; i < object.breachWatchRecordRequest.length; ++i) { - if (typeof object.breachWatchRecordRequest[i] !== "object") + if (!$util.isObject(object.breachWatchRecordRequest[i])) throw TypeError(".BreachWatch.BreachWatchUpdateRequest.breachWatchRecordRequest: object expected"); message.breachWatchRecordRequest[i] = $root.BreachWatch.BreachWatchRecordRequest.fromObject(object.breachWatchRecordRequest[i], long + 1); } @@ -190459,7 +191563,7 @@ export const BreachWatch = $root.BreachWatch = (() => { for (let j = 0; j < message.breachWatchRecordRequest.length; ++j) object.breachWatchRecordRequest[j] = $root.BreachWatch.BreachWatchRecordRequest.toObject(message.breachWatchRecordRequest[j], options, q + 1); } - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; return object; }; @@ -190590,7 +191694,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchRecordStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -190668,13 +191772,13 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (!$util.isString(message.status)) return "status: string expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) if (!$util.isString(message.reason)) return "reason: string expected"; return null; @@ -190691,6 +191795,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchRecordStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchRecordStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchRecordStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -190736,11 +191842,11 @@ export const BreachWatch = $root.BreachWatch = (() => { object.status = ""; object.reason = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) object.reason = message.reason; return object; }; @@ -190851,7 +191957,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchUpdateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -190923,7 +192029,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.breachWatchRecordStatus != null && message.hasOwnProperty("breachWatchRecordStatus")) { + if (message.breachWatchRecordStatus != null && Object.hasOwnProperty.call(message, "breachWatchRecordStatus")) { if (!Array.isArray(message.breachWatchRecordStatus)) return "breachWatchRecordStatus: array expected"; for (let i = 0; i < message.breachWatchRecordStatus.length; ++i) { @@ -190946,6 +192052,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchUpdateResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchUpdateResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchUpdateResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -190956,7 +192064,7 @@ export const BreachWatch = $root.BreachWatch = (() => { throw TypeError(".BreachWatch.BreachWatchUpdateResponse.breachWatchRecordStatus: array expected"); message.breachWatchRecordStatus = []; for (let i = 0; i < object.breachWatchRecordStatus.length; ++i) { - if (typeof object.breachWatchRecordStatus[i] !== "object") + if (!$util.isObject(object.breachWatchRecordStatus[i])) throw TypeError(".BreachWatch.BreachWatchUpdateResponse.breachWatchRecordStatus: object expected"); message.breachWatchRecordStatus[i] = $root.BreachWatch.BreachWatchRecordStatus.fromObject(object.breachWatchRecordStatus[i], long + 1); } @@ -191095,7 +192203,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -191165,7 +192273,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.breachWatchToken != null && message.hasOwnProperty("breachWatchToken")) + if (message.breachWatchToken != null && Object.hasOwnProperty.call(message, "breachWatchToken")) if (!(message.breachWatchToken && typeof message.breachWatchToken.length === "number" || $util.isString(message.breachWatchToken))) return "breachWatchToken: buffer expected"; return null; @@ -191182,6 +192290,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchTokenRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchTokenRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchTokenRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -191220,7 +192330,7 @@ export const BreachWatch = $root.BreachWatch = (() => { if (options.bytes !== Array) object.breachWatchToken = $util.newBuffer(object.breachWatchToken); } - if (message.breachWatchToken != null && message.hasOwnProperty("breachWatchToken")) + if (message.breachWatchToken != null && Object.hasOwnProperty.call(message, "breachWatchToken")) object.breachWatchToken = options.bytes === String ? $util.base64.encode(message.breachWatchToken, 0, message.breachWatchToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.breachWatchToken) : message.breachWatchToken; return object; }; @@ -191340,7 +192450,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -191414,10 +192524,10 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.breachWatchToken != null && message.hasOwnProperty("breachWatchToken")) + if (message.breachWatchToken != null && Object.hasOwnProperty.call(message, "breachWatchToken")) if (!(message.breachWatchToken && typeof message.breachWatchToken.length === "number" || $util.isString(message.breachWatchToken))) return "breachWatchToken: buffer expected"; - if (message.clientEncrypted != null && message.hasOwnProperty("clientEncrypted")) + if (message.clientEncrypted != null && Object.hasOwnProperty.call(message, "clientEncrypted")) if (typeof message.clientEncrypted !== "boolean") return "clientEncrypted: boolean expected"; return null; @@ -191434,6 +192544,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -191476,9 +192588,9 @@ export const BreachWatch = $root.BreachWatch = (() => { } object.clientEncrypted = false; } - if (message.breachWatchToken != null && message.hasOwnProperty("breachWatchToken")) + if (message.breachWatchToken != null && Object.hasOwnProperty.call(message, "breachWatchToken")) object.breachWatchToken = options.bytes === String ? $util.base64.encode(message.breachWatchToken, 0, message.breachWatchToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.breachWatchToken) : message.breachWatchToken; - if (message.clientEncrypted != null && message.hasOwnProperty("clientEncrypted")) + if (message.clientEncrypted != null && Object.hasOwnProperty.call(message, "clientEncrypted")) object.clientEncrypted = message.clientEncrypted; return object; }; @@ -191609,7 +192721,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ AnonymizedTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -191687,13 +192799,13 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.domainToken != null && message.hasOwnProperty("domainToken")) + if (message.domainToken != null && Object.hasOwnProperty.call(message, "domainToken")) if (!(message.domainToken && typeof message.domainToken.length === "number" || $util.isString(message.domainToken))) return "domainToken: buffer expected"; - if (message.emailToken != null && message.hasOwnProperty("emailToken")) + if (message.emailToken != null && Object.hasOwnProperty.call(message, "emailToken")) if (!(message.emailToken && typeof message.emailToken.length === "number" || $util.isString(message.emailToken))) return "emailToken: buffer expected"; - if (message.passwordToken != null && message.hasOwnProperty("passwordToken")) + if (message.passwordToken != null && Object.hasOwnProperty.call(message, "passwordToken")) if (!(message.passwordToken && typeof message.passwordToken.length === "number" || $util.isString(message.passwordToken))) return "passwordToken: buffer expected"; return null; @@ -191710,6 +192822,8 @@ export const BreachWatch = $root.BreachWatch = (() => { AnonymizedTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.AnonymizedTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.AnonymizedTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -191773,11 +192887,11 @@ export const BreachWatch = $root.BreachWatch = (() => { object.passwordToken = $util.newBuffer(object.passwordToken); } } - if (message.domainToken != null && message.hasOwnProperty("domainToken")) + if (message.domainToken != null && Object.hasOwnProperty.call(message, "domainToken")) object.domainToken = options.bytes === String ? $util.base64.encode(message.domainToken, 0, message.domainToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.domainToken) : message.domainToken; - if (message.emailToken != null && message.hasOwnProperty("emailToken")) + if (message.emailToken != null && Object.hasOwnProperty.call(message, "emailToken")) object.emailToken = options.bytes === String ? $util.base64.encode(message.emailToken, 0, message.emailToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.emailToken) : message.emailToken; - if (message.passwordToken != null && message.hasOwnProperty("passwordToken")) + if (message.passwordToken != null && Object.hasOwnProperty.call(message, "passwordToken")) object.passwordToken = options.bytes === String ? $util.base64.encode(message.passwordToken, 0, message.passwordToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.passwordToken) : message.passwordToken; return object; }; @@ -191897,7 +193011,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ HashCheck.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -191971,10 +193085,10 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.hash1 != null && message.hasOwnProperty("hash1")) + if (message.hash1 != null && Object.hasOwnProperty.call(message, "hash1")) if (!(message.hash1 && typeof message.hash1.length === "number" || $util.isString(message.hash1))) return "hash1: buffer expected"; - if (message.euid != null && message.hasOwnProperty("euid")) + if (message.euid != null && Object.hasOwnProperty.call(message, "euid")) if (!(message.euid && typeof message.euid.length === "number" || $util.isString(message.euid))) return "euid: buffer expected"; return null; @@ -191991,6 +193105,8 @@ export const BreachWatch = $root.BreachWatch = (() => { HashCheck.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.HashCheck) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.HashCheck: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -192042,9 +193158,9 @@ export const BreachWatch = $root.BreachWatch = (() => { object.euid = $util.newBuffer(object.euid); } } - if (message.hash1 != null && message.hasOwnProperty("hash1")) + if (message.hash1 != null && Object.hasOwnProperty.call(message, "hash1")) object.hash1 = options.bytes === String ? $util.base64.encode(message.hash1, 0, message.hash1.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash1) : message.hash1; - if (message.euid != null && message.hasOwnProperty("euid")) + if (message.euid != null && Object.hasOwnProperty.call(message, "euid")) object.euid = options.bytes === String ? $util.base64.encode(message.euid, 0, message.euid.length) : options.bytes === Array ? Array.prototype.slice.call(message.euid) : message.euid; return object; }; @@ -192179,7 +193295,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -192261,10 +193377,10 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.anonymizedToken != null && message.hasOwnProperty("anonymizedToken")) + if (message.anonymizedToken != null && Object.hasOwnProperty.call(message, "anonymizedToken")) if (!(message.anonymizedToken && typeof message.anonymizedToken.length === "number" || $util.isString(message.anonymizedToken))) return "anonymizedToken: buffer expected"; - if (message.hashCheck != null && message.hasOwnProperty("hashCheck")) { + if (message.hashCheck != null && Object.hasOwnProperty.call(message, "hashCheck")) { if (!Array.isArray(message.hashCheck)) return "hashCheck: array expected"; for (let i = 0; i < message.hashCheck.length; ++i) { @@ -192273,7 +193389,7 @@ export const BreachWatch = $root.BreachWatch = (() => { return "hashCheck." + error; } } - if (message.removedEuid != null && message.hasOwnProperty("removedEuid")) { + if (message.removedEuid != null && Object.hasOwnProperty.call(message, "removedEuid")) { if (!Array.isArray(message.removedEuid)) return "removedEuid: array expected"; for (let i = 0; i < message.removedEuid.length; ++i) @@ -192294,6 +193410,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchStatusRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchStatusRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchStatusRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -192309,7 +193427,7 @@ export const BreachWatch = $root.BreachWatch = (() => { throw TypeError(".BreachWatch.BreachWatchStatusRequest.hashCheck: array expected"); message.hashCheck = []; for (let i = 0; i < object.hashCheck.length; ++i) { - if (typeof object.hashCheck[i] !== "object") + if (!$util.isObject(object.hashCheck[i])) throw TypeError(".BreachWatch.BreachWatchStatusRequest.hashCheck: object expected"); message.hashCheck[i] = $root.BreachWatch.HashCheck.fromObject(object.hashCheck[i], long + 1); } @@ -192356,7 +193474,7 @@ export const BreachWatch = $root.BreachWatch = (() => { if (options.bytes !== Array) object.anonymizedToken = $util.newBuffer(object.anonymizedToken); } - if (message.anonymizedToken != null && message.hasOwnProperty("anonymizedToken")) + if (message.anonymizedToken != null && Object.hasOwnProperty.call(message, "anonymizedToken")) object.anonymizedToken = options.bytes === String ? $util.base64.encode(message.anonymizedToken, 0, message.anonymizedToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.anonymizedToken) : message.anonymizedToken; if (message.hashCheck && message.hashCheck.length) { object.hashCheck = []; @@ -192497,7 +193615,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ HashStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -192575,13 +193693,13 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.hash1 != null && message.hasOwnProperty("hash1")) + if (message.hash1 != null && Object.hasOwnProperty.call(message, "hash1")) if (!(message.hash1 && typeof message.hash1.length === "number" || $util.isString(message.hash1))) return "hash1: buffer expected"; - if (message.euid != null && message.hasOwnProperty("euid")) + if (message.euid != null && Object.hasOwnProperty.call(message, "euid")) if (!(message.euid && typeof message.euid.length === "number" || $util.isString(message.euid))) return "euid: buffer expected"; - if (message.breachDetected != null && message.hasOwnProperty("breachDetected")) + if (message.breachDetected != null && Object.hasOwnProperty.call(message, "breachDetected")) if (typeof message.breachDetected !== "boolean") return "breachDetected: boolean expected"; return null; @@ -192598,6 +193716,8 @@ export const BreachWatch = $root.BreachWatch = (() => { HashStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.HashStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.HashStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -192652,11 +193772,11 @@ export const BreachWatch = $root.BreachWatch = (() => { } object.breachDetected = false; } - if (message.hash1 != null && message.hasOwnProperty("hash1")) + if (message.hash1 != null && Object.hasOwnProperty.call(message, "hash1")) object.hash1 = options.bytes === String ? $util.base64.encode(message.hash1, 0, message.hash1.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash1) : message.hash1; - if (message.euid != null && message.hasOwnProperty("euid")) + if (message.euid != null && Object.hasOwnProperty.call(message, "euid")) object.euid = options.bytes === String ? $util.base64.encode(message.euid, 0, message.euid.length) : options.bytes === Array ? Array.prototype.slice.call(message.euid) : message.euid; - if (message.breachDetected != null && message.hasOwnProperty("breachDetected")) + if (message.breachDetected != null && Object.hasOwnProperty.call(message, "breachDetected")) object.breachDetected = message.breachDetected; return object; }; @@ -192767,7 +193887,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -192839,7 +193959,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.hashStatus != null && message.hasOwnProperty("hashStatus")) { + if (message.hashStatus != null && Object.hasOwnProperty.call(message, "hashStatus")) { if (!Array.isArray(message.hashStatus)) return "hashStatus: array expected"; for (let i = 0; i < message.hashStatus.length; ++i) { @@ -192862,6 +193982,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachWatchStatusResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachWatchStatusResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachWatchStatusResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -192872,7 +193994,7 @@ export const BreachWatch = $root.BreachWatch = (() => { throw TypeError(".BreachWatch.BreachWatchStatusResponse.hashStatus: array expected"); message.hashStatus = []; for (let i = 0; i < object.hashStatus.length; ++i) { - if (typeof object.hashStatus[i] !== "object") + if (!$util.isObject(object.hashStatus[i])) throw TypeError(".BreachWatch.BreachWatchStatusResponse.hashStatus: object expected"); message.hashStatus[i] = $root.BreachWatch.HashStatus.fromObject(object.hashStatus[i], long + 1); } @@ -193022,7 +194144,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ EnterprisePublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -193096,10 +194218,10 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterprisePublicKey != null && message.hasOwnProperty("enterprisePublicKey")) + if (message.enterprisePublicKey != null && Object.hasOwnProperty.call(message, "enterprisePublicKey")) if (!(message.enterprisePublicKey && typeof message.enterprisePublicKey.length === "number" || $util.isString(message.enterprisePublicKey))) return "enterprisePublicKey: buffer expected"; - if (message.enterpriseECCPublicKey != null && message.hasOwnProperty("enterpriseECCPublicKey")) + if (message.enterpriseECCPublicKey != null && Object.hasOwnProperty.call(message, "enterpriseECCPublicKey")) if (!(message.enterpriseECCPublicKey && typeof message.enterpriseECCPublicKey.length === "number" || $util.isString(message.enterpriseECCPublicKey))) return "enterpriseECCPublicKey: buffer expected"; return null; @@ -193116,6 +194238,8 @@ export const BreachWatch = $root.BreachWatch = (() => { EnterprisePublicKeyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.EnterprisePublicKeyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.EnterprisePublicKeyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -193167,9 +194291,9 @@ export const BreachWatch = $root.BreachWatch = (() => { object.enterpriseECCPublicKey = $util.newBuffer(object.enterpriseECCPublicKey); } } - if (message.enterprisePublicKey != null && message.hasOwnProperty("enterprisePublicKey")) + if (message.enterprisePublicKey != null && Object.hasOwnProperty.call(message, "enterprisePublicKey")) object.enterprisePublicKey = options.bytes === String ? $util.base64.encode(message.enterprisePublicKey, 0, message.enterprisePublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterprisePublicKey) : message.enterprisePublicKey; - if (message.enterpriseECCPublicKey != null && message.hasOwnProperty("enterpriseECCPublicKey")) + if (message.enterpriseECCPublicKey != null && Object.hasOwnProperty.call(message, "enterpriseECCPublicKey")) object.enterpriseECCPublicKey = options.bytes === String ? $util.base64.encode(message.enterpriseECCPublicKey, 0, message.enterpriseECCPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.enterpriseECCPublicKey) : message.enterpriseECCPublicKey; return object; }; @@ -193278,7 +194402,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ FreeScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -193348,7 +194472,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.hashedEmail != null && message.hasOwnProperty("hashedEmail")) + if (message.hashedEmail != null && Object.hasOwnProperty.call(message, "hashedEmail")) if (!(message.hashedEmail && typeof message.hashedEmail.length === "number" || $util.isString(message.hashedEmail))) return "hashedEmail: buffer expected"; return null; @@ -193365,6 +194489,8 @@ export const BreachWatch = $root.BreachWatch = (() => { FreeScanRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.FreeScanRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.FreeScanRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -193403,7 +194529,7 @@ export const BreachWatch = $root.BreachWatch = (() => { if (options.bytes !== Array) object.hashedEmail = $util.newBuffer(object.hashedEmail); } - if (message.hashedEmail != null && message.hasOwnProperty("hashedEmail")) + if (message.hashedEmail != null && Object.hasOwnProperty.call(message, "hashedEmail")) object.hashedEmail = options.bytes === String ? $util.base64.encode(message.hashedEmail, 0, message.hashedEmail.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedEmail) : message.hashedEmail; return object; }; @@ -193523,7 +194649,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ FreeScanResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -193597,10 +194723,10 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.emailBreaches != null && message.hasOwnProperty("emailBreaches")) + if (message.emailBreaches != null && Object.hasOwnProperty.call(message, "emailBreaches")) if (!$util.isInteger(message.emailBreaches)) return "emailBreaches: integer expected"; - if (message.passwordBreaches != null && message.hasOwnProperty("passwordBreaches")) + if (message.passwordBreaches != null && Object.hasOwnProperty.call(message, "passwordBreaches")) if (!$util.isInteger(message.passwordBreaches)) return "passwordBreaches: integer expected"; return null; @@ -193617,6 +194743,8 @@ export const BreachWatch = $root.BreachWatch = (() => { FreeScanResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.FreeScanResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.FreeScanResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -193650,9 +194778,9 @@ export const BreachWatch = $root.BreachWatch = (() => { object.emailBreaches = 0; object.passwordBreaches = 0; } - if (message.emailBreaches != null && message.hasOwnProperty("emailBreaches")) + if (message.emailBreaches != null && Object.hasOwnProperty.call(message, "emailBreaches")) object.emailBreaches = message.emailBreaches; - if (message.passwordBreaches != null && message.hasOwnProperty("passwordBreaches")) + if (message.passwordBreaches != null && Object.hasOwnProperty.call(message, "passwordBreaches")) object.passwordBreaches = message.passwordBreaches; return object; }; @@ -193761,7 +194889,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ PaidUserRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -193831,7 +194959,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; return null; @@ -193848,6 +194976,8 @@ export const BreachWatch = $root.BreachWatch = (() => { PaidUserRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.PaidUserRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.PaidUserRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -193877,7 +195007,7 @@ export const BreachWatch = $root.BreachWatch = (() => { let object = {}; if (options.defaults) object.email = ""; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; return object; }; @@ -193986,7 +195116,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ PaidUserResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -194056,7 +195186,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.paidUser != null && message.hasOwnProperty("paidUser")) + if (message.paidUser != null && Object.hasOwnProperty.call(message, "paidUser")) if (typeof message.paidUser !== "boolean") return "paidUser: boolean expected"; return null; @@ -194073,6 +195203,8 @@ export const BreachWatch = $root.BreachWatch = (() => { PaidUserResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.PaidUserResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.PaidUserResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -194102,7 +195234,7 @@ export const BreachWatch = $root.BreachWatch = (() => { let object = {}; if (options.defaults) object.paidUser = false; - if (message.paidUser != null && message.hasOwnProperty("paidUser")) + if (message.paidUser != null && Object.hasOwnProperty.call(message, "paidUser")) object.paidUser = message.paidUser; return object; }; @@ -194211,7 +195343,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ DetailedScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -194281,7 +195413,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; return null; @@ -194298,6 +195430,8 @@ export const BreachWatch = $root.BreachWatch = (() => { DetailedScanRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.DetailedScanRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.DetailedScanRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -194327,7 +195461,7 @@ export const BreachWatch = $root.BreachWatch = (() => { let object = {}; if (options.defaults) object.email = ""; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; return object; }; @@ -194436,7 +195570,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ UseOneTimeTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -194506,7 +195640,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) if (!(message.token && typeof message.token.length === "number" || $util.isString(message.token))) return "token: buffer expected"; return null; @@ -194523,6 +195657,8 @@ export const BreachWatch = $root.BreachWatch = (() => { UseOneTimeTokenRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.UseOneTimeTokenRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.UseOneTimeTokenRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -194561,7 +195697,7 @@ export const BreachWatch = $root.BreachWatch = (() => { if (options.bytes !== Array) object.token = $util.newBuffer(object.token); } - if (message.token != null && message.hasOwnProperty("token")) + if (message.token != null && Object.hasOwnProperty.call(message, "token")) object.token = options.bytes === String ? $util.base64.encode(message.token, 0, message.token.length) : options.bytes === Array ? Array.prototype.slice.call(message.token) : message.token; return object; }; @@ -194714,7 +195850,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ BreachEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -194800,19 +195936,19 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.site != null && message.hasOwnProperty("site")) + if (message.site != null && Object.hasOwnProperty.call(message, "site")) if (!$util.isString(message.site)) return "site: string expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.passwordInBreach != null && message.hasOwnProperty("passwordInBreach")) + if (message.passwordInBreach != null && Object.hasOwnProperty.call(message, "passwordInBreach")) if (typeof message.passwordInBreach !== "boolean") return "passwordInBreach: boolean expected"; - if (message.date != null && message.hasOwnProperty("date")) + if (message.date != null && Object.hasOwnProperty.call(message, "date")) if (!$util.isString(message.date)) return "date: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; return null; @@ -194829,6 +195965,8 @@ export const BreachWatch = $root.BreachWatch = (() => { BreachEvent.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.BreachEvent) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.BreachEvent: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -194871,15 +196009,15 @@ export const BreachWatch = $root.BreachWatch = (() => { object.date = ""; object.description = ""; } - if (message.site != null && message.hasOwnProperty("site")) + if (message.site != null && Object.hasOwnProperty.call(message, "site")) object.site = message.site; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.passwordInBreach != null && message.hasOwnProperty("passwordInBreach")) + if (message.passwordInBreach != null && Object.hasOwnProperty.call(message, "passwordInBreach")) object.passwordInBreach = message.passwordInBreach; - if (message.date != null && message.hasOwnProperty("date")) + if (message.date != null && Object.hasOwnProperty.call(message, "date")) object.date = message.date; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) object.description = message.description; return object; }; @@ -195023,7 +196161,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ UseOneTimeTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -195107,13 +196245,13 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.emailBreaches != null && message.hasOwnProperty("emailBreaches")) + if (message.emailBreaches != null && Object.hasOwnProperty.call(message, "emailBreaches")) if (!$util.isInteger(message.emailBreaches)) return "emailBreaches: integer expected"; - if (message.passwordBreaches != null && message.hasOwnProperty("passwordBreaches")) + if (message.passwordBreaches != null && Object.hasOwnProperty.call(message, "passwordBreaches")) if (!$util.isInteger(message.passwordBreaches)) return "passwordBreaches: integer expected"; - if (message.breachEvents != null && message.hasOwnProperty("breachEvents")) { + if (message.breachEvents != null && Object.hasOwnProperty.call(message, "breachEvents")) { if (!Array.isArray(message.breachEvents)) return "breachEvents: array expected"; for (let i = 0; i < message.breachEvents.length; ++i) { @@ -195122,7 +196260,7 @@ export const BreachWatch = $root.BreachWatch = (() => { return "breachEvents." + error; } } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; return null; @@ -195139,6 +196277,8 @@ export const BreachWatch = $root.BreachWatch = (() => { UseOneTimeTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.UseOneTimeTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.UseOneTimeTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -195153,7 +196293,7 @@ export const BreachWatch = $root.BreachWatch = (() => { throw TypeError(".BreachWatch.UseOneTimeTokenResponse.breachEvents: array expected"); message.breachEvents = []; for (let i = 0; i < object.breachEvents.length; ++i) { - if (typeof object.breachEvents[i] !== "object") + if (!$util.isObject(object.breachEvents[i])) throw TypeError(".BreachWatch.UseOneTimeTokenResponse.breachEvents: object expected"); message.breachEvents[i] = $root.BreachWatch.BreachEvent.fromObject(object.breachEvents[i], long + 1); } @@ -195187,16 +196327,16 @@ export const BreachWatch = $root.BreachWatch = (() => { object.passwordBreaches = 0; object.email = ""; } - if (message.emailBreaches != null && message.hasOwnProperty("emailBreaches")) + if (message.emailBreaches != null && Object.hasOwnProperty.call(message, "emailBreaches")) object.emailBreaches = message.emailBreaches; - if (message.passwordBreaches != null && message.hasOwnProperty("passwordBreaches")) + if (message.passwordBreaches != null && Object.hasOwnProperty.call(message, "passwordBreaches")) object.passwordBreaches = message.passwordBreaches; if (message.breachEvents && message.breachEvents.length) { object.breachEvents = []; for (let j = 0; j < message.breachEvents.length; ++j) object.breachEvents[j] = $root.BreachWatch.BreachEvent.toObject(message.breachEvents[j], options, q + 1); } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; return object; }; @@ -195316,7 +196456,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ OneTimeUseToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -195390,10 +196530,10 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.pad != null && message.hasOwnProperty("pad")) + if (message.pad != null && Object.hasOwnProperty.call(message, "pad")) if (!$util.isString(message.pad)) return "pad: string expected"; return null; @@ -195410,6 +196550,8 @@ export const BreachWatch = $root.BreachWatch = (() => { OneTimeUseToken.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.OneTimeUseToken) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.OneTimeUseToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -195443,9 +196585,9 @@ export const BreachWatch = $root.BreachWatch = (() => { object.email = ""; object.pad = ""; } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.pad != null && message.hasOwnProperty("pad")) + if (message.pad != null && Object.hasOwnProperty.call(message, "pad")) object.pad = message.pad; return object; }; @@ -195554,7 +196696,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ FreePasswordScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -195624,7 +196766,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.hashedPassword != null && message.hasOwnProperty("hashedPassword")) + if (message.hashedPassword != null && Object.hasOwnProperty.call(message, "hashedPassword")) if (!(message.hashedPassword && typeof message.hashedPassword.length === "number" || $util.isString(message.hashedPassword))) return "hashedPassword: buffer expected"; return null; @@ -195641,6 +196783,8 @@ export const BreachWatch = $root.BreachWatch = (() => { FreePasswordScanRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.FreePasswordScanRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.FreePasswordScanRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -195679,7 +196823,7 @@ export const BreachWatch = $root.BreachWatch = (() => { if (options.bytes !== Array) object.hashedPassword = $util.newBuffer(object.hashedPassword); } - if (message.hashedPassword != null && message.hasOwnProperty("hashedPassword")) + if (message.hashedPassword != null && Object.hasOwnProperty.call(message, "hashedPassword")) object.hashedPassword = options.bytes === String ? $util.base64.encode(message.hashedPassword, 0, message.hashedPassword.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedPassword) : message.hashedPassword; return object; }; @@ -195788,7 +196932,7 @@ export const BreachWatch = $root.BreachWatch = (() => { * @returns {$protobuf.Writer} Writer */ FreePasswordScanResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -195858,7 +197002,7 @@ export const BreachWatch = $root.BreachWatch = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.passwordBreaches != null && message.hasOwnProperty("passwordBreaches")) + if (message.passwordBreaches != null && Object.hasOwnProperty.call(message, "passwordBreaches")) if (!$util.isInteger(message.passwordBreaches) && !(message.passwordBreaches && $util.isInteger(message.passwordBreaches.low) && $util.isInteger(message.passwordBreaches.high))) return "passwordBreaches: integer|Long expected"; return null; @@ -195875,6 +197019,8 @@ export const BreachWatch = $root.BreachWatch = (() => { FreePasswordScanResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BreachWatch.FreePasswordScanResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BreachWatch.FreePasswordScanResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -195915,7 +197061,7 @@ export const BreachWatch = $root.BreachWatch = (() => { object.passwordBreaches = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.passwordBreaches = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.passwordBreaches != null && message.hasOwnProperty("passwordBreaches")) + if (message.passwordBreaches != null && Object.hasOwnProperty.call(message, "passwordBreaches")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.passwordBreaches = typeof message.passwordBreaches === "number" ? BigInt(message.passwordBreaches) : $util.Long.fromBits(message.passwordBreaches.low >>> 0, message.passwordBreaches.high >>> 0, false).toBigInt(); else if (typeof message.passwordBreaches === "number") @@ -196054,7 +197200,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -196130,7 +197276,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.breachWatchRecordRequest != null && message.hasOwnProperty("breachWatchRecordRequest")) { + if (message.breachWatchRecordRequest != null && Object.hasOwnProperty.call(message, "breachWatchRecordRequest")) { if (!Array.isArray(message.breachWatchRecordRequest)) return "breachWatchRecordRequest: array expected"; for (let i = 0; i < message.breachWatchRecordRequest.length; ++i) { @@ -196139,7 +197285,7 @@ export const Tokens = $root.Tokens = (() => { return "breachWatchRecordRequest." + error; } } - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; return null; @@ -196156,6 +197302,8 @@ export const Tokens = $root.Tokens = (() => { BreachWatchUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.BreachWatchUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.BreachWatchUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -196166,7 +197314,7 @@ export const Tokens = $root.Tokens = (() => { throw TypeError(".Tokens.BreachWatchUpdateRequest.breachWatchRecordRequest: array expected"); message.breachWatchRecordRequest = []; for (let i = 0; i < object.breachWatchRecordRequest.length; ++i) { - if (typeof object.breachWatchRecordRequest[i] !== "object") + if (!$util.isObject(object.breachWatchRecordRequest[i])) throw TypeError(".Tokens.BreachWatchUpdateRequest.breachWatchRecordRequest: object expected"); message.breachWatchRecordRequest[i] = $root.Tokens.BreachWatchRecordRequest.fromObject(object.breachWatchRecordRequest[i], long + 1); } @@ -196211,7 +197359,7 @@ export const Tokens = $root.Tokens = (() => { for (let j = 0; j < message.breachWatchRecordRequest.length; ++j) object.breachWatchRecordRequest[j] = $root.Tokens.BreachWatchRecordRequest.toObject(message.breachWatchRecordRequest[j], options, q + 1); } - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; return object; }; @@ -196353,7 +197501,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -196435,13 +197583,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) return "encryptedData: buffer expected"; - if (message.breachWatchInfoType != null && message.hasOwnProperty("breachWatchInfoType")) + if (message.breachWatchInfoType != null && Object.hasOwnProperty.call(message, "breachWatchInfoType")) switch (message.breachWatchInfoType) { default: return "breachWatchInfoType: enum value expected"; @@ -196449,7 +197597,7 @@ export const Tokens = $root.Tokens = (() => { case 1: break; } - if (message.updateUserWhoScanned != null && message.hasOwnProperty("updateUserWhoScanned")) + if (message.updateUserWhoScanned != null && Object.hasOwnProperty.call(message, "updateUserWhoScanned")) if (typeof message.updateUserWhoScanned !== "boolean") return "updateUserWhoScanned: boolean expected"; return null; @@ -196466,6 +197614,8 @@ export const Tokens = $root.Tokens = (() => { BreachWatchRecordRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.BreachWatchRecordRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.BreachWatchRecordRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -196537,13 +197687,13 @@ export const Tokens = $root.Tokens = (() => { object.breachWatchInfoType = options.enums === String ? "RECORD" : 0; object.updateUserWhoScanned = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; - if (message.breachWatchInfoType != null && message.hasOwnProperty("breachWatchInfoType")) + if (message.breachWatchInfoType != null && Object.hasOwnProperty.call(message, "breachWatchInfoType")) object.breachWatchInfoType = options.enums === String ? $root.Tokens.BreachWatchInfoType[message.breachWatchInfoType] === undefined ? message.breachWatchInfoType : $root.Tokens.BreachWatchInfoType[message.breachWatchInfoType] : message.breachWatchInfoType; - if (message.updateUserWhoScanned != null && message.hasOwnProperty("updateUserWhoScanned")) + if (message.updateUserWhoScanned != null && Object.hasOwnProperty.call(message, "updateUserWhoScanned")) object.updateUserWhoScanned = message.updateUserWhoScanned; return object; }; @@ -196694,7 +197844,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -196778,7 +197928,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.passwords != null && message.hasOwnProperty("passwords")) { + if (message.passwords != null && Object.hasOwnProperty.call(message, "passwords")) { if (!Array.isArray(message.passwords)) return "passwords: array expected"; for (let i = 0; i < message.passwords.length; ++i) { @@ -196787,7 +197937,7 @@ export const Tokens = $root.Tokens = (() => { return "passwords." + error; } } - if (message.emails != null && message.hasOwnProperty("emails")) { + if (message.emails != null && Object.hasOwnProperty.call(message, "emails")) { if (!Array.isArray(message.emails)) return "emails: array expected"; for (let i = 0; i < message.emails.length; ++i) { @@ -196796,7 +197946,7 @@ export const Tokens = $root.Tokens = (() => { return "emails." + error; } } - if (message.domains != null && message.hasOwnProperty("domains")) { + if (message.domains != null && Object.hasOwnProperty.call(message, "domains")) { if (!Array.isArray(message.domains)) return "domains: array expected"; for (let i = 0; i < message.domains.length; ++i) { @@ -196819,6 +197969,8 @@ export const Tokens = $root.Tokens = (() => { BreachWatchData.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.BreachWatchData) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.BreachWatchData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -196829,7 +197981,7 @@ export const Tokens = $root.Tokens = (() => { throw TypeError(".Tokens.BreachWatchData.passwords: array expected"); message.passwords = []; for (let i = 0; i < object.passwords.length; ++i) { - if (typeof object.passwords[i] !== "object") + if (!$util.isObject(object.passwords[i])) throw TypeError(".Tokens.BreachWatchData.passwords: object expected"); message.passwords[i] = $root.Tokens.BWPassword.fromObject(object.passwords[i], long + 1); } @@ -196839,7 +197991,7 @@ export const Tokens = $root.Tokens = (() => { throw TypeError(".Tokens.BreachWatchData.emails: array expected"); message.emails = []; for (let i = 0; i < object.emails.length; ++i) { - if (typeof object.emails[i] !== "object") + if (!$util.isObject(object.emails[i])) throw TypeError(".Tokens.BreachWatchData.emails: object expected"); message.emails[i] = $root.Tokens.BWPassword.fromObject(object.emails[i], long + 1); } @@ -196849,7 +198001,7 @@ export const Tokens = $root.Tokens = (() => { throw TypeError(".Tokens.BreachWatchData.domains: array expected"); message.domains = []; for (let i = 0; i < object.domains.length; ++i) { - if (typeof object.domains[i] !== "object") + if (!$util.isObject(object.domains[i])) throw TypeError(".Tokens.BreachWatchData.domains: object expected"); message.domains[i] = $root.Tokens.BWPassword.fromObject(object.domains[i], long + 1); } @@ -197034,7 +198186,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ BWPassword.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -197116,13 +198268,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.resolved != null && message.hasOwnProperty("resolved")) + if (message.resolved != null && Object.hasOwnProperty.call(message, "resolved")) if (!$util.isInteger(message.resolved) && !(message.resolved && $util.isInteger(message.resolved.low) && $util.isInteger(message.resolved.high))) return "resolved: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -197133,7 +198285,7 @@ export const Tokens = $root.Tokens = (() => { case 4: break; } - if (message.euid != null && message.hasOwnProperty("euid")) + if (message.euid != null && Object.hasOwnProperty.call(message, "euid")) if (!(message.euid && typeof message.euid.length === "number" || $util.isString(message.euid))) return "euid: buffer expected"; return null; @@ -197150,6 +198302,8 @@ export const Tokens = $root.Tokens = (() => { BWPassword.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.BWPassword) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.BWPassword: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -197235,18 +198389,18 @@ export const Tokens = $root.Tokens = (() => { object.euid = $util.newBuffer(object.euid); } } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.resolved != null && message.hasOwnProperty("resolved")) + if (message.resolved != null && Object.hasOwnProperty.call(message, "resolved")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.resolved = typeof message.resolved === "number" ? BigInt(message.resolved) : $util.Long.fromBits(message.resolved.low >>> 0, message.resolved.high >>> 0, true).toBigInt(); else if (typeof message.resolved === "number") object.resolved = options.longs === String ? String(message.resolved) : message.resolved; else object.resolved = options.longs === String ? $util.Long.prototype.toString.call(message.resolved) : options.longs === Number ? new $util.LongBits(message.resolved.low >>> 0, message.resolved.high >>> 0).toNumber(true) : message.resolved; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Tokens.BWStatus[message.status] === undefined ? message.status : $root.Tokens.BWStatus[message.status] : message.status; - if (message.euid != null && message.hasOwnProperty("euid")) + if (message.euid != null && Object.hasOwnProperty.call(message, "euid")) object.euid = options.bytes === String ? $util.base64.encode(message.euid, 0, message.euid.length) : options.bytes === Array ? Array.prototype.slice.call(message.euid) : message.euid; return object; }; @@ -197386,7 +198540,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ DeviceToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -197460,10 +198614,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.region != null && message.hasOwnProperty("region")) + if (message.region != null && Object.hasOwnProperty.call(message, "region")) if (!$util.isInteger(message.region)) return "region: integer expected"; return null; @@ -197480,6 +198634,8 @@ export const Tokens = $root.Tokens = (() => { DeviceToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.DeviceToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.DeviceToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -197524,14 +198680,14 @@ export const Tokens = $root.Tokens = (() => { object.deviceId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.region = 0; } - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.region != null && message.hasOwnProperty("region")) + if (message.region != null && Object.hasOwnProperty.call(message, "region")) object.region = message.region; return object; }; @@ -197673,7 +198829,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SSOLoginToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -197755,16 +198911,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) if (!$util.isString(message.alias)) return "alias: string expected"; - if (message.displayname != null && message.hasOwnProperty("displayname")) + if (message.displayname != null && Object.hasOwnProperty.call(message, "displayname")) if (!$util.isString(message.displayname)) return "displayname: string expected"; return null; @@ -197781,6 +198937,8 @@ export const Tokens = $root.Tokens = (() => { SSOLoginToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SSOLoginToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SSOLoginToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -197831,18 +198989,18 @@ export const Tokens = $root.Tokens = (() => { object.alias = ""; object.displayname = ""; } - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, false).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber() : message.ssoServiceProviderId; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.alias != null && message.hasOwnProperty("alias")) + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) object.alias = message.alias; - if (message.displayname != null && message.hasOwnProperty("displayname")) + if (message.displayname != null && Object.hasOwnProperty.call(message, "displayname")) object.displayname = message.displayname; return object; }; @@ -197962,7 +199120,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ PasskeyLoginToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -198036,10 +199194,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.passkeyVerificationMS != null && message.hasOwnProperty("passkeyVerificationMS")) + if (message.passkeyVerificationMS != null && Object.hasOwnProperty.call(message, "passkeyVerificationMS")) if (!$util.isInteger(message.passkeyVerificationMS) && !(message.passkeyVerificationMS && $util.isInteger(message.passkeyVerificationMS.low) && $util.isInteger(message.passkeyVerificationMS.high))) return "passkeyVerificationMS: integer|Long expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) if (!(message.challenge && typeof message.challenge.length === "number" || $util.isString(message.challenge))) return "challenge: buffer expected"; return null; @@ -198056,6 +199214,8 @@ export const Tokens = $root.Tokens = (() => { PasskeyLoginToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.PasskeyLoginToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.PasskeyLoginToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -198109,14 +199269,14 @@ export const Tokens = $root.Tokens = (() => { object.challenge = $util.newBuffer(object.challenge); } } - if (message.passkeyVerificationMS != null && message.hasOwnProperty("passkeyVerificationMS")) + if (message.passkeyVerificationMS != null && Object.hasOwnProperty.call(message, "passkeyVerificationMS")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.passkeyVerificationMS = typeof message.passkeyVerificationMS === "number" ? BigInt(message.passkeyVerificationMS) : $util.Long.fromBits(message.passkeyVerificationMS.low >>> 0, message.passkeyVerificationMS.high >>> 0, false).toBigInt(); else if (typeof message.passkeyVerificationMS === "number") object.passkeyVerificationMS = options.longs === String ? String(message.passkeyVerificationMS) : message.passkeyVerificationMS; else object.passkeyVerificationMS = options.longs === String ? $util.Long.prototype.toString.call(message.passkeyVerificationMS) : options.longs === Number ? new $util.LongBits(message.passkeyVerificationMS.low >>> 0, message.passkeyVerificationMS.high >>> 0).toNumber() : message.passkeyVerificationMS; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) object.challenge = options.bytes === String ? $util.base64.encode(message.challenge, 0, message.challenge.length) : options.bytes === Array ? Array.prototype.slice.call(message.challenge) : message.challenge; return object; }; @@ -198401,7 +199561,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LoginToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -198535,19 +199695,19 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.loginSessionId != null && message.hasOwnProperty("loginSessionId")) + if (message.loginSessionId != null && Object.hasOwnProperty.call(message, "loginSessionId")) if (!$util.isInteger(message.loginSessionId) && !(message.loginSessionId && $util.isInteger(message.loginSessionId.low) && $util.isInteger(message.loginSessionId.high))) return "loginSessionId: integer|Long expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.loginState != null && message.hasOwnProperty("loginState")) + if (message.loginState != null && Object.hasOwnProperty.call(message, "loginState")) switch (message.loginState) { default: return "loginState: enum value expected"; @@ -198576,7 +199736,7 @@ export const Tokens = $root.Tokens = (() => { case 99: break; } - if (message.loginMethod != null && message.hasOwnProperty("loginMethod")) + if (message.loginMethod != null && Object.hasOwnProperty.call(message, "loginMethod")) switch (message.loginMethod) { default: return "loginMethod: enum value expected"; @@ -198587,19 +199747,19 @@ export const Tokens = $root.Tokens = (() => { case 4: break; } - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) if (!$util.isInteger(message.clientVersionId)) return "clientVersionId: integer expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -198628,18 +199788,18 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.ssoLoginToken != null && message.hasOwnProperty("ssoLoginToken")) { + if (message.ssoLoginToken != null && Object.hasOwnProperty.call(message, "ssoLoginToken")) { let error = $root.Tokens.SSOLoginToken.verify(message.ssoLoginToken, long + 1); if (error) return "ssoLoginToken." + error; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.relogin != null && message.hasOwnProperty("relogin")) + if (message.relogin != null && Object.hasOwnProperty.call(message, "relogin")) if (typeof message.relogin !== "boolean") return "relogin: boolean expected"; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) switch (message.loginType) { default: return "loginType: enum value expected"; @@ -198652,10 +199812,10 @@ export const Tokens = $root.Tokens = (() => { case 6: break; } - if (message.fromUserId != null && message.hasOwnProperty("fromUserId")) + if (message.fromUserId != null && Object.hasOwnProperty.call(message, "fromUserId")) if (!$util.isInteger(message.fromUserId)) return "fromUserId: integer expected"; - if (message.passkeyLoginToken != null && message.hasOwnProperty("passkeyLoginToken")) { + if (message.passkeyLoginToken != null && Object.hasOwnProperty.call(message, "passkeyLoginToken")) { let error = $root.Tokens.PasskeyLoginToken.verify(message.passkeyLoginToken, long + 1); if (error) return "passkeyLoginToken." + error; @@ -198674,6 +199834,8 @@ export const Tokens = $root.Tokens = (() => { LoginToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LoginToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LoginToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -198958,7 +200120,7 @@ export const Tokens = $root.Tokens = (() => { break; } if (object.ssoLoginToken != null) { - if (typeof object.ssoLoginToken !== "object") + if (!$util.isObject(object.ssoLoginToken)) throw TypeError(".Tokens.LoginToken.ssoLoginToken: object expected"); message.ssoLoginToken = $root.Tokens.SSOLoginToken.fromObject(object.ssoLoginToken, long + 1); } @@ -199005,7 +200167,7 @@ export const Tokens = $root.Tokens = (() => { if (object.fromUserId != null) message.fromUserId = object.fromUserId | 0; if (object.passkeyLoginToken != null) { - if (typeof object.passkeyLoginToken !== "object") + if (!$util.isObject(object.passkeyLoginToken)) throw TypeError(".Tokens.LoginToken.passkeyLoginToken: object expected"); message.passkeyLoginToken = $root.Tokens.PasskeyLoginToken.fromObject(object.passkeyLoginToken, long + 1); } @@ -199076,59 +200238,59 @@ export const Tokens = $root.Tokens = (() => { object.fromUserId = 0; object.passkeyLoginToken = null; } - if (message.loginSessionId != null && message.hasOwnProperty("loginSessionId")) + if (message.loginSessionId != null && Object.hasOwnProperty.call(message, "loginSessionId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.loginSessionId = typeof message.loginSessionId === "number" ? BigInt(message.loginSessionId) : $util.Long.fromBits(message.loginSessionId.low >>> 0, message.loginSessionId.high >>> 0, false).toBigInt(); else if (typeof message.loginSessionId === "number") object.loginSessionId = options.longs === String ? String(message.loginSessionId) : message.loginSessionId; else object.loginSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.loginSessionId) : options.longs === Number ? new $util.LongBits(message.loginSessionId.low >>> 0, message.loginSessionId.high >>> 0).toNumber() : message.loginSessionId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.loginState != null && message.hasOwnProperty("loginState")) + if (message.loginState != null && Object.hasOwnProperty.call(message, "loginState")) object.loginState = options.enums === String ? $root.Authentication.LoginState[message.loginState] === undefined ? message.loginState : $root.Authentication.LoginState[message.loginState] : message.loginState; - if (message.loginMethod != null && message.hasOwnProperty("loginMethod")) + if (message.loginMethod != null && Object.hasOwnProperty.call(message, "loginMethod")) object.loginMethod = options.enums === String ? $root.Authentication.LoginMethod[message.loginMethod] === undefined ? message.loginMethod : $root.Authentication.LoginMethod[message.loginMethod] : message.loginMethod; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) object.clientVersionId = message.clientVersionId; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.ssoLoginToken != null && message.hasOwnProperty("ssoLoginToken")) + if (message.ssoLoginToken != null && Object.hasOwnProperty.call(message, "ssoLoginToken")) object.ssoLoginToken = $root.Tokens.SSOLoginToken.toObject(message.ssoLoginToken, options, q + 1); - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.relogin != null && message.hasOwnProperty("relogin")) + if (message.relogin != null && Object.hasOwnProperty.call(message, "relogin")) object.relogin = message.relogin; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) object.loginType = options.enums === String ? $root.Authentication.LoginType[message.loginType] === undefined ? message.loginType : $root.Authentication.LoginType[message.loginType] : message.loginType; - if (message.fromUserId != null && message.hasOwnProperty("fromUserId")) + if (message.fromUserId != null && Object.hasOwnProperty.call(message, "fromUserId")) object.fromUserId = message.fromUserId; - if (message.passkeyLoginToken != null && message.hasOwnProperty("passkeyLoginToken")) + if (message.passkeyLoginToken != null && Object.hasOwnProperty.call(message, "passkeyLoginToken")) object.passkeyLoginToken = $root.Tokens.PasskeyLoginToken.toObject(message.passkeyLoginToken, options, q + 1); return object; }; @@ -199270,7 +200432,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ DeviceApprovalToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -199352,18 +200514,18 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) { + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) { let error = $root.Tokens.DeviceToken.verify(message.deviceToken, long + 1); if (error) return "deviceToken." + error; } - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -199406,6 +200568,8 @@ export const Tokens = $root.Tokens = (() => { DeviceApprovalToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.DeviceApprovalToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.DeviceApprovalToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -199430,7 +200594,7 @@ export const Tokens = $root.Tokens = (() => { else if (typeof object.expiration === "object") message.expiration = new $util.LongBits(object.expiration.low >>> 0, object.expiration.high >>> 0).toNumber(); if (object.deviceToken != null) { - if (typeof object.deviceToken !== "object") + if (!$util.isObject(object.deviceToken)) throw TypeError(".Tokens.DeviceApprovalToken.deviceToken: object expected"); message.deviceToken = $root.Tokens.DeviceToken.fromObject(object.deviceToken, long + 1); } @@ -199568,23 +200732,23 @@ export const Tokens = $root.Tokens = (() => { object.deviceToken = null; object.supportedLanguage = options.enums === String ? "ENGLISH" : 0; } - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) object.deviceToken = $root.Tokens.DeviceToken.toObject(message.deviceToken, options, q + 1); - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; return object; }; @@ -199726,7 +200890,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ TwoFactorToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -199808,18 +200972,18 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) { + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) { let error = $root.Tokens.DeviceToken.verify(message.deviceToken, long + 1); if (error) return "deviceToken." + error; } - if (message.deviceIp != null && message.hasOwnProperty("deviceIp")) + if (message.deviceIp != null && Object.hasOwnProperty.call(message, "deviceIp")) if (!$util.isString(message.deviceIp)) return "deviceIp: string expected"; return null; @@ -199836,6 +201000,8 @@ export const Tokens = $root.Tokens = (() => { TwoFactorToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.TwoFactorToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.TwoFactorToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -199860,7 +201026,7 @@ export const Tokens = $root.Tokens = (() => { else if (typeof object.expiration === "object") message.expiration = new $util.LongBits(object.expiration.low >>> 0, object.expiration.high >>> 0).toNumber(); if (object.deviceToken != null) { - if (typeof object.deviceToken !== "object") + if (!$util.isObject(object.deviceToken)) throw TypeError(".Tokens.TwoFactorToken.deviceToken: object expected"); message.deviceToken = $root.Tokens.DeviceToken.fromObject(object.deviceToken, long + 1); } @@ -199900,23 +201066,23 @@ export const Tokens = $root.Tokens = (() => { object.deviceToken = null; object.deviceIp = ""; } - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) object.deviceToken = $root.Tokens.DeviceToken.toObject(message.deviceToken, options, q + 1); - if (message.deviceIp != null && message.hasOwnProperty("deviceIp")) + if (message.deviceIp != null && Object.hasOwnProperty.call(message, "deviceIp")) object.deviceIp = message.deviceIp; return object; }; @@ -200058,7 +201224,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -200140,16 +201306,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.domainUid != null && message.hasOwnProperty("domainUid")) + if (message.domainUid != null && Object.hasOwnProperty.call(message, "domainUid")) if (!(message.domainUid && typeof message.domainUid.length === "number" || $util.isString(message.domainUid))) return "domainUid: buffer expected"; - if (message.emailUid != null && message.hasOwnProperty("emailUid")) + if (message.emailUid != null && Object.hasOwnProperty.call(message, "emailUid")) if (!(message.emailUid && typeof message.emailUid.length === "number" || $util.isString(message.emailUid))) return "emailUid: buffer expected"; - if (message.passwordUid != null && message.hasOwnProperty("passwordUid")) + if (message.passwordUid != null && Object.hasOwnProperty.call(message, "passwordUid")) if (!(message.passwordUid && typeof message.passwordUid.length === "number" || $util.isString(message.passwordUid))) return "passwordUid: buffer expected"; return null; @@ -200166,6 +201332,8 @@ export const Tokens = $root.Tokens = (() => { BreachWatchToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.BreachWatchToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.BreachWatchToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -200232,13 +201400,13 @@ export const Tokens = $root.Tokens = (() => { object.passwordUid = $util.newBuffer(object.passwordUid); } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.domainUid != null && message.hasOwnProperty("domainUid")) + if (message.domainUid != null && Object.hasOwnProperty.call(message, "domainUid")) object.domainUid = options.bytes === String ? $util.base64.encode(message.domainUid, 0, message.domainUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.domainUid) : message.domainUid; - if (message.emailUid != null && message.hasOwnProperty("emailUid")) + if (message.emailUid != null && Object.hasOwnProperty.call(message, "emailUid")) object.emailUid = options.bytes === String ? $util.base64.encode(message.emailUid, 0, message.emailUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.emailUid) : message.emailUid; - if (message.passwordUid != null && message.hasOwnProperty("passwordUid")) + if (message.passwordUid != null && Object.hasOwnProperty.call(message, "passwordUid")) object.passwordUid = options.bytes === String ? $util.base64.encode(message.passwordUid, 0, message.passwordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.passwordUid) : message.passwordUid; return object; }; @@ -200396,7 +201564,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ AnonymizedToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -200478,16 +201646,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.anonymizedTokenType != null && message.hasOwnProperty("anonymizedTokenType")) + if (message.anonymizedTokenType != null && Object.hasOwnProperty.call(message, "anonymizedTokenType")) switch (message.anonymizedTokenType) { default: return "anonymizedTokenType: enum value expected"; @@ -200510,6 +201678,8 @@ export const Tokens = $root.Tokens = (() => { AnonymizedToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.AnonymizedToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.AnonymizedToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -200598,23 +201768,23 @@ export const Tokens = $root.Tokens = (() => { } object.anonymizedTokenType = options.enums === String ? "DAT" : 0; } - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.anonymizedTokenType != null && message.hasOwnProperty("anonymizedTokenType")) + if (message.anonymizedTokenType != null && Object.hasOwnProperty.call(message, "anonymizedTokenType")) object.anonymizedTokenType = options.enums === String ? $root.Tokens.AnonymizedTokenType[message.anonymizedTokenType] === undefined ? message.anonymizedTokenType : $root.Tokens.AnonymizedTokenType[message.anonymizedTokenType] : message.anonymizedTokenType; return object; }; @@ -200734,7 +201904,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LicenseToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -200808,10 +201978,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.licenseStatus != null && message.hasOwnProperty("licenseStatus")) + if (message.licenseStatus != null && Object.hasOwnProperty.call(message, "licenseStatus")) switch (message.licenseStatus) { default: return "licenseStatus: enum value expected"; @@ -200835,6 +202005,8 @@ export const Tokens = $root.Tokens = (() => { LicenseToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LicenseToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LicenseToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -200901,14 +202073,14 @@ export const Tokens = $root.Tokens = (() => { object.expiration = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.licenseStatus = options.enums === String ? "OTHER" : 0; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.licenseStatus != null && message.hasOwnProperty("licenseStatus")) + if (message.licenseStatus != null && Object.hasOwnProperty.call(message, "licenseStatus")) object.licenseStatus = options.enums === String ? $root.Authentication.LicenseStatus[message.licenseStatus] === undefined ? message.licenseStatus : $root.Authentication.LicenseStatus[message.licenseStatus] : message.licenseStatus; return object; }; @@ -201275,7 +202447,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SessionToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -201433,53 +202605,53 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.du1 != null && message.hasOwnProperty("du1")) + if (message.du1 != null && Object.hasOwnProperty.call(message, "du1")) if (!$util.isString(message.du1)) return "du1: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.du8 != null && message.hasOwnProperty("du8")) { + if (message.du8 != null && Object.hasOwnProperty.call(message, "du8")) { let error = $root.Tokens.DeviceToken.verify(message.du8, long + 1); if (error) return "du8." + error; } - if (message.fromUserId != null && message.hasOwnProperty("fromUserId")) + if (message.fromUserId != null && Object.hasOwnProperty.call(message, "fromUserId")) if (!$util.isInteger(message.fromUserId)) return "fromUserId: integer expected"; - if (message.forUserId != null && message.hasOwnProperty("forUserId")) + if (message.forUserId != null && Object.hasOwnProperty.call(message, "forUserId")) if (!$util.isInteger(message.forUserId)) return "forUserId: integer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.du2 != null && message.hasOwnProperty("du2")) { + if (message.du2 != null && Object.hasOwnProperty.call(message, "du2")) { let error = $root.Tokens.LicenseToken.verify(message.du2, long + 1); if (error) return "du2." + error; } - if (message.du3 != null && message.hasOwnProperty("du3")) { + if (message.du3 != null && Object.hasOwnProperty.call(message, "du3")) { let error = $root.Tokens.LicenseToken.verify(message.du3, long + 1); if (error) return "du3." + error; } - if (message.du4 != null && message.hasOwnProperty("du4")) { + if (message.du4 != null && Object.hasOwnProperty.call(message, "du4")) { let error = $root.Tokens.LicenseToken.verify(message.du4, long + 1); if (error) return "du4." + error; } - if (message.du5 != null && message.hasOwnProperty("du5")) { + if (message.du5 != null && Object.hasOwnProperty.call(message, "du5")) { let error = $root.Tokens.LicenseToken.verify(message.du5, long + 1); if (error) return "du5." + error; } - if (message.du6 != null && message.hasOwnProperty("du6")) + if (message.du6 != null && Object.hasOwnProperty.call(message, "du6")) switch (message.du6) { default: return "du6: enum value expected"; @@ -201488,10 +202660,10 @@ export const Tokens = $root.Tokens = (() => { case 2: break; } - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) if (!$util.isInteger(message.clientVersionId)) return "clientVersionId: integer expected"; - if (message.sessionTokenType != null && message.hasOwnProperty("sessionTokenType")) + if (message.sessionTokenType != null && Object.hasOwnProperty.call(message, "sessionTokenType")) switch (message.sessionTokenType) { default: return "sessionTokenType: enum value expected"; @@ -201509,28 +202681,28 @@ export const Tokens = $root.Tokens = (() => { case 11: break; } - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; - if (message.du7 != null && message.hasOwnProperty("du7")) + if (message.du7 != null && Object.hasOwnProperty.call(message, "du7")) if (typeof message.du7 !== "boolean") return "du7: boolean expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.loginSessionId != null && message.hasOwnProperty("loginSessionId")) + if (message.loginSessionId != null && Object.hasOwnProperty.call(message, "loginSessionId")) if (!$util.isInteger(message.loginSessionId) && !(message.loginSessionId && $util.isInteger(message.loginSessionId.low) && $util.isInteger(message.loginSessionId.high))) return "loginSessionId: integer|Long expected"; - if (message.clientTypeId != null && message.hasOwnProperty("clientTypeId")) + if (message.clientTypeId != null && Object.hasOwnProperty.call(message, "clientTypeId")) if (!$util.isInteger(message.clientTypeId)) return "clientTypeId: integer expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isInteger(message.ipAddress) && !(message.ipAddress && $util.isInteger(message.ipAddress.low) && $util.isInteger(message.ipAddress.high))) return "ipAddress: integer|Long expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) if (typeof message.latitude !== "number") return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) if (typeof message.longitude !== "number") return "longitude: number expected"; return null; @@ -201547,6 +202719,8 @@ export const Tokens = $root.Tokens = (() => { SessionToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SessionToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SessionToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -201578,7 +202752,7 @@ export const Tokens = $root.Tokens = (() => { else if (object.messageSessionUid.length >= 0) message.messageSessionUid = object.messageSessionUid; if (object.du8 != null) { - if (typeof object.du8 !== "object") + if (!$util.isObject(object.du8)) throw TypeError(".Tokens.SessionToken.du8: object expected"); message.du8 = $root.Tokens.DeviceToken.fromObject(object.du8, long + 1); } @@ -201596,22 +202770,22 @@ export const Tokens = $root.Tokens = (() => { else if (typeof object.enterpriseUserId === "object") message.enterpriseUserId = new $util.LongBits(object.enterpriseUserId.low >>> 0, object.enterpriseUserId.high >>> 0).toNumber(); if (object.du2 != null) { - if (typeof object.du2 !== "object") + if (!$util.isObject(object.du2)) throw TypeError(".Tokens.SessionToken.du2: object expected"); message.du2 = $root.Tokens.LicenseToken.fromObject(object.du2, long + 1); } if (object.du3 != null) { - if (typeof object.du3 !== "object") + if (!$util.isObject(object.du3)) throw TypeError(".Tokens.SessionToken.du3: object expected"); message.du3 = $root.Tokens.LicenseToken.fromObject(object.du3, long + 1); } if (object.du4 != null) { - if (typeof object.du4 !== "object") + if (!$util.isObject(object.du4)) throw TypeError(".Tokens.SessionToken.du4: object expected"); message.du4 = $root.Tokens.LicenseToken.fromObject(object.du4, long + 1); } if (object.du5 != null) { - if (typeof object.du5 !== "object") + if (!$util.isObject(object.du5)) throw TypeError(".Tokens.SessionToken.du5: object expected"); message.du5 = $root.Tokens.LicenseToken.fromObject(object.du5, long + 1); } @@ -201805,81 +202979,81 @@ export const Tokens = $root.Tokens = (() => { object.latitude = 0; object.longitude = 0; } - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.du1 != null && message.hasOwnProperty("du1")) + if (message.du1 != null && Object.hasOwnProperty.call(message, "du1")) object.du1 = message.du1; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.du8 != null && message.hasOwnProperty("du8")) + if (message.du8 != null && Object.hasOwnProperty.call(message, "du8")) object.du8 = $root.Tokens.DeviceToken.toObject(message.du8, options, q + 1); - if (message.fromUserId != null && message.hasOwnProperty("fromUserId")) + if (message.fromUserId != null && Object.hasOwnProperty.call(message, "fromUserId")) object.fromUserId = message.fromUserId; - if (message.forUserId != null && message.hasOwnProperty("forUserId")) + if (message.forUserId != null && Object.hasOwnProperty.call(message, "forUserId")) object.forUserId = message.forUserId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.du2 != null && message.hasOwnProperty("du2")) + if (message.du2 != null && Object.hasOwnProperty.call(message, "du2")) object.du2 = $root.Tokens.LicenseToken.toObject(message.du2, options, q + 1); - if (message.du3 != null && message.hasOwnProperty("du3")) + if (message.du3 != null && Object.hasOwnProperty.call(message, "du3")) object.du3 = $root.Tokens.LicenseToken.toObject(message.du3, options, q + 1); - if (message.du4 != null && message.hasOwnProperty("du4")) + if (message.du4 != null && Object.hasOwnProperty.call(message, "du4")) object.du4 = $root.Tokens.LicenseToken.toObject(message.du4, options, q + 1); - if (message.du6 != null && message.hasOwnProperty("du6")) + if (message.du6 != null && Object.hasOwnProperty.call(message, "du6")) object.du6 = options.enums === String ? $root.Authentication.AccountType[message.du6] === undefined ? message.du6 : $root.Authentication.AccountType[message.du6] : message.du6; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) object.clientVersionId = message.clientVersionId; - if (message.sessionTokenType != null && message.hasOwnProperty("sessionTokenType")) + if (message.sessionTokenType != null && Object.hasOwnProperty.call(message, "sessionTokenType")) object.sessionTokenType = options.enums === String ? $root.Authentication.SessionTokenType[message.sessionTokenType] === undefined ? message.sessionTokenType : $root.Authentication.SessionTokenType[message.sessionTokenType] : message.sessionTokenType; - if (message.du5 != null && message.hasOwnProperty("du5")) + if (message.du5 != null && Object.hasOwnProperty.call(message, "du5")) object.du5 = $root.Tokens.LicenseToken.toObject(message.du5, options, q + 1); - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; - if (message.du7 != null && message.hasOwnProperty("du7")) + if (message.du7 != null && Object.hasOwnProperty.call(message, "du7")) object.du7 = message.du7; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.loginSessionId != null && message.hasOwnProperty("loginSessionId")) + if (message.loginSessionId != null && Object.hasOwnProperty.call(message, "loginSessionId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.loginSessionId = typeof message.loginSessionId === "number" ? BigInt(message.loginSessionId) : $util.Long.fromBits(message.loginSessionId.low >>> 0, message.loginSessionId.high >>> 0, false).toBigInt(); else if (typeof message.loginSessionId === "number") object.loginSessionId = options.longs === String ? String(message.loginSessionId) : message.loginSessionId; else object.loginSessionId = options.longs === String ? $util.Long.prototype.toString.call(message.loginSessionId) : options.longs === Number ? new $util.LongBits(message.loginSessionId.low >>> 0, message.loginSessionId.high >>> 0).toNumber() : message.loginSessionId; - if (message.clientTypeId != null && message.hasOwnProperty("clientTypeId")) + if (message.clientTypeId != null && Object.hasOwnProperty.call(message, "clientTypeId")) object.clientTypeId = message.clientTypeId; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ipAddress = typeof message.ipAddress === "number" ? BigInt(message.ipAddress) : $util.Long.fromBits(message.ipAddress.low >>> 0, message.ipAddress.high >>> 0, false).toBigInt(); else if (typeof message.ipAddress === "number") object.ipAddress = options.longs === String ? String(message.ipAddress) : message.ipAddress; else object.ipAddress = options.longs === String ? $util.Long.prototype.toString.call(message.ipAddress) : options.longs === Number ? new $util.LongBits(message.ipAddress.low >>> 0, message.ipAddress.high >>> 0).toNumber() : message.ipAddress; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; @@ -201999,7 +203173,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ UserLicenseStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -202073,7 +203247,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.licenseType != null && message.hasOwnProperty("licenseType")) + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) switch (message.licenseType) { default: return "licenseType: enum value expected"; @@ -202083,7 +203257,7 @@ export const Tokens = $root.Tokens = (() => { case 3: break; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; return null; @@ -202100,6 +203274,8 @@ export const Tokens = $root.Tokens = (() => { UserLicenseStatus.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.UserLicenseStatus) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.UserLicenseStatus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -202166,9 +203342,9 @@ export const Tokens = $root.Tokens = (() => { } else object.expiration = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.licenseType != null && message.hasOwnProperty("licenseType")) + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) object.licenseType = options.enums === String ? $root.Authentication.LicenseType[message.licenseType] === undefined ? message.licenseType : $root.Authentication.LicenseType[message.licenseType] : message.licenseType; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") @@ -202282,7 +203458,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ CheckOutTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -202352,7 +203528,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.checkOutToken != null && message.hasOwnProperty("checkOutToken")) + if (message.checkOutToken != null && Object.hasOwnProperty.call(message, "checkOutToken")) if (!$util.isString(message.checkOutToken)) return "checkOutToken: string expected"; return null; @@ -202369,6 +203545,8 @@ export const Tokens = $root.Tokens = (() => { CheckOutTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.CheckOutTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.CheckOutTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -202398,7 +203576,7 @@ export const Tokens = $root.Tokens = (() => { let object = {}; if (options.defaults) object.checkOutToken = ""; - if (message.checkOutToken != null && message.hasOwnProperty("checkOutToken")) + if (message.checkOutToken != null && Object.hasOwnProperty.call(message, "checkOutToken")) object.checkOutToken = message.checkOutToken; return object; }; @@ -202529,7 +203707,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ImporterToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -202607,13 +203785,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.importId != null && message.hasOwnProperty("importId")) + if (message.importId != null && Object.hasOwnProperty.call(message, "importId")) if (!$util.isInteger(message.importId)) return "importId: integer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.region != null && message.hasOwnProperty("region")) + if (message.region != null && Object.hasOwnProperty.call(message, "region")) if (!$util.isString(message.region)) return "region: string expected"; return null; @@ -202630,6 +203808,8 @@ export const Tokens = $root.Tokens = (() => { ImporterToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ImporterToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ImporterToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -202666,11 +203846,11 @@ export const Tokens = $root.Tokens = (() => { object.userId = 0; object.region = ""; } - if (message.importId != null && message.hasOwnProperty("importId")) + if (message.importId != null && Object.hasOwnProperty.call(message, "importId")) object.importId = message.importId; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.region != null && message.hasOwnProperty("region")) + if (message.region != null && Object.hasOwnProperty.call(message, "region")) object.region = message.region; return object; }; @@ -202834,7 +204014,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ApiDecryptedRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -202924,15 +204104,15 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.decryptedTransmissionKey != null && message.hasOwnProperty("decryptedTransmissionKey")) + if (message.decryptedTransmissionKey != null && Object.hasOwnProperty.call(message, "decryptedTransmissionKey")) if (!(message.decryptedTransmissionKey && typeof message.decryptedTransmissionKey.length === "number" || $util.isString(message.decryptedTransmissionKey))) return "decryptedTransmissionKey: buffer expected"; - if (message.apiRequestPayload != null && message.hasOwnProperty("apiRequestPayload")) { + if (message.apiRequestPayload != null && Object.hasOwnProperty.call(message, "apiRequestPayload")) { let error = $root.Authentication.ApiRequestPayload.verify(message.apiRequestPayload, long + 1); if (error) return "apiRequestPayload." + error; } - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -202961,13 +204141,13 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.recaptcha != null && message.hasOwnProperty("recaptcha")) + if (message.recaptcha != null && Object.hasOwnProperty.call(message, "recaptcha")) if (!$util.isString(message.recaptcha)) return "recaptcha: string expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) if (!$util.isString(message.userAgent)) return "userAgent: string expected"; - if (message.subEnvironment != null && message.hasOwnProperty("subEnvironment")) + if (message.subEnvironment != null && Object.hasOwnProperty.call(message, "subEnvironment")) if (!$util.isString(message.subEnvironment)) return "subEnvironment: string expected"; return null; @@ -202984,6 +204164,8 @@ export const Tokens = $root.Tokens = (() => { ApiDecryptedRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ApiDecryptedRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ApiDecryptedRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -202995,7 +204177,7 @@ export const Tokens = $root.Tokens = (() => { else if (object.decryptedTransmissionKey.length >= 0) message.decryptedTransmissionKey = object.decryptedTransmissionKey; if (object.apiRequestPayload != null) { - if (typeof object.apiRequestPayload !== "object") + if (!$util.isObject(object.apiRequestPayload)) throw TypeError(".Tokens.ApiDecryptedRequest.apiRequestPayload: object expected"); message.apiRequestPayload = $root.Authentication.ApiRequestPayload.fromObject(object.apiRequestPayload, long + 1); } @@ -203139,17 +204321,17 @@ export const Tokens = $root.Tokens = (() => { object.userAgent = ""; object.subEnvironment = ""; } - if (message.decryptedTransmissionKey != null && message.hasOwnProperty("decryptedTransmissionKey")) + if (message.decryptedTransmissionKey != null && Object.hasOwnProperty.call(message, "decryptedTransmissionKey")) object.decryptedTransmissionKey = options.bytes === String ? $util.base64.encode(message.decryptedTransmissionKey, 0, message.decryptedTransmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.decryptedTransmissionKey) : message.decryptedTransmissionKey; - if (message.apiRequestPayload != null && message.hasOwnProperty("apiRequestPayload")) + if (message.apiRequestPayload != null && Object.hasOwnProperty.call(message, "apiRequestPayload")) object.apiRequestPayload = $root.Authentication.ApiRequestPayload.toObject(message.apiRequestPayload, options, q + 1); - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.recaptcha != null && message.hasOwnProperty("recaptcha")) + if (message.recaptcha != null && Object.hasOwnProperty.call(message, "recaptcha")) object.recaptcha = message.recaptcha; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) object.userAgent = message.userAgent; - if (message.subEnvironment != null && message.hasOwnProperty("subEnvironment")) + if (message.subEnvironment != null && Object.hasOwnProperty.call(message, "subEnvironment")) object.subEnvironment = message.subEnvironment; return object; }; @@ -203313,7 +204495,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ChangeEmailToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -203403,13 +204585,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.newEmail != null && message.hasOwnProperty("newEmail")) + if (message.newEmail != null && Object.hasOwnProperty.call(message, "newEmail")) if (!$util.isString(message.newEmail)) return "newEmail: string expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -203438,13 +204620,13 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) if (!$util.isInteger(message.clientVersionId)) return "clientVersionId: integer expected"; return null; @@ -203461,6 +204643,8 @@ export const Tokens = $root.Tokens = (() => { ChangeEmailToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ChangeEmailToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ChangeEmailToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -203626,27 +204810,27 @@ export const Tokens = $root.Tokens = (() => { object.creation = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.clientVersionId = 0; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.newEmail != null && message.hasOwnProperty("newEmail")) + if (message.newEmail != null && Object.hasOwnProperty.call(message, "newEmail")) object.newEmail = message.newEmail; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) object.clientVersionId = message.clientVersionId; return object; }; @@ -203799,7 +204983,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EmailVerificationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -203885,19 +205069,19 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.du1 != null && message.hasOwnProperty("du1")) + if (message.du1 != null && Object.hasOwnProperty.call(message, "du1")) if (!$util.isString(message.du1)) return "du1: string expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.du2 != null && message.hasOwnProperty("du2")) + if (message.du2 != null && Object.hasOwnProperty.call(message, "du2")) if (!$util.isInteger(message.du2) && !(message.du2 && $util.isInteger(message.du2.low) && $util.isInteger(message.du2.high))) return "du2: integer|Long expected"; return null; @@ -203914,6 +205098,8 @@ export const Tokens = $root.Tokens = (() => { EmailVerificationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EmailVerificationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EmailVerificationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -203978,20 +205164,20 @@ export const Tokens = $root.Tokens = (() => { } else object.du2 = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.du1 != null && message.hasOwnProperty("du1")) + if (message.du1 != null && Object.hasOwnProperty.call(message, "du1")) object.du1 = message.du1; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.du2 != null && message.hasOwnProperty("du2")) + if (message.du2 != null && Object.hasOwnProperty.call(message, "du2")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.du2 = typeof message.du2 === "number" ? BigInt(message.du2) : $util.Long.fromBits(message.du2.low >>> 0, message.du2.high >>> 0, false).toBigInt(); else if (typeof message.du2 === "number") @@ -204182,7 +205368,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ IpAddressVerificationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -204280,28 +205466,28 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (!$util.isInteger(message.ssoServiceProviderId) && !(message.ssoServiceProviderId && $util.isInteger(message.ssoServiceProviderId.low) && $util.isInteger(message.ssoServiceProviderId.high))) return "ssoServiceProviderId: integer|Long expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.du1 != null && message.hasOwnProperty("du1")) + if (message.du1 != null && Object.hasOwnProperty.call(message, "du1")) if (!$util.isString(message.du1)) return "du1: string expected"; - if (message.du2 != null && message.hasOwnProperty("du2")) + if (message.du2 != null && Object.hasOwnProperty.call(message, "du2")) if (!$util.isInteger(message.du2) && !(message.du2 && $util.isInteger(message.du2.low) && $util.isInteger(message.du2.high))) return "du2: integer|Long expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; return null; @@ -204318,6 +205504,8 @@ export const Tokens = $root.Tokens = (() => { IpAddressVerificationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.IpAddressVerificationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.IpAddressVerificationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -204402,31 +205590,31 @@ export const Tokens = $root.Tokens = (() => { } else object.deviceId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.ssoServiceProviderId != null && message.hasOwnProperty("ssoServiceProviderId")) + if (message.ssoServiceProviderId != null && Object.hasOwnProperty.call(message, "ssoServiceProviderId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ssoServiceProviderId = typeof message.ssoServiceProviderId === "number" ? BigInt(message.ssoServiceProviderId) : $util.Long.fromBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0, false).toBigInt(); else if (typeof message.ssoServiceProviderId === "number") object.ssoServiceProviderId = options.longs === String ? String(message.ssoServiceProviderId) : message.ssoServiceProviderId; else object.ssoServiceProviderId = options.longs === String ? $util.Long.prototype.toString.call(message.ssoServiceProviderId) : options.longs === Number ? new $util.LongBits(message.ssoServiceProviderId.low >>> 0, message.ssoServiceProviderId.high >>> 0).toNumber() : message.ssoServiceProviderId; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.du1 != null && message.hasOwnProperty("du1")) + if (message.du1 != null && Object.hasOwnProperty.call(message, "du1")) object.du1 = message.du1; - if (message.du2 != null && message.hasOwnProperty("du2")) + if (message.du2 != null && Object.hasOwnProperty.call(message, "du2")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.du2 = typeof message.du2 === "number" ? BigInt(message.du2) : $util.Long.fromBits(message.du2.low >>> 0, message.du2.high >>> 0, false).toBigInt(); else if (typeof message.du2 === "number") object.du2 = options.longs === String ? String(message.du2) : message.du2; else object.du2 = options.longs === String ? $util.Long.prototype.toString.call(message.du2) : options.longs === Number ? new $util.LongBits(message.du2.low >>> 0, message.du2.high >>> 0).toNumber() : message.du2; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") @@ -204595,7 +205783,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterprisePersonalAccountToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -204685,13 +205873,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -204720,13 +205908,13 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) if (!$util.isInteger(message.duration) && !(message.duration && $util.isInteger(message.duration.low) && $util.isInteger(message.duration.high))) return "duration: integer|Long expected"; - if (message.referralName != null && message.hasOwnProperty("referralName")) + if (message.referralName != null && Object.hasOwnProperty.call(message, "referralName")) if (!$util.isString(message.referralName)) return "referralName: string expected"; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; return null; @@ -204743,6 +205931,8 @@ export const Tokens = $root.Tokens = (() => { EnterprisePersonalAccountToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterprisePersonalAccountToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterprisePersonalAccountToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -204919,27 +206109,27 @@ export const Tokens = $root.Tokens = (() => { } else object.creation = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.duration = typeof message.duration === "number" ? BigInt(message.duration) : $util.Long.fromBits(message.duration.low >>> 0, message.duration.high >>> 0, false).toBigInt(); else if (typeof message.duration === "number") object.duration = options.longs === String ? String(message.duration) : message.duration; else object.duration = options.longs === String ? $util.Long.prototype.toString.call(message.duration) : options.longs === Number ? new $util.LongBits(message.duration.low >>> 0, message.duration.high >>> 0).toNumber() : message.duration; - if (message.referralName != null && message.hasOwnProperty("referralName")) + if (message.referralName != null && Object.hasOwnProperty.call(message, "referralName")) object.referralName = message.referralName; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") @@ -205119,7 +206309,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ UsernameVerificationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -205213,13 +206403,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -205248,16 +206438,16 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) if (!$util.isInteger(message.clientVersionId)) return "clientVersionId: integer expected"; - if (message.alternateUsername != null && message.hasOwnProperty("alternateUsername")) + if (message.alternateUsername != null && Object.hasOwnProperty.call(message, "alternateUsername")) if (!$util.isString(message.alternateUsername)) return "alternateUsername: string expected"; - if (message.toUsername != null && message.hasOwnProperty("toUsername")) + if (message.toUsername != null && Object.hasOwnProperty.call(message, "toUsername")) if (!$util.isString(message.toUsername)) return "toUsername: string expected"; return null; @@ -205274,6 +206464,8 @@ export const Tokens = $root.Tokens = (() => { UsernameVerificationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.UsernameVerificationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.UsernameVerificationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -205440,24 +206632,24 @@ export const Tokens = $root.Tokens = (() => { object.alternateUsername = ""; object.toUsername = ""; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) object.clientVersionId = message.clientVersionId; - if (message.alternateUsername != null && message.hasOwnProperty("alternateUsername")) + if (message.alternateUsername != null && Object.hasOwnProperty.call(message, "alternateUsername")) object.alternateUsername = message.alternateUsername; - if (message.toUsername != null && message.hasOwnProperty("toUsername")) + if (message.toUsername != null && Object.hasOwnProperty.call(message, "toUsername")) object.toUsername = message.toUsername; return object; }; @@ -205643,7 +206835,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ DeviceVerificationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -205741,19 +206933,19 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -205782,13 +206974,13 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; return null; @@ -205805,6 +206997,8 @@ export const Tokens = $root.Tokens = (() => { DeviceVerificationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.DeviceVerificationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.DeviceVerificationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -205994,31 +207188,31 @@ export const Tokens = $root.Tokens = (() => { } object.ipAddress = ""; } - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; return object; }; @@ -206182,7 +207376,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ReActivateDeviceApprovalRequestToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -206272,22 +207466,22 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.fromUsername != null && message.hasOwnProperty("fromUsername")) + if (message.fromUsername != null && Object.hasOwnProperty.call(message, "fromUsername")) if (!$util.isString(message.fromUsername)) return "fromUsername: string expected"; - if (message.forUsername != null && message.hasOwnProperty("forUsername")) + if (message.forUsername != null && Object.hasOwnProperty.call(message, "forUsername")) if (!$util.isString(message.forUsername)) return "forUsername: string expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.requestTimeStamp != null && message.hasOwnProperty("requestTimeStamp")) + if (message.requestTimeStamp != null && Object.hasOwnProperty.call(message, "requestTimeStamp")) if (!$util.isInteger(message.requestTimeStamp) && !(message.requestTimeStamp && $util.isInteger(message.requestTimeStamp.low) && $util.isInteger(message.requestTimeStamp.high))) return "requestTimeStamp: integer|Long expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -206330,6 +207524,8 @@ export const Tokens = $root.Tokens = (() => { ReActivateDeviceApprovalRequestToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ReActivateDeviceApprovalRequestToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ReActivateDeviceApprovalRequestToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -206504,27 +207700,27 @@ export const Tokens = $root.Tokens = (() => { object.requestTimeStamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.supportedLanguage = options.enums === String ? "ENGLISH" : 0; } - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.fromUsername != null && message.hasOwnProperty("fromUsername")) + if (message.fromUsername != null && Object.hasOwnProperty.call(message, "fromUsername")) object.fromUsername = message.fromUsername; - if (message.forUsername != null && message.hasOwnProperty("forUsername")) + if (message.forUsername != null && Object.hasOwnProperty.call(message, "forUsername")) object.forUsername = message.forUsername; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.requestTimeStamp != null && message.hasOwnProperty("requestTimeStamp")) + if (message.requestTimeStamp != null && Object.hasOwnProperty.call(message, "requestTimeStamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.requestTimeStamp = typeof message.requestTimeStamp === "number" ? BigInt(message.requestTimeStamp) : $util.Long.fromBits(message.requestTimeStamp.low >>> 0, message.requestTimeStamp.high >>> 0, false).toBigInt(); else if (typeof message.requestTimeStamp === "number") object.requestTimeStamp = options.longs === String ? String(message.requestTimeStamp) : message.requestTimeStamp; else object.requestTimeStamp = options.longs === String ? $util.Long.prototype.toString.call(message.requestTimeStamp) : options.longs === Number ? new $util.LongBits(message.requestTimeStamp.low >>> 0, message.requestTimeStamp.high >>> 0).toNumber() : message.requestTimeStamp; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; return object; }; @@ -206699,7 +207895,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ CreateUserToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -206793,16 +207989,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.createUserRequestId != null && message.hasOwnProperty("createUserRequestId")) + if (message.createUserRequestId != null && Object.hasOwnProperty.call(message, "createUserRequestId")) if (!$util.isInteger(message.createUserRequestId)) return "createUserRequestId: integer expected"; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) if (!$util.isString(message.verificationCode)) return "verificationCode: string expected"; - if (message.requestTimeStamp != null && message.hasOwnProperty("requestTimeStamp")) + if (message.requestTimeStamp != null && Object.hasOwnProperty.call(message, "requestTimeStamp")) if (!$util.isInteger(message.requestTimeStamp) && !(message.requestTimeStamp && $util.isInteger(message.requestTimeStamp.low) && $util.isInteger(message.requestTimeStamp.high))) return "requestTimeStamp: integer|Long expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -206831,13 +208027,13 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.remoteAddress != null && message.hasOwnProperty("remoteAddress")) + if (message.remoteAddress != null && Object.hasOwnProperty.call(message, "remoteAddress")) if (!$util.isString(message.remoteAddress)) return "remoteAddress: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; return null; @@ -206854,6 +208050,8 @@ export const Tokens = $root.Tokens = (() => { CreateUserToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.CreateUserToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.CreateUserToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -207031,24 +208229,24 @@ export const Tokens = $root.Tokens = (() => { } else object.deviceId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.createUserRequestId != null && message.hasOwnProperty("createUserRequestId")) + if (message.createUserRequestId != null && Object.hasOwnProperty.call(message, "createUserRequestId")) object.createUserRequestId = message.createUserRequestId; - if (message.verificationCode != null && message.hasOwnProperty("verificationCode")) + if (message.verificationCode != null && Object.hasOwnProperty.call(message, "verificationCode")) object.verificationCode = message.verificationCode; - if (message.requestTimeStamp != null && message.hasOwnProperty("requestTimeStamp")) + if (message.requestTimeStamp != null && Object.hasOwnProperty.call(message, "requestTimeStamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.requestTimeStamp = typeof message.requestTimeStamp === "number" ? BigInt(message.requestTimeStamp) : $util.Long.fromBits(message.requestTimeStamp.low >>> 0, message.requestTimeStamp.high >>> 0, false).toBigInt(); else if (typeof message.requestTimeStamp === "number") object.requestTimeStamp = options.longs === String ? String(message.requestTimeStamp) : message.requestTimeStamp; else object.requestTimeStamp = options.longs === String ? $util.Long.prototype.toString.call(message.requestTimeStamp) : options.longs === Number ? new $util.LongBits(message.requestTimeStamp.low >>> 0, message.requestTimeStamp.high >>> 0).toNumber() : message.requestTimeStamp; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.remoteAddress != null && message.hasOwnProperty("remoteAddress")) + if (message.remoteAddress != null && Object.hasOwnProperty.call(message, "remoteAddress")) object.remoteAddress = message.remoteAddress; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") @@ -207206,7 +208404,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ DeleteUserToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -207292,19 +208490,19 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userIdForDelete != null && message.hasOwnProperty("userIdForDelete")) + if (message.userIdForDelete != null && Object.hasOwnProperty.call(message, "userIdForDelete")) if (!$util.isInteger(message.userIdForDelete)) return "userIdForDelete: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) if (!$util.isString(message.reason)) return "reason: string expected"; - if (message.requestTimeStamp != null && message.hasOwnProperty("requestTimeStamp")) + if (message.requestTimeStamp != null && Object.hasOwnProperty.call(message, "requestTimeStamp")) if (!$util.isInteger(message.requestTimeStamp) && !(message.requestTimeStamp && $util.isInteger(message.requestTimeStamp.low) && $util.isInteger(message.requestTimeStamp.high))) return "requestTimeStamp: integer|Long expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -207347,6 +208545,8 @@ export const Tokens = $root.Tokens = (() => { DeleteUserToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.DeleteUserToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.DeleteUserToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -207498,20 +208698,20 @@ export const Tokens = $root.Tokens = (() => { object.requestTimeStamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.supportedLanguage = options.enums === String ? "ENGLISH" : 0; } - if (message.userIdForDelete != null && message.hasOwnProperty("userIdForDelete")) + if (message.userIdForDelete != null && Object.hasOwnProperty.call(message, "userIdForDelete")) object.userIdForDelete = message.userIdForDelete; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) object.reason = message.reason; - if (message.requestTimeStamp != null && message.hasOwnProperty("requestTimeStamp")) + if (message.requestTimeStamp != null && Object.hasOwnProperty.call(message, "requestTimeStamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.requestTimeStamp = typeof message.requestTimeStamp === "number" ? BigInt(message.requestTimeStamp) : $util.Long.fromBits(message.requestTimeStamp.low >>> 0, message.requestTimeStamp.high >>> 0, false).toBigInt(); else if (typeof message.requestTimeStamp === "number") object.requestTimeStamp = options.longs === String ? String(message.requestTimeStamp) : message.requestTimeStamp; else object.requestTimeStamp = options.longs === String ? $util.Long.prototype.toString.call(message.requestTimeStamp) : options.longs === Number ? new $util.LongBits(message.requestTimeStamp.low >>> 0, message.requestTimeStamp.high >>> 0).toNumber() : message.requestTimeStamp; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; return object; }; @@ -207692,7 +208892,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ProcessToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -207778,7 +208978,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.processTokenType != null && message.hasOwnProperty("processTokenType")) + if (message.processTokenType != null && Object.hasOwnProperty.call(message, "processTokenType")) switch (message.processTokenType) { default: return "processTokenType: enum value expected"; @@ -207793,13 +208993,13 @@ export const Tokens = $root.Tokens = (() => { case 8: break; } - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) switch (message.supportedLanguage) { default: return "supportedLanguage: enum value expected"; @@ -207828,7 +209028,7 @@ export const Tokens = $root.Tokens = (() => { case 22: break; } - if (message.subEnvironment != null && message.hasOwnProperty("subEnvironment")) + if (message.subEnvironment != null && Object.hasOwnProperty.call(message, "subEnvironment")) if (!$util.isString(message.subEnvironment)) return "subEnvironment: string expected"; return null; @@ -207845,6 +209045,8 @@ export const Tokens = $root.Tokens = (() => { ProcessToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ProcessToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ProcessToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -208047,20 +209249,20 @@ export const Tokens = $root.Tokens = (() => { object.supportedLanguage = options.enums === String ? "ENGLISH" : 0; object.subEnvironment = ""; } - if (message.processTokenType != null && message.hasOwnProperty("processTokenType")) + if (message.processTokenType != null && Object.hasOwnProperty.call(message, "processTokenType")) object.processTokenType = options.enums === String ? $root.Tokens.ProcessTokenType[message.processTokenType] === undefined ? message.processTokenType : $root.Tokens.ProcessTokenType[message.processTokenType] : message.processTokenType; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") object.creation = options.longs === String ? String(message.creation) : message.creation; else object.creation = options.longs === String ? $util.Long.prototype.toString.call(message.creation) : options.longs === Number ? new $util.LongBits(message.creation.low >>> 0, message.creation.high >>> 0).toNumber() : message.creation; - if (message.supportedLanguage != null && message.hasOwnProperty("supportedLanguage")) + if (message.supportedLanguage != null && Object.hasOwnProperty.call(message, "supportedLanguage")) object.supportedLanguage = options.enums === String ? $root.Authentication.SupportedLanguage[message.supportedLanguage] === undefined ? message.supportedLanguage : $root.Authentication.SupportedLanguage[message.supportedLanguage] : message.supportedLanguage; - if (message.subEnvironment != null && message.hasOwnProperty("subEnvironment")) + if (message.subEnvironment != null && Object.hasOwnProperty.call(message, "subEnvironment")) object.subEnvironment = message.subEnvironment; return object; }; @@ -208216,7 +209418,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseDataContinuationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -208298,7 +209500,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startType != null && message.hasOwnProperty("startType")) + if (message.startType != null && Object.hasOwnProperty.call(message, "startType")) switch (message.startType) { default: return "startType: enum value expected"; @@ -208306,15 +209508,15 @@ export const Tokens = $root.Tokens = (() => { case 1: break; } - if (message.processedUpToTransactionId != null && message.hasOwnProperty("processedUpToTransactionId")) + if (message.processedUpToTransactionId != null && Object.hasOwnProperty.call(message, "processedUpToTransactionId")) if (!$util.isInteger(message.processedUpToTransactionId) && !(message.processedUpToTransactionId && $util.isInteger(message.processedUpToTransactionId.low) && $util.isInteger(message.processedUpToTransactionId.high))) return "processedUpToTransactionId: integer|Long expected"; - if (message.position != null && message.hasOwnProperty("position")) { + if (message.position != null && Object.hasOwnProperty.call(message, "position")) { let error = $root.Tokens.Position.verify(message.position, long + 1); if (error) return "position." + error; } - if (message.lastProcessedTime != null && message.hasOwnProperty("lastProcessedTime")) + if (message.lastProcessedTime != null && Object.hasOwnProperty.call(message, "lastProcessedTime")) if (!$util.isString(message.lastProcessedTime)) return "lastProcessedTime: string expected"; return null; @@ -208331,6 +209533,8 @@ export const Tokens = $root.Tokens = (() => { EnterpriseDataContinuationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterpriseDataContinuationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterpriseDataContinuationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -208362,7 +209566,7 @@ export const Tokens = $root.Tokens = (() => { else if (typeof object.processedUpToTransactionId === "object") message.processedUpToTransactionId = new $util.LongBits(object.processedUpToTransactionId.low >>> 0, object.processedUpToTransactionId.high >>> 0).toNumber(); if (object.position != null) { - if (typeof object.position !== "object") + if (!$util.isObject(object.position)) throw TypeError(".Tokens.EnterpriseDataContinuationToken.position: object expected"); message.position = $root.Tokens.Position.fromObject(object.position, long + 1); } @@ -208398,18 +209602,18 @@ export const Tokens = $root.Tokens = (() => { object.position = null; object.lastProcessedTime = ""; } - if (message.startType != null && message.hasOwnProperty("startType")) + if (message.startType != null && Object.hasOwnProperty.call(message, "startType")) object.startType = options.enums === String ? $root.Tokens.PageTokenType[message.startType] === undefined ? message.startType : $root.Tokens.PageTokenType[message.startType] : message.startType; - if (message.processedUpToTransactionId != null && message.hasOwnProperty("processedUpToTransactionId")) + if (message.processedUpToTransactionId != null && Object.hasOwnProperty.call(message, "processedUpToTransactionId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.processedUpToTransactionId = typeof message.processedUpToTransactionId === "number" ? BigInt(message.processedUpToTransactionId) : $util.Long.fromBits(message.processedUpToTransactionId.low >>> 0, message.processedUpToTransactionId.high >>> 0, false).toBigInt(); else if (typeof message.processedUpToTransactionId === "number") object.processedUpToTransactionId = options.longs === String ? String(message.processedUpToTransactionId) : message.processedUpToTransactionId; else object.processedUpToTransactionId = options.longs === String ? $util.Long.prototype.toString.call(message.processedUpToTransactionId) : options.longs === Number ? new $util.LongBits(message.processedUpToTransactionId.low >>> 0, message.processedUpToTransactionId.high >>> 0).toNumber() : message.processedUpToTransactionId; - if (message.position != null && message.hasOwnProperty("position")) + if (message.position != null && Object.hasOwnProperty.call(message, "position")) object.position = $root.Tokens.Position.toObject(message.position, options, q + 1); - if (message.lastProcessedTime != null && message.hasOwnProperty("lastProcessedTime")) + if (message.lastProcessedTime != null && Object.hasOwnProperty.call(message, "lastProcessedTime")) object.lastProcessedTime = message.lastProcessedTime; return object; }; @@ -208662,7 +209866,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ Position.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -208740,7 +209944,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entity != null && message.hasOwnProperty("entity")) + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) switch (message.entity) { default: return "entity: enum value expected"; @@ -208770,10 +209974,10 @@ export const Tokens = $root.Tokens = (() => { case 23: break; } - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) if (!(message.location && typeof message.location.length === "number" || $util.isString(message.location))) return "location: buffer expected"; return null; @@ -208790,6 +209994,8 @@ export const Tokens = $root.Tokens = (() => { Position.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.Position) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.Position: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -208948,16 +210154,16 @@ export const Tokens = $root.Tokens = (() => { object.location = $util.newBuffer(object.location); } } - if (message.entity != null && message.hasOwnProperty("entity")) + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) object.entity = options.enums === String ? $root.Enterprise.EnterpriseDataEntity[message.entity] === undefined ? message.entity : $root.Enterprise.EnterpriseDataEntity[message.entity] : message.entity; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) object.location = options.bytes === String ? $util.base64.encode(message.location, 0, message.location.length) : options.bytes === Array ? Array.prototype.slice.call(message.location) : message.location; return object; }; @@ -209066,7 +210272,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationL.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -209136,7 +210342,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; return null; @@ -209153,6 +210359,8 @@ export const Tokens = $root.Tokens = (() => { LocationL.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationL) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationL: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -209193,7 +210401,7 @@ export const Tokens = $root.Tokens = (() => { object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.id = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id = typeof message.id === "number" ? BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, false).toBigInt(); else if (typeof message.id === "number") @@ -209318,7 +210526,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationLL.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -209392,10 +210600,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (!$util.isInteger(message.id1) && !(message.id1 && $util.isInteger(message.id1.low) && $util.isInteger(message.id1.high))) return "id1: integer|Long expected"; - if (message.id2 != null && message.hasOwnProperty("id2")) + if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) if (!$util.isInteger(message.id2) && !(message.id2 && $util.isInteger(message.id2.low) && $util.isInteger(message.id2.high))) return "id2: integer|Long expected"; return null; @@ -209412,6 +210620,8 @@ export const Tokens = $root.Tokens = (() => { LocationLL.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationLL) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationLL: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -209467,14 +210677,14 @@ export const Tokens = $root.Tokens = (() => { } else object.id2 = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id1 = typeof message.id1 === "number" ? BigInt(message.id1) : $util.Long.fromBits(message.id1.low >>> 0, message.id1.high >>> 0, false).toBigInt(); else if (typeof message.id1 === "number") object.id1 = options.longs === String ? String(message.id1) : message.id1; else object.id1 = options.longs === String ? $util.Long.prototype.toString.call(message.id1) : options.longs === Number ? new $util.LongBits(message.id1.low >>> 0, message.id1.high >>> 0).toNumber() : message.id1; - if (message.id2 != null && message.hasOwnProperty("id2")) + if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id2 = typeof message.id2 === "number" ? BigInt(message.id2) : $util.Long.fromBits(message.id2.low >>> 0, message.id2.high >>> 0, false).toBigInt(); else if (typeof message.id2 === "number") @@ -209599,7 +210809,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationLI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -209673,10 +210883,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (!$util.isInteger(message.id1) && !(message.id1 && $util.isInteger(message.id1.low) && $util.isInteger(message.id1.high))) return "id1: integer|Long expected"; - if (message.id2 != null && message.hasOwnProperty("id2")) + if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) if (!$util.isInteger(message.id2)) return "id2: integer expected"; return null; @@ -209693,6 +210903,8 @@ export const Tokens = $root.Tokens = (() => { LocationLI.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationLI) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationLI: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -209737,14 +210949,14 @@ export const Tokens = $root.Tokens = (() => { object.id1 = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.id2 = 0; } - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id1 = typeof message.id1 === "number" ? BigInt(message.id1) : $util.Long.fromBits(message.id1.low >>> 0, message.id1.high >>> 0, false).toBigInt(); else if (typeof message.id1 === "number") object.id1 = options.longs === String ? String(message.id1) : message.id1; else object.id1 = options.longs === String ? $util.Long.prototype.toString.call(message.id1) : options.longs === Number ? new $util.LongBits(message.id1.low >>> 0, message.id1.high >>> 0).toNumber() : message.id1; - if (message.id2 != null && message.hasOwnProperty("id2")) + if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) object.id2 = message.id2; return object; }; @@ -209864,7 +211076,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationII.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -209938,10 +211150,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (!$util.isInteger(message.id1)) return "id1: integer expected"; - if (message.id2 != null && message.hasOwnProperty("id2")) + if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) if (!$util.isInteger(message.id2)) return "id2: integer expected"; return null; @@ -209958,6 +211170,8 @@ export const Tokens = $root.Tokens = (() => { LocationII.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationII) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationII: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -209991,9 +211205,9 @@ export const Tokens = $root.Tokens = (() => { object.id1 = 0; object.id2 = 0; } - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) object.id1 = message.id1; - if (message.id2 != null && message.hasOwnProperty("id2")) + if (message.id2 != null && Object.hasOwnProperty.call(message, "id2")) object.id2 = message.id2; return object; }; @@ -210102,7 +211316,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationB.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -210172,7 +211386,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; return null; @@ -210189,6 +211403,8 @@ export const Tokens = $root.Tokens = (() => { LocationB.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationB) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationB: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -210227,7 +211443,7 @@ export const Tokens = $root.Tokens = (() => { if (options.bytes !== Array) object.uid = $util.newBuffer(object.uid); } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; return object; }; @@ -210347,7 +211563,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationLB.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -210421,10 +211637,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; return null; @@ -210441,6 +211657,8 @@ export const Tokens = $root.Tokens = (() => { LocationLB.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationLB) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationLB: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -210494,14 +211712,14 @@ export const Tokens = $root.Tokens = (() => { object.uid = $util.newBuffer(object.uid); } } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id = typeof message.id === "number" ? BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, false).toBigInt(); else if (typeof message.id === "number") object.id = options.longs === String ? String(message.id) : message.id; else object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; return object; }; @@ -210621,7 +211839,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationBI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -210695,10 +211913,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; return null; @@ -210715,6 +211933,8 @@ export const Tokens = $root.Tokens = (() => { LocationBI.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationBI) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationBI: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -210757,9 +211977,9 @@ export const Tokens = $root.Tokens = (() => { } object.id = 0; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; return object; }; @@ -210879,7 +212099,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ LocationLS.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -210953,10 +212173,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (!$util.isInteger(message.id1) && !(message.id1 && $util.isInteger(message.id1.low) && $util.isInteger(message.id1.high))) return "id1: integer|Long expected"; - if (message.str != null && message.hasOwnProperty("str")) + if (message.str != null && Object.hasOwnProperty.call(message, "str")) if (!$util.isString(message.str)) return "str: string expected"; return null; @@ -210973,6 +212193,8 @@ export const Tokens = $root.Tokens = (() => { LocationLS.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.LocationLS) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.LocationLS: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -211017,14 +212239,14 @@ export const Tokens = $root.Tokens = (() => { object.id1 = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.str = ""; } - if (message.id1 != null && message.hasOwnProperty("id1")) + if (message.id1 != null && Object.hasOwnProperty.call(message, "id1")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.id1 = typeof message.id1 === "number" ? BigInt(message.id1) : $util.Long.fromBits(message.id1.low >>> 0, message.id1.high >>> 0, false).toBigInt(); else if (typeof message.id1 === "number") object.id1 = options.longs === String ? String(message.id1) : message.id1; else object.id1 = options.longs === String ? $util.Long.prototype.toString.call(message.id1) : options.longs === Number ? new $util.LongBits(message.id1.low >>> 0, message.id1.high >>> 0).toNumber() : message.id1; - if (message.str != null && message.hasOwnProperty("str")) + if (message.str != null && Object.hasOwnProperty.call(message, "str")) object.str = message.str; return object; }; @@ -211155,7 +212377,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseDataRoleTeamsPageToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -211233,13 +212455,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.lastNodeId != null && message.hasOwnProperty("lastNodeId")) + if (message.lastNodeId != null && Object.hasOwnProperty.call(message, "lastNodeId")) if (!$util.isInteger(message.lastNodeId) && !(message.lastNodeId && $util.isInteger(message.lastNodeId.low) && $util.isInteger(message.lastNodeId.high))) return "lastNodeId: integer|Long expected"; - if (message.lastRoleId != null && message.hasOwnProperty("lastRoleId")) + if (message.lastRoleId != null && Object.hasOwnProperty.call(message, "lastRoleId")) if (!$util.isInteger(message.lastRoleId) && !(message.lastRoleId && $util.isInteger(message.lastRoleId.low) && $util.isInteger(message.lastRoleId.high))) return "lastRoleId: integer|Long expected"; - if (message.lastTeamUid != null && message.hasOwnProperty("lastTeamUid")) + if (message.lastTeamUid != null && Object.hasOwnProperty.call(message, "lastTeamUid")) if (!(message.lastTeamUid && typeof message.lastTeamUid.length === "number" || $util.isString(message.lastTeamUid))) return "lastTeamUid: buffer expected"; return null; @@ -211256,6 +212478,8 @@ export const Tokens = $root.Tokens = (() => { EnterpriseDataRoleTeamsPageToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterpriseDataRoleTeamsPageToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterpriseDataRoleTeamsPageToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -211323,21 +212547,21 @@ export const Tokens = $root.Tokens = (() => { object.lastTeamUid = $util.newBuffer(object.lastTeamUid); } } - if (message.lastNodeId != null && message.hasOwnProperty("lastNodeId")) + if (message.lastNodeId != null && Object.hasOwnProperty.call(message, "lastNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastNodeId = typeof message.lastNodeId === "number" ? BigInt(message.lastNodeId) : $util.Long.fromBits(message.lastNodeId.low >>> 0, message.lastNodeId.high >>> 0, false).toBigInt(); else if (typeof message.lastNodeId === "number") object.lastNodeId = options.longs === String ? String(message.lastNodeId) : message.lastNodeId; else object.lastNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.lastNodeId) : options.longs === Number ? new $util.LongBits(message.lastNodeId.low >>> 0, message.lastNodeId.high >>> 0).toNumber() : message.lastNodeId; - if (message.lastRoleId != null && message.hasOwnProperty("lastRoleId")) + if (message.lastRoleId != null && Object.hasOwnProperty.call(message, "lastRoleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastRoleId = typeof message.lastRoleId === "number" ? BigInt(message.lastRoleId) : $util.Long.fromBits(message.lastRoleId.low >>> 0, message.lastRoleId.high >>> 0, false).toBigInt(); else if (typeof message.lastRoleId === "number") object.lastRoleId = options.longs === String ? String(message.lastRoleId) : message.lastRoleId; else object.lastRoleId = options.longs === String ? $util.Long.prototype.toString.call(message.lastRoleId) : options.longs === Number ? new $util.LongBits(message.lastRoleId.low >>> 0, message.lastRoleId.high >>> 0).toNumber() : message.lastRoleId; - if (message.lastTeamUid != null && message.hasOwnProperty("lastTeamUid")) + if (message.lastTeamUid != null && Object.hasOwnProperty.call(message, "lastTeamUid")) object.lastTeamUid = options.bytes === String ? $util.base64.encode(message.lastTeamUid, 0, message.lastTeamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastTeamUid) : message.lastTeamUid; return object; }; @@ -211457,7 +212681,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseDataTeamsPageToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -211531,10 +212755,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.lastNodeId != null && message.hasOwnProperty("lastNodeId")) + if (message.lastNodeId != null && Object.hasOwnProperty.call(message, "lastNodeId")) if (!$util.isInteger(message.lastNodeId) && !(message.lastNodeId && $util.isInteger(message.lastNodeId.low) && $util.isInteger(message.lastNodeId.high))) return "lastNodeId: integer|Long expected"; - if (message.lastTeamUid != null && message.hasOwnProperty("lastTeamUid")) + if (message.lastTeamUid != null && Object.hasOwnProperty.call(message, "lastTeamUid")) if (!(message.lastTeamUid && typeof message.lastTeamUid.length === "number" || $util.isString(message.lastTeamUid))) return "lastTeamUid: buffer expected"; return null; @@ -211551,6 +212775,8 @@ export const Tokens = $root.Tokens = (() => { EnterpriseDataTeamsPageToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterpriseDataTeamsPageToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterpriseDataTeamsPageToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -211604,14 +212830,14 @@ export const Tokens = $root.Tokens = (() => { object.lastTeamUid = $util.newBuffer(object.lastTeamUid); } } - if (message.lastNodeId != null && message.hasOwnProperty("lastNodeId")) + if (message.lastNodeId != null && Object.hasOwnProperty.call(message, "lastNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastNodeId = typeof message.lastNodeId === "number" ? BigInt(message.lastNodeId) : $util.Long.fromBits(message.lastNodeId.low >>> 0, message.lastNodeId.high >>> 0, false).toBigInt(); else if (typeof message.lastNodeId === "number") object.lastNodeId = options.longs === String ? String(message.lastNodeId) : message.lastNodeId; else object.lastNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.lastNodeId) : options.longs === Number ? new $util.LongBits(message.lastNodeId.low >>> 0, message.lastNodeId.high >>> 0).toNumber() : message.lastNodeId; - if (message.lastTeamUid != null && message.hasOwnProperty("lastTeamUid")) + if (message.lastTeamUid != null && Object.hasOwnProperty.call(message, "lastTeamUid")) object.lastTeamUid = options.bytes === String ? $util.base64.encode(message.lastTeamUid, 0, message.lastTeamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastTeamUid) : message.lastTeamUid; return object; }; @@ -211742,7 +212968,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseDataTeamUsersPageToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -211820,13 +213046,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.lastNodeId != null && message.hasOwnProperty("lastNodeId")) + if (message.lastNodeId != null && Object.hasOwnProperty.call(message, "lastNodeId")) if (!$util.isInteger(message.lastNodeId) && !(message.lastNodeId && $util.isInteger(message.lastNodeId.low) && $util.isInteger(message.lastNodeId.high))) return "lastNodeId: integer|Long expected"; - if (message.lastTeamUid != null && message.hasOwnProperty("lastTeamUid")) + if (message.lastTeamUid != null && Object.hasOwnProperty.call(message, "lastTeamUid")) if (!(message.lastTeamUid && typeof message.lastTeamUid.length === "number" || $util.isString(message.lastTeamUid))) return "lastTeamUid: buffer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; return null; @@ -211843,6 +213069,8 @@ export const Tokens = $root.Tokens = (() => { EnterpriseDataTeamUsersPageToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterpriseDataTeamUsersPageToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterpriseDataTeamUsersPageToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -211899,16 +213127,16 @@ export const Tokens = $root.Tokens = (() => { } object.userId = 0; } - if (message.lastNodeId != null && message.hasOwnProperty("lastNodeId")) + if (message.lastNodeId != null && Object.hasOwnProperty.call(message, "lastNodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastNodeId = typeof message.lastNodeId === "number" ? BigInt(message.lastNodeId) : $util.Long.fromBits(message.lastNodeId.low >>> 0, message.lastNodeId.high >>> 0, false).toBigInt(); else if (typeof message.lastNodeId === "number") object.lastNodeId = options.longs === String ? String(message.lastNodeId) : message.lastNodeId; else object.lastNodeId = options.longs === String ? $util.Long.prototype.toString.call(message.lastNodeId) : options.longs === Number ? new $util.LongBits(message.lastNodeId.low >>> 0, message.lastNodeId.high >>> 0).toNumber() : message.lastNodeId; - if (message.lastTeamUid != null && message.hasOwnProperty("lastTeamUid")) + if (message.lastTeamUid != null && Object.hasOwnProperty.call(message, "lastTeamUid")) object.lastTeamUid = options.bytes === String ? $util.base64.encode(message.lastTeamUid, 0, message.lastTeamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastTeamUid) : message.lastTeamUid; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; return object; }; @@ -212068,7 +213296,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseBackupUnlockPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -212150,16 +213378,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.user1Id != null && message.hasOwnProperty("user1Id")) + if (message.user1Id != null && Object.hasOwnProperty.call(message, "user1Id")) if (!$util.isInteger(message.user1Id)) return "user1Id: integer expected"; - if (message.user2Id != null && message.hasOwnProperty("user2Id")) + if (message.user2Id != null && Object.hasOwnProperty.call(message, "user2Id")) if (!$util.isInteger(message.user2Id)) return "user2Id: integer expected"; - if (message.user1Key != null && message.hasOwnProperty("user1Key")) + if (message.user1Key != null && Object.hasOwnProperty.call(message, "user1Key")) if (!(message.user1Key && typeof message.user1Key.length === "number" || $util.isString(message.user1Key))) return "user1Key: buffer expected"; - if (message.user2Key != null && message.hasOwnProperty("user2Key")) + if (message.user2Key != null && Object.hasOwnProperty.call(message, "user2Key")) if (!(message.user2Key && typeof message.user2Key.length === "number" || $util.isString(message.user2Key))) return "user2Key: buffer expected"; return null; @@ -212176,6 +213404,8 @@ export const Tokens = $root.Tokens = (() => { EnterpriseBackupUnlockPair.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterpriseBackupUnlockPair) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterpriseBackupUnlockPair: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -212233,13 +213463,13 @@ export const Tokens = $root.Tokens = (() => { object.user2Key = $util.newBuffer(object.user2Key); } } - if (message.user1Id != null && message.hasOwnProperty("user1Id")) + if (message.user1Id != null && Object.hasOwnProperty.call(message, "user1Id")) object.user1Id = message.user1Id; - if (message.user2Id != null && message.hasOwnProperty("user2Id")) + if (message.user2Id != null && Object.hasOwnProperty.call(message, "user2Id")) object.user2Id = message.user2Id; - if (message.user1Key != null && message.hasOwnProperty("user1Key")) + if (message.user1Key != null && Object.hasOwnProperty.call(message, "user1Key")) object.user1Key = options.bytes === String ? $util.base64.encode(message.user1Key, 0, message.user1Key.length) : options.bytes === Array ? Array.prototype.slice.call(message.user1Key) : message.user1Key; - if (message.user2Key != null && message.hasOwnProperty("user2Key")) + if (message.user2Key != null && Object.hasOwnProperty.call(message, "user2Key")) object.user2Key = options.bytes === String ? $util.base64.encode(message.user2Key, 0, message.user2Key.length) : options.bytes === Array ? Array.prototype.slice.call(message.user2Key) : message.user2Key; return object; }; @@ -212394,7 +213624,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseBackupContinuationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -212482,10 +213712,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.backupKey != null && message.hasOwnProperty("backupKey")) + if (message.backupKey != null && Object.hasOwnProperty.call(message, "backupKey")) if (!(message.backupKey && typeof message.backupKey.length === "number" || $util.isString(message.backupKey))) return "backupKey: buffer expected"; - if (message.unlockPairs != null && message.hasOwnProperty("unlockPairs")) { + if (message.unlockPairs != null && Object.hasOwnProperty.call(message, "unlockPairs")) { if (!Array.isArray(message.unlockPairs)) return "unlockPairs: array expected"; for (let i = 0; i < message.unlockPairs.length; ++i) { @@ -212494,7 +213724,7 @@ export const Tokens = $root.Tokens = (() => { return "unlockPairs." + error; } } - if (message.backupStage != null && message.hasOwnProperty("backupStage")) + if (message.backupStage != null && Object.hasOwnProperty.call(message, "backupStage")) switch (message.backupStage) { default: return "backupStage: enum value expected"; @@ -212504,10 +213734,10 @@ export const Tokens = $root.Tokens = (() => { case 3: break; } - if (message.startUser != null && message.hasOwnProperty("startUser")) + if (message.startUser != null && Object.hasOwnProperty.call(message, "startUser")) if (!$util.isInteger(message.startUser) && !(message.startUser && $util.isInteger(message.startUser.low) && $util.isInteger(message.startUser.high))) return "startUser: integer|Long expected"; - if (message.startRecord != null && message.hasOwnProperty("startRecord")) + if (message.startRecord != null && Object.hasOwnProperty.call(message, "startRecord")) if (!(message.startRecord && typeof message.startRecord.length === "number" || $util.isString(message.startRecord))) return "startRecord: buffer expected"; return null; @@ -212524,6 +213754,8 @@ export const Tokens = $root.Tokens = (() => { EnterpriseBackupContinuationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.EnterpriseBackupContinuationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.EnterpriseBackupContinuationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -212539,7 +213771,7 @@ export const Tokens = $root.Tokens = (() => { throw TypeError(".Tokens.EnterpriseBackupContinuationToken.unlockPairs: array expected"); message.unlockPairs = []; for (let i = 0; i < object.unlockPairs.length; ++i) { - if (typeof object.unlockPairs[i] !== "object") + if (!$util.isObject(object.unlockPairs[i])) throw TypeError(".Tokens.EnterpriseBackupContinuationToken.unlockPairs: object expected"); message.unlockPairs[i] = $root.Tokens.EnterpriseBackupUnlockPair.fromObject(object.unlockPairs[i], long + 1); } @@ -212626,23 +213858,23 @@ export const Tokens = $root.Tokens = (() => { object.startRecord = $util.newBuffer(object.startRecord); } } - if (message.backupKey != null && message.hasOwnProperty("backupKey")) + if (message.backupKey != null && Object.hasOwnProperty.call(message, "backupKey")) object.backupKey = options.bytes === String ? $util.base64.encode(message.backupKey, 0, message.backupKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.backupKey) : message.backupKey; if (message.unlockPairs && message.unlockPairs.length) { object.unlockPairs = []; for (let j = 0; j < message.unlockPairs.length; ++j) object.unlockPairs[j] = $root.Tokens.EnterpriseBackupUnlockPair.toObject(message.unlockPairs[j], options, q + 1); } - if (message.backupStage != null && message.hasOwnProperty("backupStage")) + if (message.backupStage != null && Object.hasOwnProperty.call(message, "backupStage")) object.backupStage = options.enums === String ? $root.Tokens.EnterpriseBackupStage[message.backupStage] === undefined ? message.backupStage : $root.Tokens.EnterpriseBackupStage[message.backupStage] : message.backupStage; - if (message.startUser != null && message.hasOwnProperty("startUser")) + if (message.startUser != null && Object.hasOwnProperty.call(message, "startUser")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startUser = typeof message.startUser === "number" ? BigInt(message.startUser) : $util.Long.fromBits(message.startUser.low >>> 0, message.startUser.high >>> 0, false).toBigInt(); else if (typeof message.startUser === "number") object.startUser = options.longs === String ? String(message.startUser) : message.startUser; else object.startUser = options.longs === String ? $util.Long.prototype.toString.call(message.startUser) : options.longs === Number ? new $util.LongBits(message.startUser.low >>> 0, message.startUser.high >>> 0).toNumber() : message.startUser; - if (message.startRecord != null && message.hasOwnProperty("startRecord")) + if (message.startRecord != null && Object.hasOwnProperty.call(message, "startRecord")) object.startRecord = options.bytes === String ? $util.base64.encode(message.startRecord, 0, message.startRecord.length) : options.bytes === Array ? Array.prototype.slice.call(message.startRecord) : message.startRecord; return object; }; @@ -212784,7 +214016,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ VerificationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -212866,16 +214098,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.regionId != null && message.hasOwnProperty("regionId")) + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) if (!$util.isInteger(message.regionId)) return "regionId: integer expected"; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (!$util.isInteger(message.creation) && !(message.creation && $util.isInteger(message.creation.low) && $util.isInteger(message.creation.high))) return "creation: integer|Long expected"; return null; @@ -212892,6 +214124,8 @@ export const Tokens = $root.Tokens = (() => { VerificationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.VerificationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.VerificationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -212951,13 +214185,13 @@ export const Tokens = $root.Tokens = (() => { } else object.creation = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.regionId != null && message.hasOwnProperty("regionId")) + if (message.regionId != null && Object.hasOwnProperty.call(message, "regionId")) object.regionId = message.regionId; - if (message.creation != null && message.hasOwnProperty("creation")) + if (message.creation != null && Object.hasOwnProperty.call(message, "creation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.creation = typeof message.creation === "number" ? BigInt(message.creation) : $util.Long.fromBits(message.creation.low >>> 0, message.creation.high >>> 0, false).toBigInt(); else if (typeof message.creation === "number") @@ -213107,7 +214341,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ComplianceDataContinuationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -213185,13 +214419,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && Object.hasOwnProperty.call(message, "source")) switch (message.source) { default: return "source: enum value expected"; @@ -213213,6 +214447,8 @@ export const Tokens = $root.Tokens = (() => { ComplianceDataContinuationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ComplianceDataContinuationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ComplianceDataContinuationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -213283,16 +214519,16 @@ export const Tokens = $root.Tokens = (() => { } object.source = options.enums === String ? "LEGACY" : 0; } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && Object.hasOwnProperty.call(message, "source")) object.source = options.enums === String ? $root.Tokens.AuditRecordSource[message.source] === undefined ? message.source : $root.Tokens.AuditRecordSource[message.source] : message.source; return object; }; @@ -213544,7 +214780,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ VaultSyncDownContinuationToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -213666,48 +214902,48 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tokenVersion != null && message.hasOwnProperty("tokenVersion")) + if (message.tokenVersion != null && Object.hasOwnProperty.call(message, "tokenVersion")) if (!$util.isInteger(message.tokenVersion)) return "tokenVersion: integer expected"; - if (message.syncedToSyncOrder != null && message.hasOwnProperty("syncedToSyncOrder")) + if (message.syncedToSyncOrder != null && Object.hasOwnProperty.call(message, "syncedToSyncOrder")) if (!$util.isInteger(message.syncedToSyncOrder) && !(message.syncedToSyncOrder && $util.isInteger(message.syncedToSyncOrder.low) && $util.isInteger(message.syncedToSyncOrder.high))) return "syncedToSyncOrder: integer|Long expected"; - if (message.syncingToSyncOrder != null && message.hasOwnProperty("syncingToSyncOrder")) + if (message.syncingToSyncOrder != null && Object.hasOwnProperty.call(message, "syncingToSyncOrder")) if (!$util.isInteger(message.syncingToSyncOrder) && !(message.syncingToSyncOrder && $util.isInteger(message.syncingToSyncOrder.low) && $util.isInteger(message.syncingToSyncOrder.high))) return "syncingToSyncOrder: integer|Long expected"; - if (message.tokenGenerated != null && message.hasOwnProperty("tokenGenerated")) + if (message.tokenGenerated != null && Object.hasOwnProperty.call(message, "tokenGenerated")) if (!$util.isInteger(message.tokenGenerated)) return "tokenGenerated: integer expected"; - if (message.lastFullSyncCompleted != null && message.hasOwnProperty("lastFullSyncCompleted")) + if (message.lastFullSyncCompleted != null && Object.hasOwnProperty.call(message, "lastFullSyncCompleted")) if (!$util.isInteger(message.lastFullSyncCompleted)) return "lastFullSyncCompleted: integer expected"; - if (message.locations != null && message.hasOwnProperty("locations")) { + if (message.locations != null && Object.hasOwnProperty.call(message, "locations")) { let error = $root.Tokens.VaultSyncDownLocations.verify(message.locations, long + 1); if (error) return "locations." + error; } - if (message.checkForAuditData != null && message.hasOwnProperty("checkForAuditData")) + if (message.checkForAuditData != null && Object.hasOwnProperty.call(message, "checkForAuditData")) if (typeof message.checkForAuditData !== "boolean") return "checkForAuditData: boolean expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isInteger(message.clientVersion)) return "clientVersion: integer expected"; - if (message.clientDataVersion != null && message.hasOwnProperty("clientDataVersion")) + if (message.clientDataVersion != null && Object.hasOwnProperty.call(message, "clientDataVersion")) if (!$util.isInteger(message.clientDataVersion)) return "clientDataVersion: integer expected"; - if (message.noRemovedSharedFoldersWithTeamAccess != null && message.hasOwnProperty("noRemovedSharedFoldersWithTeamAccess")) + if (message.noRemovedSharedFoldersWithTeamAccess != null && Object.hasOwnProperty.call(message, "noRemovedSharedFoldersWithTeamAccess")) if (typeof message.noRemovedSharedFoldersWithTeamAccess !== "boolean") return "noRemovedSharedFoldersWithTeamAccess: boolean expected"; - if (message.notificationSyncPoint != null && message.hasOwnProperty("notificationSyncPoint")) + if (message.notificationSyncPoint != null && Object.hasOwnProperty.call(message, "notificationSyncPoint")) if (!$util.isInteger(message.notificationSyncPoint) && !(message.notificationSyncPoint && $util.isInteger(message.notificationSyncPoint.low) && $util.isInteger(message.notificationSyncPoint.high))) return "notificationSyncPoint: integer|Long expected"; - if (message.skipUserRevision != null && message.hasOwnProperty("skipUserRevision")) + if (message.skipUserRevision != null && Object.hasOwnProperty.call(message, "skipUserRevision")) if (typeof message.skipUserRevision !== "boolean") return "skipUserRevision: boolean expected"; - if (message.multiPageIncrementalClientVersion != null && message.hasOwnProperty("multiPageIncrementalClientVersion")) + if (message.multiPageIncrementalClientVersion != null && Object.hasOwnProperty.call(message, "multiPageIncrementalClientVersion")) if (!$util.isInteger(message.multiPageIncrementalClientVersion)) return "multiPageIncrementalClientVersion: integer expected"; - if (message.dagSyncPoint != null && message.hasOwnProperty("dagSyncPoint")) + if (message.dagSyncPoint != null && Object.hasOwnProperty.call(message, "dagSyncPoint")) if (!$util.isInteger(message.dagSyncPoint) && !(message.dagSyncPoint && $util.isInteger(message.dagSyncPoint.low) && $util.isInteger(message.dagSyncPoint.high))) return "dagSyncPoint: integer|Long expected"; return null; @@ -213724,6 +214960,8 @@ export const Tokens = $root.Tokens = (() => { VaultSyncDownContinuationToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.VaultSyncDownContinuationToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.VaultSyncDownContinuationToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -213754,7 +214992,7 @@ export const Tokens = $root.Tokens = (() => { if (object.lastFullSyncCompleted != null) message.lastFullSyncCompleted = object.lastFullSyncCompleted | 0; if (object.locations != null) { - if (typeof object.locations !== "object") + if (!$util.isObject(object.locations)) throw TypeError(".Tokens.VaultSyncDownContinuationToken.locations: object expected"); message.locations = $root.Tokens.VaultSyncDownLocations.fromObject(object.locations, long + 1); } @@ -213840,48 +215078,48 @@ export const Tokens = $root.Tokens = (() => { } else object.dagSyncPoint = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.tokenVersion != null && message.hasOwnProperty("tokenVersion")) + if (message.tokenVersion != null && Object.hasOwnProperty.call(message, "tokenVersion")) object.tokenVersion = message.tokenVersion; - if (message.syncedToSyncOrder != null && message.hasOwnProperty("syncedToSyncOrder")) + if (message.syncedToSyncOrder != null && Object.hasOwnProperty.call(message, "syncedToSyncOrder")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncedToSyncOrder = typeof message.syncedToSyncOrder === "number" ? BigInt(message.syncedToSyncOrder) : $util.Long.fromBits(message.syncedToSyncOrder.low >>> 0, message.syncedToSyncOrder.high >>> 0, false).toBigInt(); else if (typeof message.syncedToSyncOrder === "number") object.syncedToSyncOrder = options.longs === String ? String(message.syncedToSyncOrder) : message.syncedToSyncOrder; else object.syncedToSyncOrder = options.longs === String ? $util.Long.prototype.toString.call(message.syncedToSyncOrder) : options.longs === Number ? new $util.LongBits(message.syncedToSyncOrder.low >>> 0, message.syncedToSyncOrder.high >>> 0).toNumber() : message.syncedToSyncOrder; - if (message.syncingToSyncOrder != null && message.hasOwnProperty("syncingToSyncOrder")) + if (message.syncingToSyncOrder != null && Object.hasOwnProperty.call(message, "syncingToSyncOrder")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncingToSyncOrder = typeof message.syncingToSyncOrder === "number" ? BigInt(message.syncingToSyncOrder) : $util.Long.fromBits(message.syncingToSyncOrder.low >>> 0, message.syncingToSyncOrder.high >>> 0, false).toBigInt(); else if (typeof message.syncingToSyncOrder === "number") object.syncingToSyncOrder = options.longs === String ? String(message.syncingToSyncOrder) : message.syncingToSyncOrder; else object.syncingToSyncOrder = options.longs === String ? $util.Long.prototype.toString.call(message.syncingToSyncOrder) : options.longs === Number ? new $util.LongBits(message.syncingToSyncOrder.low >>> 0, message.syncingToSyncOrder.high >>> 0).toNumber() : message.syncingToSyncOrder; - if (message.tokenGenerated != null && message.hasOwnProperty("tokenGenerated")) + if (message.tokenGenerated != null && Object.hasOwnProperty.call(message, "tokenGenerated")) object.tokenGenerated = message.tokenGenerated; - if (message.lastFullSyncCompleted != null && message.hasOwnProperty("lastFullSyncCompleted")) + if (message.lastFullSyncCompleted != null && Object.hasOwnProperty.call(message, "lastFullSyncCompleted")) object.lastFullSyncCompleted = message.lastFullSyncCompleted; - if (message.locations != null && message.hasOwnProperty("locations")) + if (message.locations != null && Object.hasOwnProperty.call(message, "locations")) object.locations = $root.Tokens.VaultSyncDownLocations.toObject(message.locations, options, q + 1); - if (message.checkForAuditData != null && message.hasOwnProperty("checkForAuditData")) + if (message.checkForAuditData != null && Object.hasOwnProperty.call(message, "checkForAuditData")) object.checkForAuditData = message.checkForAuditData; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.clientDataVersion != null && message.hasOwnProperty("clientDataVersion")) + if (message.clientDataVersion != null && Object.hasOwnProperty.call(message, "clientDataVersion")) object.clientDataVersion = message.clientDataVersion; - if (message.noRemovedSharedFoldersWithTeamAccess != null && message.hasOwnProperty("noRemovedSharedFoldersWithTeamAccess")) + if (message.noRemovedSharedFoldersWithTeamAccess != null && Object.hasOwnProperty.call(message, "noRemovedSharedFoldersWithTeamAccess")) object.noRemovedSharedFoldersWithTeamAccess = message.noRemovedSharedFoldersWithTeamAccess; - if (message.notificationSyncPoint != null && message.hasOwnProperty("notificationSyncPoint")) + if (message.notificationSyncPoint != null && Object.hasOwnProperty.call(message, "notificationSyncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.notificationSyncPoint = typeof message.notificationSyncPoint === "number" ? BigInt(message.notificationSyncPoint) : $util.Long.fromBits(message.notificationSyncPoint.low >>> 0, message.notificationSyncPoint.high >>> 0, false).toBigInt(); else if (typeof message.notificationSyncPoint === "number") object.notificationSyncPoint = options.longs === String ? String(message.notificationSyncPoint) : message.notificationSyncPoint; else object.notificationSyncPoint = options.longs === String ? $util.Long.prototype.toString.call(message.notificationSyncPoint) : options.longs === Number ? new $util.LongBits(message.notificationSyncPoint.low >>> 0, message.notificationSyncPoint.high >>> 0).toNumber() : message.notificationSyncPoint; - if (message.skipUserRevision != null && message.hasOwnProperty("skipUserRevision")) + if (message.skipUserRevision != null && Object.hasOwnProperty.call(message, "skipUserRevision")) object.skipUserRevision = message.skipUserRevision; - if (message.multiPageIncrementalClientVersion != null && message.hasOwnProperty("multiPageIncrementalClientVersion")) + if (message.multiPageIncrementalClientVersion != null && Object.hasOwnProperty.call(message, "multiPageIncrementalClientVersion")) object.multiPageIncrementalClientVersion = message.multiPageIncrementalClientVersion; - if (message.dagSyncPoint != null && message.hasOwnProperty("dagSyncPoint")) + if (message.dagSyncPoint != null && Object.hasOwnProperty.call(message, "dagSyncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dagSyncPoint = typeof message.dagSyncPoint === "number" ? BigInt(message.dagSyncPoint) : $util.Long.fromBits(message.dagSyncPoint.low >>> 0, message.dagSyncPoint.high >>> 0, false).toBigInt(); else if (typeof message.dagSyncPoint === "number") @@ -214160,7 +215398,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ VaultSyncDownLocations.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -214290,80 +215528,80 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.vaultDataEntity != null && message.hasOwnProperty("vaultDataEntity")) + if (message.vaultDataEntity != null && Object.hasOwnProperty.call(message, "vaultDataEntity")) if (!$util.isInteger(message.vaultDataEntity)) return "vaultDataEntity: integer expected"; - if (message.recordLocation != null && message.hasOwnProperty("recordLocation")) { + if (message.recordLocation != null && Object.hasOwnProperty.call(message, "recordLocation")) { let error = $root.Tokens.RecordLocation.verify(message.recordLocation, long + 1); if (error) return "recordLocation." + error; } - if (message.recordLinkLocation != null && message.hasOwnProperty("recordLinkLocation")) { + if (message.recordLinkLocation != null && Object.hasOwnProperty.call(message, "recordLinkLocation")) { let error = $root.Tokens.RecordLinkLocation.verify(message.recordLinkLocation, long + 1); if (error) return "recordLinkLocation." + error; } - if (message.folderLocation != null && message.hasOwnProperty("folderLocation")) { + if (message.folderLocation != null && Object.hasOwnProperty.call(message, "folderLocation")) { let error = $root.Tokens.FolderLocation.verify(message.folderLocation, long + 1); if (error) return "folderLocation." + error; } - if (message.folderRecordLocation != null && message.hasOwnProperty("folderRecordLocation")) { + if (message.folderRecordLocation != null && Object.hasOwnProperty.call(message, "folderRecordLocation")) { let error = $root.Tokens.FolderRecordLocation.verify(message.folderRecordLocation, long + 1); if (error) return "folderRecordLocation." + error; } - if (message.folderSharedFolderLocation != null && message.hasOwnProperty("folderSharedFolderLocation")) { + if (message.folderSharedFolderLocation != null && Object.hasOwnProperty.call(message, "folderSharedFolderLocation")) { let error = $root.Tokens.FolderSharedFolderLocation.verify(message.folderSharedFolderLocation, long + 1); if (error) return "folderSharedFolderLocation." + error; } - if (message.sharedFolderLocation != null && message.hasOwnProperty("sharedFolderLocation")) { + if (message.sharedFolderLocation != null && Object.hasOwnProperty.call(message, "sharedFolderLocation")) { let error = $root.Tokens.SharedFolderLocation.verify(message.sharedFolderLocation, long + 1); if (error) return "sharedFolderLocation." + error; } - if (message.sharedFolderRecordLocation != null && message.hasOwnProperty("sharedFolderRecordLocation")) { + if (message.sharedFolderRecordLocation != null && Object.hasOwnProperty.call(message, "sharedFolderRecordLocation")) { let error = $root.Tokens.SharedFolderRecordLocation.verify(message.sharedFolderRecordLocation, long + 1); if (error) return "sharedFolderRecordLocation." + error; } - if (message.sharedFolderTeamLocation != null && message.hasOwnProperty("sharedFolderTeamLocation")) { + if (message.sharedFolderTeamLocation != null && Object.hasOwnProperty.call(message, "sharedFolderTeamLocation")) { let error = $root.Tokens.SharedFolderTeamLocation.verify(message.sharedFolderTeamLocation, long + 1); if (error) return "sharedFolderTeamLocation." + error; } - if (message.sharedFolderUserLocation != null && message.hasOwnProperty("sharedFolderUserLocation")) { + if (message.sharedFolderUserLocation != null && Object.hasOwnProperty.call(message, "sharedFolderUserLocation")) { let error = $root.Tokens.SharedFolderUserLocation.verify(message.sharedFolderUserLocation, long + 1); if (error) return "sharedFolderUserLocation." + error; } - if (message.shareInvitationLocation != null && message.hasOwnProperty("shareInvitationLocation")) { + if (message.shareInvitationLocation != null && Object.hasOwnProperty.call(message, "shareInvitationLocation")) { let error = $root.Tokens.ShareInvitationLocation.verify(message.shareInvitationLocation, long + 1); if (error) return "shareInvitationLocation." + error; } - if (message.teamLocation != null && message.hasOwnProperty("teamLocation")) { + if (message.teamLocation != null && Object.hasOwnProperty.call(message, "teamLocation")) { let error = $root.Tokens.TeamLocation.verify(message.teamLocation, long + 1); if (error) return "teamLocation." + error; } - if (message.userAuthHashLocation != null && message.hasOwnProperty("userAuthHashLocation")) { + if (message.userAuthHashLocation != null && Object.hasOwnProperty.call(message, "userAuthHashLocation")) { let error = $root.Tokens.UserAuthHashLocation.verify(message.userAuthHashLocation, long + 1); if (error) return "userAuthHashLocation." + error; } - if (message.ksmLocation != null && message.hasOwnProperty("ksmLocation")) { + if (message.ksmLocation != null && Object.hasOwnProperty.call(message, "ksmLocation")) { let error = $root.Tokens.KsmLocation.verify(message.ksmLocation, long + 1); if (error) return "ksmLocation." + error; } - if (message.sharedFolderFolderRecordLocation != null && message.hasOwnProperty("sharedFolderFolderRecordLocation")) { + if (message.sharedFolderFolderRecordLocation != null && Object.hasOwnProperty.call(message, "sharedFolderFolderRecordLocation")) { let error = $root.Tokens.SharedFolderFolderRecordLocation.verify(message.sharedFolderFolderRecordLocation, long + 1); if (error) return "sharedFolderFolderRecordLocation." + error; } - if (message.userLocation != null && message.hasOwnProperty("userLocation")) { + if (message.userLocation != null && Object.hasOwnProperty.call(message, "userLocation")) { let error = $root.Tokens.UserLocation.verify(message.userLocation, long + 1); if (error) return "userLocation." + error; @@ -214382,6 +215620,8 @@ export const Tokens = $root.Tokens = (() => { VaultSyncDownLocations.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.VaultSyncDownLocations) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.VaultSyncDownLocations: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -214390,77 +215630,77 @@ export const Tokens = $root.Tokens = (() => { if (object.vaultDataEntity != null) message.vaultDataEntity = object.vaultDataEntity | 0; if (object.recordLocation != null) { - if (typeof object.recordLocation !== "object") + if (!$util.isObject(object.recordLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.recordLocation: object expected"); message.recordLocation = $root.Tokens.RecordLocation.fromObject(object.recordLocation, long + 1); } if (object.recordLinkLocation != null) { - if (typeof object.recordLinkLocation !== "object") + if (!$util.isObject(object.recordLinkLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.recordLinkLocation: object expected"); message.recordLinkLocation = $root.Tokens.RecordLinkLocation.fromObject(object.recordLinkLocation, long + 1); } if (object.folderLocation != null) { - if (typeof object.folderLocation !== "object") + if (!$util.isObject(object.folderLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.folderLocation: object expected"); message.folderLocation = $root.Tokens.FolderLocation.fromObject(object.folderLocation, long + 1); } if (object.folderRecordLocation != null) { - if (typeof object.folderRecordLocation !== "object") + if (!$util.isObject(object.folderRecordLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.folderRecordLocation: object expected"); message.folderRecordLocation = $root.Tokens.FolderRecordLocation.fromObject(object.folderRecordLocation, long + 1); } if (object.folderSharedFolderLocation != null) { - if (typeof object.folderSharedFolderLocation !== "object") + if (!$util.isObject(object.folderSharedFolderLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.folderSharedFolderLocation: object expected"); message.folderSharedFolderLocation = $root.Tokens.FolderSharedFolderLocation.fromObject(object.folderSharedFolderLocation, long + 1); } if (object.sharedFolderLocation != null) { - if (typeof object.sharedFolderLocation !== "object") + if (!$util.isObject(object.sharedFolderLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.sharedFolderLocation: object expected"); message.sharedFolderLocation = $root.Tokens.SharedFolderLocation.fromObject(object.sharedFolderLocation, long + 1); } if (object.sharedFolderRecordLocation != null) { - if (typeof object.sharedFolderRecordLocation !== "object") + if (!$util.isObject(object.sharedFolderRecordLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.sharedFolderRecordLocation: object expected"); message.sharedFolderRecordLocation = $root.Tokens.SharedFolderRecordLocation.fromObject(object.sharedFolderRecordLocation, long + 1); } if (object.sharedFolderTeamLocation != null) { - if (typeof object.sharedFolderTeamLocation !== "object") + if (!$util.isObject(object.sharedFolderTeamLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.sharedFolderTeamLocation: object expected"); message.sharedFolderTeamLocation = $root.Tokens.SharedFolderTeamLocation.fromObject(object.sharedFolderTeamLocation, long + 1); } if (object.sharedFolderUserLocation != null) { - if (typeof object.sharedFolderUserLocation !== "object") + if (!$util.isObject(object.sharedFolderUserLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.sharedFolderUserLocation: object expected"); message.sharedFolderUserLocation = $root.Tokens.SharedFolderUserLocation.fromObject(object.sharedFolderUserLocation, long + 1); } if (object.shareInvitationLocation != null) { - if (typeof object.shareInvitationLocation !== "object") + if (!$util.isObject(object.shareInvitationLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.shareInvitationLocation: object expected"); message.shareInvitationLocation = $root.Tokens.ShareInvitationLocation.fromObject(object.shareInvitationLocation, long + 1); } if (object.teamLocation != null) { - if (typeof object.teamLocation !== "object") + if (!$util.isObject(object.teamLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.teamLocation: object expected"); message.teamLocation = $root.Tokens.TeamLocation.fromObject(object.teamLocation, long + 1); } if (object.userAuthHashLocation != null) { - if (typeof object.userAuthHashLocation !== "object") + if (!$util.isObject(object.userAuthHashLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.userAuthHashLocation: object expected"); message.userAuthHashLocation = $root.Tokens.UserAuthHashLocation.fromObject(object.userAuthHashLocation, long + 1); } if (object.ksmLocation != null) { - if (typeof object.ksmLocation !== "object") + if (!$util.isObject(object.ksmLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.ksmLocation: object expected"); message.ksmLocation = $root.Tokens.KsmLocation.fromObject(object.ksmLocation, long + 1); } if (object.sharedFolderFolderRecordLocation != null) { - if (typeof object.sharedFolderFolderRecordLocation !== "object") + if (!$util.isObject(object.sharedFolderFolderRecordLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.sharedFolderFolderRecordLocation: object expected"); message.sharedFolderFolderRecordLocation = $root.Tokens.SharedFolderFolderRecordLocation.fromObject(object.sharedFolderFolderRecordLocation, long + 1); } if (object.userLocation != null) { - if (typeof object.userLocation !== "object") + if (!$util.isObject(object.userLocation)) throw TypeError(".Tokens.VaultSyncDownLocations.userLocation: object expected"); message.userLocation = $root.Tokens.UserLocation.fromObject(object.userLocation, long + 1); } @@ -214502,37 +215742,37 @@ export const Tokens = $root.Tokens = (() => { object.sharedFolderFolderRecordLocation = null; object.userLocation = null; } - if (message.vaultDataEntity != null && message.hasOwnProperty("vaultDataEntity")) + if (message.vaultDataEntity != null && Object.hasOwnProperty.call(message, "vaultDataEntity")) object.vaultDataEntity = message.vaultDataEntity; - if (message.recordLocation != null && message.hasOwnProperty("recordLocation")) + if (message.recordLocation != null && Object.hasOwnProperty.call(message, "recordLocation")) object.recordLocation = $root.Tokens.RecordLocation.toObject(message.recordLocation, options, q + 1); - if (message.recordLinkLocation != null && message.hasOwnProperty("recordLinkLocation")) + if (message.recordLinkLocation != null && Object.hasOwnProperty.call(message, "recordLinkLocation")) object.recordLinkLocation = $root.Tokens.RecordLinkLocation.toObject(message.recordLinkLocation, options, q + 1); - if (message.folderLocation != null && message.hasOwnProperty("folderLocation")) + if (message.folderLocation != null && Object.hasOwnProperty.call(message, "folderLocation")) object.folderLocation = $root.Tokens.FolderLocation.toObject(message.folderLocation, options, q + 1); - if (message.folderRecordLocation != null && message.hasOwnProperty("folderRecordLocation")) + if (message.folderRecordLocation != null && Object.hasOwnProperty.call(message, "folderRecordLocation")) object.folderRecordLocation = $root.Tokens.FolderRecordLocation.toObject(message.folderRecordLocation, options, q + 1); - if (message.folderSharedFolderLocation != null && message.hasOwnProperty("folderSharedFolderLocation")) + if (message.folderSharedFolderLocation != null && Object.hasOwnProperty.call(message, "folderSharedFolderLocation")) object.folderSharedFolderLocation = $root.Tokens.FolderSharedFolderLocation.toObject(message.folderSharedFolderLocation, options, q + 1); - if (message.sharedFolderLocation != null && message.hasOwnProperty("sharedFolderLocation")) + if (message.sharedFolderLocation != null && Object.hasOwnProperty.call(message, "sharedFolderLocation")) object.sharedFolderLocation = $root.Tokens.SharedFolderLocation.toObject(message.sharedFolderLocation, options, q + 1); - if (message.sharedFolderRecordLocation != null && message.hasOwnProperty("sharedFolderRecordLocation")) + if (message.sharedFolderRecordLocation != null && Object.hasOwnProperty.call(message, "sharedFolderRecordLocation")) object.sharedFolderRecordLocation = $root.Tokens.SharedFolderRecordLocation.toObject(message.sharedFolderRecordLocation, options, q + 1); - if (message.sharedFolderTeamLocation != null && message.hasOwnProperty("sharedFolderTeamLocation")) + if (message.sharedFolderTeamLocation != null && Object.hasOwnProperty.call(message, "sharedFolderTeamLocation")) object.sharedFolderTeamLocation = $root.Tokens.SharedFolderTeamLocation.toObject(message.sharedFolderTeamLocation, options, q + 1); - if (message.sharedFolderUserLocation != null && message.hasOwnProperty("sharedFolderUserLocation")) + if (message.sharedFolderUserLocation != null && Object.hasOwnProperty.call(message, "sharedFolderUserLocation")) object.sharedFolderUserLocation = $root.Tokens.SharedFolderUserLocation.toObject(message.sharedFolderUserLocation, options, q + 1); - if (message.shareInvitationLocation != null && message.hasOwnProperty("shareInvitationLocation")) + if (message.shareInvitationLocation != null && Object.hasOwnProperty.call(message, "shareInvitationLocation")) object.shareInvitationLocation = $root.Tokens.ShareInvitationLocation.toObject(message.shareInvitationLocation, options, q + 1); - if (message.teamLocation != null && message.hasOwnProperty("teamLocation")) + if (message.teamLocation != null && Object.hasOwnProperty.call(message, "teamLocation")) object.teamLocation = $root.Tokens.TeamLocation.toObject(message.teamLocation, options, q + 1); - if (message.userAuthHashLocation != null && message.hasOwnProperty("userAuthHashLocation")) + if (message.userAuthHashLocation != null && Object.hasOwnProperty.call(message, "userAuthHashLocation")) object.userAuthHashLocation = $root.Tokens.UserAuthHashLocation.toObject(message.userAuthHashLocation, options, q + 1); - if (message.ksmLocation != null && message.hasOwnProperty("ksmLocation")) + if (message.ksmLocation != null && Object.hasOwnProperty.call(message, "ksmLocation")) object.ksmLocation = $root.Tokens.KsmLocation.toObject(message.ksmLocation, options, q + 1); - if (message.sharedFolderFolderRecordLocation != null && message.hasOwnProperty("sharedFolderFolderRecordLocation")) + if (message.sharedFolderFolderRecordLocation != null && Object.hasOwnProperty.call(message, "sharedFolderFolderRecordLocation")) object.sharedFolderFolderRecordLocation = $root.Tokens.SharedFolderFolderRecordLocation.toObject(message.sharedFolderFolderRecordLocation, options, q + 1); - if (message.userLocation != null && message.hasOwnProperty("userLocation")) + if (message.userLocation != null && Object.hasOwnProperty.call(message, "userLocation")) object.userLocation = $root.Tokens.UserLocation.toObject(message.userLocation, options, q + 1); return object; }; @@ -214652,7 +215892,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ RecordLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -214726,10 +215966,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -214746,6 +215986,8 @@ export const Tokens = $root.Tokens = (() => { RecordLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.RecordLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.RecordLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -214799,9 +216041,9 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -214926,7 +216168,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ FolderLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -215000,10 +216242,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -215020,6 +216262,8 @@ export const Tokens = $root.Tokens = (() => { FolderLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.FolderLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.FolderLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -215073,9 +216317,9 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -215200,7 +216444,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -215274,10 +216518,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -215294,6 +216538,8 @@ export const Tokens = $root.Tokens = (() => { SharedFolderLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SharedFolderLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SharedFolderLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -215347,9 +216593,9 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -215496,7 +216742,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUserLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -215578,16 +216824,16 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; return null; @@ -215604,6 +216850,8 @@ export const Tokens = $root.Tokens = (() => { SharedFolderUserLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SharedFolderUserLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SharedFolderUserLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -215672,18 +216920,18 @@ export const Tokens = $root.Tokens = (() => { object.accountUid = $util.newBuffer(object.accountUid); } } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") object.lastSyncRevision = options.longs === String ? String(message.lastSyncRevision) : message.lastSyncRevision; else object.lastSyncRevision = options.longs === String ? $util.Long.prototype.toString.call(message.lastSyncRevision) : options.longs === Number ? new $util.LongBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0).toNumber() : message.lastSyncRevision; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; return object; }; @@ -215814,7 +217062,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderTeamLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -215892,13 +217140,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -215915,6 +217163,8 @@ export const Tokens = $root.Tokens = (() => { SharedFolderTeamLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SharedFolderTeamLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SharedFolderTeamLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -215980,11 +217230,11 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -216120,7 +217370,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecordLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -216198,13 +217448,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -216221,6 +217471,8 @@ export const Tokens = $root.Tokens = (() => { SharedFolderRecordLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SharedFolderRecordLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SharedFolderRecordLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -216286,11 +217538,11 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -216426,7 +217678,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderFolderRecordLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -216504,13 +217756,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; return null; @@ -216527,6 +217779,8 @@ export const Tokens = $root.Tokens = (() => { SharedFolderFolderRecordLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.SharedFolderFolderRecordLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.SharedFolderFolderRecordLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -216590,11 +217844,11 @@ export const Tokens = $root.Tokens = (() => { object.recordUid = $util.newBuffer(object.recordUid); } } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; return object; }; @@ -216714,7 +217968,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ TeamLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -216788,10 +218042,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -216808,6 +218062,8 @@ export const Tokens = $root.Tokens = (() => { TeamLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.TeamLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.TeamLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -216861,9 +218117,9 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -216988,7 +218244,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ UserAuthHashLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -217062,10 +218318,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userAuthHashUid != null && message.hasOwnProperty("userAuthHashUid")) + if (message.userAuthHashUid != null && Object.hasOwnProperty.call(message, "userAuthHashUid")) if (!(message.userAuthHashUid && typeof message.userAuthHashUid.length === "number" || $util.isString(message.userAuthHashUid))) return "userAuthHashUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -217082,6 +218338,8 @@ export const Tokens = $root.Tokens = (() => { UserAuthHashLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.UserAuthHashLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.UserAuthHashLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -217135,9 +218393,9 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.userAuthHashUid != null && message.hasOwnProperty("userAuthHashUid")) + if (message.userAuthHashUid != null && Object.hasOwnProperty.call(message, "userAuthHashUid")) object.userAuthHashUid = options.bytes === String ? $util.base64.encode(message.userAuthHashUid, 0, message.userAuthHashUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.userAuthHashUid) : message.userAuthHashUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -217273,7 +218531,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ FolderRecordLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -217351,13 +218609,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -217374,6 +218632,8 @@ export const Tokens = $root.Tokens = (() => { FolderRecordLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.FolderRecordLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.FolderRecordLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -217439,11 +218699,11 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -217579,7 +218839,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ RecordLinkLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -217657,13 +218917,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parentRecordUid != null && message.hasOwnProperty("parentRecordUid")) + if (message.parentRecordUid != null && Object.hasOwnProperty.call(message, "parentRecordUid")) if (!(message.parentRecordUid && typeof message.parentRecordUid.length === "number" || $util.isString(message.parentRecordUid))) return "parentRecordUid: buffer expected"; - if (message.childRecordUid != null && message.hasOwnProperty("childRecordUid")) + if (message.childRecordUid != null && Object.hasOwnProperty.call(message, "childRecordUid")) if (!(message.childRecordUid && typeof message.childRecordUid.length === "number" || $util.isString(message.childRecordUid))) return "childRecordUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -217680,6 +218940,8 @@ export const Tokens = $root.Tokens = (() => { RecordLinkLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.RecordLinkLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.RecordLinkLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -217745,11 +219007,11 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.parentRecordUid != null && message.hasOwnProperty("parentRecordUid")) + if (message.parentRecordUid != null && Object.hasOwnProperty.call(message, "parentRecordUid")) object.parentRecordUid = options.bytes === String ? $util.base64.encode(message.parentRecordUid, 0, message.parentRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentRecordUid) : message.parentRecordUid; - if (message.childRecordUid != null && message.hasOwnProperty("childRecordUid")) + if (message.childRecordUid != null && Object.hasOwnProperty.call(message, "childRecordUid")) object.childRecordUid = options.bytes === String ? $util.base64.encode(message.childRecordUid, 0, message.childRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.childRecordUid) : message.childRecordUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -217885,7 +219147,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ KsmLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -217963,13 +219225,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.detailUid != null && message.hasOwnProperty("detailUid")) + if (message.detailUid != null && Object.hasOwnProperty.call(message, "detailUid")) if (!(message.detailUid && typeof message.detailUid.length === "number" || $util.isString(message.detailUid))) return "detailUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -217986,6 +219248,8 @@ export const Tokens = $root.Tokens = (() => { KsmLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.KsmLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.KsmLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -218051,11 +219315,11 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; - if (message.detailUid != null && message.hasOwnProperty("detailUid")) + if (message.detailUid != null && Object.hasOwnProperty.call(message, "detailUid")) object.detailUid = options.bytes === String ? $util.base64.encode(message.detailUid, 0, message.detailUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.detailUid) : message.detailUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -218191,7 +219455,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ FolderSharedFolderLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -218269,13 +219533,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (!$util.isInteger(message.lastSyncRevision) && !(message.lastSyncRevision && $util.isInteger(message.lastSyncRevision.low) && $util.isInteger(message.lastSyncRevision.high))) return "lastSyncRevision: integer|Long expected"; return null; @@ -218292,6 +219556,8 @@ export const Tokens = $root.Tokens = (() => { FolderSharedFolderLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.FolderSharedFolderLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.FolderSharedFolderLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -218357,11 +219623,11 @@ export const Tokens = $root.Tokens = (() => { } else object.lastSyncRevision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.lastSyncRevision != null && message.hasOwnProperty("lastSyncRevision")) + if (message.lastSyncRevision != null && Object.hasOwnProperty.call(message, "lastSyncRevision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastSyncRevision = typeof message.lastSyncRevision === "number" ? BigInt(message.lastSyncRevision) : $util.Long.fromBits(message.lastSyncRevision.low >>> 0, message.lastSyncRevision.high >>> 0, false).toBigInt(); else if (typeof message.lastSyncRevision === "number") @@ -218475,7 +219741,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ ShareInvitationLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -218545,7 +219811,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -218562,6 +219828,8 @@ export const Tokens = $root.Tokens = (() => { ShareInvitationLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.ShareInvitationLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.ShareInvitationLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -218591,7 +219859,7 @@ export const Tokens = $root.Tokens = (() => { let object = {}; if (options.defaults) object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -218700,7 +219968,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ UserLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -218770,7 +220038,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; return null; @@ -218787,6 +220055,8 @@ export const Tokens = $root.Tokens = (() => { UserLocation.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.UserLocation) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.UserLocation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -218816,7 +220086,7 @@ export const Tokens = $root.Tokens = (() => { let object = {}; if (options.defaults) object.userId = 0; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; return object; }; @@ -218938,7 +220208,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ KeyCloakToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -219014,10 +220284,10 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.groups != null && message.hasOwnProperty("groups")) { + if (message.groups != null && Object.hasOwnProperty.call(message, "groups")) { if (!Array.isArray(message.groups)) return "groups: array expected"; for (let i = 0; i < message.groups.length; ++i) @@ -219038,6 +220308,8 @@ export const Tokens = $root.Tokens = (() => { KeyCloakToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.KeyCloakToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.KeyCloakToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -219076,7 +220348,7 @@ export const Tokens = $root.Tokens = (() => { object.groups = []; if (options.defaults) object.email = ""; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; if (message.groups && message.groups.length) { object.groups = []; @@ -219190,7 +220462,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ IPWhiteList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -219260,7 +220532,7 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ipranges != null && message.hasOwnProperty("ipranges")) + if (message.ipranges != null && Object.hasOwnProperty.call(message, "ipranges")) if (!$util.isString(message.ipranges)) return "ipranges: string expected"; return null; @@ -219277,6 +220549,8 @@ export const Tokens = $root.Tokens = (() => { IPWhiteList.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.IPWhiteList) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.IPWhiteList: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -219306,7 +220580,7 @@ export const Tokens = $root.Tokens = (() => { let object = {}; if (options.defaults) object.ipranges = ""; - if (message.ipranges != null && message.hasOwnProperty("ipranges")) + if (message.ipranges != null && Object.hasOwnProperty.call(message, "ipranges")) object.ipranges = message.ipranges; return object; }; @@ -219437,7 +220711,7 @@ export const Tokens = $root.Tokens = (() => { * @returns {$protobuf.Writer} Writer */ IncrementalSecurityDataContToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -219515,13 +220789,13 @@ export const Tokens = $root.Tokens = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserIdUpToSave != null && message.hasOwnProperty("enterpriseUserIdUpToSave")) + if (message.enterpriseUserIdUpToSave != null && Object.hasOwnProperty.call(message, "enterpriseUserIdUpToSave")) if (!$util.isInteger(message.enterpriseUserIdUpToSave) && !(message.enterpriseUserIdUpToSave && $util.isInteger(message.enterpriseUserIdUpToSave.low) && $util.isInteger(message.enterpriseUserIdUpToSave.high))) return "enterpriseUserIdUpToSave: integer|Long expected"; - if (message.revisionUpToSave != null && message.hasOwnProperty("revisionUpToSave")) + if (message.revisionUpToSave != null && Object.hasOwnProperty.call(message, "revisionUpToSave")) if (!$util.isInteger(message.revisionUpToSave) && !(message.revisionUpToSave && $util.isInteger(message.revisionUpToSave.low) && $util.isInteger(message.revisionUpToSave.high))) return "revisionUpToSave: integer|Long expected"; - if (message.recordUidUpToSave != null && message.hasOwnProperty("recordUidUpToSave")) + if (message.recordUidUpToSave != null && Object.hasOwnProperty.call(message, "recordUidUpToSave")) if (!(message.recordUidUpToSave && typeof message.recordUidUpToSave.length === "number" || $util.isString(message.recordUidUpToSave))) return "recordUidUpToSave: buffer expected"; return null; @@ -219538,6 +220812,8 @@ export const Tokens = $root.Tokens = (() => { IncrementalSecurityDataContToken.fromObject = function fromObject(object, long) { if (object instanceof $root.Tokens.IncrementalSecurityDataContToken) return object; + if (!$util.isObject(object)) + throw TypeError(".Tokens.IncrementalSecurityDataContToken: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -219605,21 +220881,21 @@ export const Tokens = $root.Tokens = (() => { object.recordUidUpToSave = $util.newBuffer(object.recordUidUpToSave); } } - if (message.enterpriseUserIdUpToSave != null && message.hasOwnProperty("enterpriseUserIdUpToSave")) + if (message.enterpriseUserIdUpToSave != null && Object.hasOwnProperty.call(message, "enterpriseUserIdUpToSave")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserIdUpToSave = typeof message.enterpriseUserIdUpToSave === "number" ? BigInt(message.enterpriseUserIdUpToSave) : $util.Long.fromBits(message.enterpriseUserIdUpToSave.low >>> 0, message.enterpriseUserIdUpToSave.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserIdUpToSave === "number") object.enterpriseUserIdUpToSave = options.longs === String ? String(message.enterpriseUserIdUpToSave) : message.enterpriseUserIdUpToSave; else object.enterpriseUserIdUpToSave = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserIdUpToSave) : options.longs === Number ? new $util.LongBits(message.enterpriseUserIdUpToSave.low >>> 0, message.enterpriseUserIdUpToSave.high >>> 0).toNumber() : message.enterpriseUserIdUpToSave; - if (message.revisionUpToSave != null && message.hasOwnProperty("revisionUpToSave")) + if (message.revisionUpToSave != null && Object.hasOwnProperty.call(message, "revisionUpToSave")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revisionUpToSave = typeof message.revisionUpToSave === "number" ? BigInt(message.revisionUpToSave) : $util.Long.fromBits(message.revisionUpToSave.low >>> 0, message.revisionUpToSave.high >>> 0, false).toBigInt(); else if (typeof message.revisionUpToSave === "number") object.revisionUpToSave = options.longs === String ? String(message.revisionUpToSave) : message.revisionUpToSave; else object.revisionUpToSave = options.longs === String ? $util.Long.prototype.toString.call(message.revisionUpToSave) : options.longs === Number ? new $util.LongBits(message.revisionUpToSave.low >>> 0, message.revisionUpToSave.high >>> 0).toNumber() : message.revisionUpToSave; - if (message.recordUidUpToSave != null && message.hasOwnProperty("recordUidUpToSave")) + if (message.recordUidUpToSave != null && Object.hasOwnProperty.call(message, "recordUidUpToSave")) object.recordUidUpToSave = options.bytes === String ? $util.base64.encode(message.recordUidUpToSave, 0, message.recordUidUpToSave.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUidUpToSave) : message.recordUidUpToSave; return object; }; @@ -219773,7 +221049,7 @@ export const ExternalService = $root.ExternalService = (() => { * @returns {$protobuf.Writer} Writer */ SaveSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -219855,16 +221131,16 @@ export const ExternalService = $root.ExternalService = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.certificate != null && message.hasOwnProperty("certificate")) + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) if (!(message.certificate && typeof message.certificate.length === "number" || $util.isString(message.certificate))) return "certificate: buffer expected"; - if (message.password != null && message.hasOwnProperty("password")) + if (message.password != null && Object.hasOwnProperty.call(message, "password")) if (!$util.isString(message.password)) return "password: string expected"; - if (message.directoryUrl != null && message.hasOwnProperty("directoryUrl")) + if (message.directoryUrl != null && Object.hasOwnProperty.call(message, "directoryUrl")) if (!$util.isString(message.directoryUrl)) return "directoryUrl: string expected"; return null; @@ -219881,6 +221157,8 @@ export const ExternalService = $root.ExternalService = (() => { SaveSettingsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ExternalService.SaveSettingsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ExternalService.SaveSettingsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -219929,13 +221207,13 @@ export const ExternalService = $root.ExternalService = (() => { object.password = ""; object.directoryUrl = ""; } - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.certificate != null && message.hasOwnProperty("certificate")) + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) object.certificate = options.bytes === String ? $util.base64.encode(message.certificate, 0, message.certificate.length) : options.bytes === Array ? Array.prototype.slice.call(message.certificate) : message.certificate; - if (message.password != null && message.hasOwnProperty("password")) + if (message.password != null && Object.hasOwnProperty.call(message, "password")) object.password = message.password; - if (message.directoryUrl != null && message.hasOwnProperty("directoryUrl")) + if (message.directoryUrl != null && Object.hasOwnProperty.call(message, "directoryUrl")) object.directoryUrl = message.directoryUrl; return object; }; @@ -220055,7 +221333,7 @@ export const ExternalService = $root.ExternalService = (() => { * @returns {$protobuf.Writer} Writer */ GetUsersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -220129,10 +221407,10 @@ export const ExternalService = $root.ExternalService = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && Object.hasOwnProperty.call(message, "field")) if (!$util.isString(message.field)) return "field: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -220149,6 +221427,8 @@ export const ExternalService = $root.ExternalService = (() => { GetUsersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ExternalService.GetUsersRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ExternalService.GetUsersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -220182,9 +221462,9 @@ export const ExternalService = $root.ExternalService = (() => { object.field = ""; object.value = ""; } - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && Object.hasOwnProperty.call(message, "field")) object.field = message.field; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -220360,7 +221640,7 @@ export const ExternalService = $root.ExternalService = (() => { * @returns {$protobuf.Writer} Writer */ User.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -220442,13 +221722,13 @@ export const ExternalService = $root.ExternalService = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -220458,7 +221738,7 @@ export const ExternalService = $root.ExternalService = (() => { case 3: break; } - if (message.lockStatus != null && message.hasOwnProperty("lockStatus")) + if (message.lockStatus != null && Object.hasOwnProperty.call(message, "lockStatus")) switch (message.lockStatus) { default: return "lockStatus: enum value expected"; @@ -220481,6 +221761,8 @@ export const ExternalService = $root.ExternalService = (() => { User.fromObject = function fromObject(object, long) { if (object instanceof $root.ExternalService.User) return object; + if (!$util.isObject(object)) + throw TypeError(".ExternalService.User: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -220560,13 +221842,13 @@ export const ExternalService = $root.ExternalService = (() => { object.status = options.enums === String ? "NEW" : 0; object.lockStatus = options.enums === String ? "UNLOCKED" : 0; } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.ExternalService.UserStatus[message.status] === undefined ? message.status : $root.ExternalService.UserStatus[message.status] : message.status; - if (message.lockStatus != null && message.hasOwnProperty("lockStatus")) + if (message.lockStatus != null && Object.hasOwnProperty.call(message, "lockStatus")) object.lockStatus = options.enums === String ? $root.ExternalService.LockStatus[message.lockStatus] === undefined ? message.lockStatus : $root.ExternalService.LockStatus[message.lockStatus] : message.lockStatus; return object; }; @@ -220677,7 +221959,7 @@ export const ExternalService = $root.ExternalService = (() => { * @returns {$protobuf.Writer} Writer */ GetUsersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -220749,7 +222031,7 @@ export const ExternalService = $root.ExternalService = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -220772,6 +222054,8 @@ export const ExternalService = $root.ExternalService = (() => { GetUsersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.ExternalService.GetUsersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".ExternalService.GetUsersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -220782,7 +222066,7 @@ export const ExternalService = $root.ExternalService = (() => { throw TypeError(".ExternalService.GetUsersResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".ExternalService.GetUsersResponse.users: object expected"); message.users[i] = $root.ExternalService.User.fromObject(object.users[i], long + 1); } @@ -220955,7 +222239,7 @@ export const Push = $root.Push = (() => { * @returns {$protobuf.Writer} Writer */ UserRegistrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -221033,13 +222317,13 @@ export const Push = $root.Push = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; return null; @@ -221056,6 +222340,8 @@ export const Push = $root.Push = (() => { UserRegistrationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Push.UserRegistrationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Push.UserRegistrationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -221101,11 +222387,11 @@ export const Push = $root.Push = (() => { object.userId = 0; object.enterpriseId = 0; } - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; return object; }; @@ -221311,7 +222597,7 @@ export const Push = $root.Push = (() => { * @returns {$protobuf.Writer} Writer */ KAToPushServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -221417,7 +222703,7 @@ export const Push = $root.Push = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) switch (message.messageType) { default: return "messageType: enum value expected"; @@ -221433,27 +222719,27 @@ export const Push = $root.Push = (() => { case 9: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) { + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) { if (!Array.isArray(message.encryptedDeviceToken)) return "encryptedDeviceToken: array expected"; for (let i = 0; i < message.encryptedDeviceToken.length; ++i) if (!(message.encryptedDeviceToken[i] && typeof message.encryptedDeviceToken[i].length === "number" || $util.isString(message.encryptedDeviceToken[i]))) return "encryptedDeviceToken: buffer[] expected"; } - if (message.userId != null && message.hasOwnProperty("userId")) { + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) { if (!Array.isArray(message.userId)) return "userId: array expected"; for (let i = 0; i < message.userId.length; ++i) if (!$util.isInteger(message.userId[i])) return "userId: integer[] expected"; } - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) { + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) { if (!Array.isArray(message.enterpriseId)) return "enterpriseId: array expected"; for (let i = 0; i < message.enterpriseId.length; ++i) @@ -221474,6 +222760,8 @@ export const Push = $root.Push = (() => { KAToPushServerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Push.KAToPushServerRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Push.KAToPushServerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -221594,11 +222882,11 @@ export const Push = $root.Push = (() => { object.messageSessionUid = $util.newBuffer(object.messageSessionUid); } } - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) object.messageType = options.enums === String ? $root.Push.MessageType[message.messageType] === undefined ? message.messageType : $root.Push.MessageType[message.messageType] : message.messageType; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; if (message.encryptedDeviceToken && message.encryptedDeviceToken.length) { object.encryptedDeviceToken = []; @@ -221744,7 +223032,7 @@ export const Push = $root.Push = (() => { * @returns {$protobuf.Writer} Writer */ WssConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -221822,13 +223110,13 @@ export const Push = $root.Push = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) if (!(message.messageSessionUid && typeof message.messageSessionUid.length === "number" || $util.isString(message.messageSessionUid))) return "messageSessionUid: buffer expected"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.deviceTimeStamp != null && message.hasOwnProperty("deviceTimeStamp")) + if (message.deviceTimeStamp != null && Object.hasOwnProperty.call(message, "deviceTimeStamp")) if (!$util.isInteger(message.deviceTimeStamp) && !(message.deviceTimeStamp && $util.isInteger(message.deviceTimeStamp.low) && $util.isInteger(message.deviceTimeStamp.high))) return "deviceTimeStamp: integer|Long expected"; return null; @@ -221845,6 +223133,8 @@ export const Push = $root.Push = (() => { WssConnectionRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Push.WssConnectionRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Push.WssConnectionRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -221910,11 +223200,11 @@ export const Push = $root.Push = (() => { } else object.deviceTimeStamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.messageSessionUid != null && message.hasOwnProperty("messageSessionUid")) + if (message.messageSessionUid != null && Object.hasOwnProperty.call(message, "messageSessionUid")) object.messageSessionUid = options.bytes === String ? $util.base64.encode(message.messageSessionUid, 0, message.messageSessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSessionUid) : message.messageSessionUid; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.deviceTimeStamp != null && message.hasOwnProperty("deviceTimeStamp")) + if (message.deviceTimeStamp != null && Object.hasOwnProperty.call(message, "deviceTimeStamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceTimeStamp = typeof message.deviceTimeStamp === "number" ? BigInt(message.deviceTimeStamp) : $util.Long.fromBits(message.deviceTimeStamp.low >>> 0, message.deviceTimeStamp.high >>> 0, false).toBigInt(); else if (typeof message.deviceTimeStamp === "number") @@ -222039,7 +223329,7 @@ export const Push = $root.Push = (() => { * @returns {$protobuf.Writer} Writer */ WssClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -222113,7 +223403,7 @@ export const Push = $root.Push = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) switch (message.messageType) { default: return "messageType: enum value expected"; @@ -222129,7 +223419,7 @@ export const Push = $root.Push = (() => { case 9: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -222146,6 +223436,8 @@ export const Push = $root.Push = (() => { WssClientResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Push.WssClientResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Push.WssClientResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -222225,9 +223517,9 @@ export const Push = $root.Push = (() => { object.messageType = options.enums === String ? "UNKNOWN" : 0; object.message = ""; } - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) object.messageType = options.enums === String ? $root.Push.MessageType[message.messageType] === undefined ? message.messageType : $root.Push.MessageType[message.messageType] : message.messageType; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -222369,7 +223661,7 @@ export const Push = $root.Push = (() => { * @returns {$protobuf.Writer} Writer */ PushServerDeviceRegistrationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -222451,16 +223743,16 @@ export const Push = $root.Push = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) if (!(message.encryptedDeviceToken && typeof message.encryptedDeviceToken.length === "number" || $util.isString(message.encryptedDeviceToken))) return "encryptedDeviceToken: buffer expected"; - if (message.pushToken != null && message.hasOwnProperty("pushToken")) + if (message.pushToken != null && Object.hasOwnProperty.call(message, "pushToken")) if (!$util.isString(message.pushToken)) return "pushToken: string expected"; - if (message.mobilePushPlatform != null && message.hasOwnProperty("mobilePushPlatform")) + if (message.mobilePushPlatform != null && Object.hasOwnProperty.call(message, "mobilePushPlatform")) if (!$util.isString(message.mobilePushPlatform)) return "mobilePushPlatform: string expected"; - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) if (!(message.transmissionKey && typeof message.transmissionKey.length === "number" || $util.isString(message.transmissionKey))) return "transmissionKey: buffer expected"; return null; @@ -222477,6 +223769,8 @@ export const Push = $root.Push = (() => { PushServerDeviceRegistrationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Push.PushServerDeviceRegistrationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Push.PushServerDeviceRegistrationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -222534,13 +223828,13 @@ export const Push = $root.Push = (() => { object.transmissionKey = $util.newBuffer(object.transmissionKey); } } - if (message.encryptedDeviceToken != null && message.hasOwnProperty("encryptedDeviceToken")) + if (message.encryptedDeviceToken != null && Object.hasOwnProperty.call(message, "encryptedDeviceToken")) object.encryptedDeviceToken = options.bytes === String ? $util.base64.encode(message.encryptedDeviceToken, 0, message.encryptedDeviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedDeviceToken) : message.encryptedDeviceToken; - if (message.pushToken != null && message.hasOwnProperty("pushToken")) + if (message.pushToken != null && Object.hasOwnProperty.call(message, "pushToken")) object.pushToken = message.pushToken; - if (message.mobilePushPlatform != null && message.hasOwnProperty("mobilePushPlatform")) + if (message.mobilePushPlatform != null && Object.hasOwnProperty.call(message, "mobilePushPlatform")) object.mobilePushPlatform = message.mobilePushPlatform; - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) object.transmissionKey = options.bytes === String ? $util.base64.encode(message.transmissionKey, 0, message.transmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.transmissionKey) : message.transmissionKey; return object; }; @@ -222660,7 +223954,7 @@ export const Push = $root.Push = (() => { * @returns {$protobuf.Writer} Writer */ SnsMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -222734,7 +224028,7 @@ export const Push = $root.Push = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) switch (message.messageType) { default: return "messageType: enum value expected"; @@ -222750,7 +224044,7 @@ export const Push = $root.Push = (() => { case 9: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!(message.message && typeof message.message.length === "number" || $util.isString(message.message))) return "message: buffer expected"; return null; @@ -222767,6 +224061,8 @@ export const Push = $root.Push = (() => { SnsMessage.fromObject = function fromObject(object, long) { if (object instanceof $root.Push.SnsMessage) return object; + if (!$util.isObject(object)) + throw TypeError(".Push.SnsMessage: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -222855,9 +224151,9 @@ export const Push = $root.Push = (() => { object.message = $util.newBuffer(object.message); } } - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) object.messageType = options.enums === String ? $root.Push.MessageType[message.messageType] === undefined ? message.messageType : $root.Push.MessageType[message.messageType] : message.messageType; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = options.bytes === String ? $util.base64.encode(message.message, 0, message.message.length) : options.bytes === Array ? Array.prototype.slice.call(message.message) : message.message; return object; }; @@ -222989,7 +224285,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ IdRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -223063,10 +224359,10 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startingId != null && message.hasOwnProperty("startingId")) + if (message.startingId != null && Object.hasOwnProperty.call(message, "startingId")) if (!$util.isInteger(message.startingId) && !(message.startingId && $util.isInteger(message.startingId.low) && $util.isInteger(message.startingId.high))) return "startingId: integer|Long expected"; - if (message.endingId != null && message.hasOwnProperty("endingId")) + if (message.endingId != null && Object.hasOwnProperty.call(message, "endingId")) if (!$util.isInteger(message.endingId) && !(message.endingId && $util.isInteger(message.endingId.low) && $util.isInteger(message.endingId.high))) return "endingId: integer|Long expected"; return null; @@ -223083,6 +224379,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { IdRange.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.IdRange) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.IdRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -223138,14 +224436,14 @@ export const ServiceLogger = $root.ServiceLogger = (() => { } else object.endingId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.startingId != null && message.hasOwnProperty("startingId")) + if (message.startingId != null && Object.hasOwnProperty.call(message, "startingId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startingId = typeof message.startingId === "number" ? BigInt(message.startingId) : $util.Long.fromBits(message.startingId.low >>> 0, message.startingId.high >>> 0, true).toBigInt(); else if (typeof message.startingId === "number") object.startingId = options.longs === String ? String(message.startingId) : message.startingId; else object.startingId = options.longs === String ? $util.Long.prototype.toString.call(message.startingId) : options.longs === Number ? new $util.LongBits(message.startingId.low >>> 0, message.startingId.high >>> 0).toNumber(true) : message.startingId; - if (message.endingId != null && message.hasOwnProperty("endingId")) + if (message.endingId != null && Object.hasOwnProperty.call(message, "endingId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endingId = typeof message.endingId === "number" ? BigInt(message.endingId) : $util.Long.fromBits(message.endingId.low >>> 0, message.endingId.high >>> 0, true).toBigInt(); else if (typeof message.endingId === "number") @@ -223281,7 +224579,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceInfoSpecifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -223359,13 +224657,13 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.all != null && message.hasOwnProperty("all")) + if (message.all != null && Object.hasOwnProperty.call(message, "all")) if (typeof message.all !== "boolean") return "all: boolean expected"; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (!$util.isInteger(message.serviceInfoId) && !(message.serviceInfoId && $util.isInteger(message.serviceInfoId.low) && $util.isInteger(message.serviceInfoId.high))) return "serviceInfoId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -223382,6 +224680,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceInfoSpecifier.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceInfoSpecifier) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceInfoSpecifier: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -223429,16 +224729,16 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.serviceInfoId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.name = ""; } - if (message.all != null && message.hasOwnProperty("all")) + if (message.all != null && Object.hasOwnProperty.call(message, "all")) object.all = message.all; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceInfoId = typeof message.serviceInfoId === "number" ? BigInt(message.serviceInfoId) : $util.Long.fromBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0, true).toBigInt(); else if (typeof message.serviceInfoId === "number") object.serviceInfoId = options.longs === String ? String(message.serviceInfoId) : message.serviceInfoId; else object.serviceInfoId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceInfoId) : options.longs === Number ? new $util.LongBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0).toNumber(true) : message.serviceInfoId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -223549,7 +224849,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -223621,7 +224921,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceInfoSpecifier != null && message.hasOwnProperty("serviceInfoSpecifier")) { + if (message.serviceInfoSpecifier != null && Object.hasOwnProperty.call(message, "serviceInfoSpecifier")) { if (!Array.isArray(message.serviceInfoSpecifier)) return "serviceInfoSpecifier: array expected"; for (let i = 0; i < message.serviceInfoSpecifier.length; ++i) { @@ -223644,6 +224944,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceInfoRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceInfoRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceInfoRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -223654,7 +224956,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceInfoRequest.serviceInfoSpecifier: array expected"); message.serviceInfoSpecifier = []; for (let i = 0; i < object.serviceInfoSpecifier.length; ++i) { - if (typeof object.serviceInfoSpecifier[i] !== "object") + if (!$util.isObject(object.serviceInfoSpecifier[i])) throw TypeError(".ServiceLogger.ServiceInfoRequest.serviceInfoSpecifier: object expected"); message.serviceInfoSpecifier[i] = $root.ServiceLogger.ServiceInfoSpecifier.fromObject(object.serviceInfoSpecifier[i], long + 1); } @@ -223837,7 +225139,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceInfoRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -223923,19 +225225,19 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (!$util.isInteger(message.serviceInfoId) && !(message.serviceInfoId && $util.isInteger(message.serviceInfoId.low) && $util.isInteger(message.serviceInfoId.high))) return "serviceInfoId: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.deleteAfter != null && message.hasOwnProperty("deleteAfter")) + if (message.deleteAfter != null && Object.hasOwnProperty.call(message, "deleteAfter")) if (!$util.isInteger(message.deleteAfter)) return "deleteAfter: integer expected"; - if (message.deleteAfterTimeUnits != null && message.hasOwnProperty("deleteAfterTimeUnits")) + if (message.deleteAfterTimeUnits != null && Object.hasOwnProperty.call(message, "deleteAfterTimeUnits")) if (!$util.isString(message.deleteAfterTimeUnits)) return "deleteAfterTimeUnits: string expected"; - if (message.isShortTermLogging != null && message.hasOwnProperty("isShortTermLogging")) + if (message.isShortTermLogging != null && Object.hasOwnProperty.call(message, "isShortTermLogging")) if (typeof message.isShortTermLogging !== "boolean") return "isShortTermLogging: boolean expected"; return null; @@ -223952,6 +225254,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceInfoRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceInfoRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceInfoRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -224005,20 +225309,20 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.deleteAfterTimeUnits = ""; object.isShortTermLogging = false; } - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceInfoId = typeof message.serviceInfoId === "number" ? BigInt(message.serviceInfoId) : $util.Long.fromBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0, true).toBigInt(); else if (typeof message.serviceInfoId === "number") object.serviceInfoId = options.longs === String ? String(message.serviceInfoId) : message.serviceInfoId; else object.serviceInfoId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceInfoId) : options.longs === Number ? new $util.LongBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0).toNumber(true) : message.serviceInfoId; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.deleteAfter != null && message.hasOwnProperty("deleteAfter")) + if (message.deleteAfter != null && Object.hasOwnProperty.call(message, "deleteAfter")) object.deleteAfter = message.deleteAfter; - if (message.deleteAfterTimeUnits != null && message.hasOwnProperty("deleteAfterTimeUnits")) + if (message.deleteAfterTimeUnits != null && Object.hasOwnProperty.call(message, "deleteAfterTimeUnits")) object.deleteAfterTimeUnits = message.deleteAfterTimeUnits; - if (message.isShortTermLogging != null && message.hasOwnProperty("isShortTermLogging")) + if (message.isShortTermLogging != null && Object.hasOwnProperty.call(message, "isShortTermLogging")) object.isShortTermLogging = message.isShortTermLogging; return object; }; @@ -224129,7 +225433,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -224201,7 +225505,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceInfoRecord != null && message.hasOwnProperty("serviceInfoRecord")) { + if (message.serviceInfoRecord != null && Object.hasOwnProperty.call(message, "serviceInfoRecord")) { if (!Array.isArray(message.serviceInfoRecord)) return "serviceInfoRecord: array expected"; for (let i = 0; i < message.serviceInfoRecord.length; ++i) { @@ -224224,6 +225528,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceInfoResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceInfoResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceInfoResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -224234,7 +225540,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceInfoResponse.serviceInfoRecord: array expected"); message.serviceInfoRecord = []; for (let i = 0; i < object.serviceInfoRecord.length; ++i) { - if (typeof object.serviceInfoRecord[i] !== "object") + if (!$util.isObject(object.serviceInfoRecord[i])) throw TypeError(".ServiceLogger.ServiceInfoResponse.serviceInfoRecord: object expected"); message.serviceInfoRecord[i] = $root.ServiceLogger.ServiceInfoRecord.fromObject(object.serviceInfoRecord[i], long + 1); } @@ -224375,7 +225681,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceInfoUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -224447,7 +225753,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceInfoRecord != null && message.hasOwnProperty("serviceInfoRecord")) { + if (message.serviceInfoRecord != null && Object.hasOwnProperty.call(message, "serviceInfoRecord")) { if (!Array.isArray(message.serviceInfoRecord)) return "serviceInfoRecord: array expected"; for (let i = 0; i < message.serviceInfoRecord.length; ++i) { @@ -224470,6 +225776,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceInfoUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceInfoUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceInfoUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -224480,7 +225788,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceInfoUpdateRequest.serviceInfoRecord: array expected"); message.serviceInfoRecord = []; for (let i = 0; i < object.serviceInfoRecord.length; ++i) { - if (typeof object.serviceInfoRecord[i] !== "object") + if (!$util.isObject(object.serviceInfoRecord[i])) throw TypeError(".ServiceLogger.ServiceInfoUpdateRequest.serviceInfoRecord: object expected"); message.serviceInfoRecord[i] = $root.ServiceLogger.ServiceInfoRecord.fromObject(object.serviceInfoRecord[i], long + 1); } @@ -224654,7 +225962,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceRuleSpecifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -224738,16 +226046,16 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.all != null && message.hasOwnProperty("all")) + if (message.all != null && Object.hasOwnProperty.call(message, "all")) if (typeof message.all !== "boolean") return "all: boolean expected"; - if (message.serviceRuleId != null && message.hasOwnProperty("serviceRuleId")) + if (message.serviceRuleId != null && Object.hasOwnProperty.call(message, "serviceRuleId")) if (!$util.isInteger(message.serviceRuleId) && !(message.serviceRuleId && $util.isInteger(message.serviceRuleId.low) && $util.isInteger(message.serviceRuleId.high))) return "serviceRuleId: integer|Long expected"; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (!$util.isInteger(message.serviceInfoId) && !(message.serviceInfoId && $util.isInteger(message.serviceInfoId.low) && $util.isInteger(message.serviceInfoId.high))) return "serviceInfoId: integer|Long expected"; - if (message.resourceIdRange != null && message.hasOwnProperty("resourceIdRange")) { + if (message.resourceIdRange != null && Object.hasOwnProperty.call(message, "resourceIdRange")) { if (!Array.isArray(message.resourceIdRange)) return "resourceIdRange: array expected"; for (let i = 0; i < message.resourceIdRange.length; ++i) { @@ -224770,6 +226078,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceRuleSpecifier.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceRuleSpecifier) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceRuleSpecifier: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -224800,7 +226110,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceRuleSpecifier.resourceIdRange: array expected"); message.resourceIdRange = []; for (let i = 0; i < object.resourceIdRange.length; ++i) { - if (typeof object.resourceIdRange[i] !== "object") + if (!$util.isObject(object.resourceIdRange[i])) throw TypeError(".ServiceLogger.ServiceRuleSpecifier.resourceIdRange: object expected"); message.resourceIdRange[i] = $root.ServiceLogger.IdRange.fromObject(object.resourceIdRange[i], long + 1); } @@ -224840,16 +226150,16 @@ export const ServiceLogger = $root.ServiceLogger = (() => { } else object.serviceInfoId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.all != null && message.hasOwnProperty("all")) + if (message.all != null && Object.hasOwnProperty.call(message, "all")) object.all = message.all; - if (message.serviceRuleId != null && message.hasOwnProperty("serviceRuleId")) + if (message.serviceRuleId != null && Object.hasOwnProperty.call(message, "serviceRuleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceRuleId = typeof message.serviceRuleId === "number" ? BigInt(message.serviceRuleId) : $util.Long.fromBits(message.serviceRuleId.low >>> 0, message.serviceRuleId.high >>> 0, true).toBigInt(); else if (typeof message.serviceRuleId === "number") object.serviceRuleId = options.longs === String ? String(message.serviceRuleId) : message.serviceRuleId; else object.serviceRuleId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceRuleId) : options.longs === Number ? new $util.LongBits(message.serviceRuleId.low >>> 0, message.serviceRuleId.high >>> 0).toNumber(true) : message.serviceRuleId; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceInfoId = typeof message.serviceInfoId === "number" ? BigInt(message.serviceInfoId) : $util.Long.fromBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0, true).toBigInt(); else if (typeof message.serviceInfoId === "number") @@ -224970,7 +226280,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -225042,7 +226352,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceRuleSpecifier != null && message.hasOwnProperty("serviceRuleSpecifier")) { + if (message.serviceRuleSpecifier != null && Object.hasOwnProperty.call(message, "serviceRuleSpecifier")) { if (!Array.isArray(message.serviceRuleSpecifier)) return "serviceRuleSpecifier: array expected"; for (let i = 0; i < message.serviceRuleSpecifier.length; ++i) { @@ -225065,6 +226375,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceRuleRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceRuleRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceRuleRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -225075,7 +226387,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceRuleRequest.serviceRuleSpecifier: array expected"); message.serviceRuleSpecifier = []; for (let i = 0; i < object.serviceRuleSpecifier.length; ++i) { - if (typeof object.serviceRuleSpecifier[i] !== "object") + if (!$util.isObject(object.serviceRuleSpecifier[i])) throw TypeError(".ServiceLogger.ServiceRuleRequest.serviceRuleSpecifier: object expected"); message.serviceRuleSpecifier[i] = $root.ServiceLogger.ServiceRuleSpecifier.fromObject(object.serviceRuleSpecifier[i], long + 1); } @@ -225291,7 +226603,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceRuleRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -225389,28 +226701,28 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceRuleId != null && message.hasOwnProperty("serviceRuleId")) + if (message.serviceRuleId != null && Object.hasOwnProperty.call(message, "serviceRuleId")) if (!$util.isInteger(message.serviceRuleId) && !(message.serviceRuleId && $util.isInteger(message.serviceRuleId.low) && $util.isInteger(message.serviceRuleId.high))) return "serviceRuleId: integer|Long expected"; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (!$util.isInteger(message.serviceInfoId) && !(message.serviceInfoId && $util.isInteger(message.serviceInfoId.low) && $util.isInteger(message.serviceInfoId.high))) return "serviceInfoId: integer|Long expected"; - if (message.resourceId != null && message.hasOwnProperty("resourceId")) + if (message.resourceId != null && Object.hasOwnProperty.call(message, "resourceId")) if (!$util.isInteger(message.resourceId) && !(message.resourceId && $util.isInteger(message.resourceId.low) && $util.isInteger(message.resourceId.high))) return "resourceId: integer|Long expected"; - if (message.isLoggingEnabled != null && message.hasOwnProperty("isLoggingEnabled")) + if (message.isLoggingEnabled != null && Object.hasOwnProperty.call(message, "isLoggingEnabled")) if (typeof message.isLoggingEnabled !== "boolean") return "isLoggingEnabled: boolean expected"; - if (message.logLevel != null && message.hasOwnProperty("logLevel")) + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) if (!$util.isString(message.logLevel)) return "logLevel: string expected"; - if (message.ruleStart != null && message.hasOwnProperty("ruleStart")) + if (message.ruleStart != null && Object.hasOwnProperty.call(message, "ruleStart")) if (!$util.isString(message.ruleStart)) return "ruleStart: string expected"; - if (message.ruleEnd != null && message.hasOwnProperty("ruleEnd")) + if (message.ruleEnd != null && Object.hasOwnProperty.call(message, "ruleEnd")) if (!$util.isString(message.ruleEnd)) return "ruleEnd: string expected"; - if (message.dateModified != null && message.hasOwnProperty("dateModified")) + if (message.dateModified != null && Object.hasOwnProperty.call(message, "dateModified")) if (!$util.isString(message.dateModified)) return "dateModified: string expected"; return null; @@ -225427,6 +226739,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceRuleRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceRuleRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceRuleRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -225511,36 +226825,36 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.ruleEnd = ""; object.dateModified = ""; } - if (message.serviceRuleId != null && message.hasOwnProperty("serviceRuleId")) + if (message.serviceRuleId != null && Object.hasOwnProperty.call(message, "serviceRuleId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceRuleId = typeof message.serviceRuleId === "number" ? BigInt(message.serviceRuleId) : $util.Long.fromBits(message.serviceRuleId.low >>> 0, message.serviceRuleId.high >>> 0, true).toBigInt(); else if (typeof message.serviceRuleId === "number") object.serviceRuleId = options.longs === String ? String(message.serviceRuleId) : message.serviceRuleId; else object.serviceRuleId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceRuleId) : options.longs === Number ? new $util.LongBits(message.serviceRuleId.low >>> 0, message.serviceRuleId.high >>> 0).toNumber(true) : message.serviceRuleId; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceInfoId = typeof message.serviceInfoId === "number" ? BigInt(message.serviceInfoId) : $util.Long.fromBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0, true).toBigInt(); else if (typeof message.serviceInfoId === "number") object.serviceInfoId = options.longs === String ? String(message.serviceInfoId) : message.serviceInfoId; else object.serviceInfoId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceInfoId) : options.longs === Number ? new $util.LongBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0).toNumber(true) : message.serviceInfoId; - if (message.resourceId != null && message.hasOwnProperty("resourceId")) + if (message.resourceId != null && Object.hasOwnProperty.call(message, "resourceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.resourceId = typeof message.resourceId === "number" ? BigInt(message.resourceId) : $util.Long.fromBits(message.resourceId.low >>> 0, message.resourceId.high >>> 0, true).toBigInt(); else if (typeof message.resourceId === "number") object.resourceId = options.longs === String ? String(message.resourceId) : message.resourceId; else object.resourceId = options.longs === String ? $util.Long.prototype.toString.call(message.resourceId) : options.longs === Number ? new $util.LongBits(message.resourceId.low >>> 0, message.resourceId.high >>> 0).toNumber(true) : message.resourceId; - if (message.isLoggingEnabled != null && message.hasOwnProperty("isLoggingEnabled")) + if (message.isLoggingEnabled != null && Object.hasOwnProperty.call(message, "isLoggingEnabled")) object.isLoggingEnabled = message.isLoggingEnabled; - if (message.logLevel != null && message.hasOwnProperty("logLevel")) + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) object.logLevel = message.logLevel; - if (message.ruleStart != null && message.hasOwnProperty("ruleStart")) + if (message.ruleStart != null && Object.hasOwnProperty.call(message, "ruleStart")) object.ruleStart = message.ruleStart; - if (message.ruleEnd != null && message.hasOwnProperty("ruleEnd")) + if (message.ruleEnd != null && Object.hasOwnProperty.call(message, "ruleEnd")) object.ruleEnd = message.ruleEnd; - if (message.dateModified != null && message.hasOwnProperty("dateModified")) + if (message.dateModified != null && Object.hasOwnProperty.call(message, "dateModified")) object.dateModified = message.dateModified; return object; }; @@ -225651,7 +226965,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceRuleResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -225723,7 +227037,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceRule != null && message.hasOwnProperty("serviceRule")) { + if (message.serviceRule != null && Object.hasOwnProperty.call(message, "serviceRule")) { if (!Array.isArray(message.serviceRule)) return "serviceRule: array expected"; for (let i = 0; i < message.serviceRule.length; ++i) { @@ -225746,6 +227060,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceRuleResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceRuleResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceRuleResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -225756,7 +227072,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceRuleResponse.serviceRule: array expected"); message.serviceRule = []; for (let i = 0; i < object.serviceRule.length; ++i) { - if (typeof object.serviceRule[i] !== "object") + if (!$util.isObject(object.serviceRule[i])) throw TypeError(".ServiceLogger.ServiceRuleResponse.serviceRule: object expected"); message.serviceRule[i] = $root.ServiceLogger.ServiceRuleRecord.fromObject(object.serviceRule[i], long + 1); } @@ -225897,7 +227213,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceRuleUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -225969,7 +227285,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceRuleRecord != null && message.hasOwnProperty("serviceRuleRecord")) { + if (message.serviceRuleRecord != null && Object.hasOwnProperty.call(message, "serviceRuleRecord")) { if (!Array.isArray(message.serviceRuleRecord)) return "serviceRuleRecord: array expected"; for (let i = 0; i < message.serviceRuleRecord.length; ++i) { @@ -225992,6 +227308,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceRuleUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceRuleUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceRuleUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -226002,7 +227320,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceRuleUpdateRequest.serviceRuleRecord: array expected"); message.serviceRuleRecord = []; for (let i = 0; i < object.serviceRuleRecord.length; ++i) { - if (typeof object.serviceRuleRecord[i] !== "object") + if (!$util.isObject(object.serviceRuleRecord[i])) throw TypeError(".ServiceLogger.ServiceRuleUpdateRequest.serviceRuleRecord: object expected"); message.serviceRuleRecord[i] = $root.ServiceLogger.ServiceRuleRecord.fromObject(object.serviceRuleRecord[i], long + 1); } @@ -226200,7 +227518,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogSpecifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -226294,13 +227612,13 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.all != null && message.hasOwnProperty("all")) + if (message.all != null && Object.hasOwnProperty.call(message, "all")) if (typeof message.all !== "boolean") return "all: boolean expected"; - if (message.serviceLogId != null && message.hasOwnProperty("serviceLogId")) + if (message.serviceLogId != null && Object.hasOwnProperty.call(message, "serviceLogId")) if (!$util.isInteger(message.serviceLogId) && !(message.serviceLogId && $util.isInteger(message.serviceLogId.low) && $util.isInteger(message.serviceLogId.high))) return "serviceLogId: integer|Long expected"; - if (message.serviceIdRange != null && message.hasOwnProperty("serviceIdRange")) { + if (message.serviceIdRange != null && Object.hasOwnProperty.call(message, "serviceIdRange")) { if (!Array.isArray(message.serviceIdRange)) return "serviceIdRange: array expected"; for (let i = 0; i < message.serviceIdRange.length; ++i) { @@ -226309,7 +227627,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { return "serviceIdRange." + error; } } - if (message.resourceIdRange != null && message.hasOwnProperty("resourceIdRange")) { + if (message.resourceIdRange != null && Object.hasOwnProperty.call(message, "resourceIdRange")) { if (!Array.isArray(message.resourceIdRange)) return "resourceIdRange: array expected"; for (let i = 0; i < message.resourceIdRange.length; ++i) { @@ -226318,10 +227636,10 @@ export const ServiceLogger = $root.ServiceLogger = (() => { return "resourceIdRange." + error; } } - if (message.startDateTime != null && message.hasOwnProperty("startDateTime")) + if (message.startDateTime != null && Object.hasOwnProperty.call(message, "startDateTime")) if (!$util.isString(message.startDateTime)) return "startDateTime: string expected"; - if (message.endDateTime != null && message.hasOwnProperty("endDateTime")) + if (message.endDateTime != null && Object.hasOwnProperty.call(message, "endDateTime")) if (!$util.isString(message.endDateTime)) return "endDateTime: string expected"; return null; @@ -226338,6 +227656,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogSpecifier.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogSpecifier) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogSpecifier: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -226359,7 +227679,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogSpecifier.serviceIdRange: array expected"); message.serviceIdRange = []; for (let i = 0; i < object.serviceIdRange.length; ++i) { - if (typeof object.serviceIdRange[i] !== "object") + if (!$util.isObject(object.serviceIdRange[i])) throw TypeError(".ServiceLogger.ServiceLogSpecifier.serviceIdRange: object expected"); message.serviceIdRange[i] = $root.ServiceLogger.IdRange.fromObject(object.serviceIdRange[i], long + 1); } @@ -226369,7 +227689,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogSpecifier.resourceIdRange: array expected"); message.resourceIdRange = []; for (let i = 0; i < object.resourceIdRange.length; ++i) { - if (typeof object.resourceIdRange[i] !== "object") + if (!$util.isObject(object.resourceIdRange[i])) throw TypeError(".ServiceLogger.ServiceLogSpecifier.resourceIdRange: object expected"); message.resourceIdRange[i] = $root.ServiceLogger.IdRange.fromObject(object.resourceIdRange[i], long + 1); } @@ -226412,9 +227732,9 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.startDateTime = ""; object.endDateTime = ""; } - if (message.all != null && message.hasOwnProperty("all")) + if (message.all != null && Object.hasOwnProperty.call(message, "all")) object.all = message.all; - if (message.serviceLogId != null && message.hasOwnProperty("serviceLogId")) + if (message.serviceLogId != null && Object.hasOwnProperty.call(message, "serviceLogId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceLogId = typeof message.serviceLogId === "number" ? BigInt(message.serviceLogId) : $util.Long.fromBits(message.serviceLogId.low >>> 0, message.serviceLogId.high >>> 0, true).toBigInt(); else if (typeof message.serviceLogId === "number") @@ -226431,9 +227751,9 @@ export const ServiceLogger = $root.ServiceLogger = (() => { for (let j = 0; j < message.resourceIdRange.length; ++j) object.resourceIdRange[j] = $root.ServiceLogger.IdRange.toObject(message.resourceIdRange[j], options, q + 1); } - if (message.startDateTime != null && message.hasOwnProperty("startDateTime")) + if (message.startDateTime != null && Object.hasOwnProperty.call(message, "startDateTime")) object.startDateTime = message.startDateTime; - if (message.endDateTime != null && message.hasOwnProperty("endDateTime")) + if (message.endDateTime != null && Object.hasOwnProperty.call(message, "endDateTime")) object.endDateTime = message.endDateTime; return object; }; @@ -226544,7 +227864,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogGetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -226616,7 +227936,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceLogSpecifier != null && message.hasOwnProperty("serviceLogSpecifier")) { + if (message.serviceLogSpecifier != null && Object.hasOwnProperty.call(message, "serviceLogSpecifier")) { if (!Array.isArray(message.serviceLogSpecifier)) return "serviceLogSpecifier: array expected"; for (let i = 0; i < message.serviceLogSpecifier.length; ++i) { @@ -226639,6 +227959,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogGetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogGetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogGetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -226649,7 +227971,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogGetRequest.serviceLogSpecifier: array expected"); message.serviceLogSpecifier = []; for (let i = 0; i < object.serviceLogSpecifier.length; ++i) { - if (typeof object.serviceLogSpecifier[i] !== "object") + if (!$util.isObject(object.serviceLogSpecifier[i])) throw TypeError(".ServiceLogger.ServiceLogGetRequest.serviceLogSpecifier: object expected"); message.serviceLogSpecifier[i] = $root.ServiceLogger.ServiceLogSpecifier.fromObject(object.serviceLogSpecifier[i], long + 1); } @@ -226865,7 +228187,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -226963,28 +228285,28 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceLogId != null && message.hasOwnProperty("serviceLogId")) + if (message.serviceLogId != null && Object.hasOwnProperty.call(message, "serviceLogId")) if (!$util.isInteger(message.serviceLogId) && !(message.serviceLogId && $util.isInteger(message.serviceLogId.low) && $util.isInteger(message.serviceLogId.high))) return "serviceLogId: integer|Long expected"; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (!$util.isInteger(message.serviceInfoId) && !(message.serviceInfoId && $util.isInteger(message.serviceInfoId.low) && $util.isInteger(message.serviceInfoId.high))) return "serviceInfoId: integer|Long expected"; - if (message.resourceId != null && message.hasOwnProperty("resourceId")) + if (message.resourceId != null && Object.hasOwnProperty.call(message, "resourceId")) if (!$util.isInteger(message.resourceId) && !(message.resourceId && $util.isInteger(message.resourceId.low) && $util.isInteger(message.resourceId.high))) return "resourceId: integer|Long expected"; - if (message.logger != null && message.hasOwnProperty("logger")) + if (message.logger != null && Object.hasOwnProperty.call(message, "logger")) if (!$util.isString(message.logger)) return "logger: string expected"; - if (message.logLevel != null && message.hasOwnProperty("logLevel")) + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) if (!$util.isString(message.logLevel)) return "logLevel: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.exception != null && message.hasOwnProperty("exception")) + if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) if (!$util.isString(message.exception)) return "exception: string expected"; - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (!$util.isString(message.dateCreated)) return "dateCreated: string expected"; return null; @@ -227001,6 +228323,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -227085,36 +228409,36 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.exception = ""; object.dateCreated = ""; } - if (message.serviceLogId != null && message.hasOwnProperty("serviceLogId")) + if (message.serviceLogId != null && Object.hasOwnProperty.call(message, "serviceLogId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceLogId = typeof message.serviceLogId === "number" ? BigInt(message.serviceLogId) : $util.Long.fromBits(message.serviceLogId.low >>> 0, message.serviceLogId.high >>> 0, true).toBigInt(); else if (typeof message.serviceLogId === "number") object.serviceLogId = options.longs === String ? String(message.serviceLogId) : message.serviceLogId; else object.serviceLogId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceLogId) : options.longs === Number ? new $util.LongBits(message.serviceLogId.low >>> 0, message.serviceLogId.high >>> 0).toNumber(true) : message.serviceLogId; - if (message.serviceInfoId != null && message.hasOwnProperty("serviceInfoId")) + if (message.serviceInfoId != null && Object.hasOwnProperty.call(message, "serviceInfoId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceInfoId = typeof message.serviceInfoId === "number" ? BigInt(message.serviceInfoId) : $util.Long.fromBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0, true).toBigInt(); else if (typeof message.serviceInfoId === "number") object.serviceInfoId = options.longs === String ? String(message.serviceInfoId) : message.serviceInfoId; else object.serviceInfoId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceInfoId) : options.longs === Number ? new $util.LongBits(message.serviceInfoId.low >>> 0, message.serviceInfoId.high >>> 0).toNumber(true) : message.serviceInfoId; - if (message.resourceId != null && message.hasOwnProperty("resourceId")) + if (message.resourceId != null && Object.hasOwnProperty.call(message, "resourceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.resourceId = typeof message.resourceId === "number" ? BigInt(message.resourceId) : $util.Long.fromBits(message.resourceId.low >>> 0, message.resourceId.high >>> 0, true).toBigInt(); else if (typeof message.resourceId === "number") object.resourceId = options.longs === String ? String(message.resourceId) : message.resourceId; else object.resourceId = options.longs === String ? $util.Long.prototype.toString.call(message.resourceId) : options.longs === Number ? new $util.LongBits(message.resourceId.low >>> 0, message.resourceId.high >>> 0).toNumber(true) : message.resourceId; - if (message.logger != null && message.hasOwnProperty("logger")) + if (message.logger != null && Object.hasOwnProperty.call(message, "logger")) object.logger = message.logger; - if (message.logLevel != null && message.hasOwnProperty("logLevel")) + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) object.logLevel = message.logLevel; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.exception != null && message.hasOwnProperty("exception")) + if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) object.exception = message.exception; - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) object.dateCreated = message.dateCreated; return object; }; @@ -227225,7 +228549,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -227297,7 +228621,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entry != null && message.hasOwnProperty("entry")) { + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) { if (!Array.isArray(message.entry)) return "entry: array expected"; for (let i = 0; i < message.entry.length; ++i) { @@ -227320,6 +228644,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -227330,7 +228656,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogAddRequest.entry: array expected"); message.entry = []; for (let i = 0; i < object.entry.length; ++i) { - if (typeof object.entry[i] !== "object") + if (!$util.isObject(object.entry[i])) throw TypeError(".ServiceLogger.ServiceLogAddRequest.entry: object expected"); message.entry[i] = $root.ServiceLogger.ServiceLogRecord.fromObject(object.entry[i], long + 1); } @@ -227471,7 +228797,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -227543,7 +228869,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entry != null && message.hasOwnProperty("entry")) { + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) { if (!Array.isArray(message.entry)) return "entry: array expected"; for (let i = 0; i < message.entry.length; ++i) { @@ -227566,6 +228892,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -227576,7 +228904,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogResponse.entry: array expected"); message.entry = []; for (let i = 0; i < object.entry.length; ++i) { - if (typeof object.entry[i] !== "object") + if (!$util.isObject(object.entry[i])) throw TypeError(".ServiceLogger.ServiceLogResponse.entry: object expected"); message.entry[i] = $root.ServiceLogger.ServiceLogRecord.fromObject(object.entry[i], long + 1); } @@ -227761,7 +229089,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogClearRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -227849,19 +229177,19 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.useDefaults != null && message.hasOwnProperty("useDefaults")) + if (message.useDefaults != null && Object.hasOwnProperty.call(message, "useDefaults")) if (typeof message.useDefaults !== "boolean") return "useDefaults: boolean expected"; - if (message.serviceTypeId != null && message.hasOwnProperty("serviceTypeId")) + if (message.serviceTypeId != null && Object.hasOwnProperty.call(message, "serviceTypeId")) if (!$util.isInteger(message.serviceTypeId) && !(message.serviceTypeId && $util.isInteger(message.serviceTypeId.low) && $util.isInteger(message.serviceTypeId.high))) return "serviceTypeId: integer|Long expected"; - if (message.daysOld != null && message.hasOwnProperty("daysOld")) + if (message.daysOld != null && Object.hasOwnProperty.call(message, "daysOld")) if (!$util.isInteger(message.daysOld)) return "daysOld: integer expected"; - if (message.hoursOld != null && message.hasOwnProperty("hoursOld")) + if (message.hoursOld != null && Object.hasOwnProperty.call(message, "hoursOld")) if (!$util.isInteger(message.hoursOld)) return "hoursOld: integer expected"; - if (message.resourceIdRange != null && message.hasOwnProperty("resourceIdRange")) { + if (message.resourceIdRange != null && Object.hasOwnProperty.call(message, "resourceIdRange")) { if (!Array.isArray(message.resourceIdRange)) return "resourceIdRange: array expected"; for (let i = 0; i < message.resourceIdRange.length; ++i) { @@ -227884,6 +229212,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogClearRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogClearRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogClearRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -227909,7 +229239,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogClearRequest.resourceIdRange: array expected"); message.resourceIdRange = []; for (let i = 0; i < object.resourceIdRange.length; ++i) { - if (typeof object.resourceIdRange[i] !== "object") + if (!$util.isObject(object.resourceIdRange[i])) throw TypeError(".ServiceLogger.ServiceLogClearRequest.resourceIdRange: object expected"); message.resourceIdRange[i] = $root.ServiceLogger.IdRange.fromObject(object.resourceIdRange[i], long + 1); } @@ -227946,18 +229276,18 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.daysOld = 0; object.hoursOld = 0; } - if (message.useDefaults != null && message.hasOwnProperty("useDefaults")) + if (message.useDefaults != null && Object.hasOwnProperty.call(message, "useDefaults")) object.useDefaults = message.useDefaults; - if (message.serviceTypeId != null && message.hasOwnProperty("serviceTypeId")) + if (message.serviceTypeId != null && Object.hasOwnProperty.call(message, "serviceTypeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceTypeId = typeof message.serviceTypeId === "number" ? BigInt(message.serviceTypeId) : $util.Long.fromBits(message.serviceTypeId.low >>> 0, message.serviceTypeId.high >>> 0, true).toBigInt(); else if (typeof message.serviceTypeId === "number") object.serviceTypeId = options.longs === String ? String(message.serviceTypeId) : message.serviceTypeId; else object.serviceTypeId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceTypeId) : options.longs === Number ? new $util.LongBits(message.serviceTypeId.low >>> 0, message.serviceTypeId.high >>> 0).toNumber(true) : message.serviceTypeId; - if (message.daysOld != null && message.hasOwnProperty("daysOld")) + if (message.daysOld != null && Object.hasOwnProperty.call(message, "daysOld")) object.daysOld = message.daysOld; - if (message.hoursOld != null && message.hasOwnProperty("hoursOld")) + if (message.hoursOld != null && Object.hasOwnProperty.call(message, "hoursOld")) object.hoursOld = message.hoursOld; if (message.resourceIdRange && message.resourceIdRange.length) { object.resourceIdRange = []; @@ -228117,7 +229447,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { * @returns {$protobuf.Writer} Writer */ ServiceLogClearResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -228205,13 +229535,13 @@ export const ServiceLogger = $root.ServiceLogger = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.serviceTypeId != null && message.hasOwnProperty("serviceTypeId")) + if (message.serviceTypeId != null && Object.hasOwnProperty.call(message, "serviceTypeId")) if (!$util.isInteger(message.serviceTypeId) && !(message.serviceTypeId && $util.isInteger(message.serviceTypeId.low) && $util.isInteger(message.serviceTypeId.high))) return "serviceTypeId: integer|Long expected"; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) if (!$util.isString(message.serviceName)) return "serviceName: string expected"; - if (message.resourceIdRange != null && message.hasOwnProperty("resourceIdRange")) { + if (message.resourceIdRange != null && Object.hasOwnProperty.call(message, "resourceIdRange")) { if (!Array.isArray(message.resourceIdRange)) return "resourceIdRange: array expected"; for (let i = 0; i < message.resourceIdRange.length; ++i) { @@ -228220,10 +229550,10 @@ export const ServiceLogger = $root.ServiceLogger = (() => { return "resourceIdRange." + error; } } - if (message.numDeleted != null && message.hasOwnProperty("numDeleted")) + if (message.numDeleted != null && Object.hasOwnProperty.call(message, "numDeleted")) if (!$util.isInteger(message.numDeleted)) return "numDeleted: integer expected"; - if (message.numRemaining != null && message.hasOwnProperty("numRemaining")) + if (message.numRemaining != null && Object.hasOwnProperty.call(message, "numRemaining")) if (!$util.isInteger(message.numRemaining)) return "numRemaining: integer expected"; return null; @@ -228240,6 +229570,8 @@ export const ServiceLogger = $root.ServiceLogger = (() => { ServiceLogClearResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.ServiceLogger.ServiceLogClearResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".ServiceLogger.ServiceLogClearResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -228261,7 +229593,7 @@ export const ServiceLogger = $root.ServiceLogger = (() => { throw TypeError(".ServiceLogger.ServiceLogClearResponse.resourceIdRange: array expected"); message.resourceIdRange = []; for (let i = 0; i < object.resourceIdRange.length; ++i) { - if (typeof object.resourceIdRange[i] !== "object") + if (!$util.isObject(object.resourceIdRange[i])) throw TypeError(".ServiceLogger.ServiceLogClearResponse.resourceIdRange: object expected"); message.resourceIdRange[i] = $root.ServiceLogger.IdRange.fromObject(object.resourceIdRange[i], long + 1); } @@ -228302,23 +229634,23 @@ export const ServiceLogger = $root.ServiceLogger = (() => { object.numDeleted = 0; object.numRemaining = 0; } - if (message.serviceTypeId != null && message.hasOwnProperty("serviceTypeId")) + if (message.serviceTypeId != null && Object.hasOwnProperty.call(message, "serviceTypeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serviceTypeId = typeof message.serviceTypeId === "number" ? BigInt(message.serviceTypeId) : $util.Long.fromBits(message.serviceTypeId.low >>> 0, message.serviceTypeId.high >>> 0, true).toBigInt(); else if (typeof message.serviceTypeId === "number") object.serviceTypeId = options.longs === String ? String(message.serviceTypeId) : message.serviceTypeId; else object.serviceTypeId = options.longs === String ? $util.Long.prototype.toString.call(message.serviceTypeId) : options.longs === Number ? new $util.LongBits(message.serviceTypeId.low >>> 0, message.serviceTypeId.high >>> 0).toNumber(true) : message.serviceTypeId; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) object.serviceName = message.serviceName; if (message.resourceIdRange && message.resourceIdRange.length) { object.resourceIdRange = []; for (let j = 0; j < message.resourceIdRange.length; ++j) object.resourceIdRange[j] = $root.ServiceLogger.IdRange.toObject(message.resourceIdRange[j], options, q + 1); } - if (message.numDeleted != null && message.hasOwnProperty("numDeleted")) + if (message.numDeleted != null && Object.hasOwnProperty.call(message, "numDeleted")) object.numDeleted = message.numDeleted; - if (message.numRemaining != null && message.hasOwnProperty("numRemaining")) + if (message.numRemaining != null && Object.hasOwnProperty.call(message, "numRemaining")) object.numRemaining = message.numRemaining; return object; }; @@ -228475,7 +229807,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SyncDownRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -228553,13 +229885,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; - if (message.dataVersion != null && message.hasOwnProperty("dataVersion")) + if (message.dataVersion != null && Object.hasOwnProperty.call(message, "dataVersion")) if (!$util.isInteger(message.dataVersion)) return "dataVersion: integer expected"; - if (message.debug != null && message.hasOwnProperty("debug")) + if (message.debug != null && Object.hasOwnProperty.call(message, "debug")) if (typeof message.debug !== "boolean") return "debug: boolean expected"; return null; @@ -228576,6 +229908,8 @@ export const Vault = $root.Vault = (() => { SyncDownRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SyncDownRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SyncDownRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -228621,11 +229955,11 @@ export const Vault = $root.Vault = (() => { object.dataVersion = 0; object.debug = false; } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; - if (message.dataVersion != null && message.hasOwnProperty("dataVersion")) + if (message.dataVersion != null && Object.hasOwnProperty.call(message, "dataVersion")) object.dataVersion = message.dataVersion; - if (message.debug != null && message.hasOwnProperty("debug")) + if (message.debug != null && Object.hasOwnProperty.call(message, "debug")) object.debug = message.debug; return object; }; @@ -229331,7 +230665,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SyncDownResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -229669,13 +231003,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; - if (message.cacheStatus != null && message.hasOwnProperty("cacheStatus")) + if (message.cacheStatus != null && Object.hasOwnProperty.call(message, "cacheStatus")) switch (message.cacheStatus) { default: return "cacheStatus: enum value expected"; @@ -229683,7 +231017,7 @@ export const Vault = $root.Vault = (() => { case 1: break; } - if (message.userFolders != null && message.hasOwnProperty("userFolders")) { + if (message.userFolders != null && Object.hasOwnProperty.call(message, "userFolders")) { if (!Array.isArray(message.userFolders)) return "userFolders: array expected"; for (let i = 0; i < message.userFolders.length; ++i) { @@ -229692,7 +231026,7 @@ export const Vault = $root.Vault = (() => { return "userFolders." + error; } } - if (message.sharedFolders != null && message.hasOwnProperty("sharedFolders")) { + if (message.sharedFolders != null && Object.hasOwnProperty.call(message, "sharedFolders")) { if (!Array.isArray(message.sharedFolders)) return "sharedFolders: array expected"; for (let i = 0; i < message.sharedFolders.length; ++i) { @@ -229701,7 +231035,7 @@ export const Vault = $root.Vault = (() => { return "sharedFolders." + error; } } - if (message.userFolderSharedFolders != null && message.hasOwnProperty("userFolderSharedFolders")) { + if (message.userFolderSharedFolders != null && Object.hasOwnProperty.call(message, "userFolderSharedFolders")) { if (!Array.isArray(message.userFolderSharedFolders)) return "userFolderSharedFolders: array expected"; for (let i = 0; i < message.userFolderSharedFolders.length; ++i) { @@ -229710,7 +231044,7 @@ export const Vault = $root.Vault = (() => { return "userFolderSharedFolders." + error; } } - if (message.sharedFolderFolders != null && message.hasOwnProperty("sharedFolderFolders")) { + if (message.sharedFolderFolders != null && Object.hasOwnProperty.call(message, "sharedFolderFolders")) { if (!Array.isArray(message.sharedFolderFolders)) return "sharedFolderFolders: array expected"; for (let i = 0; i < message.sharedFolderFolders.length; ++i) { @@ -229719,7 +231053,7 @@ export const Vault = $root.Vault = (() => { return "sharedFolderFolders." + error; } } - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -229728,7 +231062,7 @@ export const Vault = $root.Vault = (() => { return "records." + error; } } - if (message.recordMetaData != null && message.hasOwnProperty("recordMetaData")) { + if (message.recordMetaData != null && Object.hasOwnProperty.call(message, "recordMetaData")) { if (!Array.isArray(message.recordMetaData)) return "recordMetaData: array expected"; for (let i = 0; i < message.recordMetaData.length; ++i) { @@ -229737,7 +231071,7 @@ export const Vault = $root.Vault = (() => { return "recordMetaData." + error; } } - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) { + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) { if (!Array.isArray(message.nonSharedData)) return "nonSharedData: array expected"; for (let i = 0; i < message.nonSharedData.length; ++i) { @@ -229746,7 +231080,7 @@ export const Vault = $root.Vault = (() => { return "nonSharedData." + error; } } - if (message.recordLinks != null && message.hasOwnProperty("recordLinks")) { + if (message.recordLinks != null && Object.hasOwnProperty.call(message, "recordLinks")) { if (!Array.isArray(message.recordLinks)) return "recordLinks: array expected"; for (let i = 0; i < message.recordLinks.length; ++i) { @@ -229755,7 +231089,7 @@ export const Vault = $root.Vault = (() => { return "recordLinks." + error; } } - if (message.userFolderRecords != null && message.hasOwnProperty("userFolderRecords")) { + if (message.userFolderRecords != null && Object.hasOwnProperty.call(message, "userFolderRecords")) { if (!Array.isArray(message.userFolderRecords)) return "userFolderRecords: array expected"; for (let i = 0; i < message.userFolderRecords.length; ++i) { @@ -229764,7 +231098,7 @@ export const Vault = $root.Vault = (() => { return "userFolderRecords." + error; } } - if (message.sharedFolderRecords != null && message.hasOwnProperty("sharedFolderRecords")) { + if (message.sharedFolderRecords != null && Object.hasOwnProperty.call(message, "sharedFolderRecords")) { if (!Array.isArray(message.sharedFolderRecords)) return "sharedFolderRecords: array expected"; for (let i = 0; i < message.sharedFolderRecords.length; ++i) { @@ -229773,7 +231107,7 @@ export const Vault = $root.Vault = (() => { return "sharedFolderRecords." + error; } } - if (message.sharedFolderFolderRecords != null && message.hasOwnProperty("sharedFolderFolderRecords")) { + if (message.sharedFolderFolderRecords != null && Object.hasOwnProperty.call(message, "sharedFolderFolderRecords")) { if (!Array.isArray(message.sharedFolderFolderRecords)) return "sharedFolderFolderRecords: array expected"; for (let i = 0; i < message.sharedFolderFolderRecords.length; ++i) { @@ -229782,7 +231116,7 @@ export const Vault = $root.Vault = (() => { return "sharedFolderFolderRecords." + error; } } - if (message.sharedFolderUsers != null && message.hasOwnProperty("sharedFolderUsers")) { + if (message.sharedFolderUsers != null && Object.hasOwnProperty.call(message, "sharedFolderUsers")) { if (!Array.isArray(message.sharedFolderUsers)) return "sharedFolderUsers: array expected"; for (let i = 0; i < message.sharedFolderUsers.length; ++i) { @@ -229791,7 +231125,7 @@ export const Vault = $root.Vault = (() => { return "sharedFolderUsers." + error; } } - if (message.sharedFolderTeams != null && message.hasOwnProperty("sharedFolderTeams")) { + if (message.sharedFolderTeams != null && Object.hasOwnProperty.call(message, "sharedFolderTeams")) { if (!Array.isArray(message.sharedFolderTeams)) return "sharedFolderTeams: array expected"; for (let i = 0; i < message.sharedFolderTeams.length; ++i) { @@ -229800,14 +231134,14 @@ export const Vault = $root.Vault = (() => { return "sharedFolderTeams." + error; } } - if (message.recordAddAuditData != null && message.hasOwnProperty("recordAddAuditData")) { + if (message.recordAddAuditData != null && Object.hasOwnProperty.call(message, "recordAddAuditData")) { if (!Array.isArray(message.recordAddAuditData)) return "recordAddAuditData: array expected"; for (let i = 0; i < message.recordAddAuditData.length; ++i) if (!(message.recordAddAuditData[i] && typeof message.recordAddAuditData[i].length === "number" || $util.isString(message.recordAddAuditData[i]))) return "recordAddAuditData: buffer[] expected"; } - if (message.teams != null && message.hasOwnProperty("teams")) { + if (message.teams != null && Object.hasOwnProperty.call(message, "teams")) { if (!Array.isArray(message.teams)) return "teams: array expected"; for (let i = 0; i < message.teams.length; ++i) { @@ -229816,7 +231150,7 @@ export const Vault = $root.Vault = (() => { return "teams." + error; } } - if (message.sharingChanges != null && message.hasOwnProperty("sharingChanges")) { + if (message.sharingChanges != null && Object.hasOwnProperty.call(message, "sharingChanges")) { if (!Array.isArray(message.sharingChanges)) return "sharingChanges: array expected"; for (let i = 0; i < message.sharingChanges.length; ++i) { @@ -229825,17 +231159,17 @@ export const Vault = $root.Vault = (() => { return "sharingChanges." + error; } } - if (message.profile != null && message.hasOwnProperty("profile")) { + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) { let error = $root.Vault.Profile.verify(message.profile, long + 1); if (error) return "profile." + error; } - if (message.profilePic != null && message.hasOwnProperty("profilePic")) { + if (message.profilePic != null && Object.hasOwnProperty.call(message, "profilePic")) { let error = $root.Vault.ProfilePic.verify(message.profilePic, long + 1); if (error) return "profilePic." + error; } - if (message.pendingTeamMembers != null && message.hasOwnProperty("pendingTeamMembers")) { + if (message.pendingTeamMembers != null && Object.hasOwnProperty.call(message, "pendingTeamMembers")) { if (!Array.isArray(message.pendingTeamMembers)) return "pendingTeamMembers: array expected"; for (let i = 0; i < message.pendingTeamMembers.length; ++i) { @@ -229844,7 +231178,7 @@ export const Vault = $root.Vault = (() => { return "pendingTeamMembers." + error; } } - if (message.breachWatchRecords != null && message.hasOwnProperty("breachWatchRecords")) { + if (message.breachWatchRecords != null && Object.hasOwnProperty.call(message, "breachWatchRecords")) { if (!Array.isArray(message.breachWatchRecords)) return "breachWatchRecords: array expected"; for (let i = 0; i < message.breachWatchRecords.length; ++i) { @@ -229853,7 +231187,7 @@ export const Vault = $root.Vault = (() => { return "breachWatchRecords." + error; } } - if (message.userAuths != null && message.hasOwnProperty("userAuths")) { + if (message.userAuths != null && Object.hasOwnProperty.call(message, "userAuths")) { if (!Array.isArray(message.userAuths)) return "userAuths: array expected"; for (let i = 0; i < message.userAuths.length; ++i) { @@ -229862,7 +231196,7 @@ export const Vault = $root.Vault = (() => { return "userAuths." + error; } } - if (message.breachWatchSecurityData != null && message.hasOwnProperty("breachWatchSecurityData")) { + if (message.breachWatchSecurityData != null && Object.hasOwnProperty.call(message, "breachWatchSecurityData")) { if (!Array.isArray(message.breachWatchSecurityData)) return "breachWatchSecurityData: array expected"; for (let i = 0; i < message.breachWatchSecurityData.length; ++i) { @@ -229871,26 +231205,26 @@ export const Vault = $root.Vault = (() => { return "breachWatchSecurityData." + error; } } - if (message.reusedPasswords != null && message.hasOwnProperty("reusedPasswords")) { + if (message.reusedPasswords != null && Object.hasOwnProperty.call(message, "reusedPasswords")) { let error = $root.Vault.ReusedPasswords.verify(message.reusedPasswords, long + 1); if (error) return "reusedPasswords." + error; } - if (message.removedUserFolders != null && message.hasOwnProperty("removedUserFolders")) { + if (message.removedUserFolders != null && Object.hasOwnProperty.call(message, "removedUserFolders")) { if (!Array.isArray(message.removedUserFolders)) return "removedUserFolders: array expected"; for (let i = 0; i < message.removedUserFolders.length; ++i) if (!(message.removedUserFolders[i] && typeof message.removedUserFolders[i].length === "number" || $util.isString(message.removedUserFolders[i]))) return "removedUserFolders: buffer[] expected"; } - if (message.removedSharedFolders != null && message.hasOwnProperty("removedSharedFolders")) { + if (message.removedSharedFolders != null && Object.hasOwnProperty.call(message, "removedSharedFolders")) { if (!Array.isArray(message.removedSharedFolders)) return "removedSharedFolders: array expected"; for (let i = 0; i < message.removedSharedFolders.length; ++i) if (!(message.removedSharedFolders[i] && typeof message.removedSharedFolders[i].length === "number" || $util.isString(message.removedSharedFolders[i]))) return "removedSharedFolders: buffer[] expected"; } - if (message.removedUserFolderSharedFolders != null && message.hasOwnProperty("removedUserFolderSharedFolders")) { + if (message.removedUserFolderSharedFolders != null && Object.hasOwnProperty.call(message, "removedUserFolderSharedFolders")) { if (!Array.isArray(message.removedUserFolderSharedFolders)) return "removedUserFolderSharedFolders: array expected"; for (let i = 0; i < message.removedUserFolderSharedFolders.length; ++i) { @@ -229899,7 +231233,7 @@ export const Vault = $root.Vault = (() => { return "removedUserFolderSharedFolders." + error; } } - if (message.removedSharedFolderFolders != null && message.hasOwnProperty("removedSharedFolderFolders")) { + if (message.removedSharedFolderFolders != null && Object.hasOwnProperty.call(message, "removedSharedFolderFolders")) { if (!Array.isArray(message.removedSharedFolderFolders)) return "removedSharedFolderFolders: array expected"; for (let i = 0; i < message.removedSharedFolderFolders.length; ++i) { @@ -229908,14 +231242,14 @@ export const Vault = $root.Vault = (() => { return "removedSharedFolderFolders." + error; } } - if (message.removedRecords != null && message.hasOwnProperty("removedRecords")) { + if (message.removedRecords != null && Object.hasOwnProperty.call(message, "removedRecords")) { if (!Array.isArray(message.removedRecords)) return "removedRecords: array expected"; for (let i = 0; i < message.removedRecords.length; ++i) if (!(message.removedRecords[i] && typeof message.removedRecords[i].length === "number" || $util.isString(message.removedRecords[i]))) return "removedRecords: buffer[] expected"; } - if (message.removedRecordLinks != null && message.hasOwnProperty("removedRecordLinks")) { + if (message.removedRecordLinks != null && Object.hasOwnProperty.call(message, "removedRecordLinks")) { if (!Array.isArray(message.removedRecordLinks)) return "removedRecordLinks: array expected"; for (let i = 0; i < message.removedRecordLinks.length; ++i) { @@ -229924,7 +231258,7 @@ export const Vault = $root.Vault = (() => { return "removedRecordLinks." + error; } } - if (message.removedUserFolderRecords != null && message.hasOwnProperty("removedUserFolderRecords")) { + if (message.removedUserFolderRecords != null && Object.hasOwnProperty.call(message, "removedUserFolderRecords")) { if (!Array.isArray(message.removedUserFolderRecords)) return "removedUserFolderRecords: array expected"; for (let i = 0; i < message.removedUserFolderRecords.length; ++i) { @@ -229933,7 +231267,7 @@ export const Vault = $root.Vault = (() => { return "removedUserFolderRecords." + error; } } - if (message.removedSharedFolderRecords != null && message.hasOwnProperty("removedSharedFolderRecords")) { + if (message.removedSharedFolderRecords != null && Object.hasOwnProperty.call(message, "removedSharedFolderRecords")) { if (!Array.isArray(message.removedSharedFolderRecords)) return "removedSharedFolderRecords: array expected"; for (let i = 0; i < message.removedSharedFolderRecords.length; ++i) { @@ -229942,7 +231276,7 @@ export const Vault = $root.Vault = (() => { return "removedSharedFolderRecords." + error; } } - if (message.removedSharedFolderFolderRecords != null && message.hasOwnProperty("removedSharedFolderFolderRecords")) { + if (message.removedSharedFolderFolderRecords != null && Object.hasOwnProperty.call(message, "removedSharedFolderFolderRecords")) { if (!Array.isArray(message.removedSharedFolderFolderRecords)) return "removedSharedFolderFolderRecords: array expected"; for (let i = 0; i < message.removedSharedFolderFolderRecords.length; ++i) { @@ -229951,7 +231285,7 @@ export const Vault = $root.Vault = (() => { return "removedSharedFolderFolderRecords." + error; } } - if (message.removedSharedFolderUsers != null && message.hasOwnProperty("removedSharedFolderUsers")) { + if (message.removedSharedFolderUsers != null && Object.hasOwnProperty.call(message, "removedSharedFolderUsers")) { if (!Array.isArray(message.removedSharedFolderUsers)) return "removedSharedFolderUsers: array expected"; for (let i = 0; i < message.removedSharedFolderUsers.length; ++i) { @@ -229960,7 +231294,7 @@ export const Vault = $root.Vault = (() => { return "removedSharedFolderUsers." + error; } } - if (message.removedSharedFolderTeams != null && message.hasOwnProperty("removedSharedFolderTeams")) { + if (message.removedSharedFolderTeams != null && Object.hasOwnProperty.call(message, "removedSharedFolderTeams")) { if (!Array.isArray(message.removedSharedFolderTeams)) return "removedSharedFolderTeams: array expected"; for (let i = 0; i < message.removedSharedFolderTeams.length; ++i) { @@ -229969,14 +231303,14 @@ export const Vault = $root.Vault = (() => { return "removedSharedFolderTeams." + error; } } - if (message.removedTeams != null && message.hasOwnProperty("removedTeams")) { + if (message.removedTeams != null && Object.hasOwnProperty.call(message, "removedTeams")) { if (!Array.isArray(message.removedTeams)) return "removedTeams: array expected"; for (let i = 0; i < message.removedTeams.length; ++i) if (!(message.removedTeams[i] && typeof message.removedTeams[i].length === "number" || $util.isString(message.removedTeams[i]))) return "removedTeams: buffer[] expected"; } - if (message.ksmAppShares != null && message.hasOwnProperty("ksmAppShares")) { + if (message.ksmAppShares != null && Object.hasOwnProperty.call(message, "ksmAppShares")) { if (!Array.isArray(message.ksmAppShares)) return "ksmAppShares: array expected"; for (let i = 0; i < message.ksmAppShares.length; ++i) { @@ -229985,7 +231319,7 @@ export const Vault = $root.Vault = (() => { return "ksmAppShares." + error; } } - if (message.ksmAppClients != null && message.hasOwnProperty("ksmAppClients")) { + if (message.ksmAppClients != null && Object.hasOwnProperty.call(message, "ksmAppClients")) { if (!Array.isArray(message.ksmAppClients)) return "ksmAppClients: array expected"; for (let i = 0; i < message.ksmAppClients.length; ++i) { @@ -229994,7 +231328,7 @@ export const Vault = $root.Vault = (() => { return "ksmAppClients." + error; } } - if (message.shareInvitations != null && message.hasOwnProperty("shareInvitations")) { + if (message.shareInvitations != null && Object.hasOwnProperty.call(message, "shareInvitations")) { if (!Array.isArray(message.shareInvitations)) return "shareInvitations: array expected"; for (let i = 0; i < message.shareInvitations.length; ++i) { @@ -230003,12 +231337,12 @@ export const Vault = $root.Vault = (() => { return "shareInvitations." + error; } } - if (message.diagnostics != null && message.hasOwnProperty("diagnostics")) { + if (message.diagnostics != null && Object.hasOwnProperty.call(message, "diagnostics")) { let error = $root.Vault.SyncDiagnostics.verify(message.diagnostics, long + 1); if (error) return "diagnostics." + error; } - if (message.recordRotations != null && message.hasOwnProperty("recordRotations")) { + if (message.recordRotations != null && Object.hasOwnProperty.call(message, "recordRotations")) { if (!Array.isArray(message.recordRotations)) return "recordRotations: array expected"; for (let i = 0; i < message.recordRotations.length; ++i) { @@ -230017,7 +231351,7 @@ export const Vault = $root.Vault = (() => { return "recordRotations." + error; } } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -230026,14 +231360,14 @@ export const Vault = $root.Vault = (() => { return "users." + error; } } - if (message.removedUsers != null && message.hasOwnProperty("removedUsers")) { + if (message.removedUsers != null && Object.hasOwnProperty.call(message, "removedUsers")) { if (!Array.isArray(message.removedUsers)) return "removedUsers: array expected"; for (let i = 0; i < message.removedUsers.length; ++i) if (!(message.removedUsers[i] && typeof message.removedUsers[i].length === "number" || $util.isString(message.removedUsers[i]))) return "removedUsers: buffer[] expected"; } - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) { + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) { if (!Array.isArray(message.securityScoreData)) return "securityScoreData: array expected"; for (let i = 0; i < message.securityScoreData.length; ++i) { @@ -230042,7 +231376,7 @@ export const Vault = $root.Vault = (() => { return "securityScoreData." + error; } } - if (message.notificationSync != null && message.hasOwnProperty("notificationSync")) { + if (message.notificationSync != null && Object.hasOwnProperty.call(message, "notificationSync")) { if (!Array.isArray(message.notificationSync)) return "notificationSync: array expected"; for (let i = 0; i < message.notificationSync.length; ++i) { @@ -230051,7 +231385,7 @@ export const Vault = $root.Vault = (() => { return "notificationSync." + error; } } - if (message.keeperDriveData != null && message.hasOwnProperty("keeperDriveData")) { + if (message.keeperDriveData != null && Object.hasOwnProperty.call(message, "keeperDriveData")) { let error = $root.Vault.KeeperDriveData.verify(message.keeperDriveData, long + 1); if (error) return "keeperDriveData." + error; @@ -230070,6 +231404,8 @@ export const Vault = $root.Vault = (() => { SyncDownResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SyncDownResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SyncDownResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -230103,7 +231439,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.userFolders: array expected"); message.userFolders = []; for (let i = 0; i < object.userFolders.length; ++i) { - if (typeof object.userFolders[i] !== "object") + if (!$util.isObject(object.userFolders[i])) throw TypeError(".Vault.SyncDownResponse.userFolders: object expected"); message.userFolders[i] = $root.Vault.UserFolder.fromObject(object.userFolders[i], long + 1); } @@ -230113,7 +231449,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharedFolders: array expected"); message.sharedFolders = []; for (let i = 0; i < object.sharedFolders.length; ++i) { - if (typeof object.sharedFolders[i] !== "object") + if (!$util.isObject(object.sharedFolders[i])) throw TypeError(".Vault.SyncDownResponse.sharedFolders: object expected"); message.sharedFolders[i] = $root.Vault.SharedFolder.fromObject(object.sharedFolders[i], long + 1); } @@ -230123,7 +231459,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.userFolderSharedFolders: array expected"); message.userFolderSharedFolders = []; for (let i = 0; i < object.userFolderSharedFolders.length; ++i) { - if (typeof object.userFolderSharedFolders[i] !== "object") + if (!$util.isObject(object.userFolderSharedFolders[i])) throw TypeError(".Vault.SyncDownResponse.userFolderSharedFolders: object expected"); message.userFolderSharedFolders[i] = $root.Vault.UserFolderSharedFolder.fromObject(object.userFolderSharedFolders[i], long + 1); } @@ -230133,7 +231469,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharedFolderFolders: array expected"); message.sharedFolderFolders = []; for (let i = 0; i < object.sharedFolderFolders.length; ++i) { - if (typeof object.sharedFolderFolders[i] !== "object") + if (!$util.isObject(object.sharedFolderFolders[i])) throw TypeError(".Vault.SyncDownResponse.sharedFolderFolders: object expected"); message.sharedFolderFolders[i] = $root.Vault.SharedFolderFolder.fromObject(object.sharedFolderFolders[i], long + 1); } @@ -230143,7 +231479,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Vault.SyncDownResponse.records: object expected"); message.records[i] = $root.Vault.Record.fromObject(object.records[i], long + 1); } @@ -230153,7 +231489,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.recordMetaData: array expected"); message.recordMetaData = []; for (let i = 0; i < object.recordMetaData.length; ++i) { - if (typeof object.recordMetaData[i] !== "object") + if (!$util.isObject(object.recordMetaData[i])) throw TypeError(".Vault.SyncDownResponse.recordMetaData: object expected"); message.recordMetaData[i] = $root.Vault.RecordMetaData.fromObject(object.recordMetaData[i], long + 1); } @@ -230163,7 +231499,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.nonSharedData: array expected"); message.nonSharedData = []; for (let i = 0; i < object.nonSharedData.length; ++i) { - if (typeof object.nonSharedData[i] !== "object") + if (!$util.isObject(object.nonSharedData[i])) throw TypeError(".Vault.SyncDownResponse.nonSharedData: object expected"); message.nonSharedData[i] = $root.Vault.NonSharedData.fromObject(object.nonSharedData[i], long + 1); } @@ -230173,7 +231509,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.recordLinks: array expected"); message.recordLinks = []; for (let i = 0; i < object.recordLinks.length; ++i) { - if (typeof object.recordLinks[i] !== "object") + if (!$util.isObject(object.recordLinks[i])) throw TypeError(".Vault.SyncDownResponse.recordLinks: object expected"); message.recordLinks[i] = $root.Vault.RecordLink.fromObject(object.recordLinks[i], long + 1); } @@ -230183,7 +231519,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.userFolderRecords: array expected"); message.userFolderRecords = []; for (let i = 0; i < object.userFolderRecords.length; ++i) { - if (typeof object.userFolderRecords[i] !== "object") + if (!$util.isObject(object.userFolderRecords[i])) throw TypeError(".Vault.SyncDownResponse.userFolderRecords: object expected"); message.userFolderRecords[i] = $root.Vault.UserFolderRecord.fromObject(object.userFolderRecords[i], long + 1); } @@ -230193,7 +231529,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharedFolderRecords: array expected"); message.sharedFolderRecords = []; for (let i = 0; i < object.sharedFolderRecords.length; ++i) { - if (typeof object.sharedFolderRecords[i] !== "object") + if (!$util.isObject(object.sharedFolderRecords[i])) throw TypeError(".Vault.SyncDownResponse.sharedFolderRecords: object expected"); message.sharedFolderRecords[i] = $root.Vault.SharedFolderRecord.fromObject(object.sharedFolderRecords[i], long + 1); } @@ -230203,7 +231539,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharedFolderFolderRecords: array expected"); message.sharedFolderFolderRecords = []; for (let i = 0; i < object.sharedFolderFolderRecords.length; ++i) { - if (typeof object.sharedFolderFolderRecords[i] !== "object") + if (!$util.isObject(object.sharedFolderFolderRecords[i])) throw TypeError(".Vault.SyncDownResponse.sharedFolderFolderRecords: object expected"); message.sharedFolderFolderRecords[i] = $root.Vault.SharedFolderFolderRecord.fromObject(object.sharedFolderFolderRecords[i], long + 1); } @@ -230213,7 +231549,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharedFolderUsers: array expected"); message.sharedFolderUsers = []; for (let i = 0; i < object.sharedFolderUsers.length; ++i) { - if (typeof object.sharedFolderUsers[i] !== "object") + if (!$util.isObject(object.sharedFolderUsers[i])) throw TypeError(".Vault.SyncDownResponse.sharedFolderUsers: object expected"); message.sharedFolderUsers[i] = $root.Vault.SharedFolderUser.fromObject(object.sharedFolderUsers[i], long + 1); } @@ -230223,7 +231559,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharedFolderTeams: array expected"); message.sharedFolderTeams = []; for (let i = 0; i < object.sharedFolderTeams.length; ++i) { - if (typeof object.sharedFolderTeams[i] !== "object") + if (!$util.isObject(object.sharedFolderTeams[i])) throw TypeError(".Vault.SyncDownResponse.sharedFolderTeams: object expected"); message.sharedFolderTeams[i] = $root.Vault.SharedFolderTeam.fromObject(object.sharedFolderTeams[i], long + 1); } @@ -230243,7 +231579,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.teams: array expected"); message.teams = []; for (let i = 0; i < object.teams.length; ++i) { - if (typeof object.teams[i] !== "object") + if (!$util.isObject(object.teams[i])) throw TypeError(".Vault.SyncDownResponse.teams: object expected"); message.teams[i] = $root.Vault.Team.fromObject(object.teams[i], long + 1); } @@ -230253,18 +231589,18 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.sharingChanges: array expected"); message.sharingChanges = []; for (let i = 0; i < object.sharingChanges.length; ++i) { - if (typeof object.sharingChanges[i] !== "object") + if (!$util.isObject(object.sharingChanges[i])) throw TypeError(".Vault.SyncDownResponse.sharingChanges: object expected"); message.sharingChanges[i] = $root.Vault.SharingChange.fromObject(object.sharingChanges[i], long + 1); } } if (object.profile != null) { - if (typeof object.profile !== "object") + if (!$util.isObject(object.profile)) throw TypeError(".Vault.SyncDownResponse.profile: object expected"); message.profile = $root.Vault.Profile.fromObject(object.profile, long + 1); } if (object.profilePic != null) { - if (typeof object.profilePic !== "object") + if (!$util.isObject(object.profilePic)) throw TypeError(".Vault.SyncDownResponse.profilePic: object expected"); message.profilePic = $root.Vault.ProfilePic.fromObject(object.profilePic, long + 1); } @@ -230273,7 +231609,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.pendingTeamMembers: array expected"); message.pendingTeamMembers = []; for (let i = 0; i < object.pendingTeamMembers.length; ++i) { - if (typeof object.pendingTeamMembers[i] !== "object") + if (!$util.isObject(object.pendingTeamMembers[i])) throw TypeError(".Vault.SyncDownResponse.pendingTeamMembers: object expected"); message.pendingTeamMembers[i] = $root.Vault.PendingTeamMember.fromObject(object.pendingTeamMembers[i], long + 1); } @@ -230283,7 +231619,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.breachWatchRecords: array expected"); message.breachWatchRecords = []; for (let i = 0; i < object.breachWatchRecords.length; ++i) { - if (typeof object.breachWatchRecords[i] !== "object") + if (!$util.isObject(object.breachWatchRecords[i])) throw TypeError(".Vault.SyncDownResponse.breachWatchRecords: object expected"); message.breachWatchRecords[i] = $root.Vault.BreachWatchRecord.fromObject(object.breachWatchRecords[i], long + 1); } @@ -230293,7 +231629,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.userAuths: array expected"); message.userAuths = []; for (let i = 0; i < object.userAuths.length; ++i) { - if (typeof object.userAuths[i] !== "object") + if (!$util.isObject(object.userAuths[i])) throw TypeError(".Vault.SyncDownResponse.userAuths: object expected"); message.userAuths[i] = $root.Vault.UserAuth.fromObject(object.userAuths[i], long + 1); } @@ -230303,13 +231639,13 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.breachWatchSecurityData: array expected"); message.breachWatchSecurityData = []; for (let i = 0; i < object.breachWatchSecurityData.length; ++i) { - if (typeof object.breachWatchSecurityData[i] !== "object") + if (!$util.isObject(object.breachWatchSecurityData[i])) throw TypeError(".Vault.SyncDownResponse.breachWatchSecurityData: object expected"); message.breachWatchSecurityData[i] = $root.Vault.BreachWatchSecurityData.fromObject(object.breachWatchSecurityData[i], long + 1); } } if (object.reusedPasswords != null) { - if (typeof object.reusedPasswords !== "object") + if (!$util.isObject(object.reusedPasswords)) throw TypeError(".Vault.SyncDownResponse.reusedPasswords: object expected"); message.reusedPasswords = $root.Vault.ReusedPasswords.fromObject(object.reusedPasswords, long + 1); } @@ -230338,7 +231674,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedUserFolderSharedFolders: array expected"); message.removedUserFolderSharedFolders = []; for (let i = 0; i < object.removedUserFolderSharedFolders.length; ++i) { - if (typeof object.removedUserFolderSharedFolders[i] !== "object") + if (!$util.isObject(object.removedUserFolderSharedFolders[i])) throw TypeError(".Vault.SyncDownResponse.removedUserFolderSharedFolders: object expected"); message.removedUserFolderSharedFolders[i] = $root.Vault.UserFolderSharedFolder.fromObject(object.removedUserFolderSharedFolders[i], long + 1); } @@ -230348,7 +231684,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedSharedFolderFolders: array expected"); message.removedSharedFolderFolders = []; for (let i = 0; i < object.removedSharedFolderFolders.length; ++i) { - if (typeof object.removedSharedFolderFolders[i] !== "object") + if (!$util.isObject(object.removedSharedFolderFolders[i])) throw TypeError(".Vault.SyncDownResponse.removedSharedFolderFolders: object expected"); message.removedSharedFolderFolders[i] = $root.Vault.SharedFolderFolder.fromObject(object.removedSharedFolderFolders[i], long + 1); } @@ -230368,7 +231704,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedRecordLinks: array expected"); message.removedRecordLinks = []; for (let i = 0; i < object.removedRecordLinks.length; ++i) { - if (typeof object.removedRecordLinks[i] !== "object") + if (!$util.isObject(object.removedRecordLinks[i])) throw TypeError(".Vault.SyncDownResponse.removedRecordLinks: object expected"); message.removedRecordLinks[i] = $root.Vault.RecordLink.fromObject(object.removedRecordLinks[i], long + 1); } @@ -230378,7 +231714,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedUserFolderRecords: array expected"); message.removedUserFolderRecords = []; for (let i = 0; i < object.removedUserFolderRecords.length; ++i) { - if (typeof object.removedUserFolderRecords[i] !== "object") + if (!$util.isObject(object.removedUserFolderRecords[i])) throw TypeError(".Vault.SyncDownResponse.removedUserFolderRecords: object expected"); message.removedUserFolderRecords[i] = $root.Vault.UserFolderRecord.fromObject(object.removedUserFolderRecords[i], long + 1); } @@ -230388,7 +231724,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedSharedFolderRecords: array expected"); message.removedSharedFolderRecords = []; for (let i = 0; i < object.removedSharedFolderRecords.length; ++i) { - if (typeof object.removedSharedFolderRecords[i] !== "object") + if (!$util.isObject(object.removedSharedFolderRecords[i])) throw TypeError(".Vault.SyncDownResponse.removedSharedFolderRecords: object expected"); message.removedSharedFolderRecords[i] = $root.Vault.SharedFolderRecord.fromObject(object.removedSharedFolderRecords[i], long + 1); } @@ -230398,7 +231734,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedSharedFolderFolderRecords: array expected"); message.removedSharedFolderFolderRecords = []; for (let i = 0; i < object.removedSharedFolderFolderRecords.length; ++i) { - if (typeof object.removedSharedFolderFolderRecords[i] !== "object") + if (!$util.isObject(object.removedSharedFolderFolderRecords[i])) throw TypeError(".Vault.SyncDownResponse.removedSharedFolderFolderRecords: object expected"); message.removedSharedFolderFolderRecords[i] = $root.Vault.SharedFolderFolderRecord.fromObject(object.removedSharedFolderFolderRecords[i], long + 1); } @@ -230408,7 +231744,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedSharedFolderUsers: array expected"); message.removedSharedFolderUsers = []; for (let i = 0; i < object.removedSharedFolderUsers.length; ++i) { - if (typeof object.removedSharedFolderUsers[i] !== "object") + if (!$util.isObject(object.removedSharedFolderUsers[i])) throw TypeError(".Vault.SyncDownResponse.removedSharedFolderUsers: object expected"); message.removedSharedFolderUsers[i] = $root.Vault.SharedFolderUser.fromObject(object.removedSharedFolderUsers[i], long + 1); } @@ -230418,7 +231754,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.removedSharedFolderTeams: array expected"); message.removedSharedFolderTeams = []; for (let i = 0; i < object.removedSharedFolderTeams.length; ++i) { - if (typeof object.removedSharedFolderTeams[i] !== "object") + if (!$util.isObject(object.removedSharedFolderTeams[i])) throw TypeError(".Vault.SyncDownResponse.removedSharedFolderTeams: object expected"); message.removedSharedFolderTeams[i] = $root.Vault.SharedFolderTeam.fromObject(object.removedSharedFolderTeams[i], long + 1); } @@ -230438,7 +231774,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.ksmAppShares: array expected"); message.ksmAppShares = []; for (let i = 0; i < object.ksmAppShares.length; ++i) { - if (typeof object.ksmAppShares[i] !== "object") + if (!$util.isObject(object.ksmAppShares[i])) throw TypeError(".Vault.SyncDownResponse.ksmAppShares: object expected"); message.ksmAppShares[i] = $root.Vault.KsmChange.fromObject(object.ksmAppShares[i], long + 1); } @@ -230448,7 +231784,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.ksmAppClients: array expected"); message.ksmAppClients = []; for (let i = 0; i < object.ksmAppClients.length; ++i) { - if (typeof object.ksmAppClients[i] !== "object") + if (!$util.isObject(object.ksmAppClients[i])) throw TypeError(".Vault.SyncDownResponse.ksmAppClients: object expected"); message.ksmAppClients[i] = $root.Vault.KsmChange.fromObject(object.ksmAppClients[i], long + 1); } @@ -230458,13 +231794,13 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.shareInvitations: array expected"); message.shareInvitations = []; for (let i = 0; i < object.shareInvitations.length; ++i) { - if (typeof object.shareInvitations[i] !== "object") + if (!$util.isObject(object.shareInvitations[i])) throw TypeError(".Vault.SyncDownResponse.shareInvitations: object expected"); message.shareInvitations[i] = $root.Vault.ShareInvitation.fromObject(object.shareInvitations[i], long + 1); } } if (object.diagnostics != null) { - if (typeof object.diagnostics !== "object") + if (!$util.isObject(object.diagnostics)) throw TypeError(".Vault.SyncDownResponse.diagnostics: object expected"); message.diagnostics = $root.Vault.SyncDiagnostics.fromObject(object.diagnostics, long + 1); } @@ -230473,7 +231809,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.recordRotations: array expected"); message.recordRotations = []; for (let i = 0; i < object.recordRotations.length; ++i) { - if (typeof object.recordRotations[i] !== "object") + if (!$util.isObject(object.recordRotations[i])) throw TypeError(".Vault.SyncDownResponse.recordRotations: object expected"); message.recordRotations[i] = $root.Vault.RecordRotation.fromObject(object.recordRotations[i], long + 1); } @@ -230483,7 +231819,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Vault.SyncDownResponse.users: object expected"); message.users[i] = $root.Vault.User.fromObject(object.users[i], long + 1); } @@ -230503,7 +231839,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.securityScoreData: array expected"); message.securityScoreData = []; for (let i = 0; i < object.securityScoreData.length; ++i) { - if (typeof object.securityScoreData[i] !== "object") + if (!$util.isObject(object.securityScoreData[i])) throw TypeError(".Vault.SyncDownResponse.securityScoreData: object expected"); message.securityScoreData[i] = $root.Vault.SecurityScoreData.fromObject(object.securityScoreData[i], long + 1); } @@ -230513,13 +231849,13 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.SyncDownResponse.notificationSync: array expected"); message.notificationSync = []; for (let i = 0; i < object.notificationSync.length; ++i) { - if (typeof object.notificationSync[i] !== "object") + if (!$util.isObject(object.notificationSync[i])) throw TypeError(".Vault.SyncDownResponse.notificationSync: object expected"); message.notificationSync[i] = $root.NotificationCenter.NotificationWrapper.fromObject(object.notificationSync[i], long + 1); } } if (object.keeperDriveData != null) { - if (typeof object.keeperDriveData !== "object") + if (!$util.isObject(object.keeperDriveData)) throw TypeError(".Vault.SyncDownResponse.keeperDriveData: object expected"); message.keeperDriveData = $root.Vault.KeeperDriveData.fromObject(object.keeperDriveData, long + 1); } @@ -230601,11 +231937,11 @@ export const Vault = $root.Vault = (() => { object.diagnostics = null; object.keeperDriveData = null; } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; - if (message.cacheStatus != null && message.hasOwnProperty("cacheStatus")) + if (message.cacheStatus != null && Object.hasOwnProperty.call(message, "cacheStatus")) object.cacheStatus = options.enums === String ? $root.Vault.CacheStatus[message.cacheStatus] === undefined ? message.cacheStatus : $root.Vault.CacheStatus[message.cacheStatus] : message.cacheStatus; if (message.userFolders && message.userFolders.length) { object.userFolders = []; @@ -230687,9 +232023,9 @@ export const Vault = $root.Vault = (() => { for (let j = 0; j < message.sharingChanges.length; ++j) object.sharingChanges[j] = $root.Vault.SharingChange.toObject(message.sharingChanges[j], options, q + 1); } - if (message.profile != null && message.hasOwnProperty("profile")) + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) object.profile = $root.Vault.Profile.toObject(message.profile, options, q + 1); - if (message.profilePic != null && message.hasOwnProperty("profilePic")) + if (message.profilePic != null && Object.hasOwnProperty.call(message, "profilePic")) object.profilePic = $root.Vault.ProfilePic.toObject(message.profilePic, options, q + 1); if (message.pendingTeamMembers && message.pendingTeamMembers.length) { object.pendingTeamMembers = []; @@ -230711,7 +232047,7 @@ export const Vault = $root.Vault = (() => { for (let j = 0; j < message.breachWatchSecurityData.length; ++j) object.breachWatchSecurityData[j] = $root.Vault.BreachWatchSecurityData.toObject(message.breachWatchSecurityData[j], options, q + 1); } - if (message.reusedPasswords != null && message.hasOwnProperty("reusedPasswords")) + if (message.reusedPasswords != null && Object.hasOwnProperty.call(message, "reusedPasswords")) object.reusedPasswords = $root.Vault.ReusedPasswords.toObject(message.reusedPasswords, options, q + 1); if (message.removedUserFolders && message.removedUserFolders.length) { object.removedUserFolders = []; @@ -230788,7 +232124,7 @@ export const Vault = $root.Vault = (() => { for (let j = 0; j < message.shareInvitations.length; ++j) object.shareInvitations[j] = $root.Vault.ShareInvitation.toObject(message.shareInvitations[j], options, q + 1); } - if (message.diagnostics != null && message.hasOwnProperty("diagnostics")) + if (message.diagnostics != null && Object.hasOwnProperty.call(message, "diagnostics")) object.diagnostics = $root.Vault.SyncDiagnostics.toObject(message.diagnostics, options, q + 1); if (message.recordRotations && message.recordRotations.length) { object.recordRotations = []; @@ -230815,7 +232151,7 @@ export const Vault = $root.Vault = (() => { for (let j = 0; j < message.notificationSync.length; ++j) object.notificationSync[j] = $root.NotificationCenter.NotificationWrapper.toObject(message.notificationSync[j], options, q + 1); } - if (message.keeperDriveData != null && message.hasOwnProperty("keeperDriveData")) + if (message.keeperDriveData != null && Object.hasOwnProperty.call(message, "keeperDriveData")) object.keeperDriveData = $root.Vault.KeeperDriveData.toObject(message.keeperDriveData, options, q + 1); return object; }; @@ -230990,7 +232326,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ DriveRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -231084,25 +232420,25 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (!$util.isInteger(message.fileSize) && !(message.fileSize && $util.isInteger(message.fileSize.low) && $util.isInteger(message.fileSize.high))) return "fileSize: integer|Long expected"; - if (message.thumbnailSize != null && message.hasOwnProperty("thumbnailSize")) + if (message.thumbnailSize != null && Object.hasOwnProperty.call(message, "thumbnailSize")) if (!$util.isInteger(message.thumbnailSize) && !(message.thumbnailSize && $util.isInteger(message.thumbnailSize.low) && $util.isInteger(message.thumbnailSize.high))) return "thumbnailSize: integer|Long expected"; return null; @@ -231119,6 +232455,8 @@ export const Vault = $root.Vault = (() => { DriveRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.DriveRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.DriveRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -231220,34 +232558,34 @@ export const Vault = $root.Vault = (() => { } else object.thumbnailSize = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fileSize = typeof message.fileSize === "number" ? BigInt(message.fileSize) : $util.Long.fromBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0, false).toBigInt(); else if (typeof message.fileSize === "number") object.fileSize = options.longs === String ? String(message.fileSize) : message.fileSize; else object.fileSize = options.longs === String ? $util.Long.prototype.toString.call(message.fileSize) : options.longs === Number ? new $util.LongBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0).toNumber() : message.fileSize; - if (message.thumbnailSize != null && message.hasOwnProperty("thumbnailSize")) + if (message.thumbnailSize != null && Object.hasOwnProperty.call(message, "thumbnailSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.thumbnailSize = typeof message.thumbnailSize === "number" ? BigInt(message.thumbnailSize) : $util.Long.fromBits(message.thumbnailSize.low >>> 0, message.thumbnailSize.high >>> 0, false).toBigInt(); else if (typeof message.thumbnailSize === "number") @@ -231383,7 +232721,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ FolderSharingState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -231461,13 +232799,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) if (!$util.isInteger(message.count)) return "count: integer expected"; return null; @@ -231484,6 +232822,8 @@ export const Vault = $root.Vault = (() => { FolderSharingState.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.FolderSharingState) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.FolderSharingState: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -231529,11 +232869,11 @@ export const Vault = $root.Vault = (() => { object.shared = false; object.count = 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) object.count = message.count; return object; }; @@ -231904,7 +233244,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ KeeperDriveData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -232096,7 +233436,7 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -232105,7 +233445,7 @@ export const Vault = $root.Vault = (() => { return "folders." + error; } } - if (message.folderKeys != null && message.hasOwnProperty("folderKeys")) { + if (message.folderKeys != null && Object.hasOwnProperty.call(message, "folderKeys")) { if (!Array.isArray(message.folderKeys)) return "folderKeys: array expected"; for (let i = 0; i < message.folderKeys.length; ++i) { @@ -232114,7 +233454,7 @@ export const Vault = $root.Vault = (() => { return "folderKeys." + error; } } - if (message.folderAccesses != null && message.hasOwnProperty("folderAccesses")) { + if (message.folderAccesses != null && Object.hasOwnProperty.call(message, "folderAccesses")) { if (!Array.isArray(message.folderAccesses)) return "folderAccesses: array expected"; for (let i = 0; i < message.folderAccesses.length; ++i) { @@ -232123,7 +233463,7 @@ export const Vault = $root.Vault = (() => { return "folderAccesses." + error; } } - if (message.revokedFolderAccesses != null && message.hasOwnProperty("revokedFolderAccesses")) { + if (message.revokedFolderAccesses != null && Object.hasOwnProperty.call(message, "revokedFolderAccesses")) { if (!Array.isArray(message.revokedFolderAccesses)) return "revokedFolderAccesses: array expected"; for (let i = 0; i < message.revokedFolderAccesses.length; ++i) { @@ -232132,7 +233472,7 @@ export const Vault = $root.Vault = (() => { return "revokedFolderAccesses." + error; } } - if (message.recordData != null && message.hasOwnProperty("recordData")) { + if (message.recordData != null && Object.hasOwnProperty.call(message, "recordData")) { if (!Array.isArray(message.recordData)) return "recordData: array expected"; for (let i = 0; i < message.recordData.length; ++i) { @@ -232141,7 +233481,7 @@ export const Vault = $root.Vault = (() => { return "recordData." + error; } } - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) { + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) { if (!Array.isArray(message.nonSharedData)) return "nonSharedData: array expected"; for (let i = 0; i < message.nonSharedData.length; ++i) { @@ -232150,7 +233490,7 @@ export const Vault = $root.Vault = (() => { return "nonSharedData." + error; } } - if (message.recordAccesses != null && message.hasOwnProperty("recordAccesses")) { + if (message.recordAccesses != null && Object.hasOwnProperty.call(message, "recordAccesses")) { if (!Array.isArray(message.recordAccesses)) return "recordAccesses: array expected"; for (let i = 0; i < message.recordAccesses.length; ++i) { @@ -232159,7 +233499,7 @@ export const Vault = $root.Vault = (() => { return "recordAccesses." + error; } } - if (message.revokedRecordAccesses != null && message.hasOwnProperty("revokedRecordAccesses")) { + if (message.revokedRecordAccesses != null && Object.hasOwnProperty.call(message, "revokedRecordAccesses")) { if (!Array.isArray(message.revokedRecordAccesses)) return "revokedRecordAccesses: array expected"; for (let i = 0; i < message.revokedRecordAccesses.length; ++i) { @@ -232168,7 +233508,7 @@ export const Vault = $root.Vault = (() => { return "revokedRecordAccesses." + error; } } - if (message.recordSharingStates != null && message.hasOwnProperty("recordSharingStates")) { + if (message.recordSharingStates != null && Object.hasOwnProperty.call(message, "recordSharingStates")) { if (!Array.isArray(message.recordSharingStates)) return "recordSharingStates: array expected"; for (let i = 0; i < message.recordSharingStates.length; ++i) { @@ -232177,7 +233517,7 @@ export const Vault = $root.Vault = (() => { return "recordSharingStates." + error; } } - if (message.recordLinks != null && message.hasOwnProperty("recordLinks")) { + if (message.recordLinks != null && Object.hasOwnProperty.call(message, "recordLinks")) { if (!Array.isArray(message.recordLinks)) return "recordLinks: array expected"; for (let i = 0; i < message.recordLinks.length; ++i) { @@ -232186,7 +233526,7 @@ export const Vault = $root.Vault = (() => { return "recordLinks." + error; } } - if (message.removedRecordLinks != null && message.hasOwnProperty("removedRecordLinks")) { + if (message.removedRecordLinks != null && Object.hasOwnProperty.call(message, "removedRecordLinks")) { if (!Array.isArray(message.removedRecordLinks)) return "removedRecordLinks: array expected"; for (let i = 0; i < message.removedRecordLinks.length; ++i) { @@ -232195,7 +233535,7 @@ export const Vault = $root.Vault = (() => { return "removedRecordLinks." + error; } } - if (message.breachWatchRecords != null && message.hasOwnProperty("breachWatchRecords")) { + if (message.breachWatchRecords != null && Object.hasOwnProperty.call(message, "breachWatchRecords")) { if (!Array.isArray(message.breachWatchRecords)) return "breachWatchRecords: array expected"; for (let i = 0; i < message.breachWatchRecords.length; ++i) { @@ -232204,7 +233544,7 @@ export const Vault = $root.Vault = (() => { return "breachWatchRecords." + error; } } - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) { + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) { if (!Array.isArray(message.securityScoreData)) return "securityScoreData: array expected"; for (let i = 0; i < message.securityScoreData.length; ++i) { @@ -232213,7 +233553,7 @@ export const Vault = $root.Vault = (() => { return "securityScoreData." + error; } } - if (message.breachWatchSecurityData != null && message.hasOwnProperty("breachWatchSecurityData")) { + if (message.breachWatchSecurityData != null && Object.hasOwnProperty.call(message, "breachWatchSecurityData")) { if (!Array.isArray(message.breachWatchSecurityData)) return "breachWatchSecurityData: array expected"; for (let i = 0; i < message.breachWatchSecurityData.length; ++i) { @@ -232222,7 +233562,7 @@ export const Vault = $root.Vault = (() => { return "breachWatchSecurityData." + error; } } - if (message.removedFolders != null && message.hasOwnProperty("removedFolders")) { + if (message.removedFolders != null && Object.hasOwnProperty.call(message, "removedFolders")) { if (!Array.isArray(message.removedFolders)) return "removedFolders: array expected"; for (let i = 0; i < message.removedFolders.length; ++i) { @@ -232231,7 +233571,7 @@ export const Vault = $root.Vault = (() => { return "removedFolders." + error; } } - if (message.removedFolderRecords != null && message.hasOwnProperty("removedFolderRecords")) { + if (message.removedFolderRecords != null && Object.hasOwnProperty.call(message, "removedFolderRecords")) { if (!Array.isArray(message.removedFolderRecords)) return "removedFolderRecords: array expected"; for (let i = 0; i < message.removedFolderRecords.length; ++i) { @@ -232240,7 +233580,7 @@ export const Vault = $root.Vault = (() => { return "removedFolderRecords." + error; } } - if (message.folderRecords != null && message.hasOwnProperty("folderRecords")) { + if (message.folderRecords != null && Object.hasOwnProperty.call(message, "folderRecords")) { if (!Array.isArray(message.folderRecords)) return "folderRecords: array expected"; for (let i = 0; i < message.folderRecords.length; ++i) { @@ -232249,7 +233589,7 @@ export const Vault = $root.Vault = (() => { return "folderRecords." + error; } } - if (message.recordRotationData != null && message.hasOwnProperty("recordRotationData")) { + if (message.recordRotationData != null && Object.hasOwnProperty.call(message, "recordRotationData")) { if (!Array.isArray(message.recordRotationData)) return "recordRotationData: array expected"; for (let i = 0; i < message.recordRotationData.length; ++i) { @@ -232258,7 +233598,7 @@ export const Vault = $root.Vault = (() => { return "recordRotationData." + error; } } - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -232267,7 +233607,7 @@ export const Vault = $root.Vault = (() => { return "records." + error; } } - if (message.folderSharingState != null && message.hasOwnProperty("folderSharingState")) { + if (message.folderSharingState != null && Object.hasOwnProperty.call(message, "folderSharingState")) { if (!Array.isArray(message.folderSharingState)) return "folderSharingState: array expected"; for (let i = 0; i < message.folderSharingState.length; ++i) { @@ -232276,7 +233616,7 @@ export const Vault = $root.Vault = (() => { return "folderSharingState." + error; } } - if (message.rawDagData != null && message.hasOwnProperty("rawDagData")) { + if (message.rawDagData != null && Object.hasOwnProperty.call(message, "rawDagData")) { if (!Array.isArray(message.rawDagData)) return "rawDagData: array expected"; for (let i = 0; i < message.rawDagData.length; ++i) { @@ -232299,6 +233639,8 @@ export const Vault = $root.Vault = (() => { KeeperDriveData.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.KeeperDriveData) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.KeeperDriveData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -232309,7 +233651,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".Vault.KeeperDriveData.folders: object expected"); message.folders[i] = $root.Folder.FolderData.fromObject(object.folders[i], long + 1); } @@ -232319,7 +233661,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.folderKeys: array expected"); message.folderKeys = []; for (let i = 0; i < object.folderKeys.length; ++i) { - if (typeof object.folderKeys[i] !== "object") + if (!$util.isObject(object.folderKeys[i])) throw TypeError(".Vault.KeeperDriveData.folderKeys: object expected"); message.folderKeys[i] = $root.Folder.FolderKey.fromObject(object.folderKeys[i], long + 1); } @@ -232329,7 +233671,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.folderAccesses: array expected"); message.folderAccesses = []; for (let i = 0; i < object.folderAccesses.length; ++i) { - if (typeof object.folderAccesses[i] !== "object") + if (!$util.isObject(object.folderAccesses[i])) throw TypeError(".Vault.KeeperDriveData.folderAccesses: object expected"); message.folderAccesses[i] = $root.Folder.FolderAccessData.fromObject(object.folderAccesses[i], long + 1); } @@ -232339,7 +233681,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.revokedFolderAccesses: array expected"); message.revokedFolderAccesses = []; for (let i = 0; i < object.revokedFolderAccesses.length; ++i) { - if (typeof object.revokedFolderAccesses[i] !== "object") + if (!$util.isObject(object.revokedFolderAccesses[i])) throw TypeError(".Vault.KeeperDriveData.revokedFolderAccesses: object expected"); message.revokedFolderAccesses[i] = $root.Folder.RevokedAccess.fromObject(object.revokedFolderAccesses[i], long + 1); } @@ -232349,7 +233691,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.recordData: array expected"); message.recordData = []; for (let i = 0; i < object.recordData.length; ++i) { - if (typeof object.recordData[i] !== "object") + if (!$util.isObject(object.recordData[i])) throw TypeError(".Vault.KeeperDriveData.recordData: object expected"); message.recordData[i] = $root.Folder.RecordData.fromObject(object.recordData[i], long + 1); } @@ -232359,7 +233701,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.nonSharedData: array expected"); message.nonSharedData = []; for (let i = 0; i < object.nonSharedData.length; ++i) { - if (typeof object.nonSharedData[i] !== "object") + if (!$util.isObject(object.nonSharedData[i])) throw TypeError(".Vault.KeeperDriveData.nonSharedData: object expected"); message.nonSharedData[i] = $root.Vault.NonSharedData.fromObject(object.nonSharedData[i], long + 1); } @@ -232369,7 +233711,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.recordAccesses: array expected"); message.recordAccesses = []; for (let i = 0; i < object.recordAccesses.length; ++i) { - if (typeof object.recordAccesses[i] !== "object") + if (!$util.isObject(object.recordAccesses[i])) throw TypeError(".Vault.KeeperDriveData.recordAccesses: object expected"); message.recordAccesses[i] = $root.Folder.RecordAccessData.fromObject(object.recordAccesses[i], long + 1); } @@ -232379,7 +233721,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.revokedRecordAccesses: array expected"); message.revokedRecordAccesses = []; for (let i = 0; i < object.revokedRecordAccesses.length; ++i) { - if (typeof object.revokedRecordAccesses[i] !== "object") + if (!$util.isObject(object.revokedRecordAccesses[i])) throw TypeError(".Vault.KeeperDriveData.revokedRecordAccesses: object expected"); message.revokedRecordAccesses[i] = $root.record.v3.sharing.RevokedAccess.fromObject(object.revokedRecordAccesses[i], long + 1); } @@ -232389,7 +233731,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.recordSharingStates: array expected"); message.recordSharingStates = []; for (let i = 0; i < object.recordSharingStates.length; ++i) { - if (typeof object.recordSharingStates[i] !== "object") + if (!$util.isObject(object.recordSharingStates[i])) throw TypeError(".Vault.KeeperDriveData.recordSharingStates: object expected"); message.recordSharingStates[i] = $root.record.v3.sharing.RecordSharingState.fromObject(object.recordSharingStates[i], long + 1); } @@ -232399,7 +233741,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.recordLinks: array expected"); message.recordLinks = []; for (let i = 0; i < object.recordLinks.length; ++i) { - if (typeof object.recordLinks[i] !== "object") + if (!$util.isObject(object.recordLinks[i])) throw TypeError(".Vault.KeeperDriveData.recordLinks: object expected"); message.recordLinks[i] = $root.Vault.RecordLink.fromObject(object.recordLinks[i], long + 1); } @@ -232409,7 +233751,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.removedRecordLinks: array expected"); message.removedRecordLinks = []; for (let i = 0; i < object.removedRecordLinks.length; ++i) { - if (typeof object.removedRecordLinks[i] !== "object") + if (!$util.isObject(object.removedRecordLinks[i])) throw TypeError(".Vault.KeeperDriveData.removedRecordLinks: object expected"); message.removedRecordLinks[i] = $root.Vault.RecordLink.fromObject(object.removedRecordLinks[i], long + 1); } @@ -232419,7 +233761,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.breachWatchRecords: array expected"); message.breachWatchRecords = []; for (let i = 0; i < object.breachWatchRecords.length; ++i) { - if (typeof object.breachWatchRecords[i] !== "object") + if (!$util.isObject(object.breachWatchRecords[i])) throw TypeError(".Vault.KeeperDriveData.breachWatchRecords: object expected"); message.breachWatchRecords[i] = $root.Vault.BreachWatchRecord.fromObject(object.breachWatchRecords[i], long + 1); } @@ -232429,7 +233771,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.securityScoreData: array expected"); message.securityScoreData = []; for (let i = 0; i < object.securityScoreData.length; ++i) { - if (typeof object.securityScoreData[i] !== "object") + if (!$util.isObject(object.securityScoreData[i])) throw TypeError(".Vault.KeeperDriveData.securityScoreData: object expected"); message.securityScoreData[i] = $root.Vault.SecurityScoreData.fromObject(object.securityScoreData[i], long + 1); } @@ -232439,7 +233781,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.breachWatchSecurityData: array expected"); message.breachWatchSecurityData = []; for (let i = 0; i < object.breachWatchSecurityData.length; ++i) { - if (typeof object.breachWatchSecurityData[i] !== "object") + if (!$util.isObject(object.breachWatchSecurityData[i])) throw TypeError(".Vault.KeeperDriveData.breachWatchSecurityData: object expected"); message.breachWatchSecurityData[i] = $root.Vault.BreachWatchSecurityData.fromObject(object.breachWatchSecurityData[i], long + 1); } @@ -232449,7 +233791,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.removedFolders: array expected"); message.removedFolders = []; for (let i = 0; i < object.removedFolders.length; ++i) { - if (typeof object.removedFolders[i] !== "object") + if (!$util.isObject(object.removedFolders[i])) throw TypeError(".Vault.KeeperDriveData.removedFolders: object expected"); message.removedFolders[i] = $root.Folder.FolderRemoved.fromObject(object.removedFolders[i], long + 1); } @@ -232459,7 +233801,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.removedFolderRecords: array expected"); message.removedFolderRecords = []; for (let i = 0; i < object.removedFolderRecords.length; ++i) { - if (typeof object.removedFolderRecords[i] !== "object") + if (!$util.isObject(object.removedFolderRecords[i])) throw TypeError(".Vault.KeeperDriveData.removedFolderRecords: object expected"); message.removedFolderRecords[i] = $root.Records.FolderRecordKey.fromObject(object.removedFolderRecords[i], long + 1); } @@ -232469,7 +233811,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.folderRecords: array expected"); message.folderRecords = []; for (let i = 0; i < object.folderRecords.length; ++i) { - if (typeof object.folderRecords[i] !== "object") + if (!$util.isObject(object.folderRecords[i])) throw TypeError(".Vault.KeeperDriveData.folderRecords: object expected"); message.folderRecords[i] = $root.Folder.FolderRecord.fromObject(object.folderRecords[i], long + 1); } @@ -232479,7 +233821,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.recordRotationData: array expected"); message.recordRotationData = []; for (let i = 0; i < object.recordRotationData.length; ++i) { - if (typeof object.recordRotationData[i] !== "object") + if (!$util.isObject(object.recordRotationData[i])) throw TypeError(".Vault.KeeperDriveData.recordRotationData: object expected"); message.recordRotationData[i] = $root.Vault.RecordRotation.fromObject(object.recordRotationData[i], long + 1); } @@ -232489,7 +233831,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".Vault.KeeperDriveData.records: object expected"); message.records[i] = $root.Vault.DriveRecord.fromObject(object.records[i], long + 1); } @@ -232499,7 +233841,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.folderSharingState: array expected"); message.folderSharingState = []; for (let i = 0; i < object.folderSharingState.length; ++i) { - if (typeof object.folderSharingState[i] !== "object") + if (!$util.isObject(object.folderSharingState[i])) throw TypeError(".Vault.KeeperDriveData.folderSharingState: object expected"); message.folderSharingState[i] = $root.Vault.FolderSharingState.fromObject(object.folderSharingState[i], long + 1); } @@ -232509,7 +233851,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.KeeperDriveData.rawDagData: array expected"); message.rawDagData = []; for (let i = 0; i < object.rawDagData.length; ++i) { - if (typeof object.rawDagData[i] !== "object") + if (!$util.isObject(object.rawDagData[i])) throw TypeError(".Vault.KeeperDriveData.rawDagData: object expected"); message.rawDagData[i] = $root.Dag.DebugData.fromObject(object.rawDagData[i], long + 1); } @@ -232824,7 +234166,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ UserFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -232914,16 +234256,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) if (!(message.parentUid && typeof message.parentUid.length === "number" || $util.isString(message.parentUid))) return "parentUid: buffer expected"; - if (message.userFolderKey != null && message.hasOwnProperty("userFolderKey")) + if (message.userFolderKey != null && Object.hasOwnProperty.call(message, "userFolderKey")) if (!(message.userFolderKey && typeof message.userFolderKey.length === "number" || $util.isString(message.userFolderKey))) return "userFolderKey: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -232936,10 +234278,10 @@ export const Vault = $root.Vault = (() => { case 6: break; } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -232956,6 +234298,8 @@ export const Vault = $root.Vault = (() => { UserFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.UserFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.UserFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -233082,22 +234426,22 @@ export const Vault = $root.Vault = (() => { object.data = $util.newBuffer(object.data); } } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) object.parentUid = options.bytes === String ? $util.base64.encode(message.parentUid, 0, message.parentUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentUid) : message.parentUid; - if (message.userFolderKey != null && message.hasOwnProperty("userFolderKey")) + if (message.userFolderKey != null && Object.hasOwnProperty.call(message, "userFolderKey")) object.userFolderKey = options.bytes === String ? $util.base64.encode(message.userFolderKey, 0, message.userFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userFolderKey) : message.userFolderKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Records.RecordKeyType[message.keyType] === undefined ? message.keyType : $root.Records.RecordKeyType[message.keyType] : message.keyType; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -233338,7 +234682,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -233456,16 +234800,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) if (!(message.sharedFolderKey && typeof message.sharedFolderKey.length === "number" || $util.isString(message.sharedFolderKey))) return "sharedFolderKey: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -233478,22 +234822,22 @@ export const Vault = $root.Vault = (() => { case 6: break; } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.defaultManageRecords != null && message.hasOwnProperty("defaultManageRecords")) + if (message.defaultManageRecords != null && Object.hasOwnProperty.call(message, "defaultManageRecords")) if (typeof message.defaultManageRecords !== "boolean") return "defaultManageRecords: boolean expected"; - if (message.defaultManageUsers != null && message.hasOwnProperty("defaultManageUsers")) + if (message.defaultManageUsers != null && Object.hasOwnProperty.call(message, "defaultManageUsers")) if (typeof message.defaultManageUsers !== "boolean") return "defaultManageUsers: boolean expected"; - if (message.defaultCanEdit != null && message.hasOwnProperty("defaultCanEdit")) + if (message.defaultCanEdit != null && Object.hasOwnProperty.call(message, "defaultCanEdit")) if (typeof message.defaultCanEdit !== "boolean") return "defaultCanEdit: boolean expected"; - if (message.defaultCanReshare != null && message.hasOwnProperty("defaultCanReshare")) + if (message.defaultCanReshare != null && Object.hasOwnProperty.call(message, "defaultCanReshare")) if (typeof message.defaultCanReshare !== "boolean") return "defaultCanReshare: boolean expected"; - if (message.cacheStatus != null && message.hasOwnProperty("cacheStatus")) + if (message.cacheStatus != null && Object.hasOwnProperty.call(message, "cacheStatus")) switch (message.cacheStatus) { default: return "cacheStatus: enum value expected"; @@ -233501,13 +234845,13 @@ export const Vault = $root.Vault = (() => { case 1: break; } - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (!$util.isString(message.owner)) return "owner: string expected"; - if (message.ownerAccountUid != null && message.hasOwnProperty("ownerAccountUid")) + if (message.ownerAccountUid != null && Object.hasOwnProperty.call(message, "ownerAccountUid")) if (!(message.ownerAccountUid && typeof message.ownerAccountUid.length === "number" || $util.isString(message.ownerAccountUid))) return "ownerAccountUid: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!(message.name && typeof message.name.length === "number" || $util.isString(message.name))) return "name: buffer expected"; return null; @@ -233524,6 +234868,8 @@ export const Vault = $root.Vault = (() => { SharedFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -233694,36 +235040,36 @@ export const Vault = $root.Vault = (() => { object.name = $util.newBuffer(object.name); } } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) object.sharedFolderKey = options.bytes === String ? $util.base64.encode(message.sharedFolderKey, 0, message.sharedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderKey) : message.sharedFolderKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Records.RecordKeyType[message.keyType] === undefined ? message.keyType : $root.Records.RecordKeyType[message.keyType] : message.keyType; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.defaultManageRecords != null && message.hasOwnProperty("defaultManageRecords")) + if (message.defaultManageRecords != null && Object.hasOwnProperty.call(message, "defaultManageRecords")) object.defaultManageRecords = message.defaultManageRecords; - if (message.defaultManageUsers != null && message.hasOwnProperty("defaultManageUsers")) + if (message.defaultManageUsers != null && Object.hasOwnProperty.call(message, "defaultManageUsers")) object.defaultManageUsers = message.defaultManageUsers; - if (message.defaultCanEdit != null && message.hasOwnProperty("defaultCanEdit")) + if (message.defaultCanEdit != null && Object.hasOwnProperty.call(message, "defaultCanEdit")) object.defaultCanEdit = message.defaultCanEdit; - if (message.defaultCanReshare != null && message.hasOwnProperty("defaultCanReshare")) + if (message.defaultCanReshare != null && Object.hasOwnProperty.call(message, "defaultCanReshare")) object.defaultCanReshare = message.defaultCanReshare; - if (message.cacheStatus != null && message.hasOwnProperty("cacheStatus")) + if (message.cacheStatus != null && Object.hasOwnProperty.call(message, "cacheStatus")) object.cacheStatus = options.enums === String ? $root.Vault.CacheStatus[message.cacheStatus] === undefined ? message.cacheStatus : $root.Vault.CacheStatus[message.cacheStatus] : message.cacheStatus; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.ownerAccountUid != null && message.hasOwnProperty("ownerAccountUid")) + if (message.ownerAccountUid != null && Object.hasOwnProperty.call(message, "ownerAccountUid")) object.ownerAccountUid = options.bytes === String ? $util.base64.encode(message.ownerAccountUid, 0, message.ownerAccountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.ownerAccountUid) : message.ownerAccountUid; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array ? Array.prototype.slice.call(message.name) : message.name; return object; }; @@ -233854,7 +235200,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ UserFolderSharedFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -233932,13 +235278,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -233955,6 +235301,8 @@ export const Vault = $root.Vault = (() => { UserFolderSharedFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.UserFolderSharedFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.UserFolderSharedFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -234020,11 +235368,11 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -234204,7 +235552,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -234298,19 +235646,19 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) if (!(message.parentUid && typeof message.parentUid.length === "number" || $util.isString(message.parentUid))) return "parentUid: buffer expected"; - if (message.sharedFolderFolderKey != null && message.hasOwnProperty("sharedFolderFolderKey")) + if (message.sharedFolderFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderFolderKey")) if (!(message.sharedFolderFolderKey && typeof message.sharedFolderFolderKey.length === "number" || $util.isString(message.sharedFolderFolderKey))) return "sharedFolderFolderKey: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -234323,10 +235671,10 @@ export const Vault = $root.Vault = (() => { case 6: break; } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -234343,6 +235691,8 @@ export const Vault = $root.Vault = (() => { SharedFolderFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolderFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolderFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -234481,24 +235831,24 @@ export const Vault = $root.Vault = (() => { object.data = $util.newBuffer(object.data); } } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) object.parentUid = options.bytes === String ? $util.base64.encode(message.parentUid, 0, message.parentUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentUid) : message.parentUid; - if (message.sharedFolderFolderKey != null && message.hasOwnProperty("sharedFolderFolderKey")) + if (message.sharedFolderFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderFolderKey")) object.sharedFolderFolderKey = options.bytes === String ? $util.base64.encode(message.sharedFolderFolderKey, 0, message.sharedFolderFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderFolderKey) : message.sharedFolderFolderKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Records.RecordKeyType[message.keyType] === undefined ? message.keyType : $root.Records.RecordKeyType[message.keyType] : message.keyType; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -234629,7 +235979,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -234707,13 +236057,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) if (!(message.sharedFolderKey && typeof message.sharedFolderKey.length === "number" || $util.isString(message.sharedFolderKey))) return "sharedFolderKey: buffer expected"; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) switch (message.keyType) { default: return "keyType: enum value expected"; @@ -234740,6 +236090,8 @@ export const Vault = $root.Vault = (() => { SharedFolderKey.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolderKey) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolderKey: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -234828,11 +236180,11 @@ export const Vault = $root.Vault = (() => { } object.keyType = options.enums === String ? "NO_KEY" : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.sharedFolderKey != null && message.hasOwnProperty("sharedFolderKey")) + if (message.sharedFolderKey != null && Object.hasOwnProperty.call(message, "sharedFolderKey")) object.sharedFolderKey = options.bytes === String ? $util.base64.encode(message.sharedFolderKey, 0, message.sharedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderKey) : message.sharedFolderKey; - if (message.keyType != null && message.hasOwnProperty("keyType")) + if (message.keyType != null && Object.hasOwnProperty.call(message, "keyType")) object.keyType = options.enums === String ? $root.Records.RecordKeyType[message.keyType] === undefined ? message.keyType : $root.Records.RecordKeyType[message.keyType] : message.keyType; return object; }; @@ -235066,7 +236418,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ Team.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -235184,16 +236536,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.teamKey != null && message.hasOwnProperty("teamKey")) + if (message.teamKey != null && Object.hasOwnProperty.call(message, "teamKey")) if (!(message.teamKey && typeof message.teamKey.length === "number" || $util.isString(message.teamKey))) return "teamKey: buffer expected"; - if (message.teamKeyType != null && message.hasOwnProperty("teamKeyType")) + if (message.teamKeyType != null && Object.hasOwnProperty.call(message, "teamKeyType")) switch (message.teamKeyType) { default: return "teamKeyType: enum value expected"; @@ -235206,26 +236558,26 @@ export const Vault = $root.Vault = (() => { case 6: break; } - if (message.teamPrivateKey != null && message.hasOwnProperty("teamPrivateKey")) + if (message.teamPrivateKey != null && Object.hasOwnProperty.call(message, "teamPrivateKey")) if (!(message.teamPrivateKey && typeof message.teamPrivateKey.length === "number" || $util.isString(message.teamPrivateKey))) return "teamPrivateKey: buffer expected"; - if (message.restrictEdit != null && message.hasOwnProperty("restrictEdit")) + if (message.restrictEdit != null && Object.hasOwnProperty.call(message, "restrictEdit")) if (typeof message.restrictEdit !== "boolean") return "restrictEdit: boolean expected"; - if (message.restrictShare != null && message.hasOwnProperty("restrictShare")) + if (message.restrictShare != null && Object.hasOwnProperty.call(message, "restrictShare")) if (typeof message.restrictShare !== "boolean") return "restrictShare: boolean expected"; - if (message.restrictView != null && message.hasOwnProperty("restrictView")) + if (message.restrictView != null && Object.hasOwnProperty.call(message, "restrictView")) if (typeof message.restrictView !== "boolean") return "restrictView: boolean expected"; - if (message.removedSharedFolders != null && message.hasOwnProperty("removedSharedFolders")) { + if (message.removedSharedFolders != null && Object.hasOwnProperty.call(message, "removedSharedFolders")) { if (!Array.isArray(message.removedSharedFolders)) return "removedSharedFolders: array expected"; for (let i = 0; i < message.removedSharedFolders.length; ++i) if (!(message.removedSharedFolders[i] && typeof message.removedSharedFolders[i].length === "number" || $util.isString(message.removedSharedFolders[i]))) return "removedSharedFolders: buffer[] expected"; } - if (message.sharedFolderKeys != null && message.hasOwnProperty("sharedFolderKeys")) { + if (message.sharedFolderKeys != null && Object.hasOwnProperty.call(message, "sharedFolderKeys")) { if (!Array.isArray(message.sharedFolderKeys)) return "sharedFolderKeys: array expected"; for (let i = 0; i < message.sharedFolderKeys.length; ++i) { @@ -235234,10 +236586,10 @@ export const Vault = $root.Vault = (() => { return "sharedFolderKeys." + error; } } - if (message.teamEccPrivateKey != null && message.hasOwnProperty("teamEccPrivateKey")) + if (message.teamEccPrivateKey != null && Object.hasOwnProperty.call(message, "teamEccPrivateKey")) if (!(message.teamEccPrivateKey && typeof message.teamEccPrivateKey.length === "number" || $util.isString(message.teamEccPrivateKey))) return "teamEccPrivateKey: buffer expected"; - if (message.teamEccPublicKey != null && message.hasOwnProperty("teamEccPublicKey")) + if (message.teamEccPublicKey != null && Object.hasOwnProperty.call(message, "teamEccPublicKey")) if (!(message.teamEccPublicKey && typeof message.teamEccPublicKey.length === "number" || $util.isString(message.teamEccPublicKey))) return "teamEccPublicKey: buffer expected"; return null; @@ -235254,6 +236606,8 @@ export const Vault = $root.Vault = (() => { Team.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.Team) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.Team: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -235333,7 +236687,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.Team.sharedFolderKeys: array expected"); message.sharedFolderKeys = []; for (let i = 0; i < object.sharedFolderKeys.length; ++i) { - if (typeof object.sharedFolderKeys[i] !== "object") + if (!$util.isObject(object.sharedFolderKeys[i])) throw TypeError(".Vault.Team.sharedFolderKeys: object expected"); message.sharedFolderKeys[i] = $root.Vault.SharedFolderKey.fromObject(object.sharedFolderKeys[i], long + 1); } @@ -235414,21 +236768,21 @@ export const Vault = $root.Vault = (() => { object.teamEccPublicKey = $util.newBuffer(object.teamEccPublicKey); } } - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.teamKey != null && message.hasOwnProperty("teamKey")) + if (message.teamKey != null && Object.hasOwnProperty.call(message, "teamKey")) object.teamKey = options.bytes === String ? $util.base64.encode(message.teamKey, 0, message.teamKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamKey) : message.teamKey; - if (message.teamKeyType != null && message.hasOwnProperty("teamKeyType")) + if (message.teamKeyType != null && Object.hasOwnProperty.call(message, "teamKeyType")) object.teamKeyType = options.enums === String ? $root.Records.RecordKeyType[message.teamKeyType] === undefined ? message.teamKeyType : $root.Records.RecordKeyType[message.teamKeyType] : message.teamKeyType; - if (message.teamPrivateKey != null && message.hasOwnProperty("teamPrivateKey")) + if (message.teamPrivateKey != null && Object.hasOwnProperty.call(message, "teamPrivateKey")) object.teamPrivateKey = options.bytes === String ? $util.base64.encode(message.teamPrivateKey, 0, message.teamPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamPrivateKey) : message.teamPrivateKey; - if (message.restrictEdit != null && message.hasOwnProperty("restrictEdit")) + if (message.restrictEdit != null && Object.hasOwnProperty.call(message, "restrictEdit")) object.restrictEdit = message.restrictEdit; - if (message.restrictShare != null && message.hasOwnProperty("restrictShare")) + if (message.restrictShare != null && Object.hasOwnProperty.call(message, "restrictShare")) object.restrictShare = message.restrictShare; - if (message.restrictView != null && message.hasOwnProperty("restrictView")) + if (message.restrictView != null && Object.hasOwnProperty.call(message, "restrictView")) object.restrictView = message.restrictView; if (message.removedSharedFolders && message.removedSharedFolders.length) { object.removedSharedFolders = []; @@ -235440,9 +236794,9 @@ export const Vault = $root.Vault = (() => { for (let j = 0; j < message.sharedFolderKeys.length; ++j) object.sharedFolderKeys[j] = $root.Vault.SharedFolderKey.toObject(message.sharedFolderKeys[j], options, q + 1); } - if (message.teamEccPrivateKey != null && message.hasOwnProperty("teamEccPrivateKey")) + if (message.teamEccPrivateKey != null && Object.hasOwnProperty.call(message, "teamEccPrivateKey")) object.teamEccPrivateKey = options.bytes === String ? $util.base64.encode(message.teamEccPrivateKey, 0, message.teamEccPrivateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamEccPrivateKey) : message.teamEccPrivateKey; - if (message.teamEccPublicKey != null && message.hasOwnProperty("teamEccPublicKey")) + if (message.teamEccPublicKey != null && Object.hasOwnProperty.call(message, "teamEccPublicKey")) object.teamEccPublicKey = options.bytes === String ? $util.base64.encode(message.teamEccPublicKey, 0, message.teamEccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamEccPublicKey) : message.teamEccPublicKey; return object; }; @@ -235650,7 +237004,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ Record.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -235756,34 +237110,34 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) if (!(message.extra && typeof message.extra.length === "number" || $util.isString(message.extra))) return "extra: buffer expected"; - if (message.udata != null && message.hasOwnProperty("udata")) + if (message.udata != null && Object.hasOwnProperty.call(message, "udata")) if (!$util.isString(message.udata)) return "udata: string expected"; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (!$util.isInteger(message.fileSize) && !(message.fileSize && $util.isInteger(message.fileSize.low) && $util.isInteger(message.fileSize.high))) return "fileSize: integer|Long expected"; - if (message.thumbnailSize != null && message.hasOwnProperty("thumbnailSize")) + if (message.thumbnailSize != null && Object.hasOwnProperty.call(message, "thumbnailSize")) if (!$util.isInteger(message.thumbnailSize) && !(message.thumbnailSize && $util.isInteger(message.thumbnailSize.low) && $util.isInteger(message.thumbnailSize.high))) return "thumbnailSize: integer|Long expected"; return null; @@ -235800,6 +237154,8 @@ export const Vault = $root.Vault = (() => { Record.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.Record) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.Record: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -235928,40 +237284,40 @@ export const Vault = $root.Vault = (() => { } else object.thumbnailSize = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.extra != null && message.hasOwnProperty("extra")) + if (message.extra != null && Object.hasOwnProperty.call(message, "extra")) object.extra = options.bytes === String ? $util.base64.encode(message.extra, 0, message.extra.length) : options.bytes === Array ? Array.prototype.slice.call(message.extra) : message.extra; - if (message.udata != null && message.hasOwnProperty("udata")) + if (message.udata != null && Object.hasOwnProperty.call(message, "udata")) object.udata = message.udata; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fileSize = typeof message.fileSize === "number" ? BigInt(message.fileSize) : $util.Long.fromBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0, false).toBigInt(); else if (typeof message.fileSize === "number") object.fileSize = options.longs === String ? String(message.fileSize) : message.fileSize; else object.fileSize = options.longs === String ? $util.Long.prototype.toString.call(message.fileSize) : options.longs === Number ? new $util.LongBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0).toNumber() : message.fileSize; - if (message.thumbnailSize != null && message.hasOwnProperty("thumbnailSize")) + if (message.thumbnailSize != null && Object.hasOwnProperty.call(message, "thumbnailSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.thumbnailSize = typeof message.thumbnailSize === "number" ? BigInt(message.thumbnailSize) : $util.Long.fromBits(message.thumbnailSize.low >>> 0, message.thumbnailSize.high >>> 0, false).toBigInt(); else if (typeof message.thumbnailSize === "number") @@ -236108,7 +237464,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ RecordLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -236190,16 +237546,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parentRecordUid != null && message.hasOwnProperty("parentRecordUid")) + if (message.parentRecordUid != null && Object.hasOwnProperty.call(message, "parentRecordUid")) if (!(message.parentRecordUid && typeof message.parentRecordUid.length === "number" || $util.isString(message.parentRecordUid))) return "parentRecordUid: buffer expected"; - if (message.childRecordUid != null && message.hasOwnProperty("childRecordUid")) + if (message.childRecordUid != null && Object.hasOwnProperty.call(message, "childRecordUid")) if (!(message.childRecordUid && typeof message.childRecordUid.length === "number" || $util.isString(message.childRecordUid))) return "childRecordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -236216,6 +237572,8 @@ export const Vault = $root.Vault = (() => { RecordLink.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.RecordLink) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.RecordLink: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -236293,13 +237651,13 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.parentRecordUid != null && message.hasOwnProperty("parentRecordUid")) + if (message.parentRecordUid != null && Object.hasOwnProperty.call(message, "parentRecordUid")) object.parentRecordUid = options.bytes === String ? $util.base64.encode(message.parentRecordUid, 0, message.parentRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentRecordUid) : message.parentRecordUid; - if (message.childRecordUid != null && message.hasOwnProperty("childRecordUid")) + if (message.childRecordUid != null && Object.hasOwnProperty.call(message, "childRecordUid")) object.childRecordUid = options.bytes === String ? $util.base64.encode(message.childRecordUid, 0, message.childRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.childRecordUid) : message.childRecordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -236435,7 +237793,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ UserFolderRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -236513,13 +237871,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -236536,6 +237894,8 @@ export const Vault = $root.Vault = (() => { UserFolderRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.UserFolderRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.UserFolderRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -236601,11 +237961,11 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -236752,7 +238112,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderFolderRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -236834,16 +238194,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -236860,6 +238220,8 @@ export const Vault = $root.Vault = (() => { SharedFolderFolderRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolderFolderRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolderFolderRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -236937,13 +238299,13 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -237068,7 +238430,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ NonSharedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -237142,10 +238504,10 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -237162,6 +238524,8 @@ export const Vault = $root.Vault = (() => { NonSharedData.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.NonSharedData) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.NonSharedData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -237213,9 +238577,9 @@ export const Vault = $root.Vault = (() => { object.data = $util.newBuffer(object.data); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -237423,7 +238787,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ RecordMetaData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -237529,16 +238893,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (typeof message.owner !== "boolean") return "owner: boolean expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) switch (message.recordKeyType) { default: return "recordKeyType: enum value expected"; @@ -237551,19 +238915,19 @@ export const Vault = $root.Vault = (() => { case 6: break; } - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) if (typeof message.canShare !== "boolean") return "canShare: boolean expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.ownerAccountUid != null && message.hasOwnProperty("ownerAccountUid")) + if (message.ownerAccountUid != null && Object.hasOwnProperty.call(message, "ownerAccountUid")) if (!(message.ownerAccountUid && typeof message.ownerAccountUid.length === "number" || $util.isString(message.ownerAccountUid))) return "ownerAccountUid: buffer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) switch (message.expirationNotificationType) { default: return "expirationNotificationType: enum value expected"; @@ -237572,7 +238936,7 @@ export const Vault = $root.Vault = (() => { case 2: break; } - if (message.ownerUsername != null && message.hasOwnProperty("ownerUsername")) + if (message.ownerUsername != null && Object.hasOwnProperty.call(message, "ownerUsername")) if (!$util.isString(message.ownerUsername)) return "ownerUsername: string expected"; return null; @@ -237589,6 +238953,8 @@ export const Vault = $root.Vault = (() => { RecordMetaData.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.RecordMetaData) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.RecordMetaData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -237736,30 +239102,30 @@ export const Vault = $root.Vault = (() => { object.expirationNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.ownerUsername = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) object.recordKeyType = options.enums === String ? $root.Records.RecordKeyType[message.recordKeyType] === undefined ? message.recordKeyType : $root.Records.RecordKeyType[message.recordKeyType] : message.recordKeyType; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) object.canShare = message.canShare; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.ownerAccountUid != null && message.hasOwnProperty("ownerAccountUid")) + if (message.ownerAccountUid != null && Object.hasOwnProperty.call(message, "ownerAccountUid")) object.ownerAccountUid = options.bytes === String ? $util.base64.encode(message.ownerAccountUid, 0, message.ownerAccountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.ownerAccountUid) : message.ownerAccountUid; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) object.expirationNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.expirationNotificationType] === undefined ? message.expirationNotificationType : $root.Records.TimerNotificationType[message.expirationNotificationType] : message.expirationNotificationType; - if (message.ownerUsername != null && message.hasOwnProperty("ownerUsername")) + if (message.ownerUsername != null && Object.hasOwnProperty.call(message, "ownerUsername")) object.ownerUsername = message.ownerUsername; return object; }; @@ -237879,7 +239245,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharingChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -237953,10 +239319,10 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) if (typeof message.shared !== "boolean") return "shared: boolean expected"; return null; @@ -237973,6 +239339,8 @@ export const Vault = $root.Vault = (() => { SharingChange.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharingChange) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharingChange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -238015,9 +239383,9 @@ export const Vault = $root.Vault = (() => { } object.shared = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.shared != null && message.hasOwnProperty("shared")) + if (message.shared != null && Object.hasOwnProperty.call(message, "shared")) object.shared = message.shared; return object; }; @@ -238148,7 +239516,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ Profile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -238226,13 +239594,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.profileName != null && message.hasOwnProperty("profileName")) + if (message.profileName != null && Object.hasOwnProperty.call(message, "profileName")) if (!$util.isString(message.profileName)) return "profileName: string expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -238249,6 +239617,8 @@ export const Vault = $root.Vault = (() => { Profile.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.Profile) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.Profile: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -238305,11 +239675,11 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.profileName != null && message.hasOwnProperty("profileName")) + if (message.profileName != null && Object.hasOwnProperty.call(message, "profileName")) object.profileName = message.profileName; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -238434,7 +239804,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ ProfilePic.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -238508,10 +239878,10 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -238528,6 +239898,8 @@ export const Vault = $root.Vault = (() => { ProfilePic.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.ProfilePic) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.ProfilePic: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -238572,9 +239944,9 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -238723,7 +240095,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ PendingTeamMember.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -238807,20 +240179,20 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.userPublicKey != null && message.hasOwnProperty("userPublicKey")) + if (message.userPublicKey != null && Object.hasOwnProperty.call(message, "userPublicKey")) if (!(message.userPublicKey && typeof message.userPublicKey.length === "number" || $util.isString(message.userPublicKey))) return "userPublicKey: buffer expected"; - if (message.teamUids != null && message.hasOwnProperty("teamUids")) { + if (message.teamUids != null && Object.hasOwnProperty.call(message, "teamUids")) { if (!Array.isArray(message.teamUids)) return "teamUids: array expected"; for (let i = 0; i < message.teamUids.length; ++i) if (!(message.teamUids[i] && typeof message.teamUids[i].length === "number" || $util.isString(message.teamUids[i]))) return "teamUids: buffer[] expected"; } - if (message.userEccPublicKey != null && message.hasOwnProperty("userEccPublicKey")) + if (message.userEccPublicKey != null && Object.hasOwnProperty.call(message, "userEccPublicKey")) if (!(message.userEccPublicKey && typeof message.userEccPublicKey.length === "number" || $util.isString(message.userEccPublicKey))) return "userEccPublicKey: buffer expected"; return null; @@ -238837,6 +240209,8 @@ export const Vault = $root.Vault = (() => { PendingTeamMember.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.PendingTeamMember) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.PendingTeamMember: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -238914,21 +240288,21 @@ export const Vault = $root.Vault = (() => { object.userEccPublicKey = $util.newBuffer(object.userEccPublicKey); } } - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.userPublicKey != null && message.hasOwnProperty("userPublicKey")) + if (message.userPublicKey != null && Object.hasOwnProperty.call(message, "userPublicKey")) object.userPublicKey = options.bytes === String ? $util.base64.encode(message.userPublicKey, 0, message.userPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userPublicKey) : message.userPublicKey; if (message.teamUids && message.teamUids.length) { object.teamUids = []; for (let j = 0; j < message.teamUids.length; ++j) object.teamUids[j] = options.bytes === String ? $util.base64.encode(message.teamUids[j], 0, message.teamUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUids[j]) : message.teamUids[j]; } - if (message.userEccPublicKey != null && message.hasOwnProperty("userEccPublicKey")) + if (message.userEccPublicKey != null && Object.hasOwnProperty.call(message, "userEccPublicKey")) object.userEccPublicKey = options.bytes === String ? $util.base64.encode(message.userEccPublicKey, 0, message.userEccPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.userEccPublicKey) : message.userEccPublicKey; return object; }; @@ -239092,7 +240466,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -239182,13 +240556,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -239196,13 +240570,13 @@ export const Vault = $root.Vault = (() => { case 1: break; } - if (message.scannedBy != null && message.hasOwnProperty("scannedBy")) + if (message.scannedBy != null && Object.hasOwnProperty.call(message, "scannedBy")) if (!$util.isString(message.scannedBy)) return "scannedBy: string expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.scannedByAccountUid != null && message.hasOwnProperty("scannedByAccountUid")) + if (message.scannedByAccountUid != null && Object.hasOwnProperty.call(message, "scannedByAccountUid")) if (!(message.scannedByAccountUid && typeof message.scannedByAccountUid.length === "number" || $util.isString(message.scannedByAccountUid))) return "scannedByAccountUid: buffer expected"; return null; @@ -239219,6 +240593,8 @@ export const Vault = $root.Vault = (() => { BreachWatchRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.BreachWatchRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.BreachWatchRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -239316,22 +240692,22 @@ export const Vault = $root.Vault = (() => { object.scannedByAccountUid = $util.newBuffer(object.scannedByAccountUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.BreachWatch.BreachWatchInfoType[message.type] === undefined ? message.type : $root.BreachWatch.BreachWatchInfoType[message.type] : message.type; - if (message.scannedBy != null && message.hasOwnProperty("scannedBy")) + if (message.scannedBy != null && Object.hasOwnProperty.call(message, "scannedBy")) object.scannedBy = message.scannedBy; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.scannedByAccountUid != null && message.hasOwnProperty("scannedByAccountUid")) + if (message.scannedByAccountUid != null && Object.hasOwnProperty.call(message, "scannedByAccountUid")) object.scannedByAccountUid = options.bytes === String ? $util.base64.encode(message.scannedByAccountUid, 0, message.scannedByAccountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.scannedByAccountUid) : message.scannedByAccountUid; return object; }; @@ -239517,7 +240893,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ UserAuth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -239615,10 +240991,10 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) switch (message.loginType) { default: return "loginType: enum value expected"; @@ -239631,22 +241007,22 @@ export const Vault = $root.Vault = (() => { case 6: break; } - if (message.deleted != null && message.hasOwnProperty("deleted")) + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) if (typeof message.deleted !== "boolean") return "deleted: boolean expected"; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) if (!$util.isInteger(message.iterations)) return "iterations: integer expected"; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) if (!(message.salt && typeof message.salt.length === "number" || $util.isString(message.salt))) return "salt: buffer expected"; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) if (!(message.encryptedClientKey && typeof message.encryptedClientKey.length === "number" || $util.isString(message.encryptedClientKey))) return "encryptedClientKey: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -239663,6 +241039,8 @@ export const Vault = $root.Vault = (() => { UserAuth.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.UserAuth) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.UserAuth: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -239786,26 +241164,26 @@ export const Vault = $root.Vault = (() => { object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.name = ""; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.loginType != null && message.hasOwnProperty("loginType")) + if (message.loginType != null && Object.hasOwnProperty.call(message, "loginType")) object.loginType = options.enums === String ? $root.Authentication.LoginType[message.loginType] === undefined ? message.loginType : $root.Authentication.LoginType[message.loginType] : message.loginType; - if (message.deleted != null && message.hasOwnProperty("deleted")) + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) object.deleted = message.deleted; - if (message.iterations != null && message.hasOwnProperty("iterations")) + if (message.iterations != null && Object.hasOwnProperty.call(message, "iterations")) object.iterations = message.iterations; - if (message.salt != null && message.hasOwnProperty("salt")) + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) object.salt = options.bytes === String ? $util.base64.encode(message.salt, 0, message.salt.length) : options.bytes === Array ? Array.prototype.slice.call(message.salt) : message.salt; - if (message.encryptedClientKey != null && message.hasOwnProperty("encryptedClientKey")) + if (message.encryptedClientKey != null && Object.hasOwnProperty.call(message, "encryptedClientKey")) object.encryptedClientKey = options.bytes === String ? $util.base64.encode(message.encryptedClientKey, 0, message.encryptedClientKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedClientKey) : message.encryptedClientKey; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -239936,7 +241314,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchSecurityData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -240014,13 +241392,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.removed != null && message.hasOwnProperty("removed")) + if (message.removed != null && Object.hasOwnProperty.call(message, "removed")) if (typeof message.removed !== "boolean") return "removed: boolean expected"; return null; @@ -240037,6 +241415,8 @@ export const Vault = $root.Vault = (() => { BreachWatchSecurityData.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.BreachWatchSecurityData) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.BreachWatchSecurityData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -240093,16 +241473,16 @@ export const Vault = $root.Vault = (() => { object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.removed = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.removed != null && message.hasOwnProperty("removed")) + if (message.removed != null && Object.hasOwnProperty.call(message, "removed")) object.removed = message.removed; return object; }; @@ -240222,7 +241602,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ ReusedPasswords.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -240296,10 +241676,10 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) if (!$util.isInteger(message.count)) return "count: integer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -240316,6 +241696,8 @@ export const Vault = $root.Vault = (() => { ReusedPasswords.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.ReusedPasswords) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.ReusedPasswords: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -240360,9 +241742,9 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && Object.hasOwnProperty.call(message, "count")) object.count = message.count; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -240586,7 +241968,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -240696,31 +242078,31 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) if (typeof message.canShare !== "boolean") return "canShare: boolean expected"; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) if (typeof message.canEdit !== "boolean") return "canEdit: boolean expected"; - if (message.ownerAccountUid != null && message.hasOwnProperty("ownerAccountUid")) + if (message.ownerAccountUid != null && Object.hasOwnProperty.call(message, "ownerAccountUid")) if (!(message.ownerAccountUid && typeof message.ownerAccountUid.length === "number" || $util.isString(message.ownerAccountUid))) return "ownerAccountUid: buffer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) if (typeof message.owner !== "boolean") return "owner: boolean expected"; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) switch (message.expirationNotificationType) { default: return "expirationNotificationType: enum value expected"; @@ -240729,10 +242111,10 @@ export const Vault = $root.Vault = (() => { case 2: break; } - if (message.ownerUsername != null && message.hasOwnProperty("ownerUsername")) + if (message.ownerUsername != null && Object.hasOwnProperty.call(message, "ownerUsername")) if (!$util.isString(message.ownerUsername)) return "ownerUsername: string expected"; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -240749,6 +242131,8 @@ export const Vault = $root.Vault = (() => { SharedFolderRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolderRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolderRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -240874,32 +242258,32 @@ export const Vault = $root.Vault = (() => { object.ownerUsername = ""; object.rotateOnExpiration = false; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.canShare != null && message.hasOwnProperty("canShare")) + if (message.canShare != null && Object.hasOwnProperty.call(message, "canShare")) object.canShare = message.canShare; - if (message.canEdit != null && message.hasOwnProperty("canEdit")) + if (message.canEdit != null && Object.hasOwnProperty.call(message, "canEdit")) object.canEdit = message.canEdit; - if (message.ownerAccountUid != null && message.hasOwnProperty("ownerAccountUid")) + if (message.ownerAccountUid != null && Object.hasOwnProperty.call(message, "ownerAccountUid")) object.ownerAccountUid = options.bytes === String ? $util.base64.encode(message.ownerAccountUid, 0, message.ownerAccountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.ownerAccountUid) : message.ownerAccountUid; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) object.owner = message.owner; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) object.expirationNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.expirationNotificationType] === undefined ? message.expirationNotificationType : $root.Records.TimerNotificationType[message.expirationNotificationType] : message.expirationNotificationType; - if (message.ownerUsername != null && message.hasOwnProperty("ownerUsername")) + if (message.ownerUsername != null && Object.hasOwnProperty.call(message, "ownerUsername")) object.ownerUsername = message.ownerUsername; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -241085,7 +242469,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -241183,25 +242567,25 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) if (typeof message.manageRecords !== "boolean") return "manageRecords: boolean expected"; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) if (typeof message.manageUsers !== "boolean") return "manageUsers: boolean expected"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) switch (message.expirationNotificationType) { default: return "expirationNotificationType: enum value expected"; @@ -241210,7 +242594,7 @@ export const Vault = $root.Vault = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -241227,6 +242611,8 @@ export const Vault = $root.Vault = (() => { SharedFolderUser.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolderUser) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolderUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -241325,26 +242711,26 @@ export const Vault = $root.Vault = (() => { object.expirationNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) object.manageRecords = message.manageRecords; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) object.manageUsers = message.manageUsers; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) object.expirationNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.expirationNotificationType] === undefined ? message.expirationNotificationType : $root.Records.TimerNotificationType[message.expirationNotificationType] : message.expirationNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -241530,7 +242916,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SharedFolderTeam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -241628,25 +243014,25 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) if (!(message.teamUid && typeof message.teamUid.length === "number" || $util.isString(message.teamUid))) return "teamUid: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) if (typeof message.manageRecords !== "boolean") return "manageRecords: boolean expected"; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) if (typeof message.manageUsers !== "boolean") return "manageUsers: boolean expected"; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) switch (message.expirationNotificationType) { default: return "expirationNotificationType: enum value expected"; @@ -241655,7 +243041,7 @@ export const Vault = $root.Vault = (() => { case 2: break; } - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) if (typeof message.rotateOnExpiration !== "boolean") return "rotateOnExpiration: boolean expected"; return null; @@ -241672,6 +243058,8 @@ export const Vault = $root.Vault = (() => { SharedFolderTeam.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SharedFolderTeam) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SharedFolderTeam: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -241770,26 +243158,26 @@ export const Vault = $root.Vault = (() => { object.expirationNotificationType = options.enums === String ? "NOTIFICATION_OFF" : 0; object.rotateOnExpiration = false; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.teamUid != null && message.hasOwnProperty("teamUid")) + if (message.teamUid != null && Object.hasOwnProperty.call(message, "teamUid")) object.teamUid = options.bytes === String ? $util.base64.encode(message.teamUid, 0, message.teamUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.teamUid) : message.teamUid; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.manageRecords != null && message.hasOwnProperty("manageRecords")) + if (message.manageRecords != null && Object.hasOwnProperty.call(message, "manageRecords")) object.manageRecords = message.manageRecords; - if (message.manageUsers != null && message.hasOwnProperty("manageUsers")) + if (message.manageUsers != null && Object.hasOwnProperty.call(message, "manageUsers")) object.manageUsers = message.manageUsers; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") object.expiration = options.longs === String ? String(message.expiration) : message.expiration; else object.expiration = options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() : message.expiration; - if (message.expirationNotificationType != null && message.hasOwnProperty("expirationNotificationType")) + if (message.expirationNotificationType != null && Object.hasOwnProperty.call(message, "expirationNotificationType")) object.expirationNotificationType = options.enums === String ? $root.Records.TimerNotificationType[message.expirationNotificationType] === undefined ? message.expirationNotificationType : $root.Records.TimerNotificationType[message.expirationNotificationType] : message.expirationNotificationType; - if (message.rotateOnExpiration != null && message.hasOwnProperty("rotateOnExpiration")) + if (message.rotateOnExpiration != null && Object.hasOwnProperty.call(message, "rotateOnExpiration")) object.rotateOnExpiration = message.rotateOnExpiration; return object; }; @@ -241942,7 +243330,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ KsmChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -242028,16 +243416,16 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) if (!(message.appRecordUid && typeof message.appRecordUid.length === "number" || $util.isString(message.appRecordUid))) return "appRecordUid: buffer expected"; - if (message.detailId != null && message.hasOwnProperty("detailId")) + if (message.detailId != null && Object.hasOwnProperty.call(message, "detailId")) if (!(message.detailId && typeof message.detailId.length === "number" || $util.isString(message.detailId))) return "detailId: buffer expected"; - if (message.removed != null && message.hasOwnProperty("removed")) + if (message.removed != null && Object.hasOwnProperty.call(message, "removed")) if (typeof message.removed !== "boolean") return "removed: boolean expected"; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) switch (message.appClientType) { default: return "appClientType: enum value expected"; @@ -242048,7 +243436,7 @@ export const Vault = $root.Vault = (() => { case 4: break; } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (!$util.isInteger(message.expiration) && !(message.expiration && $util.isInteger(message.expiration.low) && $util.isInteger(message.expiration.high))) return "expiration: integer|Long expected"; return null; @@ -242065,6 +243453,8 @@ export const Vault = $root.Vault = (() => { KsmChange.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.KsmChange) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.KsmChange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -242162,15 +243552,15 @@ export const Vault = $root.Vault = (() => { } else object.expiration = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.appRecordUid != null && message.hasOwnProperty("appRecordUid")) + if (message.appRecordUid != null && Object.hasOwnProperty.call(message, "appRecordUid")) object.appRecordUid = options.bytes === String ? $util.base64.encode(message.appRecordUid, 0, message.appRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.appRecordUid) : message.appRecordUid; - if (message.detailId != null && message.hasOwnProperty("detailId")) + if (message.detailId != null && Object.hasOwnProperty.call(message, "detailId")) object.detailId = options.bytes === String ? $util.base64.encode(message.detailId, 0, message.detailId.length) : options.bytes === Array ? Array.prototype.slice.call(message.detailId) : message.detailId; - if (message.removed != null && message.hasOwnProperty("removed")) + if (message.removed != null && Object.hasOwnProperty.call(message, "removed")) object.removed = message.removed; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) object.appClientType = options.enums === String ? $root.Enterprise.AppClientType[message.appClientType] === undefined ? message.appClientType : $root.Enterprise.AppClientType[message.appClientType] : message.appClientType; - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiration = typeof message.expiration === "number" ? BigInt(message.expiration) : $util.Long.fromBits(message.expiration.low >>> 0, message.expiration.high >>> 0, false).toBigInt(); else if (typeof message.expiration === "number") @@ -242284,7 +243674,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ ShareInvitation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -242354,7 +243744,7 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -242371,6 +243761,8 @@ export const Vault = $root.Vault = (() => { ShareInvitation.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.ShareInvitation) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.ShareInvitation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -242400,7 +243792,7 @@ export const Vault = $root.Vault = (() => { let object = {}; if (options.defaults) object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -242520,7 +243912,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ User.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -242594,10 +243986,10 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) if (!(message.accountUid && typeof message.accountUid.length === "number" || $util.isString(message.accountUid))) return "accountUid: buffer expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; return null; @@ -242614,6 +244006,8 @@ export const Vault = $root.Vault = (() => { User.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.User) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.User: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -242656,9 +244050,9 @@ export const Vault = $root.Vault = (() => { } object.username = ""; } - if (message.accountUid != null && message.hasOwnProperty("accountUid")) + if (message.accountUid != null && Object.hasOwnProperty.call(message, "accountUid")) object.accountUid = options.bytes === String ? $util.base64.encode(message.accountUid, 0, message.accountUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountUid) : message.accountUid; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; return object; }; @@ -242811,7 +244205,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SyncDiagnostics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -242897,19 +244291,19 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) if (!(message.continuationToken && typeof message.continuationToken.length === "number" || $util.isString(message.continuationToken))) return "continuationToken: buffer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.syncedTo != null && message.hasOwnProperty("syncedTo")) + if (message.syncedTo != null && Object.hasOwnProperty.call(message, "syncedTo")) if (!$util.isInteger(message.syncedTo) && !(message.syncedTo && $util.isInteger(message.syncedTo.low) && $util.isInteger(message.syncedTo.high))) return "syncedTo: integer|Long expected"; - if (message.syncingTo != null && message.hasOwnProperty("syncingTo")) + if (message.syncingTo != null && Object.hasOwnProperty.call(message, "syncingTo")) if (!$util.isInteger(message.syncingTo) && !(message.syncingTo && $util.isInteger(message.syncingTo.low) && $util.isInteger(message.syncingTo.high))) return "syncingTo: integer|Long expected"; return null; @@ -242926,6 +244320,8 @@ export const Vault = $root.Vault = (() => { SyncDiagnostics.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SyncDiagnostics) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SyncDiagnostics: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -243010,25 +244406,25 @@ export const Vault = $root.Vault = (() => { } else object.syncingTo = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.continuationToken != null && message.hasOwnProperty("continuationToken")) + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) object.continuationToken = options.bytes === String ? $util.base64.encode(message.continuationToken, 0, message.continuationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.continuationToken) : message.continuationToken; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.syncedTo != null && message.hasOwnProperty("syncedTo")) + if (message.syncedTo != null && Object.hasOwnProperty.call(message, "syncedTo")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncedTo = typeof message.syncedTo === "number" ? BigInt(message.syncedTo) : $util.Long.fromBits(message.syncedTo.low >>> 0, message.syncedTo.high >>> 0, false).toBigInt(); else if (typeof message.syncedTo === "number") object.syncedTo = options.longs === String ? String(message.syncedTo) : message.syncedTo; else object.syncedTo = options.longs === String ? $util.Long.prototype.toString.call(message.syncedTo) : options.longs === Number ? new $util.LongBits(message.syncedTo.low >>> 0, message.syncedTo.high >>> 0).toNumber() : message.syncedTo; - if (message.syncingTo != null && message.hasOwnProperty("syncingTo")) + if (message.syncingTo != null && Object.hasOwnProperty.call(message, "syncingTo")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncingTo = typeof message.syncingTo === "number" ? BigInt(message.syncingTo) : $util.Long.fromBits(message.syncingTo.low >>> 0, message.syncingTo.high >>> 0, false).toBigInt(); else if (typeof message.syncingTo === "number") @@ -243248,7 +244644,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ RecordRotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -243350,31 +244746,31 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) if (!$util.isString(message.schedule)) return "schedule: string expected"; - if (message.pwdComplexity != null && message.hasOwnProperty("pwdComplexity")) + if (message.pwdComplexity != null && Object.hasOwnProperty.call(message, "pwdComplexity")) if (!(message.pwdComplexity && typeof message.pwdComplexity.length === "number" || $util.isString(message.pwdComplexity))) return "pwdComplexity: buffer expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) if (typeof message.disabled !== "boolean") return "disabled: boolean expected"; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) if (!(message.resourceUid && typeof message.resourceUid.length === "number" || $util.isString(message.resourceUid))) return "resourceUid: buffer expected"; - if (message.lastRotation != null && message.hasOwnProperty("lastRotation")) + if (message.lastRotation != null && Object.hasOwnProperty.call(message, "lastRotation")) if (!$util.isInteger(message.lastRotation) && !(message.lastRotation && $util.isInteger(message.lastRotation.low) && $util.isInteger(message.lastRotation.high))) return "lastRotation: integer|Long expected"; - if (message.lastRotationStatus != null && message.hasOwnProperty("lastRotationStatus")) + if (message.lastRotationStatus != null && Object.hasOwnProperty.call(message, "lastRotationStatus")) switch (message.lastRotationStatus) { default: return "lastRotationStatus: enum value expected"; @@ -243398,6 +244794,8 @@ export const Vault = $root.Vault = (() => { RecordRotation.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.RecordRotation) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.RecordRotation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -243532,33 +244930,33 @@ export const Vault = $root.Vault = (() => { object.lastRotation = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.lastRotationStatus = options.enums === String ? "RRST_NOT_ROTATED" : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) object.schedule = message.schedule; - if (message.pwdComplexity != null && message.hasOwnProperty("pwdComplexity")) + if (message.pwdComplexity != null && Object.hasOwnProperty.call(message, "pwdComplexity")) object.pwdComplexity = options.bytes === String ? $util.base64.encode(message.pwdComplexity, 0, message.pwdComplexity.length) : options.bytes === Array ? Array.prototype.slice.call(message.pwdComplexity) : message.pwdComplexity; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) object.disabled = message.disabled; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) object.resourceUid = options.bytes === String ? $util.base64.encode(message.resourceUid, 0, message.resourceUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.resourceUid) : message.resourceUid; - if (message.lastRotation != null && message.hasOwnProperty("lastRotation")) + if (message.lastRotation != null && Object.hasOwnProperty.call(message, "lastRotation")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastRotation = typeof message.lastRotation === "number" ? BigInt(message.lastRotation) : $util.Long.fromBits(message.lastRotation.low >>> 0, message.lastRotation.high >>> 0, false).toBigInt(); else if (typeof message.lastRotation === "number") object.lastRotation = options.longs === String ? String(message.lastRotation) : message.lastRotation; else object.lastRotation = options.longs === String ? $util.Long.prototype.toString.call(message.lastRotation) : options.longs === Number ? new $util.LongBits(message.lastRotation.low >>> 0, message.lastRotation.high >>> 0).toNumber() : message.lastRotation; - if (message.lastRotationStatus != null && message.hasOwnProperty("lastRotationStatus")) + if (message.lastRotationStatus != null && Object.hasOwnProperty.call(message, "lastRotationStatus")) object.lastRotationStatus = options.enums === String ? $root.Vault.RecordRotationStatus[message.lastRotationStatus] === undefined ? message.lastRotationStatus : $root.Vault.RecordRotationStatus[message.lastRotationStatus] : message.lastRotationStatus; return object; }; @@ -243689,7 +245087,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ SecurityScoreData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -243767,13 +245165,13 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; return null; @@ -243790,6 +245188,8 @@ export const Vault = $root.Vault = (() => { SecurityScoreData.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.SecurityScoreData) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.SecurityScoreData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -243855,11 +245255,11 @@ export const Vault = $root.Vault = (() => { } else object.revision = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") @@ -243975,7 +245375,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchGetSyncDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -244047,7 +245447,7 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUids != null && message.hasOwnProperty("recordUids")) { + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { if (!Array.isArray(message.recordUids)) return "recordUids: array expected"; for (let i = 0; i < message.recordUids.length; ++i) @@ -244068,6 +245468,8 @@ export const Vault = $root.Vault = (() => { BreachWatchGetSyncDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.BreachWatchGetSyncDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.BreachWatchGetSyncDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -244245,7 +245647,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ BreachWatchGetSyncDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -244329,7 +245731,7 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.breachWatchRecords != null && message.hasOwnProperty("breachWatchRecords")) { + if (message.breachWatchRecords != null && Object.hasOwnProperty.call(message, "breachWatchRecords")) { if (!Array.isArray(message.breachWatchRecords)) return "breachWatchRecords: array expected"; for (let i = 0; i < message.breachWatchRecords.length; ++i) { @@ -244338,7 +245740,7 @@ export const Vault = $root.Vault = (() => { return "breachWatchRecords." + error; } } - if (message.breachWatchSecurityData != null && message.hasOwnProperty("breachWatchSecurityData")) { + if (message.breachWatchSecurityData != null && Object.hasOwnProperty.call(message, "breachWatchSecurityData")) { if (!Array.isArray(message.breachWatchSecurityData)) return "breachWatchSecurityData: array expected"; for (let i = 0; i < message.breachWatchSecurityData.length; ++i) { @@ -244347,7 +245749,7 @@ export const Vault = $root.Vault = (() => { return "breachWatchSecurityData." + error; } } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -244370,6 +245772,8 @@ export const Vault = $root.Vault = (() => { BreachWatchGetSyncDataResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.BreachWatchGetSyncDataResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.BreachWatchGetSyncDataResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -244380,7 +245784,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.BreachWatchGetSyncDataResponse.breachWatchRecords: array expected"); message.breachWatchRecords = []; for (let i = 0; i < object.breachWatchRecords.length; ++i) { - if (typeof object.breachWatchRecords[i] !== "object") + if (!$util.isObject(object.breachWatchRecords[i])) throw TypeError(".Vault.BreachWatchGetSyncDataResponse.breachWatchRecords: object expected"); message.breachWatchRecords[i] = $root.Vault.BreachWatchRecord.fromObject(object.breachWatchRecords[i], long + 1); } @@ -244390,7 +245794,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.BreachWatchGetSyncDataResponse.breachWatchSecurityData: array expected"); message.breachWatchSecurityData = []; for (let i = 0; i < object.breachWatchSecurityData.length; ++i) { - if (typeof object.breachWatchSecurityData[i] !== "object") + if (!$util.isObject(object.breachWatchSecurityData[i])) throw TypeError(".Vault.BreachWatchGetSyncDataResponse.breachWatchSecurityData: object expected"); message.breachWatchSecurityData[i] = $root.Vault.BreachWatchSecurityData.fromObject(object.breachWatchSecurityData[i], long + 1); } @@ -244400,7 +245804,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.BreachWatchGetSyncDataResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Vault.BreachWatchGetSyncDataResponse.users: object expected"); message.users[i] = $root.Vault.User.fromObject(object.users[i], long + 1); } @@ -244554,7 +245958,7 @@ export const Vault = $root.Vault = (() => { * @returns {$protobuf.Writer} Writer */ GetAccountUidMapResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -244626,7 +246030,7 @@ export const Vault = $root.Vault = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { if (!Array.isArray(message.users)) return "users: array expected"; for (let i = 0; i < message.users.length; ++i) { @@ -244649,6 +246053,8 @@ export const Vault = $root.Vault = (() => { GetAccountUidMapResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Vault.GetAccountUidMapResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Vault.GetAccountUidMapResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -244659,7 +246065,7 @@ export const Vault = $root.Vault = (() => { throw TypeError(".Vault.GetAccountUidMapResponse.users: array expected"); message.users = []; for (let i = 0; i < object.users.length; ++i) { - if (typeof object.users[i] !== "object") + if (!$util.isObject(object.users[i])) throw TypeError(".Vault.GetAccountUidMapResponse.users: object expected"); message.users[i] = $root.Vault.User.fromObject(object.users[i], long + 1); } @@ -244941,7 +246347,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ EncryptedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -245015,10 +246421,10 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -245035,6 +246441,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { EncryptedData.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.EncryptedData) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.EncryptedData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -245077,9 +246485,9 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.data = $util.newBuffer(object.data); } } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -245199,7 +246607,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationParameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -245273,10 +246681,10 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) if (!$util.isString(message.key)) return "key: string expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -245293,6 +246701,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationParameter.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationParameter) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationParameter: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -245335,9 +246745,9 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.data = $util.newBuffer(object.data); } } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && Object.hasOwnProperty.call(message, "key")) object.key = message.key; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -245532,7 +246942,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ Notification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -245641,7 +247051,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -245670,7 +247080,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { case 22: break; } - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && Object.hasOwnProperty.call(message, "category")) switch (message.category) { default: return "category: enum value expected"; @@ -245684,20 +247094,20 @@ export const NotificationCenter = $root.NotificationCenter = (() => { case 7: break; } - if (message.sender != null && message.hasOwnProperty("sender")) { + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) { let error = $root.GraphSync.GraphSyncRef.verify(message.sender, long + 1); if (error) return "sender." + error; } - if (message.senderFullName != null && message.hasOwnProperty("senderFullName")) + if (message.senderFullName != null && Object.hasOwnProperty.call(message, "senderFullName")) if (!$util.isString(message.senderFullName)) return "senderFullName: string expected"; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) { + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) { let error = $root.NotificationCenter.EncryptedData.verify(message.encryptedData, long + 1); if (error) return "encryptedData." + error; } - if (message.refs != null && message.hasOwnProperty("refs")) { + if (message.refs != null && Object.hasOwnProperty.call(message, "refs")) { if (!Array.isArray(message.refs)) return "refs: array expected"; for (let i = 0; i < message.refs.length; ++i) { @@ -245706,7 +247116,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { return "refs." + error; } } - if (message.categories != null && message.hasOwnProperty("categories")) { + if (message.categories != null && Object.hasOwnProperty.call(message, "categories")) { if (!Array.isArray(message.categories)) return "categories: array expected"; for (let i = 0; i < message.categories.length; ++i) @@ -245724,7 +247134,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { break; } } - if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) { if (!Array.isArray(message.parameters)) return "parameters: array expected"; for (let i = 0; i < message.parameters.length; ++i) { @@ -245747,6 +247157,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { Notification.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.Notification) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.Notification: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -245893,14 +247305,14 @@ export const NotificationCenter = $root.NotificationCenter = (() => { break; } if (object.sender != null) { - if (typeof object.sender !== "object") + if (!$util.isObject(object.sender)) throw TypeError(".NotificationCenter.Notification.sender: object expected"); message.sender = $root.GraphSync.GraphSyncRef.fromObject(object.sender, long + 1); } if (object.senderFullName != null) message.senderFullName = String(object.senderFullName); if (object.encryptedData != null) { - if (typeof object.encryptedData !== "object") + if (!$util.isObject(object.encryptedData)) throw TypeError(".NotificationCenter.Notification.encryptedData: object expected"); message.encryptedData = $root.NotificationCenter.EncryptedData.fromObject(object.encryptedData, long + 1); } @@ -245909,7 +247321,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.Notification.refs: array expected"); message.refs = []; for (let i = 0; i < object.refs.length; ++i) { - if (typeof object.refs[i] !== "object") + if (!$util.isObject(object.refs[i])) throw TypeError(".NotificationCenter.Notification.refs: object expected"); message.refs[i] = $root.GraphSync.GraphSyncRef.fromObject(object.refs[i], long + 1); } @@ -245964,7 +247376,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.Notification.parameters: array expected"); message.parameters = []; for (let i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") + if (!$util.isObject(object.parameters[i])) throw TypeError(".NotificationCenter.Notification.parameters: object expected"); message.parameters[i] = $root.NotificationCenter.NotificationParameter.fromObject(object.parameters[i], long + 1); } @@ -246001,15 +247413,15 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.senderFullName = ""; object.encryptedData = null; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.NotificationCenter.NotificationType[message.type] === undefined ? message.type : $root.NotificationCenter.NotificationType[message.type] : message.type; - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && Object.hasOwnProperty.call(message, "category")) object.category = options.enums === String ? $root.NotificationCenter.NotificationCategory[message.category] === undefined ? message.category : $root.NotificationCenter.NotificationCategory[message.category] : message.category; - if (message.sender != null && message.hasOwnProperty("sender")) + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) object.sender = $root.GraphSync.GraphSyncRef.toObject(message.sender, options, q + 1); - if (message.senderFullName != null && message.hasOwnProperty("senderFullName")) + if (message.senderFullName != null && Object.hasOwnProperty.call(message, "senderFullName")) object.senderFullName = message.senderFullName; - if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) object.encryptedData = $root.NotificationCenter.EncryptedData.toObject(message.encryptedData, options, q + 1); if (message.refs && message.refs.length) { object.refs = []; @@ -246166,7 +247578,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationReadMark.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -246248,16 +247660,16 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.notificationEdgeId != null && message.hasOwnProperty("notificationEdgeId")) + if (message.notificationEdgeId != null && Object.hasOwnProperty.call(message, "notificationEdgeId")) if (!$util.isInteger(message.notificationEdgeId) && !(message.notificationEdgeId && $util.isInteger(message.notificationEdgeId.low) && $util.isInteger(message.notificationEdgeId.high))) return "notificationEdgeId: integer|Long expected"; - if (message.markEdgeId != null && message.hasOwnProperty("markEdgeId")) + if (message.markEdgeId != null && Object.hasOwnProperty.call(message, "markEdgeId")) if (!$util.isInteger(message.markEdgeId) && !(message.markEdgeId && $util.isInteger(message.markEdgeId.low) && $util.isInteger(message.markEdgeId.high))) return "markEdgeId: integer|Long expected"; - if (message.readStatus != null && message.hasOwnProperty("readStatus")) + if (message.readStatus != null && Object.hasOwnProperty.call(message, "readStatus")) switch (message.readStatus) { default: return "readStatus: enum value expected"; @@ -246281,6 +247693,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationReadMark.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationReadMark) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationReadMark: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -246373,23 +247787,23 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.markEdgeId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.readStatus = options.enums === String ? "NRS_UNSPECIFIED" : 0; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.notificationEdgeId != null && message.hasOwnProperty("notificationEdgeId")) + if (message.notificationEdgeId != null && Object.hasOwnProperty.call(message, "notificationEdgeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.notificationEdgeId = typeof message.notificationEdgeId === "number" ? BigInt(message.notificationEdgeId) : $util.Long.fromBits(message.notificationEdgeId.low >>> 0, message.notificationEdgeId.high >>> 0, false).toBigInt(); else if (typeof message.notificationEdgeId === "number") object.notificationEdgeId = options.longs === String ? String(message.notificationEdgeId) : message.notificationEdgeId; else object.notificationEdgeId = options.longs === String ? $util.Long.prototype.toString.call(message.notificationEdgeId) : options.longs === Number ? new $util.LongBits(message.notificationEdgeId.low >>> 0, message.notificationEdgeId.high >>> 0).toNumber() : message.notificationEdgeId; - if (message.markEdgeId != null && message.hasOwnProperty("markEdgeId")) + if (message.markEdgeId != null && Object.hasOwnProperty.call(message, "markEdgeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.markEdgeId = typeof message.markEdgeId === "number" ? BigInt(message.markEdgeId) : $util.Long.fromBits(message.markEdgeId.low >>> 0, message.markEdgeId.high >>> 0, false).toBigInt(); else if (typeof message.markEdgeId === "number") object.markEdgeId = options.longs === String ? String(message.markEdgeId) : message.markEdgeId; else object.markEdgeId = options.longs === String ? $util.Long.prototype.toString.call(message.markEdgeId) : options.longs === Number ? new $util.LongBits(message.markEdgeId.low >>> 0, message.markEdgeId.high >>> 0).toNumber() : message.markEdgeId; - if (message.readStatus != null && message.hasOwnProperty("readStatus")) + if (message.readStatus != null && Object.hasOwnProperty.call(message, "readStatus")) object.readStatus = options.enums === String ? $root.NotificationCenter.NotificationReadStatus[message.readStatus] === undefined ? message.readStatus : $root.NotificationCenter.NotificationReadStatus[message.readStatus] : message.readStatus; return object; }; @@ -246577,7 +247991,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -246682,7 +248096,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.notification != null && message.hasOwnProperty("notification")) { + if (message.notification != null && Object.hasOwnProperty.call(message, "notification")) { properties.type = 1; { let error = $root.NotificationCenter.Notification.verify(message.notification, long + 1); @@ -246690,7 +248104,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { return "notification." + error; } } - if (message.readStatus != null && message.hasOwnProperty("readStatus")) { + if (message.readStatus != null && Object.hasOwnProperty.call(message, "readStatus")) { if (properties.type === 1) return "type: multiple values"; properties.type = 1; @@ -246704,7 +248118,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { break; } } - if (message.approvalStatus != null && message.hasOwnProperty("approvalStatus")) { + if (message.approvalStatus != null && Object.hasOwnProperty.call(message, "approvalStatus")) { if (properties.type === 1) return "type: multiple values"; properties.type = 1; @@ -246719,21 +248133,21 @@ export const NotificationCenter = $root.NotificationCenter = (() => { break; } } - if (message.trimmingPoint != null && message.hasOwnProperty("trimmingPoint")) { + if (message.trimmingPoint != null && Object.hasOwnProperty.call(message, "trimmingPoint")) { if (properties.type === 1) return "type: multiple values"; properties.type = 1; if (typeof message.trimmingPoint !== "boolean") return "trimmingPoint: boolean expected"; } - if (message.clientTypeIDs != null && message.hasOwnProperty("clientTypeIDs")) { + if (message.clientTypeIDs != null && Object.hasOwnProperty.call(message, "clientTypeIDs")) { if (!Array.isArray(message.clientTypeIDs)) return "clientTypeIDs: array expected"; for (let i = 0; i < message.clientTypeIDs.length; ++i) if (!$util.isInteger(message.clientTypeIDs[i])) return "clientTypeIDs: integer[] expected"; } - if (message.deviceIDs != null && message.hasOwnProperty("deviceIDs")) { + if (message.deviceIDs != null && Object.hasOwnProperty.call(message, "deviceIDs")) { if (!Array.isArray(message.deviceIDs)) return "deviceIDs: array expected"; for (let i = 0; i < message.deviceIDs.length; ++i) @@ -246754,13 +248168,15 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationContent.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationContent) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationContent: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.NotificationCenter.NotificationContent(); if (object.notification != null) { - if (typeof object.notification !== "object") + if (!$util.isObject(object.notification)) throw TypeError(".NotificationCenter.NotificationContent.notification: object expected"); message.notification = $root.NotificationCenter.Notification.fromObject(object.notification, long + 1); } @@ -246863,22 +248279,22 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.clientTypeIDs = []; object.deviceIDs = []; } - if (message.notification != null && message.hasOwnProperty("notification")) { + if (message.notification != null && Object.hasOwnProperty.call(message, "notification")) { object.notification = $root.NotificationCenter.Notification.toObject(message.notification, options, q + 1); if (options.oneofs) object.type = "notification"; } - if (message.readStatus != null && message.hasOwnProperty("readStatus")) { + if (message.readStatus != null && Object.hasOwnProperty.call(message, "readStatus")) { object.readStatus = options.enums === String ? $root.NotificationCenter.NotificationReadStatus[message.readStatus] === undefined ? message.readStatus : $root.NotificationCenter.NotificationReadStatus[message.readStatus] : message.readStatus; if (options.oneofs) object.type = "readStatus"; } - if (message.approvalStatus != null && message.hasOwnProperty("approvalStatus")) { + if (message.approvalStatus != null && Object.hasOwnProperty.call(message, "approvalStatus")) { object.approvalStatus = options.enums === String ? $root.NotificationCenter.NotificationApprovalStatus[message.approvalStatus] === undefined ? message.approvalStatus : $root.NotificationCenter.NotificationApprovalStatus[message.approvalStatus] : message.approvalStatus; if (options.oneofs) object.type = "approvalStatus"; } - if (message.trimmingPoint != null && message.hasOwnProperty("trimmingPoint")) { + if (message.trimmingPoint != null && Object.hasOwnProperty.call(message, "trimmingPoint")) { object.trimmingPoint = message.trimmingPoint; if (options.oneofs) object.type = "trimmingPoint"; @@ -247027,7 +248443,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationWrapper.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -247105,15 +248521,15 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { let error = $root.NotificationCenter.NotificationContent.verify(message.content, long + 1); if (error) return "content." + error; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; return null; @@ -247130,6 +248546,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationWrapper.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationWrapper) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationWrapper: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -247141,7 +248559,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { else if (object.uid.length >= 0) message.uid = object.uid; if (object.content != null) { - if (typeof object.content !== "object") + if (!$util.isObject(object.content)) throw TypeError(".NotificationCenter.NotificationWrapper.content: object expected"); message.content = $root.NotificationCenter.NotificationContent.fromObject(object.content, long + 1); } @@ -247189,11 +248607,11 @@ export const NotificationCenter = $root.NotificationCenter = (() => { } else object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = $root.NotificationCenter.NotificationContent.toObject(message.content, options, q + 1); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, false).toBigInt(); else if (typeof message.timestamp === "number") @@ -247331,7 +248749,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationSync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -247411,7 +248829,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { if (!Array.isArray(message.data)) return "data: array expected"; for (let i = 0; i < message.data.length; ++i) { @@ -247420,10 +248838,10 @@ export const NotificationCenter = $root.NotificationCenter = (() => { return "data." + error; } } - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (!$util.isInteger(message.syncPoint) && !(message.syncPoint && $util.isInteger(message.syncPoint.low) && $util.isInteger(message.syncPoint.high))) return "syncPoint: integer|Long expected"; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; return null; @@ -247440,6 +248858,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationSync.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationSync) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationSync: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -247450,7 +248870,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.NotificationSync.data: array expected"); message.data = []; for (let i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") + if (!$util.isObject(object.data[i])) throw TypeError(".NotificationCenter.NotificationSync.data: object expected"); message.data[i] = $root.NotificationCenter.NotificationWrapper.fromObject(object.data[i], long + 1); } @@ -247501,14 +248921,14 @@ export const NotificationCenter = $root.NotificationCenter = (() => { for (let j = 0; j < message.data.length; ++j) object.data[j] = $root.NotificationCenter.NotificationWrapper.toObject(message.data[j], options, q + 1); } - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncPoint = typeof message.syncPoint === "number" ? BigInt(message.syncPoint) : $util.Long.fromBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0, false).toBigInt(); else if (typeof message.syncPoint === "number") object.syncPoint = options.longs === String ? String(message.syncPoint) : message.syncPoint; else object.syncPoint = options.longs === String ? $util.Long.prototype.toString.call(message.syncPoint) : options.longs === Number ? new $util.LongBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0).toNumber() : message.syncPoint; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; return object; }; @@ -247628,7 +249048,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ ReadStatusUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -247702,10 +249122,10 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.notificationUid != null && message.hasOwnProperty("notificationUid")) + if (message.notificationUid != null && Object.hasOwnProperty.call(message, "notificationUid")) if (!(message.notificationUid && typeof message.notificationUid.length === "number" || $util.isString(message.notificationUid))) return "notificationUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -247729,6 +249149,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { ReadStatusUpdate.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.ReadStatusUpdate) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.ReadStatusUpdate: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -247793,9 +249215,9 @@ export const NotificationCenter = $root.NotificationCenter = (() => { } object.status = options.enums === String ? "NRS_UNSPECIFIED" : 0; } - if (message.notificationUid != null && message.hasOwnProperty("notificationUid")) + if (message.notificationUid != null && Object.hasOwnProperty.call(message, "notificationUid")) object.notificationUid = options.bytes === String ? $util.base64.encode(message.notificationUid, 0, message.notificationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.notificationUid) : message.notificationUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.NotificationCenter.NotificationReadStatus[message.status] === undefined ? message.status : $root.NotificationCenter.NotificationReadStatus[message.status] : message.status; return object; }; @@ -247915,7 +249337,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ ApprovalStatusUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -247989,10 +249411,10 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.notificationUid != null && message.hasOwnProperty("notificationUid")) + if (message.notificationUid != null && Object.hasOwnProperty.call(message, "notificationUid")) if (!(message.notificationUid && typeof message.notificationUid.length === "number" || $util.isString(message.notificationUid))) return "notificationUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -248017,6 +249439,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { ApprovalStatusUpdate.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.ApprovalStatusUpdate) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.ApprovalStatusUpdate: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -248085,9 +249509,9 @@ export const NotificationCenter = $root.NotificationCenter = (() => { } object.status = options.enums === String ? "NAS_UNSPECIFIED" : 0; } - if (message.notificationUid != null && message.hasOwnProperty("notificationUid")) + if (message.notificationUid != null && Object.hasOwnProperty.call(message, "notificationUid")) object.notificationUid = options.bytes === String ? $util.base64.encode(message.notificationUid, 0, message.notificationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.notificationUid) : message.notificationUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.NotificationCenter.NotificationApprovalStatus[message.status] === undefined ? message.status : $root.NotificationCenter.NotificationApprovalStatus[message.status] : message.status; return object; }; @@ -248198,7 +249622,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ ProcessMarkReadEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -248270,7 +249694,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.readStatusUpdate != null && message.hasOwnProperty("readStatusUpdate")) { + if (message.readStatusUpdate != null && Object.hasOwnProperty.call(message, "readStatusUpdate")) { if (!Array.isArray(message.readStatusUpdate)) return "readStatusUpdate: array expected"; for (let i = 0; i < message.readStatusUpdate.length; ++i) { @@ -248293,6 +249717,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { ProcessMarkReadEventsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.ProcessMarkReadEventsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.ProcessMarkReadEventsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -248303,7 +249729,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.ProcessMarkReadEventsRequest.readStatusUpdate: array expected"); message.readStatusUpdate = []; for (let i = 0; i < object.readStatusUpdate.length; ++i) { - if (typeof object.readStatusUpdate[i] !== "object") + if (!$util.isObject(object.readStatusUpdate[i])) throw TypeError(".NotificationCenter.ProcessMarkReadEventsRequest.readStatusUpdate: object expected"); message.readStatusUpdate[i] = $root.NotificationCenter.ReadStatusUpdate.fromObject(object.readStatusUpdate[i], long + 1); } @@ -248507,7 +249933,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationSendRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -248610,7 +250036,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.recipients != null && message.hasOwnProperty("recipients")) { + if (message.recipients != null && Object.hasOwnProperty.call(message, "recipients")) { if (!Array.isArray(message.recipients)) return "recipients: array expected"; for (let i = 0; i < message.recipients.length; ++i) { @@ -248619,26 +250045,26 @@ export const NotificationCenter = $root.NotificationCenter = (() => { return "recipients." + error; } } - if (message.notification != null && message.hasOwnProperty("notification")) { + if (message.notification != null && Object.hasOwnProperty.call(message, "notification")) { let error = $root.NotificationCenter.Notification.verify(message.notification, long + 1); if (error) return "notification." + error; } - if (message.clientTypeIDs != null && message.hasOwnProperty("clientTypeIDs")) { + if (message.clientTypeIDs != null && Object.hasOwnProperty.call(message, "clientTypeIDs")) { if (!Array.isArray(message.clientTypeIDs)) return "clientTypeIDs: array expected"; for (let i = 0; i < message.clientTypeIDs.length; ++i) if (!$util.isInteger(message.clientTypeIDs[i])) return "clientTypeIDs: integer[] expected"; } - if (message.deviceIDs != null && message.hasOwnProperty("deviceIDs")) { + if (message.deviceIDs != null && Object.hasOwnProperty.call(message, "deviceIDs")) { if (!Array.isArray(message.deviceIDs)) return "deviceIDs: array expected"; for (let i = 0; i < message.deviceIDs.length; ++i) if (!$util.isInteger(message.deviceIDs[i]) && !(message.deviceIDs[i] && $util.isInteger(message.deviceIDs[i].low) && $util.isInteger(message.deviceIDs[i].high))) return "deviceIDs: integer|Long[] expected"; } - if (message.predefinedUid != null && message.hasOwnProperty("predefinedUid")) { + if (message.predefinedUid != null && Object.hasOwnProperty.call(message, "predefinedUid")) { properties._predefinedUid = 1; if (!(message.predefinedUid && typeof message.predefinedUid.length === "number" || $util.isString(message.predefinedUid))) return "predefinedUid: buffer expected"; @@ -248657,6 +250083,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationSendRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationSendRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationSendRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -248667,13 +250095,13 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.NotificationSendRequest.recipients: array expected"); message.recipients = []; for (let i = 0; i < object.recipients.length; ++i) { - if (typeof object.recipients[i] !== "object") + if (!$util.isObject(object.recipients[i])) throw TypeError(".NotificationCenter.NotificationSendRequest.recipients: object expected"); message.recipients[i] = $root.GraphSync.GraphSyncRef.fromObject(object.recipients[i], long + 1); } } if (object.notification != null) { - if (typeof object.notification !== "object") + if (!$util.isObject(object.notification)) throw TypeError(".NotificationCenter.NotificationSendRequest.notification: object expected"); message.notification = $root.NotificationCenter.Notification.fromObject(object.notification, long + 1); } @@ -248735,7 +250163,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { for (let j = 0; j < message.recipients.length; ++j) object.recipients[j] = $root.GraphSync.GraphSyncRef.toObject(message.recipients[j], options, q + 1); } - if (message.notification != null && message.hasOwnProperty("notification")) + if (message.notification != null && Object.hasOwnProperty.call(message, "notification")) object.notification = $root.NotificationCenter.Notification.toObject(message.notification, options, q + 1); if (message.clientTypeIDs && message.clientTypeIDs.length) { object.clientTypeIDs = []; @@ -248752,7 +250180,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { else object.deviceIDs[j] = options.longs === String ? $util.Long.prototype.toString.call(message.deviceIDs[j]) : options.longs === Number ? new $util.LongBits(message.deviceIDs[j].low >>> 0, message.deviceIDs[j].high >>> 0).toNumber() : message.deviceIDs[j]; } - if (message.predefinedUid != null && message.hasOwnProperty("predefinedUid")) { + if (message.predefinedUid != null && Object.hasOwnProperty.call(message, "predefinedUid")) { object.predefinedUid = options.bytes === String ? $util.base64.encode(message.predefinedUid, 0, message.predefinedUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.predefinedUid) : message.predefinedUid; if (options.oneofs) object._predefinedUid = "predefinedUid"; @@ -248866,7 +250294,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationsSendRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -248938,7 +250366,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.notifications != null && message.hasOwnProperty("notifications")) { + if (message.notifications != null && Object.hasOwnProperty.call(message, "notifications")) { if (!Array.isArray(message.notifications)) return "notifications: array expected"; for (let i = 0; i < message.notifications.length; ++i) { @@ -248961,6 +250389,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationsSendRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationsSendRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationsSendRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -248971,7 +250401,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.NotificationsSendRequest.notifications: array expected"); message.notifications = []; for (let i = 0; i < object.notifications.length; ++i) { - if (typeof object.notifications[i] !== "object") + if (!$util.isObject(object.notifications[i])) throw TypeError(".NotificationCenter.NotificationsSendRequest.notifications: object expected"); message.notifications[i] = $root.NotificationCenter.NotificationSendRequest.fromObject(object.notifications[i], long + 1); } @@ -249110,7 +250540,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationSyncRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -249180,7 +250610,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (!$util.isInteger(message.syncPoint) && !(message.syncPoint && $util.isInteger(message.syncPoint.low) && $util.isInteger(message.syncPoint.high))) return "syncPoint: integer|Long expected"; return null; @@ -249197,6 +250627,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationSyncRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationSyncRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationSyncRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -249237,7 +250669,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.syncPoint = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.syncPoint = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncPoint = typeof message.syncPoint === "number" ? BigInt(message.syncPoint) : $util.Long.fromBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0, false).toBigInt(); else if (typeof message.syncPoint === "number") @@ -249362,7 +250794,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ SentNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -249436,10 +250868,10 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) if (!$util.isInteger(message.user)) return "user: integer expected"; - if (message.notificationUid != null && message.hasOwnProperty("notificationUid")) + if (message.notificationUid != null && Object.hasOwnProperty.call(message, "notificationUid")) if (!(message.notificationUid && typeof message.notificationUid.length === "number" || $util.isString(message.notificationUid))) return "notificationUid: buffer expected"; return null; @@ -249456,6 +250888,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { SentNotification.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.SentNotification) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.SentNotification: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -249498,9 +250932,9 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.notificationUid = $util.newBuffer(object.notificationUid); } } - if (message.user != null && message.hasOwnProperty("user")) + if (message.user != null && Object.hasOwnProperty.call(message, "user")) object.user = message.user; - if (message.notificationUid != null && message.hasOwnProperty("notificationUid")) + if (message.notificationUid != null && Object.hasOwnProperty.call(message, "notificationUid")) object.notificationUid = options.bytes === String ? $util.base64.encode(message.notificationUid, 0, message.notificationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.notificationUid) : message.notificationUid; return object; }; @@ -249622,7 +251056,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { * @returns {$protobuf.Writer} Writer */ NotificationsApprovalStatusUpdateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -249698,7 +251132,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -249709,7 +251143,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { case 4: break; } - if (message.notifications != null && message.hasOwnProperty("notifications")) { + if (message.notifications != null && Object.hasOwnProperty.call(message, "notifications")) { if (!Array.isArray(message.notifications)) return "notifications: array expected"; for (let i = 0; i < message.notifications.length; ++i) { @@ -249732,6 +251166,8 @@ export const NotificationCenter = $root.NotificationCenter = (() => { NotificationsApprovalStatusUpdateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.NotificationCenter.NotificationsApprovalStatusUpdateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".NotificationCenter.NotificationsApprovalStatusUpdateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -249770,7 +251206,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { throw TypeError(".NotificationCenter.NotificationsApprovalStatusUpdateRequest.notifications: array expected"); message.notifications = []; for (let i = 0; i < object.notifications.length; ++i) { - if (typeof object.notifications[i] !== "object") + if (!$util.isObject(object.notifications[i])) throw TypeError(".NotificationCenter.NotificationsApprovalStatusUpdateRequest.notifications: object expected"); message.notifications[i] = $root.NotificationCenter.SentNotification.fromObject(object.notifications[i], long + 1); } @@ -249799,7 +251235,7 @@ export const NotificationCenter = $root.NotificationCenter = (() => { object.notifications = []; if (options.defaults) object.status = options.enums === String ? "NAS_UNSPECIFIED" : 0; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.NotificationCenter.NotificationApprovalStatus[message.status] === undefined ? message.status : $root.NotificationCenter.NotificationApprovalStatus[message.status] : message.status; if (message.notifications && message.notifications.length) { object.notifications = []; @@ -249995,7 +251431,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncRef.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -250073,7 +251509,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -250098,10 +251534,10 @@ export const GraphSync = $root.GraphSync = (() => { case 18: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -250118,6 +251554,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncRef.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncRef) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncRef: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -250245,11 +251683,11 @@ export const GraphSync = $root.GraphSync = (() => { } object.name = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.GraphSync.RefType[message.type] === undefined ? message.type : $root.GraphSync.RefType[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -250427,7 +251865,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncActor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -250509,7 +251947,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -250518,13 +251956,13 @@ export const GraphSync = $root.GraphSync = (() => { case 2: break; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) return "id: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.effectiveUserId != null && message.hasOwnProperty("effectiveUserId")) + if (message.effectiveUserId != null && Object.hasOwnProperty.call(message, "effectiveUserId")) if (!(message.effectiveUserId && typeof message.effectiveUserId.length === "number" || $util.isString(message.effectiveUserId))) return "effectiveUserId: buffer expected"; return null; @@ -250541,6 +251979,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncActor.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncActor) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncActor: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -250616,13 +252056,13 @@ export const GraphSync = $root.GraphSync = (() => { object.effectiveUserId = $util.newBuffer(object.effectiveUserId); } } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.GraphSync.GraphSyncActorType[message.type] === undefined ? message.type : $root.GraphSync.GraphSyncActorType[message.type] : message.type; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.effectiveUserId != null && message.hasOwnProperty("effectiveUserId")) + if (message.effectiveUserId != null && Object.hasOwnProperty.call(message, "effectiveUserId")) object.effectiveUserId = options.bytes === String ? $util.base64.encode(message.effectiveUserId, 0, message.effectiveUserId.length) : options.bytes === Array ? Array.prototype.slice.call(message.effectiveUserId) : message.effectiveUserId; return object; }; @@ -250775,7 +252215,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -250861,7 +252301,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -250872,20 +252312,20 @@ export const GraphSync = $root.GraphSync = (() => { case 4: break; } - if (message.ref != null && message.hasOwnProperty("ref")) { + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) { let error = $root.GraphSync.GraphSyncRef.verify(message.ref, long + 1); if (error) return "ref." + error; } - if (message.parentRef != null && message.hasOwnProperty("parentRef")) { + if (message.parentRef != null && Object.hasOwnProperty.call(message, "parentRef")) { let error = $root.GraphSync.GraphSyncRef.verify(message.parentRef, long + 1); if (error) return "parentRef." + error; } - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) if (!$util.isString(message.path)) return "path: string expected"; return null; @@ -250902,6 +252342,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncData.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncData) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -250936,12 +252378,12 @@ export const GraphSync = $root.GraphSync = (() => { break; } if (object.ref != null) { - if (typeof object.ref !== "object") + if (!$util.isObject(object.ref)) throw TypeError(".GraphSync.GraphSyncData.ref: object expected"); message.ref = $root.GraphSync.GraphSyncRef.fromObject(object.ref, long + 1); } if (object.parentRef != null) { - if (typeof object.parentRef !== "object") + if (!$util.isObject(object.parentRef)) throw TypeError(".GraphSync.GraphSyncData.parentRef: object expected"); message.parentRef = $root.GraphSync.GraphSyncRef.fromObject(object.parentRef, long + 1); } @@ -250985,15 +252427,15 @@ export const GraphSync = $root.GraphSync = (() => { } object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.GraphSync.GraphSyncDataType[message.type] === undefined ? message.type : $root.GraphSync.GraphSyncDataType[message.type] : message.type; - if (message.ref != null && message.hasOwnProperty("ref")) + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) object.ref = $root.GraphSync.GraphSyncRef.toObject(message.ref, options, q + 1); - if (message.parentRef != null && message.hasOwnProperty("parentRef")) + if (message.parentRef != null && Object.hasOwnProperty.call(message, "parentRef")) object.parentRef = $root.GraphSync.GraphSyncRef.toObject(message.parentRef, options, q + 1); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) object.path = message.path; return object; }; @@ -251124,7 +252566,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncDataPlus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -251202,15 +252644,15 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { let error = $root.GraphSync.GraphSyncData.verify(message.data, long + 1); if (error) return "data." + error; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; - if (message.actor != null && message.hasOwnProperty("actor")) { + if (message.actor != null && Object.hasOwnProperty.call(message, "actor")) { let error = $root.GraphSync.GraphSyncActor.verify(message.actor, long + 1); if (error) return "actor." + error; @@ -251229,13 +252671,15 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncDataPlus.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncDataPlus) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncDataPlus: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.GraphSync.GraphSyncDataPlus(); if (object.data != null) { - if (typeof object.data !== "object") + if (!$util.isObject(object.data)) throw TypeError(".GraphSync.GraphSyncDataPlus.data: object expected"); message.data = $root.GraphSync.GraphSyncData.fromObject(object.data, long + 1); } @@ -251249,7 +252693,7 @@ export const GraphSync = $root.GraphSync = (() => { else if (typeof object.timestamp === "object") message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); if (object.actor != null) { - if (typeof object.actor !== "object") + if (!$util.isObject(object.actor)) throw TypeError(".GraphSync.GraphSyncDataPlus.actor: object expected"); message.actor = $root.GraphSync.GraphSyncActor.fromObject(object.actor, long + 1); } @@ -251282,16 +252726,16 @@ export const GraphSync = $root.GraphSync = (() => { object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.actor = null; } - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = $root.GraphSync.GraphSyncData.toObject(message.data, options, q + 1); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, false).toBigInt(); else if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.actor != null && message.hasOwnProperty("actor")) + if (message.actor != null && Object.hasOwnProperty.call(message, "actor")) object.actor = $root.GraphSync.GraphSyncActor.toObject(message.actor, options, q + 1); return object; }; @@ -251433,7 +252877,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -251515,16 +252959,16 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.streamId != null && message.hasOwnProperty("streamId")) + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) if (!(message.streamId && typeof message.streamId.length === "number" || $util.isString(message.streamId))) return "streamId: buffer expected"; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) if (!(message.origin && typeof message.origin.length === "number" || $util.isString(message.origin))) return "origin: buffer expected"; - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (!$util.isInteger(message.syncPoint) && !(message.syncPoint && $util.isInteger(message.syncPoint.low) && $util.isInteger(message.syncPoint.high))) return "syncPoint: integer|Long expected"; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) if (!$util.isInteger(message.maxCount)) return "maxCount: integer expected"; return null; @@ -251541,6 +252985,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncQuery.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncQuery) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncQuery: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -251609,18 +253055,18 @@ export const GraphSync = $root.GraphSync = (() => { object.syncPoint = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.maxCount = 0; } - if (message.streamId != null && message.hasOwnProperty("streamId")) + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) object.streamId = options.bytes === String ? $util.base64.encode(message.streamId, 0, message.streamId.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamId) : message.streamId; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) object.origin = options.bytes === String ? $util.base64.encode(message.origin, 0, message.origin.length) : options.bytes === Array ? Array.prototype.slice.call(message.origin) : message.origin; - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncPoint = typeof message.syncPoint === "number" ? BigInt(message.syncPoint) : $util.Long.fromBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0, false).toBigInt(); else if (typeof message.syncPoint === "number") object.syncPoint = options.longs === String ? String(message.syncPoint) : message.syncPoint; else object.syncPoint = options.longs === String ? $util.Long.prototype.toString.call(message.syncPoint) : options.longs === Number ? new $util.LongBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0).toNumber() : message.syncPoint; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) object.maxCount = message.maxCount; return object; }; @@ -251764,7 +253210,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -251848,13 +253294,13 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.streamId != null && message.hasOwnProperty("streamId")) + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) if (!(message.streamId && typeof message.streamId.length === "number" || $util.isString(message.streamId))) return "streamId: buffer expected"; - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (!$util.isInteger(message.syncPoint) && !(message.syncPoint && $util.isInteger(message.syncPoint.low) && $util.isInteger(message.syncPoint.high))) return "syncPoint: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { if (!Array.isArray(message.data)) return "data: array expected"; for (let i = 0; i < message.data.length; ++i) { @@ -251863,7 +253309,7 @@ export const GraphSync = $root.GraphSync = (() => { return "data." + error; } } - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; return null; @@ -251880,6 +253326,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncResult.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncResult) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -251904,7 +253352,7 @@ export const GraphSync = $root.GraphSync = (() => { throw TypeError(".GraphSync.GraphSyncResult.data: array expected"); message.data = []; for (let i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") + if (!$util.isObject(object.data[i])) throw TypeError(".GraphSync.GraphSyncResult.data: object expected"); message.data[i] = $root.GraphSync.GraphSyncDataPlus.fromObject(object.data[i], long + 1); } @@ -251948,9 +253396,9 @@ export const GraphSync = $root.GraphSync = (() => { object.syncPoint = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.hasMore = false; } - if (message.streamId != null && message.hasOwnProperty("streamId")) + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) object.streamId = options.bytes === String ? $util.base64.encode(message.streamId, 0, message.streamId.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamId) : message.streamId; - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncPoint = typeof message.syncPoint === "number" ? BigInt(message.syncPoint) : $util.Long.fromBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0, false).toBigInt(); else if (typeof message.syncPoint === "number") @@ -251962,7 +253410,7 @@ export const GraphSync = $root.GraphSync = (() => { for (let j = 0; j < message.data.length; ++j) object.data[j] = $root.GraphSync.GraphSyncDataPlus.toObject(message.data[j], options, q + 1); } - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; return object; }; @@ -252073,7 +253521,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncMultiQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -252145,7 +253593,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.queries != null && message.hasOwnProperty("queries")) { + if (message.queries != null && Object.hasOwnProperty.call(message, "queries")) { if (!Array.isArray(message.queries)) return "queries: array expected"; for (let i = 0; i < message.queries.length; ++i) { @@ -252168,6 +253616,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncMultiQuery.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncMultiQuery) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncMultiQuery: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -252178,7 +253628,7 @@ export const GraphSync = $root.GraphSync = (() => { throw TypeError(".GraphSync.GraphSyncMultiQuery.queries: array expected"); message.queries = []; for (let i = 0; i < object.queries.length; ++i) { - if (typeof object.queries[i] !== "object") + if (!$util.isObject(object.queries[i])) throw TypeError(".GraphSync.GraphSyncMultiQuery.queries: object expected"); message.queries[i] = $root.GraphSync.GraphSyncQuery.fromObject(object.queries[i], long + 1); } @@ -252319,7 +253769,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncMultiResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -252391,7 +253841,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -252414,6 +253864,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncMultiResult.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncMultiResult) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncMultiResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -252424,7 +253876,7 @@ export const GraphSync = $root.GraphSync = (() => { throw TypeError(".GraphSync.GraphSyncMultiResult.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".GraphSync.GraphSyncMultiResult.results: object expected"); message.results[i] = $root.GraphSync.GraphSyncResult.fromObject(object.results[i], long + 1); } @@ -252576,7 +254028,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncAddDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -252652,12 +254104,12 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.origin != null && message.hasOwnProperty("origin")) { + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) { let error = $root.GraphSync.GraphSyncRef.verify(message.origin, long + 1); if (error) return "origin." + error; } - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { if (!Array.isArray(message.data)) return "data: array expected"; for (let i = 0; i < message.data.length; ++i) { @@ -252680,13 +254132,15 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncAddDataRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncAddDataRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncAddDataRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.GraphSync.GraphSyncAddDataRequest(); if (object.origin != null) { - if (typeof object.origin !== "object") + if (!$util.isObject(object.origin)) throw TypeError(".GraphSync.GraphSyncAddDataRequest.origin: object expected"); message.origin = $root.GraphSync.GraphSyncRef.fromObject(object.origin, long + 1); } @@ -252695,7 +254149,7 @@ export const GraphSync = $root.GraphSync = (() => { throw TypeError(".GraphSync.GraphSyncAddDataRequest.data: array expected"); message.data = []; for (let i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") + if (!$util.isObject(object.data[i])) throw TypeError(".GraphSync.GraphSyncAddDataRequest.data: object expected"); message.data[i] = $root.GraphSync.GraphSyncData.fromObject(object.data[i], long + 1); } @@ -252724,7 +254178,7 @@ export const GraphSync = $root.GraphSync = (() => { object.data = []; if (options.defaults) object.origin = null; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) object.origin = $root.GraphSync.GraphSyncRef.toObject(message.origin, options, q + 1); if (message.data && message.data.length) { object.data = []; @@ -252840,7 +254294,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncLeafsQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -252912,7 +254366,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.vertices != null && message.hasOwnProperty("vertices")) { + if (message.vertices != null && Object.hasOwnProperty.call(message, "vertices")) { if (!Array.isArray(message.vertices)) return "vertices: array expected"; for (let i = 0; i < message.vertices.length; ++i) @@ -252933,6 +254387,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncLeafsQuery.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncLeafsQuery) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncLeafsQuery: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -253084,7 +254540,7 @@ export const GraphSync = $root.GraphSync = (() => { * @returns {$protobuf.Writer} Writer */ GraphSyncRefsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -253156,7 +254612,7 @@ export const GraphSync = $root.GraphSync = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.refs != null && message.hasOwnProperty("refs")) { + if (message.refs != null && Object.hasOwnProperty.call(message, "refs")) { if (!Array.isArray(message.refs)) return "refs: array expected"; for (let i = 0; i < message.refs.length; ++i) { @@ -253179,6 +254635,8 @@ export const GraphSync = $root.GraphSync = (() => { GraphSyncRefsResult.fromObject = function fromObject(object, long) { if (object instanceof $root.GraphSync.GraphSyncRefsResult) return object; + if (!$util.isObject(object)) + throw TypeError(".GraphSync.GraphSyncRefsResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -253189,7 +254647,7 @@ export const GraphSync = $root.GraphSync = (() => { throw TypeError(".GraphSync.GraphSyncRefsResult.refs: array expected"); message.refs = []; for (let i = 0; i < object.refs.length; ++i) { - if (typeof object.refs[i] !== "object") + if (!$util.isObject(object.refs[i])) throw TypeError(".GraphSync.GraphSyncRefsResult.refs: object expected"); message.refs[i] = $root.GraphSync.GraphSyncRef.fromObject(object.refs[i], long + 1); } @@ -253416,7 +254874,7 @@ export const Dag = $root.Dag = (() => { * @returns {$protobuf.Writer} Writer */ Ref.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -253494,7 +254952,7 @@ export const Dag = $root.Dag = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -253510,10 +254968,10 @@ export const Dag = $root.Dag = (() => { case 9: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -253530,6 +254988,8 @@ export const Dag = $root.Dag = (() => { Ref.fromObject = function fromObject(object, long) { if (object instanceof $root.Dag.Ref) return object; + if (!$util.isObject(object)) + throw TypeError(".Dag.Ref: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -253621,11 +255081,11 @@ export const Dag = $root.Dag = (() => { } object.name = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.Dag.RefType[message.type] === undefined ? message.type : $root.Dag.RefType[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -253778,7 +255238,7 @@ export const Dag = $root.Dag = (() => { * @returns {$protobuf.Writer} Writer */ Data.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -253864,7 +255324,7 @@ export const Dag = $root.Dag = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.dataType != null && message.hasOwnProperty("dataType")) + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) switch (message.dataType) { default: return "dataType: enum value expected"; @@ -253877,20 +255337,20 @@ export const Dag = $root.Dag = (() => { case 6: break; } - if (message.ref != null && message.hasOwnProperty("ref")) { + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) { let error = $root.Dag.Ref.verify(message.ref, long + 1); if (error) return "ref." + error; } - if (message.parentRef != null && message.hasOwnProperty("parentRef")) { + if (message.parentRef != null && Object.hasOwnProperty.call(message, "parentRef")) { let error = $root.Dag.Ref.verify(message.parentRef, long + 1); if (error) return "parentRef." + error; } - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) if (!$util.isString(message.path)) return "path: string expected"; return null; @@ -253907,6 +255367,8 @@ export const Dag = $root.Dag = (() => { Data.fromObject = function fromObject(object, long) { if (object instanceof $root.Dag.Data) return object; + if (!$util.isObject(object)) + throw TypeError(".Dag.Data: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -253949,12 +255411,12 @@ export const Dag = $root.Dag = (() => { break; } if (object.ref != null) { - if (typeof object.ref !== "object") + if (!$util.isObject(object.ref)) throw TypeError(".Dag.Data.ref: object expected"); message.ref = $root.Dag.Ref.fromObject(object.ref, long + 1); } if (object.parentRef != null) { - if (typeof object.parentRef !== "object") + if (!$util.isObject(object.parentRef)) throw TypeError(".Dag.Data.parentRef: object expected"); message.parentRef = $root.Dag.Ref.fromObject(object.parentRef, long + 1); } @@ -253998,15 +255460,15 @@ export const Dag = $root.Dag = (() => { } object.path = ""; } - if (message.dataType != null && message.hasOwnProperty("dataType")) + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) object.dataType = options.enums === String ? $root.Dag.DataType[message.dataType] === undefined ? message.dataType : $root.Dag.DataType[message.dataType] : message.dataType; - if (message.ref != null && message.hasOwnProperty("ref")) + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) object.ref = $root.Dag.Ref.toObject(message.ref, options, q + 1); - if (message.parentRef != null && message.hasOwnProperty("parentRef")) + if (message.parentRef != null && Object.hasOwnProperty.call(message, "parentRef")) object.parentRef = $root.Dag.Ref.toObject(message.parentRef, options, q + 1); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) object.path = message.path; return object; }; @@ -254139,7 +255601,7 @@ export const Dag = $root.Dag = (() => { * @returns {$protobuf.Writer} Writer */ SyncData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -254219,7 +255681,7 @@ export const Dag = $root.Dag = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.data != null && message.hasOwnProperty("data")) { + if (message.data != null && Object.hasOwnProperty.call(message, "data")) { if (!Array.isArray(message.data)) return "data: array expected"; for (let i = 0; i < message.data.length; ++i) { @@ -254228,10 +255690,10 @@ export const Dag = $root.Dag = (() => { return "data." + error; } } - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (!$util.isInteger(message.syncPoint) && !(message.syncPoint && $util.isInteger(message.syncPoint.low) && $util.isInteger(message.syncPoint.high))) return "syncPoint: integer|Long expected"; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; return null; @@ -254248,6 +255710,8 @@ export const Dag = $root.Dag = (() => { SyncData.fromObject = function fromObject(object, long) { if (object instanceof $root.Dag.SyncData) return object; + if (!$util.isObject(object)) + throw TypeError(".Dag.SyncData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -254258,7 +255722,7 @@ export const Dag = $root.Dag = (() => { throw TypeError(".Dag.SyncData.data: array expected"); message.data = []; for (let i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") + if (!$util.isObject(object.data[i])) throw TypeError(".Dag.SyncData.data: object expected"); message.data[i] = $root.Dag.Data.fromObject(object.data[i], long + 1); } @@ -254309,14 +255773,14 @@ export const Dag = $root.Dag = (() => { for (let j = 0; j < message.data.length; ++j) object.data[j] = $root.Dag.Data.toObject(message.data[j], options, q + 1); } - if (message.syncPoint != null && message.hasOwnProperty("syncPoint")) + if (message.syncPoint != null && Object.hasOwnProperty.call(message, "syncPoint")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.syncPoint = typeof message.syncPoint === "number" ? BigInt(message.syncPoint) : $util.Long.fromBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0, false).toBigInt(); else if (typeof message.syncPoint === "number") object.syncPoint = options.longs === String ? String(message.syncPoint) : message.syncPoint; else object.syncPoint = options.longs === String ? $util.Long.prototype.toString.call(message.syncPoint) : options.longs === Number ? new $util.LongBits(message.syncPoint.low >>> 0, message.syncPoint.high >>> 0).toNumber() : message.syncPoint; - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; return object; }; @@ -254458,7 +255922,7 @@ export const Dag = $root.Dag = (() => { * @returns {$protobuf.Writer} Writer */ DebugData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -254540,18 +256004,18 @@ export const Dag = $root.Dag = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.dataType != null && message.hasOwnProperty("dataType")) + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) if (!$util.isString(message.dataType)) return "dataType: string expected"; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) if (!$util.isString(message.path)) return "path: string expected"; - if (message.ref != null && message.hasOwnProperty("ref")) { + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) { let error = $root.Dag.DebugRefInfo.verify(message.ref, long + 1); if (error) return "ref." + error; } - if (message.parentRef != null && message.hasOwnProperty("parentRef")) { + if (message.parentRef != null && Object.hasOwnProperty.call(message, "parentRef")) { let error = $root.Dag.DebugRefInfo.verify(message.parentRef, long + 1); if (error) return "parentRef." + error; @@ -254570,6 +256034,8 @@ export const Dag = $root.Dag = (() => { DebugData.fromObject = function fromObject(object, long) { if (object instanceof $root.Dag.DebugData) return object; + if (!$util.isObject(object)) + throw TypeError(".Dag.DebugData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -254580,12 +256046,12 @@ export const Dag = $root.Dag = (() => { if (object.path != null) message.path = String(object.path); if (object.ref != null) { - if (typeof object.ref !== "object") + if (!$util.isObject(object.ref)) throw TypeError(".Dag.DebugData.ref: object expected"); message.ref = $root.Dag.DebugRefInfo.fromObject(object.ref, long + 1); } if (object.parentRef != null) { - if (typeof object.parentRef !== "object") + if (!$util.isObject(object.parentRef)) throw TypeError(".Dag.DebugData.parentRef: object expected"); message.parentRef = $root.Dag.DebugRefInfo.fromObject(object.parentRef, long + 1); } @@ -254615,13 +256081,13 @@ export const Dag = $root.Dag = (() => { object.parentRef = null; object.path = ""; } - if (message.dataType != null && message.hasOwnProperty("dataType")) + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) object.dataType = message.dataType; - if (message.ref != null && message.hasOwnProperty("ref")) + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) object.ref = $root.Dag.DebugRefInfo.toObject(message.ref, options, q + 1); - if (message.parentRef != null && message.hasOwnProperty("parentRef")) + if (message.parentRef != null && Object.hasOwnProperty.call(message, "parentRef")) object.parentRef = $root.Dag.DebugRefInfo.toObject(message.parentRef, options, q + 1); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) object.path = message.path; return object; }; @@ -254741,7 +256207,7 @@ export const Dag = $root.Dag = (() => { * @returns {$protobuf.Writer} Writer */ DebugRefInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -254815,10 +256281,10 @@ export const Dag = $root.Dag = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.refType != null && message.hasOwnProperty("refType")) + if (message.refType != null && Object.hasOwnProperty.call(message, "refType")) if (!$util.isString(message.refType)) return "refType: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -254835,6 +256301,8 @@ export const Dag = $root.Dag = (() => { DebugRefInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Dag.DebugRefInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Dag.DebugRefInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -254877,9 +256345,9 @@ export const Dag = $root.Dag = (() => { object.value = $util.newBuffer(object.value); } } - if (message.refType != null && message.hasOwnProperty("refType")) + if (message.refType != null && Object.hasOwnProperty.call(message, "refType")) object.refType = message.refType; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -254996,7 +256464,7 @@ export const record = $root.record = (() => { * @variation 1 */ Object.defineProperty(RecordSharingService.prototype.shareRecord = function shareRecord(request, callback) { - return this.rpcCall(shareRecord, $root.record.v3.sharing.Request, $root.record.v3.sharing.Response, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, shareRecord, $root.record.v3.sharing.Request, $root.record.v3.sharing.Response, request, callback); }, "name", { value: "ShareRecord" }); /** @@ -255134,7 +256602,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -255222,7 +256690,7 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.createSharingPermissions != null && message.hasOwnProperty("createSharingPermissions")) { + if (message.createSharingPermissions != null && Object.hasOwnProperty.call(message, "createSharingPermissions")) { if (!Array.isArray(message.createSharingPermissions)) return "createSharingPermissions: array expected"; for (let i = 0; i < message.createSharingPermissions.length; ++i) { @@ -255231,7 +256699,7 @@ export const record = $root.record = (() => { return "createSharingPermissions." + error; } } - if (message.updateSharingPermissions != null && message.hasOwnProperty("updateSharingPermissions")) { + if (message.updateSharingPermissions != null && Object.hasOwnProperty.call(message, "updateSharingPermissions")) { if (!Array.isArray(message.updateSharingPermissions)) return "updateSharingPermissions: array expected"; for (let i = 0; i < message.updateSharingPermissions.length; ++i) { @@ -255240,7 +256708,7 @@ export const record = $root.record = (() => { return "updateSharingPermissions." + error; } } - if (message.revokeSharingPermissions != null && message.hasOwnProperty("revokeSharingPermissions")) { + if (message.revokeSharingPermissions != null && Object.hasOwnProperty.call(message, "revokeSharingPermissions")) { if (!Array.isArray(message.revokeSharingPermissions)) return "revokeSharingPermissions: array expected"; for (let i = 0; i < message.revokeSharingPermissions.length; ++i) { @@ -255249,7 +256717,7 @@ export const record = $root.record = (() => { return "revokeSharingPermissions." + error; } } - if (message.echo != null && message.hasOwnProperty("echo")) + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) if (!$util.isString(message.echo)) return "echo: string expected"; return null; @@ -255266,6 +256734,8 @@ export const record = $root.record = (() => { Request.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.sharing.Request) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.sharing.Request: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -255276,7 +256746,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.sharing.Request.createSharingPermissions: array expected"); message.createSharingPermissions = []; for (let i = 0; i < object.createSharingPermissions.length; ++i) { - if (typeof object.createSharingPermissions[i] !== "object") + if (!$util.isObject(object.createSharingPermissions[i])) throw TypeError(".record.v3.sharing.Request.createSharingPermissions: object expected"); message.createSharingPermissions[i] = $root.record.v3.sharing.Permissions.fromObject(object.createSharingPermissions[i], long + 1); } @@ -255286,7 +256756,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.sharing.Request.updateSharingPermissions: array expected"); message.updateSharingPermissions = []; for (let i = 0; i < object.updateSharingPermissions.length; ++i) { - if (typeof object.updateSharingPermissions[i] !== "object") + if (!$util.isObject(object.updateSharingPermissions[i])) throw TypeError(".record.v3.sharing.Request.updateSharingPermissions: object expected"); message.updateSharingPermissions[i] = $root.record.v3.sharing.Permissions.fromObject(object.updateSharingPermissions[i], long + 1); } @@ -255296,7 +256766,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.sharing.Request.revokeSharingPermissions: array expected"); message.revokeSharingPermissions = []; for (let i = 0; i < object.revokeSharingPermissions.length; ++i) { - if (typeof object.revokeSharingPermissions[i] !== "object") + if (!$util.isObject(object.revokeSharingPermissions[i])) throw TypeError(".record.v3.sharing.Request.revokeSharingPermissions: object expected"); message.revokeSharingPermissions[i] = $root.record.v3.sharing.Permissions.fromObject(object.revokeSharingPermissions[i], long + 1); } @@ -255345,7 +256815,7 @@ export const record = $root.record = (() => { for (let j = 0; j < message.revokeSharingPermissions.length; ++j) object.revokeSharingPermissions[j] = $root.record.v3.sharing.Permissions.toObject(message.revokeSharingPermissions[j], options, q + 1); } - if (message.echo != null && message.hasOwnProperty("echo")) + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) object.echo = message.echo; return object; }; @@ -255500,7 +256970,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ Permissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -255586,19 +257056,19 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recipientUid != null && message.hasOwnProperty("recipientUid")) + if (message.recipientUid != null && Object.hasOwnProperty.call(message, "recipientUid")) if (!(message.recipientUid && typeof message.recipientUid.length === "number" || $util.isString(message.recipientUid))) return "recipientUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.useEccKey != null && message.hasOwnProperty("useEccKey")) + if (message.useEccKey != null && Object.hasOwnProperty.call(message, "useEccKey")) if (typeof message.useEccKey !== "boolean") return "useEccKey: boolean expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { let error = $root.Folder.RecordAccessData.verify(message.rules, long + 1); if (error) return "rules." + error; @@ -255617,6 +257087,8 @@ export const record = $root.record = (() => { Permissions.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.sharing.Permissions) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.sharing.Permissions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -255640,7 +257112,7 @@ export const record = $root.record = (() => { if (object.useEccKey != null) message.useEccKey = Boolean(object.useEccKey); if (object.rules != null) { - if (typeof object.rules !== "object") + if (!$util.isObject(object.rules)) throw TypeError(".record.v3.sharing.Permissions.rules: object expected"); message.rules = $root.Folder.RecordAccessData.fromObject(object.rules, long + 1); } @@ -255689,15 +257161,15 @@ export const record = $root.record = (() => { object.useEccKey = false; object.rules = null; } - if (message.recipientUid != null && message.hasOwnProperty("recipientUid")) + if (message.recipientUid != null && Object.hasOwnProperty.call(message, "recipientUid")) object.recipientUid = options.bytes === String ? $util.base64.encode(message.recipientUid, 0, message.recipientUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientUid) : message.recipientUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.useEccKey != null && message.hasOwnProperty("useEccKey")) + if (message.useEccKey != null && Object.hasOwnProperty.call(message, "useEccKey")) object.useEccKey = message.useEccKey; - if (message.rules != null && message.hasOwnProperty("rules")) + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) object.rules = $root.Folder.RecordAccessData.toObject(message.rules, options, q + 1); return object; }; @@ -255834,7 +257306,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -255918,7 +257390,7 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.createdSharingStatus != null && message.hasOwnProperty("createdSharingStatus")) { + if (message.createdSharingStatus != null && Object.hasOwnProperty.call(message, "createdSharingStatus")) { if (!Array.isArray(message.createdSharingStatus)) return "createdSharingStatus: array expected"; for (let i = 0; i < message.createdSharingStatus.length; ++i) { @@ -255927,7 +257399,7 @@ export const record = $root.record = (() => { return "createdSharingStatus." + error; } } - if (message.updatedSharingStatus != null && message.hasOwnProperty("updatedSharingStatus")) { + if (message.updatedSharingStatus != null && Object.hasOwnProperty.call(message, "updatedSharingStatus")) { if (!Array.isArray(message.updatedSharingStatus)) return "updatedSharingStatus: array expected"; for (let i = 0; i < message.updatedSharingStatus.length; ++i) { @@ -255936,7 +257408,7 @@ export const record = $root.record = (() => { return "updatedSharingStatus." + error; } } - if (message.revokedSharingStatus != null && message.hasOwnProperty("revokedSharingStatus")) { + if (message.revokedSharingStatus != null && Object.hasOwnProperty.call(message, "revokedSharingStatus")) { if (!Array.isArray(message.revokedSharingStatus)) return "revokedSharingStatus: array expected"; for (let i = 0; i < message.revokedSharingStatus.length; ++i) { @@ -255959,6 +257431,8 @@ export const record = $root.record = (() => { Response.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.sharing.Response) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.sharing.Response: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -255969,7 +257443,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.sharing.Response.createdSharingStatus: array expected"); message.createdSharingStatus = []; for (let i = 0; i < object.createdSharingStatus.length; ++i) { - if (typeof object.createdSharingStatus[i] !== "object") + if (!$util.isObject(object.createdSharingStatus[i])) throw TypeError(".record.v3.sharing.Response.createdSharingStatus: object expected"); message.createdSharingStatus[i] = $root.record.v3.sharing.Status.fromObject(object.createdSharingStatus[i], long + 1); } @@ -255979,7 +257453,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.sharing.Response.updatedSharingStatus: array expected"); message.updatedSharingStatus = []; for (let i = 0; i < object.updatedSharingStatus.length; ++i) { - if (typeof object.updatedSharingStatus[i] !== "object") + if (!$util.isObject(object.updatedSharingStatus[i])) throw TypeError(".record.v3.sharing.Response.updatedSharingStatus: object expected"); message.updatedSharingStatus[i] = $root.record.v3.sharing.Status.fromObject(object.updatedSharingStatus[i], long + 1); } @@ -255989,7 +257463,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.sharing.Response.revokedSharingStatus: array expected"); message.revokedSharingStatus = []; for (let i = 0; i < object.revokedSharingStatus.length; ++i) { - if (typeof object.revokedSharingStatus[i] !== "object") + if (!$util.isObject(object.revokedSharingStatus[i])) throw TypeError(".record.v3.sharing.Response.revokedSharingStatus: object expected"); message.revokedSharingStatus[i] = $root.record.v3.sharing.Status.fromObject(object.revokedSharingStatus[i], long + 1); } @@ -256174,7 +257648,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -256256,10 +257730,10 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -256272,10 +257746,10 @@ export const record = $root.record = (() => { case 6: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.recipientUid != null && message.hasOwnProperty("recipientUid")) + if (message.recipientUid != null && Object.hasOwnProperty.call(message, "recipientUid")) if (!(message.recipientUid && typeof message.recipientUid.length === "number" || $util.isString(message.recipientUid))) return "recipientUid: buffer expected"; return null; @@ -256292,6 +257766,8 @@ export const record = $root.record = (() => { Status.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.sharing.Status) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.sharing.Status: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -256383,13 +257859,13 @@ export const record = $root.record = (() => { object.recipientUid = $util.newBuffer(object.recipientUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.record.v3.sharing.SharingStatus[message.status] === undefined ? message.status : $root.record.v3.sharing.SharingStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; - if (message.recipientUid != null && message.hasOwnProperty("recipientUid")) + if (message.recipientUid != null && Object.hasOwnProperty.call(message, "recipientUid")) object.recipientUid = options.bytes === String ? $util.base64.encode(message.recipientUid, 0, message.recipientUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientUid) : message.recipientUid; return object; }; @@ -256533,7 +258009,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ RevokedAccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -256607,10 +258083,10 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.actorUid != null && message.hasOwnProperty("actorUid")) + if (message.actorUid != null && Object.hasOwnProperty.call(message, "actorUid")) if (!(message.actorUid && typeof message.actorUid.length === "number" || $util.isString(message.actorUid))) return "actorUid: buffer expected"; return null; @@ -256627,6 +258103,8 @@ export const record = $root.record = (() => { RevokedAccess.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.sharing.RevokedAccess) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.sharing.RevokedAccess: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -256678,9 +258156,9 @@ export const record = $root.record = (() => { object.actorUid = $util.newBuffer(object.actorUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.actorUid != null && message.hasOwnProperty("actorUid")) + if (message.actorUid != null && Object.hasOwnProperty.call(message, "actorUid")) object.actorUid = options.bytes === String ? $util.base64.encode(message.actorUid, 0, message.actorUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.actorUid) : message.actorUid; return object; }; @@ -256828,7 +258306,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ RecordSharingState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -256910,16 +258388,16 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.isDirectlyShared != null && message.hasOwnProperty("isDirectlyShared")) + if (message.isDirectlyShared != null && Object.hasOwnProperty.call(message, "isDirectlyShared")) if (typeof message.isDirectlyShared !== "boolean") return "isDirectlyShared: boolean expected"; - if (message.isIndirectlyShared != null && message.hasOwnProperty("isIndirectlyShared")) + if (message.isIndirectlyShared != null && Object.hasOwnProperty.call(message, "isIndirectlyShared")) if (typeof message.isIndirectlyShared !== "boolean") return "isIndirectlyShared: boolean expected"; - if (message.isShared != null && message.hasOwnProperty("isShared")) + if (message.isShared != null && Object.hasOwnProperty.call(message, "isShared")) if (typeof message.isShared !== "boolean") return "isShared: boolean expected"; return null; @@ -256936,6 +258414,8 @@ export const record = $root.record = (() => { RecordSharingState.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.sharing.RecordSharingState) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.sharing.RecordSharingState: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -256984,13 +258464,13 @@ export const record = $root.record = (() => { object.isIndirectlyShared = false; object.isShared = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.isDirectlyShared != null && message.hasOwnProperty("isDirectlyShared")) + if (message.isDirectlyShared != null && Object.hasOwnProperty.call(message, "isDirectlyShared")) object.isDirectlyShared = message.isDirectlyShared; - if (message.isIndirectlyShared != null && message.hasOwnProperty("isIndirectlyShared")) + if (message.isIndirectlyShared != null && Object.hasOwnProperty.call(message, "isIndirectlyShared")) object.isIndirectlyShared = message.isIndirectlyShared; - if (message.isShared != null && message.hasOwnProperty("isShared")) + if (message.isShared != null && Object.hasOwnProperty.call(message, "isShared")) object.isShared = message.isShared; return object; }; @@ -257126,7 +258606,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ RecordsAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -257206,7 +258686,7 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -257215,10 +258695,10 @@ export const record = $root.record = (() => { return "records." + error; } } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (!$util.isInteger(message.clientTime) && !(message.clientTime && $util.isInteger(message.clientTime.low) && $util.isInteger(message.clientTime.high))) return "clientTime: integer|Long expected"; - if (message.securityDataKeyType != null && message.hasOwnProperty("securityDataKeyType")) + if (message.securityDataKeyType != null && Object.hasOwnProperty.call(message, "securityDataKeyType")) switch (message.securityDataKeyType) { default: return "securityDataKeyType: enum value expected"; @@ -257245,6 +258725,8 @@ export const record = $root.record = (() => { RecordsAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.RecordsAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.RecordsAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -257255,7 +258737,7 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.RecordsAddRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".record.v3.RecordsAddRequest.records: object expected"); message.records[i] = $root.record.v3.RecordAdd.fromObject(object.records[i], long + 1); } @@ -257340,14 +258822,14 @@ export const record = $root.record = (() => { for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.record.v3.RecordAdd.toObject(message.records[j], options, q + 1); } - if (message.clientTime != null && message.hasOwnProperty("clientTime")) + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); else if (typeof message.clientTime === "number") object.clientTime = options.longs === String ? String(message.clientTime) : message.clientTime; else object.clientTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientTime) : options.longs === Number ? new $util.LongBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0).toNumber() : message.clientTime; - if (message.securityDataKeyType != null && message.hasOwnProperty("securityDataKeyType")) + if (message.securityDataKeyType != null && Object.hasOwnProperty.call(message, "securityDataKeyType")) object.securityDataKeyType = options.enums === String ? $root.Records.RecordKeyType[message.securityDataKeyType] === undefined ? message.securityDataKeyType : $root.Records.RecordKeyType[message.securityDataKeyType] : message.securityDataKeyType; return object; }; @@ -257581,7 +259063,7 @@ export const record = $root.record = (() => { * @returns {$protobuf.Writer} Writer */ RecordAdd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -257697,13 +259179,13 @@ export const record = $root.record = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) switch (message.recordKeyType) { default: return "recordKeyType: enum value expected"; @@ -257714,7 +259196,7 @@ export const record = $root.record = (() => { case 4: break; } - if (message.recordKeyEncryptedBy != null && message.hasOwnProperty("recordKeyEncryptedBy")) + if (message.recordKeyEncryptedBy != null && Object.hasOwnProperty.call(message, "recordKeyEncryptedBy")) switch (message.recordKeyEncryptedBy) { default: return "recordKeyEncryptedBy: enum value expected"; @@ -257723,19 +259205,19 @@ export const record = $root.record = (() => { case 2: break; } - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (!$util.isInteger(message.clientModifiedTime) && !(message.clientModifiedTime && $util.isInteger(message.clientModifiedTime.low) && $util.isInteger(message.clientModifiedTime.high))) return "clientModifiedTime: integer|Long expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) if (!(message.nonSharedData && typeof message.nonSharedData.length === "number" || $util.isString(message.nonSharedData))) return "nonSharedData: buffer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordLinks != null && message.hasOwnProperty("recordLinks")) { + if (message.recordLinks != null && Object.hasOwnProperty.call(message, "recordLinks")) { if (!Array.isArray(message.recordLinks)) return "recordLinks: array expected"; for (let i = 0; i < message.recordLinks.length; ++i) { @@ -257744,17 +259226,17 @@ export const record = $root.record = (() => { return "recordLinks." + error; } } - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { let error = $root.Records.RecordAudit.verify(message.audit, long + 1); if (error) return "audit." + error; } - if (message.securityData != null && message.hasOwnProperty("securityData")) { + if (message.securityData != null && Object.hasOwnProperty.call(message, "securityData")) { let error = $root.Records.SecurityData.verify(message.securityData, long + 1); if (error) return "securityData." + error; } - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) { + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) { let error = $root.Records.SecurityScoreData.verify(message.securityScoreData, long + 1); if (error) return "securityScoreData." + error; @@ -257773,6 +259255,8 @@ export const record = $root.record = (() => { RecordAdd.fromObject = function fromObject(object, long) { if (object instanceof $root.record.v3.RecordAdd) return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.RecordAdd: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -257865,23 +259349,23 @@ export const record = $root.record = (() => { throw TypeError(".record.v3.RecordAdd.recordLinks: array expected"); message.recordLinks = []; for (let i = 0; i < object.recordLinks.length; ++i) { - if (typeof object.recordLinks[i] !== "object") + if (!$util.isObject(object.recordLinks[i])) throw TypeError(".record.v3.RecordAdd.recordLinks: object expected"); message.recordLinks[i] = $root.Records.RecordLink.fromObject(object.recordLinks[i], long + 1); } } if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".record.v3.RecordAdd.audit: object expected"); message.audit = $root.Records.RecordAudit.fromObject(object.audit, long + 1); } if (object.securityData != null) { - if (typeof object.securityData !== "object") + if (!$util.isObject(object.securityData)) throw TypeError(".record.v3.RecordAdd.securityData: object expected"); message.securityData = $root.Records.SecurityData.fromObject(object.securityData, long + 1); } if (object.securityScoreData != null) { - if (typeof object.securityScoreData !== "object") + if (!$util.isObject(object.securityScoreData)) throw TypeError(".record.v3.RecordAdd.securityScoreData: object expected"); message.securityScoreData = $root.Records.SecurityScoreData.fromObject(object.securityScoreData, long + 1); } @@ -257954,37 +259438,37 @@ export const record = $root.record = (() => { object.securityData = null; object.securityScoreData = null; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.recordKeyType != null && message.hasOwnProperty("recordKeyType")) + if (message.recordKeyType != null && Object.hasOwnProperty.call(message, "recordKeyType")) object.recordKeyType = options.enums === String ? $root.Folder.EncryptedKeyType[message.recordKeyType] === undefined ? message.recordKeyType : $root.Folder.EncryptedKeyType[message.recordKeyType] : message.recordKeyType; - if (message.recordKeyEncryptedBy != null && message.hasOwnProperty("recordKeyEncryptedBy")) + if (message.recordKeyEncryptedBy != null && Object.hasOwnProperty.call(message, "recordKeyEncryptedBy")) object.recordKeyEncryptedBy = options.enums === String ? $root.Folder.FolderKeyEncryptionType[message.recordKeyEncryptedBy] === undefined ? message.recordKeyEncryptedBy : $root.Folder.FolderKeyEncryptionType[message.recordKeyEncryptedBy] : message.recordKeyEncryptedBy; - if (message.clientModifiedTime != null && message.hasOwnProperty("clientModifiedTime")) + if (message.clientModifiedTime != null && Object.hasOwnProperty.call(message, "clientModifiedTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.clientModifiedTime = typeof message.clientModifiedTime === "number" ? BigInt(message.clientModifiedTime) : $util.Long.fromBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0, false).toBigInt(); else if (typeof message.clientModifiedTime === "number") object.clientModifiedTime = options.longs === String ? String(message.clientModifiedTime) : message.clientModifiedTime; else object.clientModifiedTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientModifiedTime) : options.longs === Number ? new $util.LongBits(message.clientModifiedTime.low >>> 0, message.clientModifiedTime.high >>> 0).toNumber() : message.clientModifiedTime; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.nonSharedData != null && message.hasOwnProperty("nonSharedData")) + if (message.nonSharedData != null && Object.hasOwnProperty.call(message, "nonSharedData")) object.nonSharedData = options.bytes === String ? $util.base64.encode(message.nonSharedData, 0, message.nonSharedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonSharedData) : message.nonSharedData; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; if (message.recordLinks && message.recordLinks.length) { object.recordLinks = []; for (let j = 0; j < message.recordLinks.length; ++j) object.recordLinks[j] = $root.Records.RecordLink.toObject(message.recordLinks[j], options, q + 1); } - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = $root.Records.RecordAudit.toObject(message.audit, options, q + 1); - if (message.securityData != null && message.hasOwnProperty("securityData")) + if (message.securityData != null && Object.hasOwnProperty.call(message, "securityData")) object.securityData = $root.Records.SecurityData.toObject(message.securityData, options, q + 1); - if (message.securityScoreData != null && message.hasOwnProperty("securityScoreData")) + if (message.securityScoreData != null && Object.hasOwnProperty.call(message, "securityScoreData")) object.securityScoreData = $root.Records.SecurityScoreData.toObject(message.securityScoreData, options, q + 1); return object; }; @@ -258141,7 +259625,7 @@ export const Upsell = $root.Upsell = (() => { * @returns {$protobuf.Writer} Writer */ UpsellRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -258223,16 +259707,16 @@ export const Upsell = $root.Upsell = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) if (!$util.isString(message.email)) return "email: string expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) if (!$util.isString(message.sessionToken)) return "sessionToken: string expected"; return null; @@ -258249,6 +259733,8 @@ export const Upsell = $root.Upsell = (() => { UpsellRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Upsell.UpsellRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Upsell.UpsellRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -258288,13 +259774,13 @@ export const Upsell = $root.Upsell = (() => { object.clientVersion = ""; object.sessionToken = ""; } - if (message.email != null && message.hasOwnProperty("email")) + if (message.email != null && Object.hasOwnProperty.call(message, "email")) object.email = message.email; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) object.sessionToken = message.sessionToken; return object; }; @@ -258405,7 +259891,7 @@ export const Upsell = $root.Upsell = (() => { * @returns {$protobuf.Writer} Writer */ UpsellResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -258477,7 +259963,7 @@ export const Upsell = $root.Upsell = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.UpsellBanner != null && message.hasOwnProperty("UpsellBanner")) { + if (message.UpsellBanner != null && Object.hasOwnProperty.call(message, "UpsellBanner")) { if (!Array.isArray(message.UpsellBanner)) return "UpsellBanner: array expected"; for (let i = 0; i < message.UpsellBanner.length; ++i) { @@ -258500,6 +259986,8 @@ export const Upsell = $root.Upsell = (() => { UpsellResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Upsell.UpsellResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Upsell.UpsellResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -258510,7 +259998,7 @@ export const Upsell = $root.Upsell = (() => { throw TypeError(".Upsell.UpsellResponse.UpsellBanner: array expected"); message.UpsellBanner = []; for (let i = 0; i < object.UpsellBanner.length; ++i) { - if (typeof object.UpsellBanner[i] !== "object") + if (!$util.isObject(object.UpsellBanner[i])) throw TypeError(".Upsell.UpsellResponse.UpsellBanner: object expected"); message.UpsellBanner[i] = $root.Upsell.UpsellBanner.fromObject(object.UpsellBanner[i], long + 1); } @@ -258715,7 +260203,7 @@ export const Upsell = $root.Upsell = (() => { * @returns {$protobuf.Writer} Writer */ UpsellBanner.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -258809,25 +260297,25 @@ export const Upsell = $root.Upsell = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.bannerId != null && message.hasOwnProperty("bannerId")) + if (message.bannerId != null && Object.hasOwnProperty.call(message, "bannerId")) if (!$util.isInteger(message.bannerId)) return "bannerId: integer expected"; - if (message.bannerOkAction != null && message.hasOwnProperty("bannerOkAction")) + if (message.bannerOkAction != null && Object.hasOwnProperty.call(message, "bannerOkAction")) if (!$util.isString(message.bannerOkAction)) return "bannerOkAction: string expected"; - if (message.bannerOkButton != null && message.hasOwnProperty("bannerOkButton")) + if (message.bannerOkButton != null && Object.hasOwnProperty.call(message, "bannerOkButton")) if (!$util.isString(message.bannerOkButton)) return "bannerOkButton: string expected"; - if (message.bannerCancelAction != null && message.hasOwnProperty("bannerCancelAction")) + if (message.bannerCancelAction != null && Object.hasOwnProperty.call(message, "bannerCancelAction")) if (!$util.isString(message.bannerCancelAction)) return "bannerCancelAction: string expected"; - if (message.bannerCancelButton != null && message.hasOwnProperty("bannerCancelButton")) + if (message.bannerCancelButton != null && Object.hasOwnProperty.call(message, "bannerCancelButton")) if (!$util.isString(message.bannerCancelButton)) return "bannerCancelButton: string expected"; - if (message.bannerMessage != null && message.hasOwnProperty("bannerMessage")) + if (message.bannerMessage != null && Object.hasOwnProperty.call(message, "bannerMessage")) if (!$util.isString(message.bannerMessage)) return "bannerMessage: string expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; return null; @@ -258844,6 +260332,8 @@ export const Upsell = $root.Upsell = (() => { UpsellBanner.fromObject = function fromObject(object, long) { if (object instanceof $root.Upsell.UpsellBanner) return object; + if (!$util.isObject(object)) + throw TypeError(".Upsell.UpsellBanner: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -258892,19 +260382,19 @@ export const Upsell = $root.Upsell = (() => { object.bannerMessage = ""; object.locale = ""; } - if (message.bannerId != null && message.hasOwnProperty("bannerId")) + if (message.bannerId != null && Object.hasOwnProperty.call(message, "bannerId")) object.bannerId = message.bannerId; - if (message.bannerOkAction != null && message.hasOwnProperty("bannerOkAction")) + if (message.bannerOkAction != null && Object.hasOwnProperty.call(message, "bannerOkAction")) object.bannerOkAction = message.bannerOkAction; - if (message.bannerOkButton != null && message.hasOwnProperty("bannerOkButton")) + if (message.bannerOkButton != null && Object.hasOwnProperty.call(message, "bannerOkButton")) object.bannerOkButton = message.bannerOkButton; - if (message.bannerCancelAction != null && message.hasOwnProperty("bannerCancelAction")) + if (message.bannerCancelAction != null && Object.hasOwnProperty.call(message, "bannerCancelAction")) object.bannerCancelAction = message.bannerCancelAction; - if (message.bannerCancelButton != null && message.hasOwnProperty("bannerCancelButton")) + if (message.bannerCancelButton != null && Object.hasOwnProperty.call(message, "bannerCancelButton")) object.bannerCancelButton = message.bannerCancelButton; - if (message.bannerMessage != null && message.hasOwnProperty("bannerMessage")) + if (message.bannerMessage != null && Object.hasOwnProperty.call(message, "bannerMessage")) object.bannerMessage = message.bannerMessage; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; return object; }; @@ -259111,7 +260601,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ ValidateSessionTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -259189,13 +260679,13 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) if (!(message.encryptedSessionToken && typeof message.encryptedSessionToken.length === "number" || $util.isString(message.encryptedSessionToken))) return "encryptedSessionToken: buffer expected"; - if (message.returnMcEnterpiseIds != null && message.hasOwnProperty("returnMcEnterpiseIds")) + if (message.returnMcEnterpiseIds != null && Object.hasOwnProperty.call(message, "returnMcEnterpiseIds")) if (typeof message.returnMcEnterpiseIds !== "boolean") return "returnMcEnterpiseIds: boolean expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) if (!$util.isString(message.ip)) return "ip: string expected"; return null; @@ -259212,6 +260702,8 @@ export const BI = $root.BI = (() => { ValidateSessionTokenRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.ValidateSessionTokenRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.ValidateSessionTokenRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -259257,11 +260749,11 @@ export const BI = $root.BI = (() => { object.returnMcEnterpiseIds = false; object.ip = ""; } - if (message.encryptedSessionToken != null && message.hasOwnProperty("encryptedSessionToken")) + if (message.encryptedSessionToken != null && Object.hasOwnProperty.call(message, "encryptedSessionToken")) object.encryptedSessionToken = options.bytes === String ? $util.base64.encode(message.encryptedSessionToken, 0, message.encryptedSessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSessionToken) : message.encryptedSessionToken; - if (message.returnMcEnterpiseIds != null && message.hasOwnProperty("returnMcEnterpiseIds")) + if (message.returnMcEnterpiseIds != null && Object.hasOwnProperty.call(message, "returnMcEnterpiseIds")) object.returnMcEnterpiseIds = message.returnMcEnterpiseIds; - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; return object; }; @@ -259457,7 +260949,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ ValidateSessionTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -259569,16 +261061,16 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -259589,20 +261081,20 @@ export const BI = $root.BI = (() => { case 4: break; } - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) if (!$util.isString(message.statusMessage)) return "statusMessage: string expected"; - if (message.mcEnterpriseIds != null && message.hasOwnProperty("mcEnterpriseIds")) { + if (message.mcEnterpriseIds != null && Object.hasOwnProperty.call(message, "mcEnterpriseIds")) { if (!Array.isArray(message.mcEnterpriseIds)) return "mcEnterpriseIds: array expected"; for (let i = 0; i < message.mcEnterpriseIds.length; ++i) if (!$util.isInteger(message.mcEnterpriseIds[i])) return "mcEnterpriseIds: integer[] expected"; } - if (message.hasMSPPermission != null && message.hasOwnProperty("hasMSPPermission")) + if (message.hasMSPPermission != null && Object.hasOwnProperty.call(message, "hasMSPPermission")) if (typeof message.hasMSPPermission !== "boolean") return "hasMSPPermission: boolean expected"; - if (message.deletedMcEnterpriseIds != null && message.hasOwnProperty("deletedMcEnterpriseIds")) { + if (message.deletedMcEnterpriseIds != null && Object.hasOwnProperty.call(message, "deletedMcEnterpriseIds")) { if (!Array.isArray(message.deletedMcEnterpriseIds)) return "deletedMcEnterpriseIds: array expected"; for (let i = 0; i < message.deletedMcEnterpriseIds.length; ++i) @@ -259623,6 +261115,8 @@ export const BI = $root.BI = (() => { ValidateSessionTokenResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.ValidateSessionTokenResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.ValidateSessionTokenResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -259723,27 +261217,27 @@ export const BI = $root.BI = (() => { object.statusMessage = ""; object.hasMSPPermission = false; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.BI.ValidateSessionTokenResponse.Status[message.status] === undefined ? message.status : $root.BI.ValidateSessionTokenResponse.Status[message.status] : message.status; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) object.statusMessage = message.statusMessage; if (message.mcEnterpriseIds && message.mcEnterpriseIds.length) { object.mcEnterpriseIds = []; for (let j = 0; j < message.mcEnterpriseIds.length; ++j) object.mcEnterpriseIds[j] = message.mcEnterpriseIds[j]; } - if (message.hasMSPPermission != null && message.hasOwnProperty("hasMSPPermission")) + if (message.hasMSPPermission != null && Object.hasOwnProperty.call(message, "hasMSPPermission")) object.hasMSPPermission = message.hasMSPPermission; if (message.deletedMcEnterpriseIds && message.deletedMcEnterpriseIds.length) { object.deletedMcEnterpriseIds = []; @@ -259866,7 +261360,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -259946,10 +261440,6 @@ export const BI = $root.BI = (() => { SubscriptionStatusRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionStatusRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.SubscriptionStatusRequest(); }; @@ -260226,7 +261716,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -260354,29 +261844,29 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.autoRenewal != null && message.hasOwnProperty("autoRenewal")) { + if (message.autoRenewal != null && Object.hasOwnProperty.call(message, "autoRenewal")) { let error = $root.BI.AutoRenewal.verify(message.autoRenewal, long + 1); if (error) return "autoRenewal." + error; } - if (message.currentPaymentMethod != null && message.hasOwnProperty("currentPaymentMethod")) { + if (message.currentPaymentMethod != null && Object.hasOwnProperty.call(message, "currentPaymentMethod")) { let error = $root.BI.PaymentMethod.verify(message.currentPaymentMethod, long + 1); if (error) return "currentPaymentMethod." + error; } - if (message.checkoutLink != null && message.hasOwnProperty("checkoutLink")) + if (message.checkoutLink != null && Object.hasOwnProperty.call(message, "checkoutLink")) if (!$util.isString(message.checkoutLink)) return "checkoutLink: string expected"; - if (message.licenseCreateDate != null && message.hasOwnProperty("licenseCreateDate")) + if (message.licenseCreateDate != null && Object.hasOwnProperty.call(message, "licenseCreateDate")) if (!$util.isInteger(message.licenseCreateDate) && !(message.licenseCreateDate && $util.isInteger(message.licenseCreateDate.low) && $util.isInteger(message.licenseCreateDate.high))) return "licenseCreateDate: integer|Long expected"; - if (message.isDistributor != null && message.hasOwnProperty("isDistributor")) + if (message.isDistributor != null && Object.hasOwnProperty.call(message, "isDistributor")) if (typeof message.isDistributor !== "boolean") return "isDistributor: boolean expected"; - if (message.isLegacyMsp != null && message.hasOwnProperty("isLegacyMsp")) + if (message.isLegacyMsp != null && Object.hasOwnProperty.call(message, "isLegacyMsp")) if (typeof message.isLegacyMsp !== "boolean") return "isLegacyMsp: boolean expected"; - if (message.licenseStats != null && message.hasOwnProperty("licenseStats")) { + if (message.licenseStats != null && Object.hasOwnProperty.call(message, "licenseStats")) { if (!Array.isArray(message.licenseStats)) return "licenseStats: array expected"; for (let i = 0; i < message.licenseStats.length; ++i) { @@ -260385,7 +261875,7 @@ export const BI = $root.BI = (() => { return "licenseStats." + error; } } - if (message.gradientStatus != null && message.hasOwnProperty("gradientStatus")) + if (message.gradientStatus != null && Object.hasOwnProperty.call(message, "gradientStatus")) switch (message.gradientStatus) { default: return "gradientStatus: enum value expected"; @@ -260395,27 +261885,27 @@ export const BI = $root.BI = (() => { case 3: break; } - if (message.hideTrialBanner != null && message.hasOwnProperty("hideTrialBanner")) + if (message.hideTrialBanner != null && Object.hasOwnProperty.call(message, "hideTrialBanner")) if (typeof message.hideTrialBanner !== "boolean") return "hideTrialBanner: boolean expected"; - if (message.gradientLastSyncDate != null && message.hasOwnProperty("gradientLastSyncDate")) + if (message.gradientLastSyncDate != null && Object.hasOwnProperty.call(message, "gradientLastSyncDate")) if (!$util.isString(message.gradientLastSyncDate)) return "gradientLastSyncDate: string expected"; - if (message.gradientNextSyncDate != null && message.hasOwnProperty("gradientNextSyncDate")) + if (message.gradientNextSyncDate != null && Object.hasOwnProperty.call(message, "gradientNextSyncDate")) if (!$util.isString(message.gradientNextSyncDate)) return "gradientNextSyncDate: string expected"; - if (message.isGradientMappingPending != null && message.hasOwnProperty("isGradientMappingPending")) + if (message.isGradientMappingPending != null && Object.hasOwnProperty.call(message, "isGradientMappingPending")) if (typeof message.isGradientMappingPending !== "boolean") return "isGradientMappingPending: boolean expected"; - if (message.nhi != null && message.hasOwnProperty("nhi")) { + if (message.nhi != null && Object.hasOwnProperty.call(message, "nhi")) { let error = $root.BI.NhiBilling.verify(message.nhi, long + 1); if (error) return "nhi." + error; } - if (message.freeKsmApiCallsCount != null && message.hasOwnProperty("freeKsmApiCallsCount")) + if (message.freeKsmApiCallsCount != null && Object.hasOwnProperty.call(message, "freeKsmApiCallsCount")) if (!$util.isInteger(message.freeKsmApiCallsCount)) return "freeKsmApiCallsCount: integer expected"; - if (message.ksm != null && message.hasOwnProperty("ksm")) { + if (message.ksm != null && Object.hasOwnProperty.call(message, "ksm")) { let error = $root.BI.KsmBilling.verify(message.ksm, long + 1); if (error) return "ksm." + error; @@ -260434,18 +261924,20 @@ export const BI = $root.BI = (() => { SubscriptionStatusResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionStatusResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SubscriptionStatusResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.BI.SubscriptionStatusResponse(); if (object.autoRenewal != null) { - if (typeof object.autoRenewal !== "object") + if (!$util.isObject(object.autoRenewal)) throw TypeError(".BI.SubscriptionStatusResponse.autoRenewal: object expected"); message.autoRenewal = $root.BI.AutoRenewal.fromObject(object.autoRenewal, long + 1); } if (object.currentPaymentMethod != null) { - if (typeof object.currentPaymentMethod !== "object") + if (!$util.isObject(object.currentPaymentMethod)) throw TypeError(".BI.SubscriptionStatusResponse.currentPaymentMethod: object expected"); message.currentPaymentMethod = $root.BI.PaymentMethod.fromObject(object.currentPaymentMethod, long + 1); } @@ -260469,7 +261961,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionStatusResponse.licenseStats: array expected"); message.licenseStats = []; for (let i = 0; i < object.licenseStats.length; ++i) { - if (typeof object.licenseStats[i] !== "object") + if (!$util.isObject(object.licenseStats[i])) throw TypeError(".BI.SubscriptionStatusResponse.licenseStats: object expected"); message.licenseStats[i] = $root.BI.LicenseStats.fromObject(object.licenseStats[i], long + 1); } @@ -260507,14 +261999,14 @@ export const BI = $root.BI = (() => { if (object.isGradientMappingPending != null) message.isGradientMappingPending = Boolean(object.isGradientMappingPending); if (object.nhi != null) { - if (typeof object.nhi !== "object") + if (!$util.isObject(object.nhi)) throw TypeError(".BI.SubscriptionStatusResponse.nhi: object expected"); message.nhi = $root.BI.NhiBilling.fromObject(object.nhi, long + 1); } if (object.freeKsmApiCallsCount != null) message.freeKsmApiCallsCount = object.freeKsmApiCallsCount | 0; if (object.ksm != null) { - if (typeof object.ksm !== "object") + if (!$util.isObject(object.ksm)) throw TypeError(".BI.SubscriptionStatusResponse.ksm: object expected"); message.ksm = $root.BI.KsmBilling.fromObject(object.ksm, long + 1); } @@ -260560,43 +262052,43 @@ export const BI = $root.BI = (() => { object.freeKsmApiCallsCount = 0; object.ksm = null; } - if (message.autoRenewal != null && message.hasOwnProperty("autoRenewal")) + if (message.autoRenewal != null && Object.hasOwnProperty.call(message, "autoRenewal")) object.autoRenewal = $root.BI.AutoRenewal.toObject(message.autoRenewal, options, q + 1); - if (message.currentPaymentMethod != null && message.hasOwnProperty("currentPaymentMethod")) + if (message.currentPaymentMethod != null && Object.hasOwnProperty.call(message, "currentPaymentMethod")) object.currentPaymentMethod = $root.BI.PaymentMethod.toObject(message.currentPaymentMethod, options, q + 1); - if (message.checkoutLink != null && message.hasOwnProperty("checkoutLink")) + if (message.checkoutLink != null && Object.hasOwnProperty.call(message, "checkoutLink")) object.checkoutLink = message.checkoutLink; - if (message.licenseCreateDate != null && message.hasOwnProperty("licenseCreateDate")) + if (message.licenseCreateDate != null && Object.hasOwnProperty.call(message, "licenseCreateDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.licenseCreateDate = typeof message.licenseCreateDate === "number" ? BigInt(message.licenseCreateDate) : $util.Long.fromBits(message.licenseCreateDate.low >>> 0, message.licenseCreateDate.high >>> 0, false).toBigInt(); else if (typeof message.licenseCreateDate === "number") object.licenseCreateDate = options.longs === String ? String(message.licenseCreateDate) : message.licenseCreateDate; else object.licenseCreateDate = options.longs === String ? $util.Long.prototype.toString.call(message.licenseCreateDate) : options.longs === Number ? new $util.LongBits(message.licenseCreateDate.low >>> 0, message.licenseCreateDate.high >>> 0).toNumber() : message.licenseCreateDate; - if (message.isDistributor != null && message.hasOwnProperty("isDistributor")) + if (message.isDistributor != null && Object.hasOwnProperty.call(message, "isDistributor")) object.isDistributor = message.isDistributor; - if (message.isLegacyMsp != null && message.hasOwnProperty("isLegacyMsp")) + if (message.isLegacyMsp != null && Object.hasOwnProperty.call(message, "isLegacyMsp")) object.isLegacyMsp = message.isLegacyMsp; if (message.licenseStats && message.licenseStats.length) { object.licenseStats = []; for (let j = 0; j < message.licenseStats.length; ++j) object.licenseStats[j] = $root.BI.LicenseStats.toObject(message.licenseStats[j], options, q + 1); } - if (message.gradientStatus != null && message.hasOwnProperty("gradientStatus")) + if (message.gradientStatus != null && Object.hasOwnProperty.call(message, "gradientStatus")) object.gradientStatus = options.enums === String ? $root.BI.GradientIntegrationStatus[message.gradientStatus] === undefined ? message.gradientStatus : $root.BI.GradientIntegrationStatus[message.gradientStatus] : message.gradientStatus; - if (message.hideTrialBanner != null && message.hasOwnProperty("hideTrialBanner")) + if (message.hideTrialBanner != null && Object.hasOwnProperty.call(message, "hideTrialBanner")) object.hideTrialBanner = message.hideTrialBanner; - if (message.gradientLastSyncDate != null && message.hasOwnProperty("gradientLastSyncDate")) + if (message.gradientLastSyncDate != null && Object.hasOwnProperty.call(message, "gradientLastSyncDate")) object.gradientLastSyncDate = message.gradientLastSyncDate; - if (message.gradientNextSyncDate != null && message.hasOwnProperty("gradientNextSyncDate")) + if (message.gradientNextSyncDate != null && Object.hasOwnProperty.call(message, "gradientNextSyncDate")) object.gradientNextSyncDate = message.gradientNextSyncDate; - if (message.isGradientMappingPending != null && message.hasOwnProperty("isGradientMappingPending")) + if (message.isGradientMappingPending != null && Object.hasOwnProperty.call(message, "isGradientMappingPending")) object.isGradientMappingPending = message.isGradientMappingPending; - if (message.nhi != null && message.hasOwnProperty("nhi")) + if (message.nhi != null && Object.hasOwnProperty.call(message, "nhi")) object.nhi = $root.BI.NhiBilling.toObject(message.nhi, options, q + 1); - if (message.freeKsmApiCallsCount != null && message.hasOwnProperty("freeKsmApiCallsCount")) + if (message.freeKsmApiCallsCount != null && Object.hasOwnProperty.call(message, "freeKsmApiCallsCount")) object.freeKsmApiCallsCount = message.freeKsmApiCallsCount; - if (message.ksm != null && message.hasOwnProperty("ksm")) + if (message.ksm != null && Object.hasOwnProperty.call(message, "ksm")) object.ksm = $root.BI.KsmBilling.toObject(message.ksm, options, q + 1); return object; }; @@ -260749,7 +262241,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ KsmBilling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -260835,19 +262327,19 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.billingStartTimestamp != null && message.hasOwnProperty("billingStartTimestamp")) + if (message.billingStartTimestamp != null && Object.hasOwnProperty.call(message, "billingStartTimestamp")) if (!$util.isInteger(message.billingStartTimestamp) && !(message.billingStartTimestamp && $util.isInteger(message.billingStartTimestamp.low) && $util.isInteger(message.billingStartTimestamp.high))) return "billingStartTimestamp: integer|Long expected"; - if (message.billingEndTimestamp != null && message.hasOwnProperty("billingEndTimestamp")) + if (message.billingEndTimestamp != null && Object.hasOwnProperty.call(message, "billingEndTimestamp")) if (!$util.isInteger(message.billingEndTimestamp) && !(message.billingEndTimestamp && $util.isInteger(message.billingEndTimestamp.low) && $util.isInteger(message.billingEndTimestamp.high))) return "billingEndTimestamp: integer|Long expected"; - if (message.currentTierId != null && message.hasOwnProperty("currentTierId")) + if (message.currentTierId != null && Object.hasOwnProperty.call(message, "currentTierId")) if (!$util.isInteger(message.currentTierId)) return "currentTierId: integer expected"; - if (message.enterpriseBlocks != null && message.hasOwnProperty("enterpriseBlocks")) + if (message.enterpriseBlocks != null && Object.hasOwnProperty.call(message, "enterpriseBlocks")) if (!$util.isInteger(message.enterpriseBlocks)) return "enterpriseBlocks: integer expected"; - if (message.currentTierCeiling != null && message.hasOwnProperty("currentTierCeiling")) + if (message.currentTierCeiling != null && Object.hasOwnProperty.call(message, "currentTierCeiling")) if (!$util.isInteger(message.currentTierCeiling)) return "currentTierCeiling: integer expected"; return null; @@ -260864,6 +262356,8 @@ export const BI = $root.BI = (() => { KsmBilling.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.KsmBilling) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.KsmBilling: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -260928,25 +262422,25 @@ export const BI = $root.BI = (() => { object.enterpriseBlocks = 0; object.currentTierCeiling = 0; } - if (message.billingStartTimestamp != null && message.hasOwnProperty("billingStartTimestamp")) + if (message.billingStartTimestamp != null && Object.hasOwnProperty.call(message, "billingStartTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.billingStartTimestamp = typeof message.billingStartTimestamp === "number" ? BigInt(message.billingStartTimestamp) : $util.Long.fromBits(message.billingStartTimestamp.low >>> 0, message.billingStartTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.billingStartTimestamp === "number") object.billingStartTimestamp = options.longs === String ? String(message.billingStartTimestamp) : message.billingStartTimestamp; else object.billingStartTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.billingStartTimestamp) : options.longs === Number ? new $util.LongBits(message.billingStartTimestamp.low >>> 0, message.billingStartTimestamp.high >>> 0).toNumber() : message.billingStartTimestamp; - if (message.billingEndTimestamp != null && message.hasOwnProperty("billingEndTimestamp")) + if (message.billingEndTimestamp != null && Object.hasOwnProperty.call(message, "billingEndTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.billingEndTimestamp = typeof message.billingEndTimestamp === "number" ? BigInt(message.billingEndTimestamp) : $util.Long.fromBits(message.billingEndTimestamp.low >>> 0, message.billingEndTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.billingEndTimestamp === "number") object.billingEndTimestamp = options.longs === String ? String(message.billingEndTimestamp) : message.billingEndTimestamp; else object.billingEndTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.billingEndTimestamp) : options.longs === Number ? new $util.LongBits(message.billingEndTimestamp.low >>> 0, message.billingEndTimestamp.high >>> 0).toNumber() : message.billingEndTimestamp; - if (message.currentTierId != null && message.hasOwnProperty("currentTierId")) + if (message.currentTierId != null && Object.hasOwnProperty.call(message, "currentTierId")) object.currentTierId = message.currentTierId; - if (message.enterpriseBlocks != null && message.hasOwnProperty("enterpriseBlocks")) + if (message.enterpriseBlocks != null && Object.hasOwnProperty.call(message, "enterpriseBlocks")) object.enterpriseBlocks = message.enterpriseBlocks; - if (message.currentTierCeiling != null && message.hasOwnProperty("currentTierCeiling")) + if (message.currentTierCeiling != null && Object.hasOwnProperty.call(message, "currentTierCeiling")) object.currentTierCeiling = message.currentTierCeiling; return object; }; @@ -261112,7 +262606,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NhiBilling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -261204,22 +262698,22 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.billingStartTimestamp != null && message.hasOwnProperty("billingStartTimestamp")) + if (message.billingStartTimestamp != null && Object.hasOwnProperty.call(message, "billingStartTimestamp")) if (!$util.isInteger(message.billingStartTimestamp) && !(message.billingStartTimestamp && $util.isInteger(message.billingStartTimestamp.low) && $util.isInteger(message.billingStartTimestamp.high))) return "billingStartTimestamp: integer|Long expected"; - if (message.billingEndTimestamp != null && message.hasOwnProperty("billingEndTimestamp")) + if (message.billingEndTimestamp != null && Object.hasOwnProperty.call(message, "billingEndTimestamp")) if (!$util.isInteger(message.billingEndTimestamp) && !(message.billingEndTimestamp && $util.isInteger(message.billingEndTimestamp.low) && $util.isInteger(message.billingEndTimestamp.high))) return "billingEndTimestamp: integer|Long expected"; - if (message.currentTierId != null && message.hasOwnProperty("currentTierId")) + if (message.currentTierId != null && Object.hasOwnProperty.call(message, "currentTierId")) if (!$util.isInteger(message.currentTierId)) return "currentTierId: integer expected"; - if (message.enterpriseBlocks != null && message.hasOwnProperty("enterpriseBlocks")) + if (message.enterpriseBlocks != null && Object.hasOwnProperty.call(message, "enterpriseBlocks")) if (!$util.isInteger(message.enterpriseBlocks)) return "enterpriseBlocks: integer expected"; - if (message.currentTierCeiling != null && message.hasOwnProperty("currentTierCeiling")) + if (message.currentTierCeiling != null && Object.hasOwnProperty.call(message, "currentTierCeiling")) if (!$util.isInteger(message.currentTierCeiling)) return "currentTierCeiling: integer expected"; - if (message.billingPeriods != null && message.hasOwnProperty("billingPeriods")) { + if (message.billingPeriods != null && Object.hasOwnProperty.call(message, "billingPeriods")) { if (!Array.isArray(message.billingPeriods)) return "billingPeriods: array expected"; for (let i = 0; i < message.billingPeriods.length; ++i) { @@ -261242,6 +262736,8 @@ export const BI = $root.BI = (() => { NhiBilling.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NhiBilling) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NhiBilling: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -261276,7 +262772,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.NhiBilling.billingPeriods: array expected"); message.billingPeriods = []; for (let i = 0; i < object.billingPeriods.length; ++i) { - if (typeof object.billingPeriods[i] !== "object") + if (!$util.isObject(object.billingPeriods[i])) throw TypeError(".BI.NhiBilling.billingPeriods: object expected"); message.billingPeriods[i] = $root.BI.NhiBillingPeriod.fromObject(object.billingPeriods[i], long + 1); } @@ -261318,25 +262814,25 @@ export const BI = $root.BI = (() => { object.enterpriseBlocks = 0; object.currentTierCeiling = 0; } - if (message.billingStartTimestamp != null && message.hasOwnProperty("billingStartTimestamp")) + if (message.billingStartTimestamp != null && Object.hasOwnProperty.call(message, "billingStartTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.billingStartTimestamp = typeof message.billingStartTimestamp === "number" ? BigInt(message.billingStartTimestamp) : $util.Long.fromBits(message.billingStartTimestamp.low >>> 0, message.billingStartTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.billingStartTimestamp === "number") object.billingStartTimestamp = options.longs === String ? String(message.billingStartTimestamp) : message.billingStartTimestamp; else object.billingStartTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.billingStartTimestamp) : options.longs === Number ? new $util.LongBits(message.billingStartTimestamp.low >>> 0, message.billingStartTimestamp.high >>> 0).toNumber() : message.billingStartTimestamp; - if (message.billingEndTimestamp != null && message.hasOwnProperty("billingEndTimestamp")) + if (message.billingEndTimestamp != null && Object.hasOwnProperty.call(message, "billingEndTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.billingEndTimestamp = typeof message.billingEndTimestamp === "number" ? BigInt(message.billingEndTimestamp) : $util.Long.fromBits(message.billingEndTimestamp.low >>> 0, message.billingEndTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.billingEndTimestamp === "number") object.billingEndTimestamp = options.longs === String ? String(message.billingEndTimestamp) : message.billingEndTimestamp; else object.billingEndTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.billingEndTimestamp) : options.longs === Number ? new $util.LongBits(message.billingEndTimestamp.low >>> 0, message.billingEndTimestamp.high >>> 0).toNumber() : message.billingEndTimestamp; - if (message.currentTierId != null && message.hasOwnProperty("currentTierId")) + if (message.currentTierId != null && Object.hasOwnProperty.call(message, "currentTierId")) object.currentTierId = message.currentTierId; - if (message.enterpriseBlocks != null && message.hasOwnProperty("enterpriseBlocks")) + if (message.enterpriseBlocks != null && Object.hasOwnProperty.call(message, "enterpriseBlocks")) object.enterpriseBlocks = message.enterpriseBlocks; - if (message.currentTierCeiling != null && message.hasOwnProperty("currentTierCeiling")) + if (message.currentTierCeiling != null && Object.hasOwnProperty.call(message, "currentTierCeiling")) object.currentTierCeiling = message.currentTierCeiling; if (message.billingPeriods && message.billingPeriods.length) { object.billingPeriods = []; @@ -261461,7 +262957,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NhiBillingPeriod.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -261535,10 +263031,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) + if (message.startTimestamp != null && Object.hasOwnProperty.call(message, "startTimestamp")) if (!$util.isInteger(message.startTimestamp) && !(message.startTimestamp && $util.isInteger(message.startTimestamp.low) && $util.isInteger(message.startTimestamp.high))) return "startTimestamp: integer|Long expected"; - if (message.endTimestamp != null && message.hasOwnProperty("endTimestamp")) + if (message.endTimestamp != null && Object.hasOwnProperty.call(message, "endTimestamp")) if (!$util.isInteger(message.endTimestamp) && !(message.endTimestamp && $util.isInteger(message.endTimestamp.low) && $util.isInteger(message.endTimestamp.high))) return "endTimestamp: integer|Long expected"; return null; @@ -261555,6 +263051,8 @@ export const BI = $root.BI = (() => { NhiBillingPeriod.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NhiBillingPeriod) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NhiBillingPeriod: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -261610,14 +263108,14 @@ export const BI = $root.BI = (() => { } else object.endTimestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) + if (message.startTimestamp != null && Object.hasOwnProperty.call(message, "startTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startTimestamp = typeof message.startTimestamp === "number" ? BigInt(message.startTimestamp) : $util.Long.fromBits(message.startTimestamp.low >>> 0, message.startTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.startTimestamp === "number") object.startTimestamp = options.longs === String ? String(message.startTimestamp) : message.startTimestamp; else object.startTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.startTimestamp) : options.longs === Number ? new $util.LongBits(message.startTimestamp.low >>> 0, message.startTimestamp.high >>> 0).toNumber() : message.startTimestamp; - if (message.endTimestamp != null && message.hasOwnProperty("endTimestamp")) + if (message.endTimestamp != null && Object.hasOwnProperty.call(message, "endTimestamp")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endTimestamp = typeof message.endTimestamp === "number" ? BigInt(message.endTimestamp) : $util.Long.fromBits(message.endTimestamp.low >>> 0, message.endTimestamp.high >>> 0, false).toBigInt(); else if (typeof message.endTimestamp === "number") @@ -261753,7 +263251,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ LicenseStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -261831,7 +263329,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -261846,10 +263344,10 @@ export const BI = $root.BI = (() => { case 8: break; } - if (message.available != null && message.hasOwnProperty("available")) + if (message.available != null && Object.hasOwnProperty.call(message, "available")) if (!$util.isInteger(message.available)) return "available: integer expected"; - if (message.used != null && message.hasOwnProperty("used")) + if (message.used != null && Object.hasOwnProperty.call(message, "used")) if (!$util.isInteger(message.used)) return "used: integer expected"; return null; @@ -261866,6 +263364,8 @@ export const BI = $root.BI = (() => { LicenseStats.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.LicenseStats) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.LicenseStats: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -261944,11 +263444,11 @@ export const BI = $root.BI = (() => { object.available = 0; object.used = 0; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.BI.LicenseStats.Type[message.type] === undefined ? message.type : $root.BI.LicenseStats.Type[message.type] : message.type; - if (message.available != null && message.hasOwnProperty("available")) + if (message.available != null && Object.hasOwnProperty.call(message, "available")) object.available = message.available; - if (message.used != null && message.hasOwnProperty("used")) + if (message.used != null && Object.hasOwnProperty.call(message, "used")) object.used = message.used; return object; }; @@ -262107,7 +263607,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ AutoRenewal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -262185,13 +263685,13 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.nextOn != null && message.hasOwnProperty("nextOn")) + if (message.nextOn != null && Object.hasOwnProperty.call(message, "nextOn")) if (!$util.isInteger(message.nextOn) && !(message.nextOn && $util.isInteger(message.nextOn.low) && $util.isInteger(message.nextOn.high))) return "nextOn: integer|Long expected"; - if (message.daysLeft != null && message.hasOwnProperty("daysLeft")) + if (message.daysLeft != null && Object.hasOwnProperty.call(message, "daysLeft")) if (!$util.isInteger(message.daysLeft)) return "daysLeft: integer expected"; - if (message.isTrial != null && message.hasOwnProperty("isTrial")) + if (message.isTrial != null && Object.hasOwnProperty.call(message, "isTrial")) if (typeof message.isTrial !== "boolean") return "isTrial: boolean expected"; return null; @@ -262208,6 +263708,8 @@ export const BI = $root.BI = (() => { AutoRenewal.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.AutoRenewal) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.AutoRenewal: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -262255,16 +263757,16 @@ export const BI = $root.BI = (() => { object.daysLeft = 0; object.isTrial = false; } - if (message.nextOn != null && message.hasOwnProperty("nextOn")) + if (message.nextOn != null && Object.hasOwnProperty.call(message, "nextOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nextOn = typeof message.nextOn === "number" ? BigInt(message.nextOn) : $util.Long.fromBits(message.nextOn.low >>> 0, message.nextOn.high >>> 0, false).toBigInt(); else if (typeof message.nextOn === "number") object.nextOn = options.longs === String ? String(message.nextOn) : message.nextOn; else object.nextOn = options.longs === String ? $util.Long.prototype.toString.call(message.nextOn) : options.longs === Number ? new $util.LongBits(message.nextOn.low >>> 0, message.nextOn.high >>> 0).toNumber() : message.nextOn; - if (message.daysLeft != null && message.hasOwnProperty("daysLeft")) + if (message.daysLeft != null && Object.hasOwnProperty.call(message, "daysLeft")) object.daysLeft = message.daysLeft; - if (message.isTrial != null && message.hasOwnProperty("isTrial")) + if (message.isTrial != null && Object.hasOwnProperty.call(message, "isTrial")) object.isTrial = message.isTrial; return object; }; @@ -262439,7 +263941,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ PaymentMethod.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -262533,7 +264035,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -262545,30 +264047,30 @@ export const BI = $root.BI = (() => { case 5: break; } - if (message.card != null && message.hasOwnProperty("card")) { + if (message.card != null && Object.hasOwnProperty.call(message, "card")) { let error = $root.BI.PaymentMethod.Card.verify(message.card, long + 1); if (error) return "card." + error; } - if (message.sepa != null && message.hasOwnProperty("sepa")) { + if (message.sepa != null && Object.hasOwnProperty.call(message, "sepa")) { let error = $root.BI.PaymentMethod.Sepa.verify(message.sepa, long + 1); if (error) return "sepa." + error; } - if (message.paypal != null && message.hasOwnProperty("paypal")) { + if (message.paypal != null && Object.hasOwnProperty.call(message, "paypal")) { let error = $root.BI.PaymentMethod.Paypal.verify(message.paypal, long + 1); if (error) return "paypal." + error; } - if (message.failedBilling != null && message.hasOwnProperty("failedBilling")) + if (message.failedBilling != null && Object.hasOwnProperty.call(message, "failedBilling")) if (typeof message.failedBilling !== "boolean") return "failedBilling: boolean expected"; - if (message.vendor != null && message.hasOwnProperty("vendor")) { + if (message.vendor != null && Object.hasOwnProperty.call(message, "vendor")) { let error = $root.BI.PaymentMethod.Vendor.verify(message.vendor, long + 1); if (error) return "vendor." + error; } - if (message.purchaseOrder != null && message.hasOwnProperty("purchaseOrder")) { + if (message.purchaseOrder != null && Object.hasOwnProperty.call(message, "purchaseOrder")) { let error = $root.BI.PaymentMethod.PurchaseOrder.verify(message.purchaseOrder, long + 1); if (error) return "purchaseOrder." + error; @@ -262587,6 +264089,8 @@ export const BI = $root.BI = (() => { PaymentMethod.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PaymentMethod) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.PaymentMethod: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -262625,29 +264129,29 @@ export const BI = $root.BI = (() => { break; } if (object.card != null) { - if (typeof object.card !== "object") + if (!$util.isObject(object.card)) throw TypeError(".BI.PaymentMethod.card: object expected"); message.card = $root.BI.PaymentMethod.Card.fromObject(object.card, long + 1); } if (object.sepa != null) { - if (typeof object.sepa !== "object") + if (!$util.isObject(object.sepa)) throw TypeError(".BI.PaymentMethod.sepa: object expected"); message.sepa = $root.BI.PaymentMethod.Sepa.fromObject(object.sepa, long + 1); } if (object.paypal != null) { - if (typeof object.paypal !== "object") + if (!$util.isObject(object.paypal)) throw TypeError(".BI.PaymentMethod.paypal: object expected"); message.paypal = $root.BI.PaymentMethod.Paypal.fromObject(object.paypal, long + 1); } if (object.failedBilling != null) message.failedBilling = Boolean(object.failedBilling); if (object.vendor != null) { - if (typeof object.vendor !== "object") + if (!$util.isObject(object.vendor)) throw TypeError(".BI.PaymentMethod.vendor: object expected"); message.vendor = $root.BI.PaymentMethod.Vendor.fromObject(object.vendor, long + 1); } if (object.purchaseOrder != null) { - if (typeof object.purchaseOrder !== "object") + if (!$util.isObject(object.purchaseOrder)) throw TypeError(".BI.PaymentMethod.purchaseOrder: object expected"); message.purchaseOrder = $root.BI.PaymentMethod.PurchaseOrder.fromObject(object.purchaseOrder, long + 1); } @@ -262680,19 +264184,19 @@ export const BI = $root.BI = (() => { object.vendor = null; object.purchaseOrder = null; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.BI.PaymentMethod.Type[message.type] === undefined ? message.type : $root.BI.PaymentMethod.Type[message.type] : message.type; - if (message.card != null && message.hasOwnProperty("card")) + if (message.card != null && Object.hasOwnProperty.call(message, "card")) object.card = $root.BI.PaymentMethod.Card.toObject(message.card, options, q + 1); - if (message.sepa != null && message.hasOwnProperty("sepa")) + if (message.sepa != null && Object.hasOwnProperty.call(message, "sepa")) object.sepa = $root.BI.PaymentMethod.Sepa.toObject(message.sepa, options, q + 1); - if (message.paypal != null && message.hasOwnProperty("paypal")) + if (message.paypal != null && Object.hasOwnProperty.call(message, "paypal")) object.paypal = $root.BI.PaymentMethod.Paypal.toObject(message.paypal, options, q + 1); - if (message.failedBilling != null && message.hasOwnProperty("failedBilling")) + if (message.failedBilling != null && Object.hasOwnProperty.call(message, "failedBilling")) object.failedBilling = message.failedBilling; - if (message.vendor != null && message.hasOwnProperty("vendor")) + if (message.vendor != null && Object.hasOwnProperty.call(message, "vendor")) object.vendor = $root.BI.PaymentMethod.Vendor.toObject(message.vendor, options, q + 1); - if (message.purchaseOrder != null && message.hasOwnProperty("purchaseOrder")) + if (message.purchaseOrder != null && Object.hasOwnProperty.call(message, "purchaseOrder")) object.purchaseOrder = $root.BI.PaymentMethod.PurchaseOrder.toObject(message.purchaseOrder, options, q + 1); return object; }; @@ -262831,7 +264335,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Card.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -262905,10 +264409,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.last4 != null && message.hasOwnProperty("last4")) + if (message.last4 != null && Object.hasOwnProperty.call(message, "last4")) if (!$util.isString(message.last4)) return "last4: string expected"; - if (message.brand != null && message.hasOwnProperty("brand")) + if (message.brand != null && Object.hasOwnProperty.call(message, "brand")) if (!$util.isString(message.brand)) return "brand: string expected"; return null; @@ -262925,6 +264429,8 @@ export const BI = $root.BI = (() => { Card.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PaymentMethod.Card) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.PaymentMethod.Card: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -262958,9 +264464,9 @@ export const BI = $root.BI = (() => { object.last4 = ""; object.brand = ""; } - if (message.last4 != null && message.hasOwnProperty("last4")) + if (message.last4 != null && Object.hasOwnProperty.call(message, "last4")) object.last4 = message.last4; - if (message.brand != null && message.hasOwnProperty("brand")) + if (message.brand != null && Object.hasOwnProperty.call(message, "brand")) object.brand = message.brand; return object; }; @@ -263080,7 +264586,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Sepa.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -263154,10 +264660,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.last4 != null && message.hasOwnProperty("last4")) + if (message.last4 != null && Object.hasOwnProperty.call(message, "last4")) if (!$util.isString(message.last4)) return "last4: string expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; return null; @@ -263174,6 +264680,8 @@ export const BI = $root.BI = (() => { Sepa.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PaymentMethod.Sepa) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.PaymentMethod.Sepa: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -263207,9 +264715,9 @@ export const BI = $root.BI = (() => { object.last4 = ""; object.country = ""; } - if (message.last4 != null && message.hasOwnProperty("last4")) + if (message.last4 != null && Object.hasOwnProperty.call(message, "last4")) object.last4 = message.last4; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && Object.hasOwnProperty.call(message, "country")) object.country = message.country; return object; }; @@ -263307,7 +264815,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Paypal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -263387,10 +264895,6 @@ export const BI = $root.BI = (() => { Paypal.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PaymentMethod.Paypal) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.PaymentMethod.Paypal(); }; @@ -263511,7 +265015,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Vendor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -263581,7 +265085,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -263598,6 +265102,8 @@ export const BI = $root.BI = (() => { Vendor.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PaymentMethod.Vendor) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.PaymentMethod.Vendor: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -263627,7 +265133,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -263736,7 +265242,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ PurchaseOrder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -263806,7 +265312,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -263823,6 +265329,8 @@ export const BI = $root.BI = (() => { PurchaseOrder.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PaymentMethod.PurchaseOrder) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.PaymentMethod.PurchaseOrder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -263852,7 +265360,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -263953,7 +265461,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionMspPricingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -264033,10 +265541,6 @@ export const BI = $root.BI = (() => { SubscriptionMspPricingRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionMspPricingRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.SubscriptionMspPricingRequest(); }; @@ -264172,7 +265676,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionMspPricingResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -264250,7 +265754,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.addons != null && message.hasOwnProperty("addons")) { + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) { if (!Array.isArray(message.addons)) return "addons: array expected"; for (let i = 0; i < message.addons.length; ++i) { @@ -264259,7 +265763,7 @@ export const BI = $root.BI = (() => { return "addons." + error; } } - if (message.filePlans != null && message.hasOwnProperty("filePlans")) { + if (message.filePlans != null && Object.hasOwnProperty.call(message, "filePlans")) { if (!Array.isArray(message.filePlans)) return "filePlans: array expected"; for (let i = 0; i < message.filePlans.length; ++i) { @@ -264282,6 +265786,8 @@ export const BI = $root.BI = (() => { SubscriptionMspPricingResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionMspPricingResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SubscriptionMspPricingResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -264292,7 +265798,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionMspPricingResponse.addons: array expected"); message.addons = []; for (let i = 0; i < object.addons.length; ++i) { - if (typeof object.addons[i] !== "object") + if (!$util.isObject(object.addons[i])) throw TypeError(".BI.SubscriptionMspPricingResponse.addons: object expected"); message.addons[i] = $root.BI.Addon.fromObject(object.addons[i], long + 1); } @@ -264302,7 +265808,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionMspPricingResponse.filePlans: array expected"); message.filePlans = []; for (let i = 0; i < object.filePlans.length; ++i) { - if (typeof object.filePlans[i] !== "object") + if (!$util.isObject(object.filePlans[i])) throw TypeError(".BI.SubscriptionMspPricingResponse.filePlans: object expected"); message.filePlans[i] = $root.BI.FilePlan.fromObject(object.filePlans[i], long + 1); } @@ -264437,7 +265943,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionMcPricingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -264517,10 +266023,6 @@ export const BI = $root.BI = (() => { SubscriptionMcPricingRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionMcPricingRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.SubscriptionMcPricingRequest(); }; @@ -264669,7 +266171,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionMcPricingResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -264753,7 +266255,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.basePlans != null && message.hasOwnProperty("basePlans")) { + if (message.basePlans != null && Object.hasOwnProperty.call(message, "basePlans")) { if (!Array.isArray(message.basePlans)) return "basePlans: array expected"; for (let i = 0; i < message.basePlans.length; ++i) { @@ -264762,7 +266264,7 @@ export const BI = $root.BI = (() => { return "basePlans." + error; } } - if (message.addons != null && message.hasOwnProperty("addons")) { + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) { if (!Array.isArray(message.addons)) return "addons: array expected"; for (let i = 0; i < message.addons.length; ++i) { @@ -264771,7 +266273,7 @@ export const BI = $root.BI = (() => { return "addons." + error; } } - if (message.filePlans != null && message.hasOwnProperty("filePlans")) { + if (message.filePlans != null && Object.hasOwnProperty.call(message, "filePlans")) { if (!Array.isArray(message.filePlans)) return "filePlans: array expected"; for (let i = 0; i < message.filePlans.length; ++i) { @@ -264794,6 +266296,8 @@ export const BI = $root.BI = (() => { SubscriptionMcPricingResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionMcPricingResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SubscriptionMcPricingResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -264804,7 +266308,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionMcPricingResponse.basePlans: array expected"); message.basePlans = []; for (let i = 0; i < object.basePlans.length; ++i) { - if (typeof object.basePlans[i] !== "object") + if (!$util.isObject(object.basePlans[i])) throw TypeError(".BI.SubscriptionMcPricingResponse.basePlans: object expected"); message.basePlans[i] = $root.BI.BasePlan.fromObject(object.basePlans[i], long + 1); } @@ -264814,7 +266318,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionMcPricingResponse.addons: array expected"); message.addons = []; for (let i = 0; i < object.addons.length; ++i) { - if (typeof object.addons[i] !== "object") + if (!$util.isObject(object.addons[i])) throw TypeError(".BI.SubscriptionMcPricingResponse.addons: object expected"); message.addons[i] = $root.BI.Addon.fromObject(object.addons[i], long + 1); } @@ -264824,7 +266328,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionMcPricingResponse.filePlans: array expected"); message.filePlans = []; for (let i = 0; i < object.filePlans.length; ++i) { - if (typeof object.filePlans[i] !== "object") + if (!$util.isObject(object.filePlans[i])) throw TypeError(".BI.SubscriptionMcPricingResponse.filePlans: object expected"); message.filePlans[i] = $root.BI.FilePlan.fromObject(object.filePlans[i], long + 1); } @@ -264987,7 +266491,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ BasePlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -265061,10 +266565,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.cost != null && message.hasOwnProperty("cost")) { + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) { let error = $root.BI.Cost.verify(message.cost, long + 1); if (error) return "cost." + error; @@ -265083,6 +266587,8 @@ export const BI = $root.BI = (() => { BasePlan.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.BasePlan) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.BasePlan: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -265091,7 +266597,7 @@ export const BI = $root.BI = (() => { if (object.id != null) message.id = object.id | 0; if (object.cost != null) { - if (typeof object.cost !== "object") + if (!$util.isObject(object.cost)) throw TypeError(".BI.BasePlan.cost: object expected"); message.cost = $root.BI.Cost.fromObject(object.cost, long + 1); } @@ -265119,9 +266625,9 @@ export const BI = $root.BI = (() => { object.id = 0; object.cost = null; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.cost != null && message.hasOwnProperty("cost")) + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) object.cost = $root.BI.Cost.toObject(message.cost, options, q + 1); return object; }; @@ -265252,7 +266758,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Addon.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -265330,15 +266836,15 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.cost != null && message.hasOwnProperty("cost")) { + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) { let error = $root.BI.Cost.verify(message.cost, long + 1); if (error) return "cost." + error; } - if (message.amountConsumed != null && message.hasOwnProperty("amountConsumed")) + if (message.amountConsumed != null && Object.hasOwnProperty.call(message, "amountConsumed")) if (!$util.isInteger(message.amountConsumed) && !(message.amountConsumed && $util.isInteger(message.amountConsumed.low) && $util.isInteger(message.amountConsumed.high))) return "amountConsumed: integer|Long expected"; return null; @@ -265355,6 +266861,8 @@ export const BI = $root.BI = (() => { Addon.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.Addon) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.Addon: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -265363,7 +266871,7 @@ export const BI = $root.BI = (() => { if (object.id != null) message.id = object.id | 0; if (object.cost != null) { - if (typeof object.cost !== "object") + if (!$util.isObject(object.cost)) throw TypeError(".BI.Addon.cost: object expected"); message.cost = $root.BI.Cost.fromObject(object.cost, long + 1); } @@ -265405,11 +266913,11 @@ export const BI = $root.BI = (() => { } else object.amountConsumed = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.cost != null && message.hasOwnProperty("cost")) + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) object.cost = $root.BI.Cost.toObject(message.cost, options, q + 1); - if (message.amountConsumed != null && message.hasOwnProperty("amountConsumed")) + if (message.amountConsumed != null && Object.hasOwnProperty.call(message, "amountConsumed")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.amountConsumed = typeof message.amountConsumed === "number" ? BigInt(message.amountConsumed) : $util.Long.fromBits(message.amountConsumed.low >>> 0, message.amountConsumed.high >>> 0, false).toBigInt(); else if (typeof message.amountConsumed === "number") @@ -265534,7 +267042,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ FilePlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -265608,10 +267116,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.cost != null && message.hasOwnProperty("cost")) { + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) { let error = $root.BI.Cost.verify(message.cost, long + 1); if (error) return "cost." + error; @@ -265630,6 +267138,8 @@ export const BI = $root.BI = (() => { FilePlan.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.FilePlan) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.FilePlan: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -265638,7 +267148,7 @@ export const BI = $root.BI = (() => { if (object.id != null) message.id = object.id | 0; if (object.cost != null) { - if (typeof object.cost !== "object") + if (!$util.isObject(object.cost)) throw TypeError(".BI.FilePlan.cost: object expected"); message.cost = $root.BI.Cost.fromObject(object.cost, long + 1); } @@ -265666,9 +267176,9 @@ export const BI = $root.BI = (() => { object.id = 0; object.cost = null; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.cost != null && message.hasOwnProperty("cost")) + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) object.cost = $root.BI.Cost.toObject(message.cost, options, q + 1); return object; }; @@ -265810,7 +267320,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Cost.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -265892,10 +267402,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) if (typeof message.amount !== "number") return "amount: number expected"; - if (message.amountPer != null && message.hasOwnProperty("amountPer")) + if (message.amountPer != null && Object.hasOwnProperty.call(message, "amountPer")) switch (message.amountPer) { default: return "amountPer: enum value expected"; @@ -265910,7 +267420,7 @@ export const BI = $root.BI = (() => { case 8: break; } - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) switch (message.currency) { default: return "currency: enum value expected"; @@ -265923,7 +267433,7 @@ export const BI = $root.BI = (() => { case 6: break; } - if (message.contactSales != null && message.hasOwnProperty("contactSales")) + if (message.contactSales != null && Object.hasOwnProperty.call(message, "contactSales")) if (typeof message.contactSales !== "boolean") return "contactSales: boolean expected"; return null; @@ -265940,6 +267450,8 @@ export const BI = $root.BI = (() => { Cost.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.Cost) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.Cost: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -266055,13 +267567,13 @@ export const BI = $root.BI = (() => { object.currency = options.enums === String ? "UNKNOWN" : 0; object.contactSales = false; } - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) object.amount = options.json && !isFinite(message.amount) ? String(message.amount) : message.amount; - if (message.amountPer != null && message.hasOwnProperty("amountPer")) + if (message.amountPer != null && Object.hasOwnProperty.call(message, "amountPer")) object.amountPer = options.enums === String ? $root.BI.Cost.AmountPer[message.amountPer] === undefined ? message.amountPer : $root.BI.Cost.AmountPer[message.amountPer] : message.amountPer; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) object.currency = options.enums === String ? $root.BI.Currency[message.currency] === undefined ? message.currency : $root.BI.Currency[message.currency] : message.currency; - if (message.contactSales != null && message.hasOwnProperty("contactSales")) + if (message.contactSales != null && Object.hasOwnProperty.call(message, "contactSales")) object.contactSales = message.contactSales; return object; }; @@ -266220,7 +267732,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ InvoiceSearchRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -266298,13 +267810,13 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.size != null && message.hasOwnProperty("size")) + if (message.size != null && Object.hasOwnProperty.call(message, "size")) if (!$util.isInteger(message.size)) return "size: integer expected"; - if (message.startingAfterId != null && message.hasOwnProperty("startingAfterId")) + if (message.startingAfterId != null && Object.hasOwnProperty.call(message, "startingAfterId")) if (!$util.isInteger(message.startingAfterId)) return "startingAfterId: integer expected"; - if (message.allInvoicesUnfiltered != null && message.hasOwnProperty("allInvoicesUnfiltered")) + if (message.allInvoicesUnfiltered != null && Object.hasOwnProperty.call(message, "allInvoicesUnfiltered")) if (typeof message.allInvoicesUnfiltered !== "boolean") return "allInvoicesUnfiltered: boolean expected"; return null; @@ -266321,6 +267833,8 @@ export const BI = $root.BI = (() => { InvoiceSearchRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.InvoiceSearchRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.InvoiceSearchRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -266357,11 +267871,11 @@ export const BI = $root.BI = (() => { object.startingAfterId = 0; object.allInvoicesUnfiltered = false; } - if (message.size != null && message.hasOwnProperty("size")) + if (message.size != null && Object.hasOwnProperty.call(message, "size")) object.size = message.size; - if (message.startingAfterId != null && message.hasOwnProperty("startingAfterId")) + if (message.startingAfterId != null && Object.hasOwnProperty.call(message, "startingAfterId")) object.startingAfterId = message.startingAfterId; - if (message.allInvoicesUnfiltered != null && message.hasOwnProperty("allInvoicesUnfiltered")) + if (message.allInvoicesUnfiltered != null && Object.hasOwnProperty.call(message, "allInvoicesUnfiltered")) object.allInvoicesUnfiltered = message.allInvoicesUnfiltered; return object; }; @@ -266472,7 +267986,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ InvoiceSearchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -266544,7 +268058,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.invoices != null && message.hasOwnProperty("invoices")) { + if (message.invoices != null && Object.hasOwnProperty.call(message, "invoices")) { if (!Array.isArray(message.invoices)) return "invoices: array expected"; for (let i = 0; i < message.invoices.length; ++i) { @@ -266567,6 +268081,8 @@ export const BI = $root.BI = (() => { InvoiceSearchResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.InvoiceSearchResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.InvoiceSearchResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -266577,7 +268093,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.InvoiceSearchResponse.invoices: array expected"); message.invoices = []; for (let i = 0; i < object.invoices.length; ++i) { - if (typeof object.invoices[i] !== "object") + if (!$util.isObject(object.invoices[i])) throw TypeError(".BI.InvoiceSearchResponse.invoices: object expected"); message.invoices[i] = $root.BI.Invoice.fromObject(object.invoices[i], long + 1); } @@ -266771,7 +268287,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Invoice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -266861,24 +268377,24 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) if (!$util.isString(message.invoiceNumber)) return "invoiceNumber: string expected"; - if (message.invoiceDate != null && message.hasOwnProperty("invoiceDate")) + if (message.invoiceDate != null && Object.hasOwnProperty.call(message, "invoiceDate")) if (!$util.isInteger(message.invoiceDate) && !(message.invoiceDate && $util.isInteger(message.invoiceDate.low) && $util.isInteger(message.invoiceDate.high))) return "invoiceDate: integer|Long expected"; - if (message.licenseCount != null && message.hasOwnProperty("licenseCount")) + if (message.licenseCount != null && Object.hasOwnProperty.call(message, "licenseCount")) if (!$util.isInteger(message.licenseCount)) return "licenseCount: integer expected"; - if (message.totalCost != null && message.hasOwnProperty("totalCost")) { + if (message.totalCost != null && Object.hasOwnProperty.call(message, "totalCost")) { let error = $root.BI.Invoice.Cost.verify(message.totalCost, long + 1); if (error) return "totalCost." + error; } - if (message.invoiceType != null && message.hasOwnProperty("invoiceType")) + if (message.invoiceType != null && Object.hasOwnProperty.call(message, "invoiceType")) switch (message.invoiceType) { default: return "invoiceType: enum value expected"; @@ -266905,6 +268421,8 @@ export const BI = $root.BI = (() => { Invoice.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.Invoice) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.Invoice: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -266926,7 +268444,7 @@ export const BI = $root.BI = (() => { if (object.licenseCount != null) message.licenseCount = object.licenseCount | 0; if (object.totalCost != null) { - if (typeof object.totalCost !== "object") + if (!$util.isObject(object.totalCost)) throw TypeError(".BI.Invoice.totalCost: object expected"); message.totalCost = $root.BI.Invoice.Cost.fromObject(object.totalCost, long + 1); } @@ -266998,22 +268516,22 @@ export const BI = $root.BI = (() => { object.totalCost = null; object.invoiceType = options.enums === String ? "UNKNOWN" : 0; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) object.invoiceNumber = message.invoiceNumber; - if (message.invoiceDate != null && message.hasOwnProperty("invoiceDate")) + if (message.invoiceDate != null && Object.hasOwnProperty.call(message, "invoiceDate")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.invoiceDate = typeof message.invoiceDate === "number" ? BigInt(message.invoiceDate) : $util.Long.fromBits(message.invoiceDate.low >>> 0, message.invoiceDate.high >>> 0, false).toBigInt(); else if (typeof message.invoiceDate === "number") object.invoiceDate = options.longs === String ? String(message.invoiceDate) : message.invoiceDate; else object.invoiceDate = options.longs === String ? $util.Long.prototype.toString.call(message.invoiceDate) : options.longs === Number ? new $util.LongBits(message.invoiceDate.low >>> 0, message.invoiceDate.high >>> 0).toNumber() : message.invoiceDate; - if (message.licenseCount != null && message.hasOwnProperty("licenseCount")) + if (message.licenseCount != null && Object.hasOwnProperty.call(message, "licenseCount")) object.licenseCount = message.licenseCount; - if (message.totalCost != null && message.hasOwnProperty("totalCost")) + if (message.totalCost != null && Object.hasOwnProperty.call(message, "totalCost")) object.totalCost = $root.BI.Invoice.Cost.toObject(message.totalCost, options, q + 1); - if (message.invoiceType != null && message.hasOwnProperty("invoiceType")) + if (message.invoiceType != null && Object.hasOwnProperty.call(message, "invoiceType")) object.invoiceType = options.enums === String ? $root.BI.Invoice.Type[message.invoiceType] === undefined ? message.invoiceType : $root.BI.Invoice.Type[message.invoiceType] : message.invoiceType; return object; }; @@ -267130,7 +268648,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Cost.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -267204,10 +268722,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) if (typeof message.amount !== "number") return "amount: number expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) switch (message.currency) { default: return "currency: enum value expected"; @@ -267234,6 +268752,8 @@ export const BI = $root.BI = (() => { Cost.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.Invoice.Cost) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.Invoice.Cost: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -267301,9 +268821,9 @@ export const BI = $root.BI = (() => { object.amount = 0; object.currency = options.enums === String ? "UNKNOWN" : 0; } - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) object.amount = options.json && !isFinite(message.amount) ? String(message.amount) : message.amount; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) object.currency = options.enums === String ? $root.BI.Currency[message.currency] === undefined ? message.currency : $root.BI.Currency[message.currency] : message.currency; return object; }; @@ -267428,7 +268948,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ VaultInvoicesListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -267508,10 +269028,6 @@ export const BI = $root.BI = (() => { VaultInvoicesListRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.VaultInvoicesListRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.VaultInvoicesListRequest(); }; @@ -267634,7 +269150,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ VaultInvoicesListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -267706,7 +269222,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.invoices != null && message.hasOwnProperty("invoices")) { + if (message.invoices != null && Object.hasOwnProperty.call(message, "invoices")) { if (!Array.isArray(message.invoices)) return "invoices: array expected"; for (let i = 0; i < message.invoices.length; ++i) { @@ -267729,6 +269245,8 @@ export const BI = $root.BI = (() => { VaultInvoicesListResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.VaultInvoicesListResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.VaultInvoicesListResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -267739,7 +269257,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.VaultInvoicesListResponse.invoices: array expected"); message.invoices = []; for (let i = 0; i < object.invoices.length; ++i) { - if (typeof object.invoices[i] !== "object") + if (!$util.isObject(object.invoices[i])) throw TypeError(".BI.VaultInvoicesListResponse.invoices: object expected"); message.invoices[i] = $root.BI.VaultInvoice.fromObject(object.invoices[i], long + 1); } @@ -267922,7 +269440,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ VaultInvoice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -268008,21 +269526,21 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) if (!$util.isString(message.invoiceNumber)) return "invoiceNumber: string expected"; - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (!$util.isInteger(message.dateCreated) && !(message.dateCreated && $util.isInteger(message.dateCreated.low) && $util.isInteger(message.dateCreated.high))) return "dateCreated: integer|Long expected"; - if (message.total != null && message.hasOwnProperty("total")) { + if (message.total != null && Object.hasOwnProperty.call(message, "total")) { let error = $root.BI.Invoice.Cost.verify(message.total, long + 1); if (error) return "total." + error; } - if (message.purchaseType != null && message.hasOwnProperty("purchaseType")) + if (message.purchaseType != null && Object.hasOwnProperty.call(message, "purchaseType")) switch (message.purchaseType) { default: return "purchaseType: enum value expected"; @@ -268049,6 +269567,8 @@ export const BI = $root.BI = (() => { VaultInvoice.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.VaultInvoice) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.VaultInvoice: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -268068,7 +269588,7 @@ export const BI = $root.BI = (() => { else if (typeof object.dateCreated === "object") message.dateCreated = new $util.LongBits(object.dateCreated.low >>> 0, object.dateCreated.high >>> 0).toNumber(); if (object.total != null) { - if (typeof object.total !== "object") + if (!$util.isObject(object.total)) throw TypeError(".BI.VaultInvoice.total: object expected"); message.total = $root.BI.Invoice.Cost.fromObject(object.total, long + 1); } @@ -268139,20 +269659,20 @@ export const BI = $root.BI = (() => { object.total = null; object.purchaseType = options.enums === String ? "UNKNOWN" : 0; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) object.invoiceNumber = message.invoiceNumber; - if (message.dateCreated != null && message.hasOwnProperty("dateCreated")) + if (message.dateCreated != null && Object.hasOwnProperty.call(message, "dateCreated")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.dateCreated = typeof message.dateCreated === "number" ? BigInt(message.dateCreated) : $util.Long.fromBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0, false).toBigInt(); else if (typeof message.dateCreated === "number") object.dateCreated = options.longs === String ? String(message.dateCreated) : message.dateCreated; else object.dateCreated = options.longs === String ? $util.Long.prototype.toString.call(message.dateCreated) : options.longs === Number ? new $util.LongBits(message.dateCreated.low >>> 0, message.dateCreated.high >>> 0).toNumber() : message.dateCreated; - if (message.total != null && message.hasOwnProperty("total")) + if (message.total != null && Object.hasOwnProperty.call(message, "total")) object.total = $root.BI.Invoice.Cost.toObject(message.total, options, q + 1); - if (message.purchaseType != null && message.hasOwnProperty("purchaseType")) + if (message.purchaseType != null && Object.hasOwnProperty.call(message, "purchaseType")) object.purchaseType = options.enums === String ? $root.BI.Invoice.Type[message.purchaseType] === undefined ? message.purchaseType : $root.BI.Invoice.Type[message.purchaseType] : message.purchaseType; return object; }; @@ -268261,7 +269781,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ InvoiceDownloadRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -268331,7 +269851,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) if (!$util.isString(message.invoiceNumber)) return "invoiceNumber: string expected"; return null; @@ -268348,6 +269868,8 @@ export const BI = $root.BI = (() => { InvoiceDownloadRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.InvoiceDownloadRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.InvoiceDownloadRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -268377,7 +269899,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.invoiceNumber = ""; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) object.invoiceNumber = message.invoiceNumber; return object; }; @@ -268497,7 +270019,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ InvoiceDownloadResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -268571,10 +270093,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.link != null && message.hasOwnProperty("link")) + if (message.link != null && Object.hasOwnProperty.call(message, "link")) if (!$util.isString(message.link)) return "link: string expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) if (!$util.isString(message.fileName)) return "fileName: string expected"; return null; @@ -268591,6 +270113,8 @@ export const BI = $root.BI = (() => { InvoiceDownloadResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.InvoiceDownloadResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.InvoiceDownloadResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -268624,9 +270148,9 @@ export const BI = $root.BI = (() => { object.link = ""; object.fileName = ""; } - if (message.link != null && message.hasOwnProperty("link")) + if (message.link != null && Object.hasOwnProperty.call(message, "link")) object.link = message.link; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) object.fileName = message.fileName; return object; }; @@ -268735,7 +270259,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ VaultInvoiceDownloadLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -268805,7 +270329,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) if (!$util.isString(message.invoiceNumber)) return "invoiceNumber: string expected"; return null; @@ -268822,6 +270346,8 @@ export const BI = $root.BI = (() => { VaultInvoiceDownloadLinkRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.VaultInvoiceDownloadLinkRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.VaultInvoiceDownloadLinkRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -268851,7 +270377,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.invoiceNumber = ""; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) object.invoiceNumber = message.invoiceNumber; return object; }; @@ -268971,7 +270497,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ VaultInvoiceDownloadLinkResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -269045,10 +270571,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.link != null && message.hasOwnProperty("link")) + if (message.link != null && Object.hasOwnProperty.call(message, "link")) if (!$util.isString(message.link)) return "link: string expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) if (!$util.isString(message.fileName)) return "fileName: string expected"; return null; @@ -269065,6 +270591,8 @@ export const BI = $root.BI = (() => { VaultInvoiceDownloadLinkResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.VaultInvoiceDownloadLinkResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.VaultInvoiceDownloadLinkResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -269098,9 +270626,9 @@ export const BI = $root.BI = (() => { object.link = ""; object.fileName = ""; } - if (message.link != null && message.hasOwnProperty("link")) + if (message.link != null && Object.hasOwnProperty.call(message, "link")) object.link = message.link; - if (message.fileName != null && message.hasOwnProperty("fileName")) + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) object.fileName = message.fileName; return object; }; @@ -269220,7 +270748,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ ReportingDailySnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -269294,10 +270822,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.month != null && message.hasOwnProperty("month")) + if (message.month != null && Object.hasOwnProperty.call(message, "month")) if (!$util.isInteger(message.month)) return "month: integer expected"; - if (message.year != null && message.hasOwnProperty("year")) + if (message.year != null && Object.hasOwnProperty.call(message, "year")) if (!$util.isInteger(message.year)) return "year: integer expected"; return null; @@ -269314,6 +270842,8 @@ export const BI = $root.BI = (() => { ReportingDailySnapshotRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.ReportingDailySnapshotRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.ReportingDailySnapshotRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -269347,9 +270877,9 @@ export const BI = $root.BI = (() => { object.month = 0; object.year = 0; } - if (message.month != null && message.hasOwnProperty("month")) + if (message.month != null && Object.hasOwnProperty.call(message, "month")) object.month = message.month; - if (message.year != null && message.hasOwnProperty("year")) + if (message.year != null && Object.hasOwnProperty.call(message, "year")) object.year = message.year; return object; }; @@ -269473,7 +271003,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ ReportingDailySnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -269551,7 +271081,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -269560,7 +271090,7 @@ export const BI = $root.BI = (() => { return "records." + error; } } - if (message.mcEnterprises != null && message.hasOwnProperty("mcEnterprises")) { + if (message.mcEnterprises != null && Object.hasOwnProperty.call(message, "mcEnterprises")) { if (!Array.isArray(message.mcEnterprises)) return "mcEnterprises: array expected"; for (let i = 0; i < message.mcEnterprises.length; ++i) { @@ -269583,6 +271113,8 @@ export const BI = $root.BI = (() => { ReportingDailySnapshotResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.ReportingDailySnapshotResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.ReportingDailySnapshotResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -269593,7 +271125,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.ReportingDailySnapshotResponse.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".BI.ReportingDailySnapshotResponse.records: object expected"); message.records[i] = $root.BI.SnapshotRecord.fromObject(object.records[i], long + 1); } @@ -269603,7 +271135,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.ReportingDailySnapshotResponse.mcEnterprises: array expected"); message.mcEnterprises = []; for (let i = 0; i < object.mcEnterprises.length; ++i) { - if (typeof object.mcEnterprises[i] !== "object") + if (!$util.isObject(object.mcEnterprises[i])) throw TypeError(".BI.ReportingDailySnapshotResponse.mcEnterprises: object expected"); message.mcEnterprises[i] = $root.BI.SnapshotMcEnterprise.fromObject(object.mcEnterprises[i], long + 1); } @@ -269806,7 +271338,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SnapshotRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -269898,22 +271430,22 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.date != null && message.hasOwnProperty("date")) + if (message.date != null && Object.hasOwnProperty.call(message, "date")) if (!$util.isInteger(message.date) && !(message.date && $util.isInteger(message.date.low) && $util.isInteger(message.date.high))) return "date: integer|Long expected"; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; - if (message.maxLicenseCount != null && message.hasOwnProperty("maxLicenseCount")) + if (message.maxLicenseCount != null && Object.hasOwnProperty.call(message, "maxLicenseCount")) if (!$util.isInteger(message.maxLicenseCount)) return "maxLicenseCount: integer expected"; - if (message.maxFilePlanTypeId != null && message.hasOwnProperty("maxFilePlanTypeId")) + if (message.maxFilePlanTypeId != null && Object.hasOwnProperty.call(message, "maxFilePlanTypeId")) if (!$util.isInteger(message.maxFilePlanTypeId)) return "maxFilePlanTypeId: integer expected"; - if (message.maxBasePlanId != null && message.hasOwnProperty("maxBasePlanId")) + if (message.maxBasePlanId != null && Object.hasOwnProperty.call(message, "maxBasePlanId")) if (!$util.isInteger(message.maxBasePlanId)) return "maxBasePlanId: integer expected"; - if (message.addons != null && message.hasOwnProperty("addons")) { + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) { if (!Array.isArray(message.addons)) return "addons: array expected"; for (let i = 0; i < message.addons.length; ++i) { @@ -269936,6 +271468,8 @@ export const BI = $root.BI = (() => { SnapshotRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SnapshotRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SnapshotRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -269963,7 +271497,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SnapshotRecord.addons: array expected"); message.addons = []; for (let i = 0; i < object.addons.length; ++i) { - if (typeof object.addons[i] !== "object") + if (!$util.isObject(object.addons[i])) throw TypeError(".BI.SnapshotRecord.addons: object expected"); message.addons[i] = $root.BI.SnapshotRecord.Addon.fromObject(object.addons[i], long + 1); } @@ -270001,20 +271535,20 @@ export const BI = $root.BI = (() => { object.maxFilePlanTypeId = 0; object.maxBasePlanId = 0; } - if (message.date != null && message.hasOwnProperty("date")) + if (message.date != null && Object.hasOwnProperty.call(message, "date")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.date = typeof message.date === "number" ? BigInt(message.date) : $util.Long.fromBits(message.date.low >>> 0, message.date.high >>> 0, false).toBigInt(); else if (typeof message.date === "number") object.date = options.longs === String ? String(message.date) : message.date; else object.date = options.longs === String ? $util.Long.prototype.toString.call(message.date) : options.longs === Number ? new $util.LongBits(message.date.low >>> 0, message.date.high >>> 0).toNumber() : message.date; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; - if (message.maxLicenseCount != null && message.hasOwnProperty("maxLicenseCount")) + if (message.maxLicenseCount != null && Object.hasOwnProperty.call(message, "maxLicenseCount")) object.maxLicenseCount = message.maxLicenseCount; - if (message.maxFilePlanTypeId != null && message.hasOwnProperty("maxFilePlanTypeId")) + if (message.maxFilePlanTypeId != null && Object.hasOwnProperty.call(message, "maxFilePlanTypeId")) object.maxFilePlanTypeId = message.maxFilePlanTypeId; - if (message.maxBasePlanId != null && message.hasOwnProperty("maxBasePlanId")) + if (message.maxBasePlanId != null && Object.hasOwnProperty.call(message, "maxBasePlanId")) object.maxBasePlanId = message.maxBasePlanId; if (message.addons && message.addons.length) { object.addons = []; @@ -270136,7 +271670,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Addon.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -270210,10 +271744,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.maxAddonId != null && message.hasOwnProperty("maxAddonId")) + if (message.maxAddonId != null && Object.hasOwnProperty.call(message, "maxAddonId")) if (!$util.isInteger(message.maxAddonId)) return "maxAddonId: integer expected"; - if (message.units != null && message.hasOwnProperty("units")) + if (message.units != null && Object.hasOwnProperty.call(message, "units")) if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) return "units: integer|Long expected"; return null; @@ -270230,6 +271764,8 @@ export const BI = $root.BI = (() => { Addon.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SnapshotRecord.Addon) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SnapshotRecord.Addon: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -270274,9 +271810,9 @@ export const BI = $root.BI = (() => { } else object.units = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.maxAddonId != null && message.hasOwnProperty("maxAddonId")) + if (message.maxAddonId != null && Object.hasOwnProperty.call(message, "maxAddonId")) object.maxAddonId = message.maxAddonId; - if (message.units != null && message.hasOwnProperty("units")) + if (message.units != null && Object.hasOwnProperty.call(message, "units")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.units = typeof message.units === "number" ? BigInt(message.units) : $util.Long.fromBits(message.units.low >>> 0, message.units.high >>> 0, false).toBigInt(); else if (typeof message.units === "number") @@ -270404,7 +271940,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SnapshotMcEnterprise.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -270478,10 +272014,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -270498,6 +272034,8 @@ export const BI = $root.BI = (() => { SnapshotMcEnterprise.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SnapshotMcEnterprise) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SnapshotMcEnterprise: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -270531,9 +272069,9 @@ export const BI = $root.BI = (() => { object.id = 0; object.name = ""; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -270631,7 +272169,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ MappingAddonsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -270711,10 +272249,6 @@ export const BI = $root.BI = (() => { MappingAddonsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.MappingAddonsRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.MappingAddonsRequest(); }; @@ -270850,7 +272384,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ MappingAddonsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -270928,7 +272462,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.addons != null && message.hasOwnProperty("addons")) { + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) { if (!Array.isArray(message.addons)) return "addons: array expected"; for (let i = 0; i < message.addons.length; ++i) { @@ -270937,7 +272471,7 @@ export const BI = $root.BI = (() => { return "addons." + error; } } - if (message.filePlans != null && message.hasOwnProperty("filePlans")) { + if (message.filePlans != null && Object.hasOwnProperty.call(message, "filePlans")) { if (!Array.isArray(message.filePlans)) return "filePlans: array expected"; for (let i = 0; i < message.filePlans.length; ++i) { @@ -270960,6 +272494,8 @@ export const BI = $root.BI = (() => { MappingAddonsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.MappingAddonsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.MappingAddonsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -270970,7 +272506,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.MappingAddonsResponse.addons: array expected"); message.addons = []; for (let i = 0; i < object.addons.length; ++i) { - if (typeof object.addons[i] !== "object") + if (!$util.isObject(object.addons[i])) throw TypeError(".BI.MappingAddonsResponse.addons: object expected"); message.addons[i] = $root.BI.MappingItem.fromObject(object.addons[i], long + 1); } @@ -270980,7 +272516,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.MappingAddonsResponse.filePlans: array expected"); message.filePlans = []; for (let i = 0; i < object.filePlans.length; ++i) { - if (typeof object.filePlans[i] !== "object") + if (!$util.isObject(object.filePlans[i])) throw TypeError(".BI.MappingAddonsResponse.filePlans: object expected"); message.filePlans[i] = $root.BI.MappingItem.fromObject(object.filePlans[i], long + 1); } @@ -271137,7 +272673,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ MappingItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -271211,10 +272747,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -271231,6 +272767,8 @@ export const BI = $root.BI = (() => { MappingItem.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.MappingItem) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.MappingItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -271264,9 +272802,9 @@ export const BI = $root.BI = (() => { object.id = 0; object.name = ""; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -271375,7 +272913,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientValidateKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -271445,7 +272983,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.gradientKey != null && message.hasOwnProperty("gradientKey")) + if (message.gradientKey != null && Object.hasOwnProperty.call(message, "gradientKey")) if (!$util.isString(message.gradientKey)) return "gradientKey: string expected"; return null; @@ -271462,6 +273000,8 @@ export const BI = $root.BI = (() => { GradientValidateKeyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientValidateKeyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientValidateKeyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -271491,7 +273031,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.gradientKey = ""; - if (message.gradientKey != null && message.hasOwnProperty("gradientKey")) + if (message.gradientKey != null && Object.hasOwnProperty.call(message, "gradientKey")) object.gradientKey = message.gradientKey; return object; }; @@ -271611,7 +273151,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientValidateKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -271685,10 +273225,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -271705,6 +273245,8 @@ export const BI = $root.BI = (() => { GradientValidateKeyResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientValidateKeyResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientValidateKeyResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -271738,9 +273280,9 @@ export const BI = $root.BI = (() => { object.success = false; object.message = ""; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -271860,7 +273402,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientSaveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -271934,10 +273476,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.gradientKey != null && message.hasOwnProperty("gradientKey")) + if (message.gradientKey != null && Object.hasOwnProperty.call(message, "gradientKey")) if (!$util.isString(message.gradientKey)) return "gradientKey: string expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -271954,6 +273496,8 @@ export const BI = $root.BI = (() => { GradientSaveRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientSaveRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientSaveRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -271998,9 +273542,9 @@ export const BI = $root.BI = (() => { } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.gradientKey != null && message.hasOwnProperty("gradientKey")) + if (message.gradientKey != null && Object.hasOwnProperty.call(message, "gradientKey")) object.gradientKey = message.gradientKey; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -272136,7 +273680,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientSaveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -272214,10 +273758,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -272227,7 +273771,7 @@ export const BI = $root.BI = (() => { case 3: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -272244,6 +273788,8 @@ export const BI = $root.BI = (() => { GradientSaveResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientSaveResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientSaveResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -272302,11 +273848,11 @@ export const BI = $root.BI = (() => { object.status = options.enums === String ? "NOTCONNECTED" : 0; object.message = ""; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.BI.GradientIntegrationStatus[message.status] === undefined ? message.status : $root.BI.GradientIntegrationStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -272415,7 +273961,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientRemoveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -272485,7 +274031,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -272502,6 +274048,8 @@ export const BI = $root.BI = (() => { GradientRemoveRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientRemoveRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientRemoveRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -272542,7 +274090,7 @@ export const BI = $root.BI = (() => { object.enterpriseUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -272667,7 +274215,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientRemoveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -272741,10 +274289,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -272761,6 +274309,8 @@ export const BI = $root.BI = (() => { GradientRemoveResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientRemoveResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientRemoveResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -272794,9 +274344,9 @@ export const BI = $root.BI = (() => { object.success = false; object.message = ""; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -272905,7 +274455,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientSyncRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -272975,7 +274525,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -272992,6 +274542,8 @@ export const BI = $root.BI = (() => { GradientSyncRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientSyncRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientSyncRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -273032,7 +274584,7 @@ export const BI = $root.BI = (() => { object.enterpriseUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -273168,7 +274720,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ GradientSyncResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -273246,10 +274798,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -273259,7 +274811,7 @@ export const BI = $root.BI = (() => { case 3: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -273276,6 +274828,8 @@ export const BI = $root.BI = (() => { GradientSyncResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.GradientSyncResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.GradientSyncResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -273334,11 +274888,11 @@ export const BI = $root.BI = (() => { object.status = options.enums === String ? "NOTCONNECTED" : 0; object.message = ""; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.BI.GradientIntegrationStatus[message.status] === undefined ? message.status : $root.BI.GradientIntegrationStatus[message.status] : message.status; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -273476,7 +275030,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NetPromoterScoreSurveySubmissionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -273550,10 +275104,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.surveyScore != null && message.hasOwnProperty("surveyScore")) + if (message.surveyScore != null && Object.hasOwnProperty.call(message, "surveyScore")) if (!$util.isInteger(message.surveyScore)) return "surveyScore: integer expected"; - if (message.notes != null && message.hasOwnProperty("notes")) + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) if (!$util.isString(message.notes)) return "notes: string expected"; return null; @@ -273570,6 +275124,8 @@ export const BI = $root.BI = (() => { NetPromoterScoreSurveySubmissionRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NetPromoterScoreSurveySubmissionRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NetPromoterScoreSurveySubmissionRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -273603,9 +275159,9 @@ export const BI = $root.BI = (() => { object.surveyScore = 0; object.notes = ""; } - if (message.surveyScore != null && message.hasOwnProperty("surveyScore")) + if (message.surveyScore != null && Object.hasOwnProperty.call(message, "surveyScore")) object.surveyScore = message.surveyScore; - if (message.notes != null && message.hasOwnProperty("notes")) + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) object.notes = message.notes; return object; }; @@ -273703,7 +275259,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NetPromoterScoreSurveySubmissionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -273783,10 +275339,6 @@ export const BI = $root.BI = (() => { NetPromoterScoreSurveySubmissionResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NetPromoterScoreSurveySubmissionResponse) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.NetPromoterScoreSurveySubmissionResponse(); }; @@ -273896,7 +275448,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NetPromoterScorePopupScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -273976,10 +275528,6 @@ export const BI = $root.BI = (() => { NetPromoterScorePopupScheduleRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NetPromoterScorePopupScheduleRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.NetPromoterScorePopupScheduleRequest(); }; @@ -274100,7 +275648,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NetPromoterScorePopupScheduleResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -274170,7 +275718,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.showPopup != null && message.hasOwnProperty("showPopup")) + if (message.showPopup != null && Object.hasOwnProperty.call(message, "showPopup")) if (typeof message.showPopup !== "boolean") return "showPopup: boolean expected"; return null; @@ -274187,6 +275735,8 @@ export const BI = $root.BI = (() => { NetPromoterScorePopupScheduleResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NetPromoterScorePopupScheduleResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NetPromoterScorePopupScheduleResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -274216,7 +275766,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.showPopup = false; - if (message.showPopup != null && message.hasOwnProperty("showPopup")) + if (message.showPopup != null && Object.hasOwnProperty.call(message, "showPopup")) object.showPopup = message.showPopup; return object; }; @@ -274314,7 +275864,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NetPromoterScorePopupDismissalRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -274394,10 +275944,6 @@ export const BI = $root.BI = (() => { NetPromoterScorePopupDismissalRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NetPromoterScorePopupDismissalRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.NetPromoterScorePopupDismissalRequest(); }; @@ -274507,7 +276053,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NetPromoterScorePopupDismissalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -274587,10 +276133,6 @@ export const BI = $root.BI = (() => { NetPromoterScorePopupDismissalResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NetPromoterScorePopupDismissalResponse) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.NetPromoterScorePopupDismissalResponse(); }; @@ -274711,7 +276253,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ KCMLicenseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -274781,7 +276323,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -274798,6 +276340,8 @@ export const BI = $root.BI = (() => { KCMLicenseRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.KCMLicenseRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.KCMLicenseRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -274838,7 +276382,7 @@ export const BI = $root.BI = (() => { object.enterpriseUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -274952,7 +276496,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ KCMLicenseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -275022,7 +276566,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -275039,6 +276583,8 @@ export const BI = $root.BI = (() => { KCMLicenseResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.KCMLicenseResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.KCMLicenseResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -275068,7 +276614,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -275236,7 +276782,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ EventRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -275318,7 +276864,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.eventType != null && message.hasOwnProperty("eventType")) + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) switch (message.eventType) { default: return "eventType: enum value expected"; @@ -275332,13 +276878,13 @@ export const BI = $root.BI = (() => { case 7: break; } - if (message.eventValue != null && message.hasOwnProperty("eventValue")) + if (message.eventValue != null && Object.hasOwnProperty.call(message, "eventValue")) if (!$util.isString(message.eventValue)) return "eventValue: string expected"; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) if (!$util.isInteger(message.eventTime) && !(message.eventTime && $util.isInteger(message.eventTime.low) && $util.isInteger(message.eventTime.high))) return "eventTime: integer|Long expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) { let error = $root.google.protobuf.Struct.verify(message.attributes, long + 1); if (error) return "attributes." + error; @@ -275357,6 +276903,8 @@ export const BI = $root.BI = (() => { EventRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.EventRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.EventRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -275414,7 +276962,7 @@ export const BI = $root.BI = (() => { else if (typeof object.eventTime === "object") message.eventTime = new $util.LongBits(object.eventTime.low >>> 0, object.eventTime.high >>> 0).toNumber(); if (object.attributes != null) { - if (typeof object.attributes !== "object") + if (!$util.isObject(object.attributes)) throw TypeError(".BI.EventRequest.attributes: object expected"); message.attributes = $root.google.protobuf.Struct.fromObject(object.attributes, long + 1); } @@ -275448,18 +276996,18 @@ export const BI = $root.BI = (() => { object.eventTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.attributes = null; } - if (message.eventType != null && message.hasOwnProperty("eventType")) + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) object.eventType = options.enums === String ? $root.BI.EventType[message.eventType] === undefined ? message.eventType : $root.BI.EventType[message.eventType] : message.eventType; - if (message.eventValue != null && message.hasOwnProperty("eventValue")) + if (message.eventValue != null && Object.hasOwnProperty.call(message, "eventValue")) object.eventValue = message.eventValue; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.eventTime = typeof message.eventTime === "number" ? BigInt(message.eventTime) : $util.Long.fromBits(message.eventTime.low >>> 0, message.eventTime.high >>> 0, false).toBigInt(); else if (typeof message.eventTime === "number") object.eventTime = options.longs === String ? String(message.eventTime) : message.eventTime; else object.eventTime = options.longs === String ? $util.Long.prototype.toString.call(message.eventTime) : options.longs === Number ? new $util.LongBits(message.eventTime.low >>> 0, message.eventTime.high >>> 0).toNumber() : message.eventTime; - if (message.attributes != null && message.hasOwnProperty("attributes")) + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) object.attributes = $root.google.protobuf.Struct.toObject(message.attributes, options, q + 1); return object; }; @@ -275570,7 +277118,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ EventsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -275642,7 +277190,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.event != null && message.hasOwnProperty("event")) { + if (message.event != null && Object.hasOwnProperty.call(message, "event")) { if (!Array.isArray(message.event)) return "event: array expected"; for (let i = 0; i < message.event.length; ++i) { @@ -275665,6 +277213,8 @@ export const BI = $root.BI = (() => { EventsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.EventsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.EventsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -275675,7 +277225,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.EventsRequest.event: array expected"); message.event = []; for (let i = 0; i < object.event.length; ++i) { - if (typeof object.event[i] !== "object") + if (!$util.isObject(object.event[i])) throw TypeError(".BI.EventsRequest.event: object expected"); message.event[i] = $root.BI.EventRequest.fromObject(object.event[i], long + 1); } @@ -275825,7 +277375,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ EventResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -275899,10 +277449,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && Object.hasOwnProperty.call(message, "index")) if (!$util.isInteger(message.index)) return "index: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) if (typeof message.status !== "boolean") return "status: boolean expected"; return null; @@ -275919,6 +277469,8 @@ export const BI = $root.BI = (() => { EventResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.EventResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.EventResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -275952,9 +277504,9 @@ export const BI = $root.BI = (() => { object.index = 0; object.status = false; } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && Object.hasOwnProperty.call(message, "index")) object.index = message.index; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = message.status; return object; }; @@ -276065,7 +277617,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ EventsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -276137,7 +277689,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.response != null && message.hasOwnProperty("response")) { + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { if (!Array.isArray(message.response)) return "response: array expected"; for (let i = 0; i < message.response.length; ++i) { @@ -276160,6 +277712,8 @@ export const BI = $root.BI = (() => { EventsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.EventsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.EventsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -276170,7 +277724,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.EventsResponse.response: array expected"); message.response = []; for (let i = 0; i < object.response.length; ++i) { - if (typeof object.response[i] !== "object") + if (!$util.isObject(object.response[i])) throw TypeError(".BI.EventsResponse.response: object expected"); message.response[i] = $root.BI.EventResponse.fromObject(object.response[i], long + 1); } @@ -276397,7 +277951,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ CustomerCaptureRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -276499,31 +278053,31 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.pageUrl != null && message.hasOwnProperty("pageUrl")) + if (message.pageUrl != null && Object.hasOwnProperty.call(message, "pageUrl")) if (!$util.isString(message.pageUrl)) return "pageUrl: string expected"; - if (message.tree != null && message.hasOwnProperty("tree")) + if (message.tree != null && Object.hasOwnProperty.call(message, "tree")) if (!$util.isString(message.tree)) return "tree: string expected"; - if (message.hash != null && message.hasOwnProperty("hash")) + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) if (!$util.isString(message.hash)) return "hash: string expected"; - if (message.image != null && message.hasOwnProperty("image")) + if (message.image != null && Object.hasOwnProperty.call(message, "image")) if (!$util.isString(message.image)) return "image: string expected"; - if (message.pageLoadTime != null && message.hasOwnProperty("pageLoadTime")) + if (message.pageLoadTime != null && Object.hasOwnProperty.call(message, "pageLoadTime")) if (!$util.isString(message.pageLoadTime)) return "pageLoadTime: string expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) if (!$util.isString(message.keyId)) return "keyId: string expected"; - if (message.test != null && message.hasOwnProperty("test")) + if (message.test != null && Object.hasOwnProperty.call(message, "test")) if (typeof message.test !== "boolean") return "test: boolean expected"; - if (message.issueType != null && message.hasOwnProperty("issueType")) + if (message.issueType != null && Object.hasOwnProperty.call(message, "issueType")) if (!$util.isString(message.issueType)) return "issueType: string expected"; - if (message.notes != null && message.hasOwnProperty("notes")) + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) if (!$util.isString(message.notes)) return "notes: string expected"; return null; @@ -276540,6 +278094,8 @@ export const BI = $root.BI = (() => { CustomerCaptureRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.CustomerCaptureRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.CustomerCaptureRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -276594,23 +278150,23 @@ export const BI = $root.BI = (() => { object.issueType = ""; object.notes = ""; } - if (message.pageUrl != null && message.hasOwnProperty("pageUrl")) + if (message.pageUrl != null && Object.hasOwnProperty.call(message, "pageUrl")) object.pageUrl = message.pageUrl; - if (message.tree != null && message.hasOwnProperty("tree")) + if (message.tree != null && Object.hasOwnProperty.call(message, "tree")) object.tree = message.tree; - if (message.hash != null && message.hasOwnProperty("hash")) + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) object.hash = message.hash; - if (message.image != null && message.hasOwnProperty("image")) + if (message.image != null && Object.hasOwnProperty.call(message, "image")) object.image = message.image; - if (message.pageLoadTime != null && message.hasOwnProperty("pageLoadTime")) + if (message.pageLoadTime != null && Object.hasOwnProperty.call(message, "pageLoadTime")) object.pageLoadTime = message.pageLoadTime; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) object.keyId = message.keyId; - if (message.test != null && message.hasOwnProperty("test")) + if (message.test != null && Object.hasOwnProperty.call(message, "test")) object.test = message.test; - if (message.issueType != null && message.hasOwnProperty("issueType")) + if (message.issueType != null && Object.hasOwnProperty.call(message, "issueType")) object.issueType = message.issueType; - if (message.notes != null && message.hasOwnProperty("notes")) + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) object.notes = message.notes; return object; }; @@ -276708,7 +278264,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ CustomerCaptureResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -276788,10 +278344,6 @@ export const BI = $root.BI = (() => { CustomerCaptureResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.CustomerCaptureResponse) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.CustomerCaptureResponse(); }; @@ -276970,7 +278522,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ Error.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -277069,13 +278621,13 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.extras != null && message.hasOwnProperty("extras")) { + if (message.extras != null && Object.hasOwnProperty.call(message, "extras")) { if (!$util.isObject(message.extras)) return "extras: object expected"; let key = Object.keys(message.extras); @@ -277097,6 +278649,8 @@ export const BI = $root.BI = (() => { Error.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.Error) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.Error: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -277107,7 +278661,7 @@ export const BI = $root.BI = (() => { if (object.message != null) message.message = String(object.message); if (object.extras) { - if (typeof object.extras !== "object") + if (!$util.isObject(object.extras)) throw TypeError(".BI.Error.extras: object expected"); message.extras = {}; for (let keys = Object.keys(object.extras), i = 0; i < keys.length; ++i) { @@ -277142,9 +278696,9 @@ export const BI = $root.BI = (() => { object.code = ""; object.message = ""; } - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; let keys2; if (message.extras && (keys2 = Object.keys(message.extras)).length) { @@ -277317,7 +278871,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ QuotePurchase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -277407,22 +278961,22 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.quoteTotal != null && message.hasOwnProperty("quoteTotal")) + if (message.quoteTotal != null && Object.hasOwnProperty.call(message, "quoteTotal")) if (typeof message.quoteTotal !== "number") return "quoteTotal: number expected"; - if (message.includedTax != null && message.hasOwnProperty("includedTax")) + if (message.includedTax != null && Object.hasOwnProperty.call(message, "includedTax")) if (typeof message.includedTax !== "boolean") return "includedTax: boolean expected"; - if (message.includedOtherAddons != null && message.hasOwnProperty("includedOtherAddons")) + if (message.includedOtherAddons != null && Object.hasOwnProperty.call(message, "includedOtherAddons")) if (typeof message.includedOtherAddons !== "boolean") return "includedOtherAddons: boolean expected"; - if (message.taxAmount != null && message.hasOwnProperty("taxAmount")) + if (message.taxAmount != null && Object.hasOwnProperty.call(message, "taxAmount")) if (typeof message.taxAmount !== "number") return "taxAmount: number expected"; - if (message.taxLabel != null && message.hasOwnProperty("taxLabel")) + if (message.taxLabel != null && Object.hasOwnProperty.call(message, "taxLabel")) if (!$util.isString(message.taxLabel)) return "taxLabel: string expected"; - if (message.purchaseIdentifier != null && message.hasOwnProperty("purchaseIdentifier")) + if (message.purchaseIdentifier != null && Object.hasOwnProperty.call(message, "purchaseIdentifier")) if (!$util.isString(message.purchaseIdentifier)) return "purchaseIdentifier: string expected"; return null; @@ -277439,6 +278993,8 @@ export const BI = $root.BI = (() => { QuotePurchase.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.QuotePurchase) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.QuotePurchase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -277484,17 +279040,17 @@ export const BI = $root.BI = (() => { object.taxLabel = ""; object.purchaseIdentifier = ""; } - if (message.quoteTotal != null && message.hasOwnProperty("quoteTotal")) + if (message.quoteTotal != null && Object.hasOwnProperty.call(message, "quoteTotal")) object.quoteTotal = options.json && !isFinite(message.quoteTotal) ? String(message.quoteTotal) : message.quoteTotal; - if (message.includedTax != null && message.hasOwnProperty("includedTax")) + if (message.includedTax != null && Object.hasOwnProperty.call(message, "includedTax")) object.includedTax = message.includedTax; - if (message.includedOtherAddons != null && message.hasOwnProperty("includedOtherAddons")) + if (message.includedOtherAddons != null && Object.hasOwnProperty.call(message, "includedOtherAddons")) object.includedOtherAddons = message.includedOtherAddons; - if (message.taxAmount != null && message.hasOwnProperty("taxAmount")) + if (message.taxAmount != null && Object.hasOwnProperty.call(message, "taxAmount")) object.taxAmount = options.json && !isFinite(message.taxAmount) ? String(message.taxAmount) : message.taxAmount; - if (message.taxLabel != null && message.hasOwnProperty("taxLabel")) + if (message.taxLabel != null && Object.hasOwnProperty.call(message, "taxLabel")) object.taxLabel = message.taxLabel; - if (message.purchaseIdentifier != null && message.hasOwnProperty("purchaseIdentifier")) + if (message.purchaseIdentifier != null && Object.hasOwnProperty.call(message, "purchaseIdentifier")) object.purchaseIdentifier = message.purchaseIdentifier; return object; }; @@ -277629,7 +279185,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ PurchaseOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -277704,12 +279260,12 @@ export const BI = $root.BI = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.inConsole != null && message.hasOwnProperty("inConsole")) { + if (message.inConsole != null && Object.hasOwnProperty.call(message, "inConsole")) { properties._inConsole = 1; if (typeof message.inConsole !== "boolean") return "inConsole: boolean expected"; } - if (message.externalCheckout != null && message.hasOwnProperty("externalCheckout")) { + if (message.externalCheckout != null && Object.hasOwnProperty.call(message, "externalCheckout")) { properties._externalCheckout = 1; if (typeof message.externalCheckout !== "boolean") return "externalCheckout: boolean expected"; @@ -277728,6 +279284,8 @@ export const BI = $root.BI = (() => { PurchaseOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.PurchaseOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.PurchaseOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -277757,12 +279315,12 @@ export const BI = $root.BI = (() => { if (q > $util.recursionLimit) throw Error("max depth exceeded"); let object = {}; - if (message.inConsole != null && message.hasOwnProperty("inConsole")) { + if (message.inConsole != null && Object.hasOwnProperty.call(message, "inConsole")) { object.inConsole = message.inConsole; if (options.oneofs) object._inConsole = "inConsole"; } - if (message.externalCheckout != null && message.hasOwnProperty("externalCheckout")) { + if (message.externalCheckout != null && Object.hasOwnProperty.call(message, "externalCheckout")) { object.externalCheckout = message.externalCheckout; if (options.oneofs) object._externalCheckout = "externalCheckout"; @@ -278087,7 +279645,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ AddonPurchaseOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -278206,7 +279764,7 @@ export const BI = $root.BI = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.storage != null && message.hasOwnProperty("storage")) { + if (message.storage != null && Object.hasOwnProperty.call(message, "storage")) { properties._storage = 1; { let error = $root.BI.PurchaseOptions.verify(message.storage, long + 1); @@ -278214,7 +279772,7 @@ export const BI = $root.BI = (() => { return "storage." + error; } } - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { properties._audit = 1; { let error = $root.BI.PurchaseOptions.verify(message.audit, long + 1); @@ -278222,7 +279780,7 @@ export const BI = $root.BI = (() => { return "audit." + error; } } - if (message.breachwatch != null && message.hasOwnProperty("breachwatch")) { + if (message.breachwatch != null && Object.hasOwnProperty.call(message, "breachwatch")) { properties._breachwatch = 1; { let error = $root.BI.PurchaseOptions.verify(message.breachwatch, long + 1); @@ -278230,7 +279788,7 @@ export const BI = $root.BI = (() => { return "breachwatch." + error; } } - if (message.chat != null && message.hasOwnProperty("chat")) { + if (message.chat != null && Object.hasOwnProperty.call(message, "chat")) { properties._chat = 1; { let error = $root.BI.PurchaseOptions.verify(message.chat, long + 1); @@ -278238,7 +279796,7 @@ export const BI = $root.BI = (() => { return "chat." + error; } } - if (message.compliance != null && message.hasOwnProperty("compliance")) { + if (message.compliance != null && Object.hasOwnProperty.call(message, "compliance")) { properties._compliance = 1; { let error = $root.BI.PurchaseOptions.verify(message.compliance, long + 1); @@ -278246,7 +279804,7 @@ export const BI = $root.BI = (() => { return "compliance." + error; } } - if (message.professionalServicesSilver != null && message.hasOwnProperty("professionalServicesSilver")) { + if (message.professionalServicesSilver != null && Object.hasOwnProperty.call(message, "professionalServicesSilver")) { properties._professionalServicesSilver = 1; { let error = $root.BI.PurchaseOptions.verify(message.professionalServicesSilver, long + 1); @@ -278254,7 +279812,7 @@ export const BI = $root.BI = (() => { return "professionalServicesSilver." + error; } } - if (message.professionalServicesPlatinum != null && message.hasOwnProperty("professionalServicesPlatinum")) { + if (message.professionalServicesPlatinum != null && Object.hasOwnProperty.call(message, "professionalServicesPlatinum")) { properties._professionalServicesPlatinum = 1; { let error = $root.BI.PurchaseOptions.verify(message.professionalServicesPlatinum, long + 1); @@ -278262,7 +279820,7 @@ export const BI = $root.BI = (() => { return "professionalServicesPlatinum." + error; } } - if (message.pam != null && message.hasOwnProperty("pam")) { + if (message.pam != null && Object.hasOwnProperty.call(message, "pam")) { properties._pam = 1; { let error = $root.BI.PurchaseOptions.verify(message.pam, long + 1); @@ -278270,7 +279828,7 @@ export const BI = $root.BI = (() => { return "pam." + error; } } - if (message.epm != null && message.hasOwnProperty("epm")) { + if (message.epm != null && Object.hasOwnProperty.call(message, "epm")) { properties._epm = 1; { let error = $root.BI.PurchaseOptions.verify(message.epm, long + 1); @@ -278278,7 +279836,7 @@ export const BI = $root.BI = (() => { return "epm." + error; } } - if (message.secretsManager != null && message.hasOwnProperty("secretsManager")) { + if (message.secretsManager != null && Object.hasOwnProperty.call(message, "secretsManager")) { properties._secretsManager = 1; { let error = $root.BI.PurchaseOptions.verify(message.secretsManager, long + 1); @@ -278286,7 +279844,7 @@ export const BI = $root.BI = (() => { return "secretsManager." + error; } } - if (message.connectionManager != null && message.hasOwnProperty("connectionManager")) { + if (message.connectionManager != null && Object.hasOwnProperty.call(message, "connectionManager")) { properties._connectionManager = 1; { let error = $root.BI.PurchaseOptions.verify(message.connectionManager, long + 1); @@ -278294,7 +279852,7 @@ export const BI = $root.BI = (() => { return "connectionManager." + error; } } - if (message.remoteBrowserIsolation != null && message.hasOwnProperty("remoteBrowserIsolation")) { + if (message.remoteBrowserIsolation != null && Object.hasOwnProperty.call(message, "remoteBrowserIsolation")) { properties._remoteBrowserIsolation = 1; { let error = $root.BI.PurchaseOptions.verify(message.remoteBrowserIsolation, long + 1); @@ -278302,7 +279860,7 @@ export const BI = $root.BI = (() => { return "remoteBrowserIsolation." + error; } } - if (message.nhiTier != null && message.hasOwnProperty("nhiTier")) { + if (message.nhiTier != null && Object.hasOwnProperty.call(message, "nhiTier")) { properties._nhiTier = 1; { let error = $root.BI.PurchaseOptions.verify(message.nhiTier, long + 1); @@ -278324,73 +279882,75 @@ export const BI = $root.BI = (() => { AddonPurchaseOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.AddonPurchaseOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.AddonPurchaseOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.BI.AddonPurchaseOptions(); if (object.storage != null) { - if (typeof object.storage !== "object") + if (!$util.isObject(object.storage)) throw TypeError(".BI.AddonPurchaseOptions.storage: object expected"); message.storage = $root.BI.PurchaseOptions.fromObject(object.storage, long + 1); } if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".BI.AddonPurchaseOptions.audit: object expected"); message.audit = $root.BI.PurchaseOptions.fromObject(object.audit, long + 1); } if (object.breachwatch != null) { - if (typeof object.breachwatch !== "object") + if (!$util.isObject(object.breachwatch)) throw TypeError(".BI.AddonPurchaseOptions.breachwatch: object expected"); message.breachwatch = $root.BI.PurchaseOptions.fromObject(object.breachwatch, long + 1); } if (object.chat != null) { - if (typeof object.chat !== "object") + if (!$util.isObject(object.chat)) throw TypeError(".BI.AddonPurchaseOptions.chat: object expected"); message.chat = $root.BI.PurchaseOptions.fromObject(object.chat, long + 1); } if (object.compliance != null) { - if (typeof object.compliance !== "object") + if (!$util.isObject(object.compliance)) throw TypeError(".BI.AddonPurchaseOptions.compliance: object expected"); message.compliance = $root.BI.PurchaseOptions.fromObject(object.compliance, long + 1); } if (object.professionalServicesSilver != null) { - if (typeof object.professionalServicesSilver !== "object") + if (!$util.isObject(object.professionalServicesSilver)) throw TypeError(".BI.AddonPurchaseOptions.professionalServicesSilver: object expected"); message.professionalServicesSilver = $root.BI.PurchaseOptions.fromObject(object.professionalServicesSilver, long + 1); } if (object.professionalServicesPlatinum != null) { - if (typeof object.professionalServicesPlatinum !== "object") + if (!$util.isObject(object.professionalServicesPlatinum)) throw TypeError(".BI.AddonPurchaseOptions.professionalServicesPlatinum: object expected"); message.professionalServicesPlatinum = $root.BI.PurchaseOptions.fromObject(object.professionalServicesPlatinum, long + 1); } if (object.pam != null) { - if (typeof object.pam !== "object") + if (!$util.isObject(object.pam)) throw TypeError(".BI.AddonPurchaseOptions.pam: object expected"); message.pam = $root.BI.PurchaseOptions.fromObject(object.pam, long + 1); } if (object.epm != null) { - if (typeof object.epm !== "object") + if (!$util.isObject(object.epm)) throw TypeError(".BI.AddonPurchaseOptions.epm: object expected"); message.epm = $root.BI.PurchaseOptions.fromObject(object.epm, long + 1); } if (object.secretsManager != null) { - if (typeof object.secretsManager !== "object") + if (!$util.isObject(object.secretsManager)) throw TypeError(".BI.AddonPurchaseOptions.secretsManager: object expected"); message.secretsManager = $root.BI.PurchaseOptions.fromObject(object.secretsManager, long + 1); } if (object.connectionManager != null) { - if (typeof object.connectionManager !== "object") + if (!$util.isObject(object.connectionManager)) throw TypeError(".BI.AddonPurchaseOptions.connectionManager: object expected"); message.connectionManager = $root.BI.PurchaseOptions.fromObject(object.connectionManager, long + 1); } if (object.remoteBrowserIsolation != null) { - if (typeof object.remoteBrowserIsolation !== "object") + if (!$util.isObject(object.remoteBrowserIsolation)) throw TypeError(".BI.AddonPurchaseOptions.remoteBrowserIsolation: object expected"); message.remoteBrowserIsolation = $root.BI.PurchaseOptions.fromObject(object.remoteBrowserIsolation, long + 1); } if (object.nhiTier != null) { - if (typeof object.nhiTier !== "object") + if (!$util.isObject(object.nhiTier)) throw TypeError(".BI.AddonPurchaseOptions.nhiTier: object expected"); message.nhiTier = $root.BI.PurchaseOptions.fromObject(object.nhiTier, long + 1); } @@ -278414,67 +279974,67 @@ export const BI = $root.BI = (() => { if (q > $util.recursionLimit) throw Error("max depth exceeded"); let object = {}; - if (message.storage != null && message.hasOwnProperty("storage")) { + if (message.storage != null && Object.hasOwnProperty.call(message, "storage")) { object.storage = $root.BI.PurchaseOptions.toObject(message.storage, options, q + 1); if (options.oneofs) object._storage = "storage"; } - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { object.audit = $root.BI.PurchaseOptions.toObject(message.audit, options, q + 1); if (options.oneofs) object._audit = "audit"; } - if (message.breachwatch != null && message.hasOwnProperty("breachwatch")) { + if (message.breachwatch != null && Object.hasOwnProperty.call(message, "breachwatch")) { object.breachwatch = $root.BI.PurchaseOptions.toObject(message.breachwatch, options, q + 1); if (options.oneofs) object._breachwatch = "breachwatch"; } - if (message.chat != null && message.hasOwnProperty("chat")) { + if (message.chat != null && Object.hasOwnProperty.call(message, "chat")) { object.chat = $root.BI.PurchaseOptions.toObject(message.chat, options, q + 1); if (options.oneofs) object._chat = "chat"; } - if (message.compliance != null && message.hasOwnProperty("compliance")) { + if (message.compliance != null && Object.hasOwnProperty.call(message, "compliance")) { object.compliance = $root.BI.PurchaseOptions.toObject(message.compliance, options, q + 1); if (options.oneofs) object._compliance = "compliance"; } - if (message.professionalServicesSilver != null && message.hasOwnProperty("professionalServicesSilver")) { + if (message.professionalServicesSilver != null && Object.hasOwnProperty.call(message, "professionalServicesSilver")) { object.professionalServicesSilver = $root.BI.PurchaseOptions.toObject(message.professionalServicesSilver, options, q + 1); if (options.oneofs) object._professionalServicesSilver = "professionalServicesSilver"; } - if (message.professionalServicesPlatinum != null && message.hasOwnProperty("professionalServicesPlatinum")) { + if (message.professionalServicesPlatinum != null && Object.hasOwnProperty.call(message, "professionalServicesPlatinum")) { object.professionalServicesPlatinum = $root.BI.PurchaseOptions.toObject(message.professionalServicesPlatinum, options, q + 1); if (options.oneofs) object._professionalServicesPlatinum = "professionalServicesPlatinum"; } - if (message.pam != null && message.hasOwnProperty("pam")) { + if (message.pam != null && Object.hasOwnProperty.call(message, "pam")) { object.pam = $root.BI.PurchaseOptions.toObject(message.pam, options, q + 1); if (options.oneofs) object._pam = "pam"; } - if (message.epm != null && message.hasOwnProperty("epm")) { + if (message.epm != null && Object.hasOwnProperty.call(message, "epm")) { object.epm = $root.BI.PurchaseOptions.toObject(message.epm, options, q + 1); if (options.oneofs) object._epm = "epm"; } - if (message.secretsManager != null && message.hasOwnProperty("secretsManager")) { + if (message.secretsManager != null && Object.hasOwnProperty.call(message, "secretsManager")) { object.secretsManager = $root.BI.PurchaseOptions.toObject(message.secretsManager, options, q + 1); if (options.oneofs) object._secretsManager = "secretsManager"; } - if (message.connectionManager != null && message.hasOwnProperty("connectionManager")) { + if (message.connectionManager != null && Object.hasOwnProperty.call(message, "connectionManager")) { object.connectionManager = $root.BI.PurchaseOptions.toObject(message.connectionManager, options, q + 1); if (options.oneofs) object._connectionManager = "connectionManager"; } - if (message.remoteBrowserIsolation != null && message.hasOwnProperty("remoteBrowserIsolation")) { + if (message.remoteBrowserIsolation != null && Object.hasOwnProperty.call(message, "remoteBrowserIsolation")) { object.remoteBrowserIsolation = $root.BI.PurchaseOptions.toObject(message.remoteBrowserIsolation, options, q + 1); if (options.oneofs) object._remoteBrowserIsolation = "remoteBrowserIsolation"; } - if (message.nhiTier != null && message.hasOwnProperty("nhiTier")) { + if (message.nhiTier != null && Object.hasOwnProperty.call(message, "nhiTier")) { object.nhiTier = $root.BI.PurchaseOptions.toObject(message.nhiTier, options, q + 1); if (options.oneofs) object._nhiTier = "nhiTier"; @@ -278608,7 +280168,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ AvailablePurchaseOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -278686,17 +280246,17 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.basePlan != null && message.hasOwnProperty("basePlan")) { + if (message.basePlan != null && Object.hasOwnProperty.call(message, "basePlan")) { let error = $root.BI.PurchaseOptions.verify(message.basePlan, long + 1); if (error) return "basePlan." + error; } - if (message.users != null && message.hasOwnProperty("users")) { + if (message.users != null && Object.hasOwnProperty.call(message, "users")) { let error = $root.BI.PurchaseOptions.verify(message.users, long + 1); if (error) return "users." + error; } - if (message.addons != null && message.hasOwnProperty("addons")) { + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) { let error = $root.BI.AddonPurchaseOptions.verify(message.addons, long + 1); if (error) return "addons." + error; @@ -278715,23 +280275,25 @@ export const BI = $root.BI = (() => { AvailablePurchaseOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.AvailablePurchaseOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.AvailablePurchaseOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.BI.AvailablePurchaseOptions(); if (object.basePlan != null) { - if (typeof object.basePlan !== "object") + if (!$util.isObject(object.basePlan)) throw TypeError(".BI.AvailablePurchaseOptions.basePlan: object expected"); message.basePlan = $root.BI.PurchaseOptions.fromObject(object.basePlan, long + 1); } if (object.users != null) { - if (typeof object.users !== "object") + if (!$util.isObject(object.users)) throw TypeError(".BI.AvailablePurchaseOptions.users: object expected"); message.users = $root.BI.PurchaseOptions.fromObject(object.users, long + 1); } if (object.addons != null) { - if (typeof object.addons !== "object") + if (!$util.isObject(object.addons)) throw TypeError(".BI.AvailablePurchaseOptions.addons: object expected"); message.addons = $root.BI.AddonPurchaseOptions.fromObject(object.addons, long + 1); } @@ -278760,11 +280322,11 @@ export const BI = $root.BI = (() => { object.users = null; object.addons = null; } - if (message.basePlan != null && message.hasOwnProperty("basePlan")) + if (message.basePlan != null && Object.hasOwnProperty.call(message, "basePlan")) object.basePlan = $root.BI.PurchaseOptions.toObject(message.basePlan, options, q + 1); - if (message.users != null && message.hasOwnProperty("users")) + if (message.users != null && Object.hasOwnProperty.call(message, "users")) object.users = $root.BI.PurchaseOptions.toObject(message.users, options, q + 1); - if (message.addons != null && message.hasOwnProperty("addons")) + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) object.addons = $root.BI.AddonPurchaseOptions.toObject(message.addons, options, q + 1); return object; }; @@ -278862,7 +280424,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ UpgradeLicenseStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -278942,10 +280504,6 @@ export const BI = $root.BI = (() => { UpgradeLicenseStatusRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.UpgradeLicenseStatusRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.UpgradeLicenseStatusRequest(); }; @@ -279088,7 +280646,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ UpgradeLicenseStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -279166,15 +280724,15 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.allowPurchaseFromConsole != null && message.hasOwnProperty("allowPurchaseFromConsole")) + if (message.allowPurchaseFromConsole != null && Object.hasOwnProperty.call(message, "allowPurchaseFromConsole")) if (typeof message.allowPurchaseFromConsole !== "boolean") return "allowPurchaseFromConsole: boolean expected"; - if (message.purchaseOptions != null && message.hasOwnProperty("purchaseOptions")) { + if (message.purchaseOptions != null && Object.hasOwnProperty.call(message, "purchaseOptions")) { let error = $root.BI.AvailablePurchaseOptions.verify(message.purchaseOptions, long + 1); if (error) return "purchaseOptions." + error; } - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { let error = $root.BI.Error.verify(message.error, long + 1); if (error) return "error." + error; @@ -279193,6 +280751,8 @@ export const BI = $root.BI = (() => { UpgradeLicenseStatusResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.UpgradeLicenseStatusResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.UpgradeLicenseStatusResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -279201,12 +280761,12 @@ export const BI = $root.BI = (() => { if (object.allowPurchaseFromConsole != null) message.allowPurchaseFromConsole = Boolean(object.allowPurchaseFromConsole); if (object.purchaseOptions != null) { - if (typeof object.purchaseOptions !== "object") + if (!$util.isObject(object.purchaseOptions)) throw TypeError(".BI.UpgradeLicenseStatusResponse.purchaseOptions: object expected"); message.purchaseOptions = $root.BI.AvailablePurchaseOptions.fromObject(object.purchaseOptions, long + 1); } if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".BI.UpgradeLicenseStatusResponse.error: object expected"); message.error = $root.BI.Error.fromObject(object.error, long + 1); } @@ -279235,11 +280795,11 @@ export const BI = $root.BI = (() => { object.purchaseOptions = null; object.error = null; } - if (message.allowPurchaseFromConsole != null && message.hasOwnProperty("allowPurchaseFromConsole")) + if (message.allowPurchaseFromConsole != null && Object.hasOwnProperty.call(message, "allowPurchaseFromConsole")) object.allowPurchaseFromConsole = message.allowPurchaseFromConsole; - if (message.purchaseOptions != null && message.hasOwnProperty("purchaseOptions")) + if (message.purchaseOptions != null && Object.hasOwnProperty.call(message, "purchaseOptions")) object.purchaseOptions = $root.BI.AvailablePurchaseOptions.toObject(message.purchaseOptions, options, q + 1); - if (message.error != null && message.hasOwnProperty("error")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) object.error = $root.BI.Error.toObject(message.error, options, q + 1); return object; }; @@ -279370,7 +280930,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ UpgradeLicenseQuotePurchaseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -279448,7 +281008,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.productType != null && message.hasOwnProperty("productType")) + if (message.productType != null && Object.hasOwnProperty.call(message, "productType")) switch (message.productType) { default: return "productType: enum value expected"; @@ -279466,10 +281026,10 @@ export const BI = $root.BI = (() => { case 11: break; } - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) if (!$util.isInteger(message.quantity)) return "quantity: integer expected"; - if (message.tier != null && message.hasOwnProperty("tier")) + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) if (!$util.isInteger(message.tier)) return "tier: integer expected"; return null; @@ -279486,6 +281046,8 @@ export const BI = $root.BI = (() => { UpgradeLicenseQuotePurchaseRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.UpgradeLicenseQuotePurchaseRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.UpgradeLicenseQuotePurchaseRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -279576,11 +281138,11 @@ export const BI = $root.BI = (() => { object.quantity = 0; object.tier = 0; } - if (message.productType != null && message.hasOwnProperty("productType")) + if (message.productType != null && Object.hasOwnProperty.call(message, "productType")) object.productType = options.enums === String ? $root.BI.PurchaseProductType[message.productType] === undefined ? message.productType : $root.BI.PurchaseProductType[message.productType] : message.productType; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) object.quantity = message.quantity; - if (message.tier != null && message.hasOwnProperty("tier")) + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) object.tier = message.tier; return object; }; @@ -279722,7 +281284,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ UpgradeLicenseQuotePurchaseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -279804,18 +281366,18 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.quotePurchase != null && message.hasOwnProperty("quotePurchase")) { + if (message.quotePurchase != null && Object.hasOwnProperty.call(message, "quotePurchase")) { let error = $root.BI.QuotePurchase.verify(message.quotePurchase, long + 1); if (error) return "quotePurchase." + error; } - if (message.viewSummaryLink != null && message.hasOwnProperty("viewSummaryLink")) + if (message.viewSummaryLink != null && Object.hasOwnProperty.call(message, "viewSummaryLink")) if (!$util.isString(message.viewSummaryLink)) return "viewSummaryLink: string expected"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { let error = $root.BI.Error.verify(message.error, long + 1); if (error) return "error." + error; @@ -279834,6 +281396,8 @@ export const BI = $root.BI = (() => { UpgradeLicenseQuotePurchaseResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.UpgradeLicenseQuotePurchaseResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.UpgradeLicenseQuotePurchaseResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -279842,14 +281406,14 @@ export const BI = $root.BI = (() => { if (object.success != null) message.success = Boolean(object.success); if (object.quotePurchase != null) { - if (typeof object.quotePurchase !== "object") + if (!$util.isObject(object.quotePurchase)) throw TypeError(".BI.UpgradeLicenseQuotePurchaseResponse.quotePurchase: object expected"); message.quotePurchase = $root.BI.QuotePurchase.fromObject(object.quotePurchase, long + 1); } if (object.viewSummaryLink != null) message.viewSummaryLink = String(object.viewSummaryLink); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".BI.UpgradeLicenseQuotePurchaseResponse.error: object expected"); message.error = $root.BI.Error.fromObject(object.error, long + 1); } @@ -279879,13 +281443,13 @@ export const BI = $root.BI = (() => { object.viewSummaryLink = ""; object.error = null; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.quotePurchase != null && message.hasOwnProperty("quotePurchase")) + if (message.quotePurchase != null && Object.hasOwnProperty.call(message, "quotePurchase")) object.quotePurchase = $root.BI.QuotePurchase.toObject(message.quotePurchase, options, q + 1); - if (message.viewSummaryLink != null && message.hasOwnProperty("viewSummaryLink")) + if (message.viewSummaryLink != null && Object.hasOwnProperty.call(message, "viewSummaryLink")) object.viewSummaryLink = message.viewSummaryLink; - if (message.error != null && message.hasOwnProperty("error")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) object.error = $root.BI.Error.toObject(message.error, options, q + 1); return object; }; @@ -280027,7 +281591,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ UpgradeLicenseCompletePurchaseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -280109,7 +281673,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.productType != null && message.hasOwnProperty("productType")) + if (message.productType != null && Object.hasOwnProperty.call(message, "productType")) switch (message.productType) { default: return "productType: enum value expected"; @@ -280127,15 +281691,15 @@ export const BI = $root.BI = (() => { case 11: break; } - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) if (!$util.isInteger(message.quantity)) return "quantity: integer expected"; - if (message.quotePurchase != null && message.hasOwnProperty("quotePurchase")) { + if (message.quotePurchase != null && Object.hasOwnProperty.call(message, "quotePurchase")) { let error = $root.BI.QuotePurchase.verify(message.quotePurchase, long + 1); if (error) return "quotePurchase." + error; } - if (message.tier != null && message.hasOwnProperty("tier")) + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) if (!$util.isInteger(message.tier)) return "tier: integer expected"; return null; @@ -280152,6 +281716,8 @@ export const BI = $root.BI = (() => { UpgradeLicenseCompletePurchaseRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.UpgradeLicenseCompletePurchaseRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.UpgradeLicenseCompletePurchaseRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -280216,7 +281782,7 @@ export const BI = $root.BI = (() => { if (object.quantity != null) message.quantity = object.quantity | 0; if (object.quotePurchase != null) { - if (typeof object.quotePurchase !== "object") + if (!$util.isObject(object.quotePurchase)) throw TypeError(".BI.UpgradeLicenseCompletePurchaseRequest.quotePurchase: object expected"); message.quotePurchase = $root.BI.QuotePurchase.fromObject(object.quotePurchase, long + 1); } @@ -280248,13 +281814,13 @@ export const BI = $root.BI = (() => { object.quotePurchase = null; object.tier = 0; } - if (message.productType != null && message.hasOwnProperty("productType")) + if (message.productType != null && Object.hasOwnProperty.call(message, "productType")) object.productType = options.enums === String ? $root.BI.PurchaseProductType[message.productType] === undefined ? message.productType : $root.BI.PurchaseProductType[message.productType] : message.productType; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) object.quantity = message.quantity; - if (message.quotePurchase != null && message.hasOwnProperty("quotePurchase")) + if (message.quotePurchase != null && Object.hasOwnProperty.call(message, "quotePurchase")) object.quotePurchase = $root.BI.QuotePurchase.toObject(message.quotePurchase, options, q + 1); - if (message.tier != null && message.hasOwnProperty("tier")) + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) object.tier = message.tier; return object; }; @@ -280396,7 +281962,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ UpgradeLicenseCompletePurchaseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -280478,18 +282044,18 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) if (!$util.isString(message.invoiceNumber)) return "invoiceNumber: string expected"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { let error = $root.BI.Error.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.quotePurchase != null && message.hasOwnProperty("quotePurchase")) { + if (message.quotePurchase != null && Object.hasOwnProperty.call(message, "quotePurchase")) { let error = $root.BI.QuotePurchase.verify(message.quotePurchase, long + 1); if (error) return "quotePurchase." + error; @@ -280508,6 +282074,8 @@ export const BI = $root.BI = (() => { UpgradeLicenseCompletePurchaseResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.UpgradeLicenseCompletePurchaseResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.UpgradeLicenseCompletePurchaseResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -280518,12 +282086,12 @@ export const BI = $root.BI = (() => { if (object.invoiceNumber != null) message.invoiceNumber = String(object.invoiceNumber); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".BI.UpgradeLicenseCompletePurchaseResponse.error: object expected"); message.error = $root.BI.Error.fromObject(object.error, long + 1); } if (object.quotePurchase != null) { - if (typeof object.quotePurchase !== "object") + if (!$util.isObject(object.quotePurchase)) throw TypeError(".BI.UpgradeLicenseCompletePurchaseResponse.quotePurchase: object expected"); message.quotePurchase = $root.BI.QuotePurchase.fromObject(object.quotePurchase, long + 1); } @@ -280553,13 +282121,13 @@ export const BI = $root.BI = (() => { object.error = null; object.quotePurchase = null; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.invoiceNumber != null && message.hasOwnProperty("invoiceNumber")) + if (message.invoiceNumber != null && Object.hasOwnProperty.call(message, "invoiceNumber")) object.invoiceNumber = message.invoiceNumber; - if (message.error != null && message.hasOwnProperty("error")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) object.error = $root.BI.Error.toObject(message.error, options, q + 1); - if (message.quotePurchase != null && message.hasOwnProperty("quotePurchase")) + if (message.quotePurchase != null && Object.hasOwnProperty.call(message, "quotePurchase")) object.quotePurchase = $root.BI.QuotePurchase.toObject(message.quotePurchase, options, q + 1); return object; }; @@ -280679,7 +282247,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ EnterpriseBasePlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -280753,7 +282321,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.baseplanVersion != null && message.hasOwnProperty("baseplanVersion")) + if (message.baseplanVersion != null && Object.hasOwnProperty.call(message, "baseplanVersion")) switch (message.baseplanVersion) { default: return "baseplanVersion: enum value expected"; @@ -280763,7 +282331,7 @@ export const BI = $root.BI = (() => { case 3: break; } - if (message.cost != null && message.hasOwnProperty("cost")) { + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) { let error = $root.BI.Cost.verify(message.cost, long + 1); if (error) return "cost." + error; @@ -280782,6 +282350,8 @@ export const BI = $root.BI = (() => { EnterpriseBasePlan.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.EnterpriseBasePlan) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.EnterpriseBasePlan: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -280812,7 +282382,7 @@ export const BI = $root.BI = (() => { break; } if (object.cost != null) { - if (typeof object.cost !== "object") + if (!$util.isObject(object.cost)) throw TypeError(".BI.EnterpriseBasePlan.cost: object expected"); message.cost = $root.BI.Cost.fromObject(object.cost, long + 1); } @@ -280840,9 +282410,9 @@ export const BI = $root.BI = (() => { object.baseplanVersion = options.enums === String ? "UNKNOWN" : 0; object.cost = null; } - if (message.baseplanVersion != null && message.hasOwnProperty("baseplanVersion")) + if (message.baseplanVersion != null && Object.hasOwnProperty.call(message, "baseplanVersion")) object.baseplanVersion = options.enums === String ? $root.BI.EnterpriseBasePlan.EnterpriseBasePlanVersion[message.baseplanVersion] === undefined ? message.baseplanVersion : $root.BI.EnterpriseBasePlan.EnterpriseBasePlanVersion[message.baseplanVersion] : message.baseplanVersion; - if (message.cost != null && message.hasOwnProperty("cost")) + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) object.cost = $root.BI.Cost.toObject(message.cost, options, q + 1); return object; }; @@ -280958,7 +282528,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionEnterprisePricingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -281038,10 +282608,6 @@ export const BI = $root.BI = (() => { SubscriptionEnterprisePricingRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionEnterprisePricingRequest) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.BI.SubscriptionEnterprisePricingRequest(); }; @@ -281206,7 +282772,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NhiTierPlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -281292,21 +282858,21 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.tierId != null && message.hasOwnProperty("tierId")) + if (message.tierId != null && Object.hasOwnProperty.call(message, "tierId")) if (!$util.isInteger(message.tierId)) return "tierId: integer expected"; - if (message.nhiCeiling != null && message.hasOwnProperty("nhiCeiling")) + if (message.nhiCeiling != null && Object.hasOwnProperty.call(message, "nhiCeiling")) if (!$util.isInteger(message.nhiCeiling)) return "nhiCeiling: integer expected"; - if (message.cost != null && message.hasOwnProperty("cost")) { + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) { let error = $root.BI.Cost.verify(message.cost, long + 1); if (error) return "cost." + error; } - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) if (!$util.isInteger(message.productId)) return "productId: integer expected"; - if (message.nhiFloor != null && message.hasOwnProperty("nhiFloor")) + if (message.nhiFloor != null && Object.hasOwnProperty.call(message, "nhiFloor")) if (!$util.isInteger(message.nhiFloor)) return "nhiFloor: integer expected"; return null; @@ -281323,6 +282889,8 @@ export const BI = $root.BI = (() => { NhiTierPlan.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NhiTierPlan) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NhiTierPlan: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -281333,7 +282901,7 @@ export const BI = $root.BI = (() => { if (object.nhiCeiling != null) message.nhiCeiling = object.nhiCeiling | 0; if (object.cost != null) { - if (typeof object.cost !== "object") + if (!$util.isObject(object.cost)) throw TypeError(".BI.NhiTierPlan.cost: object expected"); message.cost = $root.BI.Cost.fromObject(object.cost, long + 1); } @@ -281368,15 +282936,15 @@ export const BI = $root.BI = (() => { object.productId = 0; object.nhiFloor = 0; } - if (message.tierId != null && message.hasOwnProperty("tierId")) + if (message.tierId != null && Object.hasOwnProperty.call(message, "tierId")) object.tierId = message.tierId; - if (message.nhiCeiling != null && message.hasOwnProperty("nhiCeiling")) + if (message.nhiCeiling != null && Object.hasOwnProperty.call(message, "nhiCeiling")) object.nhiCeiling = message.nhiCeiling; - if (message.cost != null && message.hasOwnProperty("cost")) + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) object.cost = $root.BI.Cost.toObject(message.cost, options, q + 1); - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) object.productId = message.productId; - if (message.nhiFloor != null && message.hasOwnProperty("nhiFloor")) + if (message.nhiFloor != null && Object.hasOwnProperty.call(message, "nhiFloor")) object.nhiFloor = message.nhiFloor; return object; }; @@ -281526,7 +283094,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SubscriptionEnterprisePricingResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -281616,7 +283184,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.basePlans != null && message.hasOwnProperty("basePlans")) { + if (message.basePlans != null && Object.hasOwnProperty.call(message, "basePlans")) { if (!Array.isArray(message.basePlans)) return "basePlans: array expected"; for (let i = 0; i < message.basePlans.length; ++i) { @@ -281625,7 +283193,7 @@ export const BI = $root.BI = (() => { return "basePlans." + error; } } - if (message.addons != null && message.hasOwnProperty("addons")) { + if (message.addons != null && Object.hasOwnProperty.call(message, "addons")) { if (!Array.isArray(message.addons)) return "addons: array expected"; for (let i = 0; i < message.addons.length; ++i) { @@ -281634,7 +283202,7 @@ export const BI = $root.BI = (() => { return "addons." + error; } } - if (message.filePlans != null && message.hasOwnProperty("filePlans")) { + if (message.filePlans != null && Object.hasOwnProperty.call(message, "filePlans")) { if (!Array.isArray(message.filePlans)) return "filePlans: array expected"; for (let i = 0; i < message.filePlans.length; ++i) { @@ -281643,7 +283211,7 @@ export const BI = $root.BI = (() => { return "filePlans." + error; } } - if (message.nhiTierPlans != null && message.hasOwnProperty("nhiTierPlans")) { + if (message.nhiTierPlans != null && Object.hasOwnProperty.call(message, "nhiTierPlans")) { if (!Array.isArray(message.nhiTierPlans)) return "nhiTierPlans: array expected"; for (let i = 0; i < message.nhiTierPlans.length; ++i) { @@ -281666,6 +283234,8 @@ export const BI = $root.BI = (() => { SubscriptionEnterprisePricingResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SubscriptionEnterprisePricingResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SubscriptionEnterprisePricingResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -281676,7 +283246,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionEnterprisePricingResponse.basePlans: array expected"); message.basePlans = []; for (let i = 0; i < object.basePlans.length; ++i) { - if (typeof object.basePlans[i] !== "object") + if (!$util.isObject(object.basePlans[i])) throw TypeError(".BI.SubscriptionEnterprisePricingResponse.basePlans: object expected"); message.basePlans[i] = $root.BI.EnterpriseBasePlan.fromObject(object.basePlans[i], long + 1); } @@ -281686,7 +283256,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionEnterprisePricingResponse.addons: array expected"); message.addons = []; for (let i = 0; i < object.addons.length; ++i) { - if (typeof object.addons[i] !== "object") + if (!$util.isObject(object.addons[i])) throw TypeError(".BI.SubscriptionEnterprisePricingResponse.addons: object expected"); message.addons[i] = $root.BI.Addon.fromObject(object.addons[i], long + 1); } @@ -281696,7 +283266,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionEnterprisePricingResponse.filePlans: array expected"); message.filePlans = []; for (let i = 0; i < object.filePlans.length; ++i) { - if (typeof object.filePlans[i] !== "object") + if (!$util.isObject(object.filePlans[i])) throw TypeError(".BI.SubscriptionEnterprisePricingResponse.filePlans: object expected"); message.filePlans[i] = $root.BI.FilePlan.fromObject(object.filePlans[i], long + 1); } @@ -281706,7 +283276,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SubscriptionEnterprisePricingResponse.nhiTierPlans: array expected"); message.nhiTierPlans = []; for (let i = 0; i < object.nhiTierPlans.length; ++i) { - if (typeof object.nhiTierPlans[i] !== "object") + if (!$util.isObject(object.nhiTierPlans[i])) throw TypeError(".BI.SubscriptionEnterprisePricingResponse.nhiTierPlans: object expected"); message.nhiTierPlans[i] = $root.BI.NhiTierPlan.fromObject(object.nhiTierPlans[i], long + 1); } @@ -281903,7 +283473,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SingularDeviceIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -281977,10 +283547,10 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.idType != null && message.hasOwnProperty("idType")) + if (message.idType != null && Object.hasOwnProperty.call(message, "idType")) switch (message.idType) { default: return "idType: enum value expected"; @@ -282009,6 +283579,8 @@ export const BI = $root.BI = (() => { SingularDeviceIdentifier.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SingularDeviceIdentifier) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SingularDeviceIdentifier: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -282084,9 +283656,9 @@ export const BI = $root.BI = (() => { object.id = ""; object.idType = options.enums === String ? "UNKNOWN_IDENTIFIER_TYPE" : 0; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.idType != null && message.hasOwnProperty("idType")) + if (message.idType != null && Object.hasOwnProperty.call(message, "idType")) object.idType = options.enums === String ? $root.BI.IdentifierType[message.idType] === undefined ? message.idType : $root.BI.IdentifierType[message.idType] : message.idType; return object; }; @@ -282272,7 +283844,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SingularSharedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -282370,28 +283942,28 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.platform != null && message.hasOwnProperty("platform")) + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) if (!$util.isString(message.platform)) return "platform: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) if (!$util.isString(message.osVersion)) return "osVersion: string expected"; - if (message.make != null && message.hasOwnProperty("make")) + if (message.make != null && Object.hasOwnProperty.call(message, "make")) if (!$util.isString(message.make)) return "make: string expected"; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) if (!$util.isString(message.locale)) return "locale: string expected"; - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) if (!$util.isString(message.build)) return "build: string expected"; - if (message.appIdentifier != null && message.hasOwnProperty("appIdentifier")) + if (message.appIdentifier != null && Object.hasOwnProperty.call(message, "appIdentifier")) if (!$util.isString(message.appIdentifier)) return "appIdentifier: string expected"; - if (message.attAuthorizationStatus != null && message.hasOwnProperty("attAuthorizationStatus")) + if (message.attAuthorizationStatus != null && Object.hasOwnProperty.call(message, "attAuthorizationStatus")) if (!$util.isInteger(message.attAuthorizationStatus)) return "attAuthorizationStatus: integer expected"; return null; @@ -282408,6 +283980,8 @@ export const BI = $root.BI = (() => { SingularSharedData.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SingularSharedData) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SingularSharedData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -282459,21 +284033,21 @@ export const BI = $root.BI = (() => { object.appIdentifier = ""; object.attAuthorizationStatus = 0; } - if (message.platform != null && message.hasOwnProperty("platform")) + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) object.platform = message.platform; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) object.osVersion = message.osVersion; - if (message.make != null && message.hasOwnProperty("make")) + if (message.make != null && Object.hasOwnProperty.call(message, "make")) object.make = message.make; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) object.model = message.model; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) object.locale = message.locale; - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) object.build = message.build; - if (message.appIdentifier != null && message.hasOwnProperty("appIdentifier")) + if (message.appIdentifier != null && Object.hasOwnProperty.call(message, "appIdentifier")) object.appIdentifier = message.appIdentifier; - if (message.attAuthorizationStatus != null && message.hasOwnProperty("attAuthorizationStatus")) + if (message.attAuthorizationStatus != null && Object.hasOwnProperty.call(message, "attAuthorizationStatus")) object.attAuthorizationStatus = message.attAuthorizationStatus; return object; }; @@ -282727,7 +284301,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SingularSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -282851,7 +284425,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceIdentifiers != null && message.hasOwnProperty("deviceIdentifiers")) { + if (message.deviceIdentifiers != null && Object.hasOwnProperty.call(message, "deviceIdentifiers")) { if (!Array.isArray(message.deviceIdentifiers)) return "deviceIdentifiers: array expected"; for (let i = 0; i < message.deviceIdentifiers.length; ++i) { @@ -282860,45 +284434,45 @@ export const BI = $root.BI = (() => { return "deviceIdentifiers." + error; } } - if (message.sharedData != null && message.hasOwnProperty("sharedData")) { + if (message.sharedData != null && Object.hasOwnProperty.call(message, "sharedData")) { let error = $root.BI.SingularSharedData.verify(message.sharedData, long + 1); if (error) return "sharedData." + error; } - if (message.applicationVersion != null && message.hasOwnProperty("applicationVersion")) + if (message.applicationVersion != null && Object.hasOwnProperty.call(message, "applicationVersion")) if (!$util.isString(message.applicationVersion)) return "applicationVersion: string expected"; - if (message.install != null && message.hasOwnProperty("install")) + if (message.install != null && Object.hasOwnProperty.call(message, "install")) if (typeof message.install !== "boolean") return "install: boolean expected"; - if (message.installTime != null && message.hasOwnProperty("installTime")) + if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) if (!$util.isInteger(message.installTime) && !(message.installTime && $util.isInteger(message.installTime.low) && $util.isInteger(message.installTime.high))) return "installTime: integer|Long expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) if (!$util.isInteger(message.updateTime) && !(message.updateTime && $util.isInteger(message.updateTime.low) && $util.isInteger(message.updateTime.high))) return "updateTime: integer|Long expected"; - if (message.installSource != null && message.hasOwnProperty("installSource")) + if (message.installSource != null && Object.hasOwnProperty.call(message, "installSource")) if (!$util.isString(message.installSource)) return "installSource: string expected"; - if (message.installReceipt != null && message.hasOwnProperty("installReceipt")) + if (message.installReceipt != null && Object.hasOwnProperty.call(message, "installReceipt")) if (!$util.isString(message.installReceipt)) return "installReceipt: string expected"; - if (message.openuri != null && message.hasOwnProperty("openuri")) + if (message.openuri != null && Object.hasOwnProperty.call(message, "openuri")) if (!$util.isString(message.openuri)) return "openuri: string expected"; - if (message.ddlEnabled != null && message.hasOwnProperty("ddlEnabled")) + if (message.ddlEnabled != null && Object.hasOwnProperty.call(message, "ddlEnabled")) if (typeof message.ddlEnabled !== "boolean") return "ddlEnabled: boolean expected"; - if (message.singularLinkResolveRequired != null && message.hasOwnProperty("singularLinkResolveRequired")) + if (message.singularLinkResolveRequired != null && Object.hasOwnProperty.call(message, "singularLinkResolveRequired")) if (typeof message.singularLinkResolveRequired !== "boolean") return "singularLinkResolveRequired: boolean expected"; - if (message.installRef != null && message.hasOwnProperty("installRef")) + if (message.installRef != null && Object.hasOwnProperty.call(message, "installRef")) if (!$util.isString(message.installRef)) return "installRef: string expected"; - if (message.metaRef != null && message.hasOwnProperty("metaRef")) + if (message.metaRef != null && Object.hasOwnProperty.call(message, "metaRef")) if (!$util.isString(message.metaRef)) return "metaRef: string expected"; - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) if (!$util.isString(message.attributionToken)) return "attributionToken: string expected"; return null; @@ -282915,6 +284489,8 @@ export const BI = $root.BI = (() => { SingularSessionRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SingularSessionRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SingularSessionRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -282925,13 +284501,13 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SingularSessionRequest.deviceIdentifiers: array expected"); message.deviceIdentifiers = []; for (let i = 0; i < object.deviceIdentifiers.length; ++i) { - if (typeof object.deviceIdentifiers[i] !== "object") + if (!$util.isObject(object.deviceIdentifiers[i])) throw TypeError(".BI.SingularSessionRequest.deviceIdentifiers: object expected"); message.deviceIdentifiers[i] = $root.BI.SingularDeviceIdentifier.fromObject(object.deviceIdentifiers[i], long + 1); } } if (object.sharedData != null) { - if (typeof object.sharedData !== "object") + if (!$util.isObject(object.sharedData)) throw TypeError(".BI.SingularSessionRequest.sharedData: object expected"); message.sharedData = $root.BI.SingularSharedData.fromObject(object.sharedData, long + 1); } @@ -283023,41 +284599,41 @@ export const BI = $root.BI = (() => { for (let j = 0; j < message.deviceIdentifiers.length; ++j) object.deviceIdentifiers[j] = $root.BI.SingularDeviceIdentifier.toObject(message.deviceIdentifiers[j], options, q + 1); } - if (message.sharedData != null && message.hasOwnProperty("sharedData")) + if (message.sharedData != null && Object.hasOwnProperty.call(message, "sharedData")) object.sharedData = $root.BI.SingularSharedData.toObject(message.sharedData, options, q + 1); - if (message.applicationVersion != null && message.hasOwnProperty("applicationVersion")) + if (message.applicationVersion != null && Object.hasOwnProperty.call(message, "applicationVersion")) object.applicationVersion = message.applicationVersion; - if (message.install != null && message.hasOwnProperty("install")) + if (message.install != null && Object.hasOwnProperty.call(message, "install")) object.install = message.install; - if (message.installTime != null && message.hasOwnProperty("installTime")) + if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.installTime = typeof message.installTime === "number" ? BigInt(message.installTime) : $util.Long.fromBits(message.installTime.low >>> 0, message.installTime.high >>> 0, false).toBigInt(); else if (typeof message.installTime === "number") object.installTime = options.longs === String ? String(message.installTime) : message.installTime; else object.installTime = options.longs === String ? $util.Long.prototype.toString.call(message.installTime) : options.longs === Number ? new $util.LongBits(message.installTime.low >>> 0, message.installTime.high >>> 0).toNumber() : message.installTime; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.updateTime = typeof message.updateTime === "number" ? BigInt(message.updateTime) : $util.Long.fromBits(message.updateTime.low >>> 0, message.updateTime.high >>> 0, false).toBigInt(); else if (typeof message.updateTime === "number") object.updateTime = options.longs === String ? String(message.updateTime) : message.updateTime; else object.updateTime = options.longs === String ? $util.Long.prototype.toString.call(message.updateTime) : options.longs === Number ? new $util.LongBits(message.updateTime.low >>> 0, message.updateTime.high >>> 0).toNumber() : message.updateTime; - if (message.installSource != null && message.hasOwnProperty("installSource")) + if (message.installSource != null && Object.hasOwnProperty.call(message, "installSource")) object.installSource = message.installSource; - if (message.installReceipt != null && message.hasOwnProperty("installReceipt")) + if (message.installReceipt != null && Object.hasOwnProperty.call(message, "installReceipt")) object.installReceipt = message.installReceipt; - if (message.openuri != null && message.hasOwnProperty("openuri")) + if (message.openuri != null && Object.hasOwnProperty.call(message, "openuri")) object.openuri = message.openuri; - if (message.ddlEnabled != null && message.hasOwnProperty("ddlEnabled")) + if (message.ddlEnabled != null && Object.hasOwnProperty.call(message, "ddlEnabled")) object.ddlEnabled = message.ddlEnabled; - if (message.singularLinkResolveRequired != null && message.hasOwnProperty("singularLinkResolveRequired")) + if (message.singularLinkResolveRequired != null && Object.hasOwnProperty.call(message, "singularLinkResolveRequired")) object.singularLinkResolveRequired = message.singularLinkResolveRequired; - if (message.installRef != null && message.hasOwnProperty("installRef")) + if (message.installRef != null && Object.hasOwnProperty.call(message, "installRef")) object.installRef = message.installRef; - if (message.metaRef != null && message.hasOwnProperty("metaRef")) + if (message.metaRef != null && Object.hasOwnProperty.call(message, "metaRef")) object.metaRef = message.metaRef; - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) object.attributionToken = message.attributionToken; return object; }; @@ -283190,7 +284766,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ SingularEventRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -283270,7 +284846,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deviceIdentifiers != null && message.hasOwnProperty("deviceIdentifiers")) { + if (message.deviceIdentifiers != null && Object.hasOwnProperty.call(message, "deviceIdentifiers")) { if (!Array.isArray(message.deviceIdentifiers)) return "deviceIdentifiers: array expected"; for (let i = 0; i < message.deviceIdentifiers.length; ++i) { @@ -283279,12 +284855,12 @@ export const BI = $root.BI = (() => { return "deviceIdentifiers." + error; } } - if (message.sharedData != null && message.hasOwnProperty("sharedData")) { + if (message.sharedData != null && Object.hasOwnProperty.call(message, "sharedData")) { let error = $root.BI.SingularSharedData.verify(message.sharedData, long + 1); if (error) return "sharedData." + error; } - if (message.eventName != null && message.hasOwnProperty("eventName")) + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) if (!$util.isString(message.eventName)) return "eventName: string expected"; return null; @@ -283301,6 +284877,8 @@ export const BI = $root.BI = (() => { SingularEventRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.SingularEventRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.SingularEventRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -283311,13 +284889,13 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.SingularEventRequest.deviceIdentifiers: array expected"); message.deviceIdentifiers = []; for (let i = 0; i < object.deviceIdentifiers.length; ++i) { - if (typeof object.deviceIdentifiers[i] !== "object") + if (!$util.isObject(object.deviceIdentifiers[i])) throw TypeError(".BI.SingularEventRequest.deviceIdentifiers: object expected"); message.deviceIdentifiers[i] = $root.BI.SingularDeviceIdentifier.fromObject(object.deviceIdentifiers[i], long + 1); } } if (object.sharedData != null) { - if (typeof object.sharedData !== "object") + if (!$util.isObject(object.sharedData)) throw TypeError(".BI.SingularEventRequest.sharedData: object expected"); message.sharedData = $root.BI.SingularSharedData.fromObject(object.sharedData, long + 1); } @@ -283354,9 +284932,9 @@ export const BI = $root.BI = (() => { for (let j = 0; j < message.deviceIdentifiers.length; ++j) object.deviceIdentifiers[j] = $root.BI.SingularDeviceIdentifier.toObject(message.deviceIdentifiers[j], options, q + 1); } - if (message.sharedData != null && message.hasOwnProperty("sharedData")) + if (message.sharedData != null && Object.hasOwnProperty.call(message, "sharedData")) object.sharedData = $root.BI.SingularSharedData.toObject(message.sharedData, options, q + 1); - if (message.eventName != null && message.hasOwnProperty("eventName")) + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) object.eventName = message.eventName; return object; }; @@ -283465,7 +285043,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ ActivePamCountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -283535,7 +285113,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; return null; @@ -283552,6 +285130,8 @@ export const BI = $root.BI = (() => { ActivePamCountRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.ActivePamCountRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.ActivePamCountRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -283581,7 +285161,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.enterpriseId = 0; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; return object; }; @@ -283690,7 +285270,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ ActivePamCountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -283760,7 +285340,7 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.pamCount != null && message.hasOwnProperty("pamCount")) + if (message.pamCount != null && Object.hasOwnProperty.call(message, "pamCount")) if (!$util.isInteger(message.pamCount)) return "pamCount: integer expected"; return null; @@ -283777,6 +285357,8 @@ export const BI = $root.BI = (() => { ActivePamCountResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.ActivePamCountResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.ActivePamCountResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -283806,7 +285388,7 @@ export const BI = $root.BI = (() => { let object = {}; if (options.defaults) object.pamCount = 0; - if (message.pamCount != null && message.hasOwnProperty("pamCount")) + if (message.pamCount != null && Object.hasOwnProperty.call(message, "pamCount")) object.pamCount = message.pamCount; return object; }; @@ -283937,7 +285519,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NhiEnterpriseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -284015,13 +285597,13 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) return "endTime: integer|Long expected"; return null; @@ -284038,6 +285620,8 @@ export const BI = $root.BI = (() => { NhiEnterpriseRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NhiEnterpriseRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NhiEnterpriseRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -284096,16 +285680,16 @@ export const BI = $root.BI = (() => { } else object.endTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startTime = typeof message.startTime === "number" ? BigInt(message.startTime) : $util.Long.fromBits(message.startTime.low >>> 0, message.startTime.high >>> 0, false).toBigInt(); else if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endTime = typeof message.endTime === "number" ? BigInt(message.endTime) : $util.Long.fromBits(message.endTime.low >>> 0, message.endTime.high >>> 0, false).toBigInt(); else if (typeof message.endTime === "number") @@ -284259,7 +285843,7 @@ export const BI = $root.BI = (() => { * @returns {$protobuf.Writer} Writer */ NhiMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -284350,20 +285934,20 @@ export const BI = $root.BI = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseIds != null && message.hasOwnProperty("enterpriseIds")) { + if (message.enterpriseIds != null && Object.hasOwnProperty.call(message, "enterpriseIds")) { if (!Array.isArray(message.enterpriseIds)) return "enterpriseIds: array expected"; for (let i = 0; i < message.enterpriseIds.length; ++i) if (!$util.isInteger(message.enterpriseIds[i])) return "enterpriseIds: integer[] expected"; } - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) return "endTime: integer|Long expected"; - if (message.enterprises != null && message.hasOwnProperty("enterprises")) { + if (message.enterprises != null && Object.hasOwnProperty.call(message, "enterprises")) { if (!Array.isArray(message.enterprises)) return "enterprises: array expected"; for (let i = 0; i < message.enterprises.length; ++i) { @@ -284386,6 +285970,8 @@ export const BI = $root.BI = (() => { NhiMetricsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.BI.NhiMetricsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".BI.NhiMetricsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -284421,7 +286007,7 @@ export const BI = $root.BI = (() => { throw TypeError(".BI.NhiMetricsRequest.enterprises: array expected"); message.enterprises = []; for (let i = 0; i < object.enterprises.length; ++i) { - if (typeof object.enterprises[i] !== "object") + if (!$util.isObject(object.enterprises[i])) throw TypeError(".BI.NhiMetricsRequest.enterprises: object expected"); message.enterprises[i] = $root.BI.NhiEnterpriseRequest.fromObject(object.enterprises[i], long + 1); } @@ -284467,14 +286053,14 @@ export const BI = $root.BI = (() => { for (let j = 0; j < message.enterpriseIds.length; ++j) object.enterpriseIds[j] = message.enterpriseIds[j]; } - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startTime = typeof message.startTime === "number" ? BigInt(message.startTime) : $util.Long.fromBits(message.startTime.low >>> 0, message.startTime.high >>> 0, false).toBigInt(); else if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endTime = typeof message.endTime === "number" ? BigInt(message.endTime) : $util.Long.fromBits(message.endTime.low >>> 0, message.endTime.high >>> 0, false).toBigInt(); else if (typeof message.endTime === "number") @@ -284616,7 +286202,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -284688,7 +286274,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (let i = 0; i < message.rules.length; ++i) { @@ -284711,6 +286297,8 @@ export const google = $root.google = (() => { Http.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Http) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Http: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -284721,7 +286309,7 @@ export const google = $root.google = (() => { throw TypeError(".google.api.Http.rules: array expected"); message.rules = []; for (let i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".google.api.Http.rules: object expected"); message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); } @@ -284964,7 +286552,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -285069,40 +286657,40 @@ export const google = $root.google = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.get != null && message.hasOwnProperty("get")) { + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { properties.pattern = 1; if (!$util.isString(message.get)) return "get: string expected"; } - if (message.put != null && message.hasOwnProperty("put")) { + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.put)) return "put: string expected"; } - if (message.post != null && message.hasOwnProperty("post")) { + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.post)) return "post: string expected"; } - if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message["delete"])) return "delete: string expected"; } - if (message.patch != null && message.hasOwnProperty("patch")) { + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.patch)) return "patch: string expected"; } - if (message.custom != null && message.hasOwnProperty("custom")) { + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; @@ -285112,13 +286700,13 @@ export const google = $root.google = (() => { return "custom." + error; } } - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) if (!$util.isString(message.body)) return "body: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (message.additionalBindings != null && Object.hasOwnProperty.call(message, "additionalBindings")) { if (!Array.isArray(message.additionalBindings)) return "additionalBindings: array expected"; for (let i = 0; i < message.additionalBindings.length; ++i) { @@ -285141,6 +286729,8 @@ export const google = $root.google = (() => { HttpRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.HttpRule) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.HttpRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -285157,7 +286747,7 @@ export const google = $root.google = (() => { if (object.patch != null) message.patch = String(object.patch); if (object.custom != null) { - if (typeof object.custom !== "object") + if (!$util.isObject(object.custom)) throw TypeError(".google.api.HttpRule.custom: object expected"); message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); } @@ -285170,7 +286760,7 @@ export const google = $root.google = (() => { throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); message.additionalBindings = []; for (let i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") + if (!$util.isObject(object.additionalBindings[i])) throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); } @@ -285201,36 +286791,36 @@ export const google = $root.google = (() => { object.selector = ""; object.body = ""; } - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { object.get = message.get; if (options.oneofs) object.pattern = "get"; } - if (message.put != null && message.hasOwnProperty("put")) { + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { object.put = message.put; if (options.oneofs) object.pattern = "put"; } - if (message.post != null && message.hasOwnProperty("post")) { + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { object.post = message.post; if (options.oneofs) object.pattern = "post"; } - if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { object["delete"] = message["delete"]; if (options.oneofs) object.pattern = "delete"; } - if (message.patch != null && message.hasOwnProperty("patch")) { + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { object.patch = message.patch; if (options.oneofs) object.pattern = "patch"; } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options, q + 1); if (options.oneofs) object.pattern = "custom"; @@ -285358,7 +286948,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -285432,10 +287022,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) if (!$util.isString(message.kind)) return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) if (!$util.isString(message.path)) return "path: string expected"; return null; @@ -285452,6 +287042,8 @@ export const google = $root.google = (() => { CustomHttpPattern.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CustomHttpPattern) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CustomHttpPattern: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -285485,9 +287077,9 @@ export const google = $root.google = (() => { object.kind = ""; object.path = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) object.path = message.path; return object; }; @@ -285610,7 +287202,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -285682,7 +287274,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.file != null && message.hasOwnProperty("file")) { + if (message.file != null && Object.hasOwnProperty.call(message, "file")) { if (!Array.isArray(message.file)) return "file: array expected"; for (let i = 0; i < message.file.length; ++i) { @@ -285705,6 +287297,8 @@ export const google = $root.google = (() => { FileDescriptorSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -285715,7 +287309,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); message.file = []; for (let i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") + if (!$util.isObject(object.file[i])) throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); } @@ -286047,7 +287641,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -286195,41 +287789,41 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (message.dependency != null && Object.hasOwnProperty.call(message, "dependency")) { if (!Array.isArray(message.dependency)) return "dependency: array expected"; for (let i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (message.publicDependency != null && Object.hasOwnProperty.call(message, "publicDependency")) { if (!Array.isArray(message.publicDependency)) return "publicDependency: array expected"; for (let i = 0; i < message.publicDependency.length; ++i) if (!$util.isInteger(message.publicDependency[i])) return "publicDependency: integer[] expected"; } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (message.weakDependency != null && Object.hasOwnProperty.call(message, "weakDependency")) { if (!Array.isArray(message.weakDependency)) return "weakDependency: array expected"; for (let i = 0; i < message.weakDependency.length; ++i) if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } - if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (message.optionDependency != null && Object.hasOwnProperty.call(message, "optionDependency")) { if (!Array.isArray(message.optionDependency)) return "optionDependency: array expected"; for (let i = 0; i < message.optionDependency.length; ++i) if (!$util.isString(message.optionDependency[i])) return "optionDependency: string[] expected"; } - if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; for (let i = 0; i < message.messageType.length; ++i) { @@ -286238,7 +287832,7 @@ export const google = $root.google = (() => { return "messageType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (let i = 0; i < message.enumType.length; ++i) { @@ -286247,7 +287841,7 @@ export const google = $root.google = (() => { return "enumType." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { + if (message.service != null && Object.hasOwnProperty.call(message, "service")) { if (!Array.isArray(message.service)) return "service: array expected"; for (let i = 0; i < message.service.length; ++i) { @@ -286256,7 +287850,7 @@ export const google = $root.google = (() => { return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (let i = 0; i < message.extension.length; ++i) { @@ -286265,20 +287859,20 @@ export const google = $root.google = (() => { return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) { let error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); if (error) return "sourceCodeInfo." + error; } - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -286310,6 +287904,8 @@ export const google = $root.google = (() => { FileDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -286352,7 +287948,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); message.messageType = []; for (let i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") + if (!$util.isObject(object.messageType[i])) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); } @@ -286362,7 +287958,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); message.enumType = []; for (let i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") + if (!$util.isObject(object.enumType[i])) throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -286372,7 +287968,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); message.service = []; for (let i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") + if (!$util.isObject(object.service[i])) throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); } @@ -286382,18 +287978,18 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); message.extension = []; for (let i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") + if (!$util.isObject(object.extension[i])) throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); } if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") + if (!$util.isObject(object.sourceCodeInfo)) throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); } @@ -286493,9 +288089,9 @@ export const google = $root.google = (() => { object.syntax = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { object.dependency = []; @@ -286522,9 +288118,9 @@ export const google = $root.google = (() => { for (let j = 0; j < message.extension.length; ++j) object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, q + 1); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options, q + 1); if (message.publicDependency && message.publicDependency.length) { object.publicDependency = []; @@ -286536,9 +288132,9 @@ export const google = $root.google = (() => { for (let j = 0; j < message.weakDependency.length; ++j) object.weakDependency[j] = message.weakDependency[j]; } - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; if (message.optionDependency && message.optionDependency.length) { object.optionDependency = []; @@ -286778,7 +288374,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -286904,10 +288500,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { + if (message.field != null && Object.hasOwnProperty.call(message, "field")) { if (!Array.isArray(message.field)) return "field: array expected"; for (let i = 0; i < message.field.length; ++i) { @@ -286916,7 +288512,7 @@ export const google = $root.google = (() => { return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (let i = 0; i < message.extension.length; ++i) { @@ -286925,7 +288521,7 @@ export const google = $root.google = (() => { return "extension." + error; } } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (message.nestedType != null && Object.hasOwnProperty.call(message, "nestedType")) { if (!Array.isArray(message.nestedType)) return "nestedType: array expected"; for (let i = 0; i < message.nestedType.length; ++i) { @@ -286934,7 +288530,7 @@ export const google = $root.google = (() => { return "nestedType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (let i = 0; i < message.enumType.length; ++i) { @@ -286943,7 +288539,7 @@ export const google = $root.google = (() => { return "enumType." + error; } } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (message.extensionRange != null && Object.hasOwnProperty.call(message, "extensionRange")) { if (!Array.isArray(message.extensionRange)) return "extensionRange: array expected"; for (let i = 0; i < message.extensionRange.length; ++i) { @@ -286952,7 +288548,7 @@ export const google = $root.google = (() => { return "extensionRange." + error; } } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (message.oneofDecl != null && Object.hasOwnProperty.call(message, "oneofDecl")) { if (!Array.isArray(message.oneofDecl)) return "oneofDecl: array expected"; for (let i = 0; i < message.oneofDecl.length; ++i) { @@ -286961,12 +288557,12 @@ export const google = $root.google = (() => { return "oneofDecl." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (let i = 0; i < message.reservedRange.length; ++i) { @@ -286975,14 +288571,14 @@ export const google = $root.google = (() => { return "reservedRange." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (let i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -287005,6 +288601,8 @@ export const google = $root.google = (() => { DescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -287017,7 +288615,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); message.field = []; for (let i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") + if (!$util.isObject(object.field[i])) throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); } @@ -287027,7 +288625,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); message.extension = []; for (let i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") + if (!$util.isObject(object.extension[i])) throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } @@ -287037,7 +288635,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); message.nestedType = []; for (let i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") + if (!$util.isObject(object.nestedType[i])) throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); } @@ -287047,7 +288645,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); message.enumType = []; for (let i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") + if (!$util.isObject(object.enumType[i])) throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -287057,7 +288655,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); message.extensionRange = []; for (let i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") + if (!$util.isObject(object.extensionRange[i])) throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); } @@ -287067,13 +288665,13 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); message.oneofDecl = []; for (let i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") + if (!$util.isObject(object.oneofDecl[i])) throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); } @@ -287082,7 +288680,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (let i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") + if (!$util.isObject(object.reservedRange[i])) throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -287149,7 +288747,7 @@ export const google = $root.google = (() => { object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { object.field = []; @@ -287176,7 +288774,7 @@ export const google = $root.google = (() => { for (let j = 0; j < message.extension.length; ++j) object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, q + 1); if (message.oneofDecl && message.oneofDecl.length) { object.oneofDecl = []; @@ -287193,7 +288791,7 @@ export const google = $root.google = (() => { for (let j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -287321,7 +288919,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -287399,13 +288997,13 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -287424,6 +289022,8 @@ export const google = $root.google = (() => { ExtensionRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -287434,7 +289034,7 @@ export const google = $root.google = (() => { if (object.end != null) message.end = object.end | 0; if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); } @@ -287463,11 +289063,11 @@ export const google = $root.google = (() => { object.end = 0; object.options = null; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options, q + 1); return object; }; @@ -287587,7 +289187,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -287661,10 +289261,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -287681,6 +289281,8 @@ export const google = $root.google = (() => { ReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -287714,9 +289316,9 @@ export const google = $root.google = (() => { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -287865,7 +289467,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -287951,7 +289553,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -287960,7 +289562,7 @@ export const google = $root.google = (() => { return "uninterpretedOption." + error; } } - if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) { if (!Array.isArray(message.declaration)) return "declaration: array expected"; for (let i = 0; i < message.declaration.length; ++i) { @@ -287969,12 +289571,12 @@ export const google = $root.google = (() => { return "declaration." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.verification != null && message.hasOwnProperty("verification")) + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) switch (message.verification) { default: return "verification: enum value expected"; @@ -287996,6 +289598,8 @@ export const google = $root.google = (() => { ExtensionRangeOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -288006,7 +289610,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -288016,13 +289620,13 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); message.declaration = []; for (let i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") + if (!$util.isObject(object.declaration[i])) throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); } } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -288075,9 +289679,9 @@ export const google = $root.google = (() => { for (let j = 0; j < message.declaration.length; ++j) object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options, q + 1); } - if (message.verification != null && message.hasOwnProperty("verification")) + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -288232,7 +289836,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -288318,19 +289922,19 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) if (typeof message.reserved !== "boolean") return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) if (typeof message.repeated !== "boolean") return "repeated: boolean expected"; return null; @@ -288347,6 +289951,8 @@ export const google = $root.google = (() => { Declaration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -288389,15 +289995,15 @@ export const google = $root.google = (() => { object.reserved = false; object.repeated = false; } - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) object.repeated = message.repeated; return object; }; @@ -288633,7 +290239,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -288743,13 +290349,13 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -288758,7 +290364,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -288782,27 +290388,27 @@ export const google = $root.google = (() => { case 18: break; } - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) if (!$util.isString(message.typeName)) return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) if (!$util.isString(message.defaultValue)) return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) if (!$util.isInteger(message.oneofIndex)) return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) if (!$util.isString(message.jsonName)) return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) if (typeof message.proto3Optional !== "boolean") return "proto3Optional: boolean expected"; return null; @@ -288819,6 +290425,8 @@ export const google = $root.google = (() => { FieldDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -288939,7 +290547,7 @@ export const google = $root.google = (() => { if (object.jsonName != null) message.jsonName = String(object.jsonName); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); } @@ -288978,27 +290586,27 @@ export const google = $root.google = (() => { object.jsonName = ""; object.proto3Optional = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, q + 1); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) object.proto3Optional = message.proto3Optional; return object; }; @@ -289180,7 +290788,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -289254,10 +290862,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -289276,6 +290884,8 @@ export const google = $root.google = (() => { OneofDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -289284,7 +290894,7 @@ export const google = $root.google = (() => { if (object.name != null) message.name = String(object.name); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); } @@ -289312,9 +290922,9 @@ export const google = $root.google = (() => { object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options, q + 1); return object; }; @@ -289484,7 +291094,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -289580,10 +291190,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { + if (message.value != null && Object.hasOwnProperty.call(message, "value")) { if (!Array.isArray(message.value)) return "value: array expected"; for (let i = 0; i < message.value.length; ++i) { @@ -289592,12 +291202,12 @@ export const google = $root.google = (() => { return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (let i = 0; i < message.reservedRange.length; ++i) { @@ -289606,14 +291216,14 @@ export const google = $root.google = (() => { return "reservedRange." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (let i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -289636,6 +291246,8 @@ export const google = $root.google = (() => { EnumDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -289648,13 +291260,13 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); message.value = []; for (let i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") + if (!$util.isObject(object.value[i])) throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); } @@ -289663,7 +291275,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (let i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") + if (!$util.isObject(object.reservedRange[i])) throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -289725,14 +291337,14 @@ export const google = $root.google = (() => { object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { object.value = []; for (let j = 0; j < message.value.length; ++j) object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, q + 1); if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; @@ -289744,7 +291356,7 @@ export const google = $root.google = (() => { for (let j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -289861,7 +291473,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -289935,10 +291547,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -289955,6 +291567,8 @@ export const google = $root.google = (() => { EnumReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -289988,9 +291602,9 @@ export const google = $root.google = (() => { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -290124,7 +291738,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -290202,13 +291816,13 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -290227,6 +291841,8 @@ export const google = $root.google = (() => { EnumValueDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -290237,7 +291853,7 @@ export const google = $root.google = (() => { if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); } @@ -290266,11 +291882,11 @@ export const google = $root.google = (() => { object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, q + 1); return object; }; @@ -290403,7 +292019,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -290483,10 +292099,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { + if (message.method != null && Object.hasOwnProperty.call(message, "method")) { if (!Array.isArray(message.method)) return "method: array expected"; for (let i = 0; i < message.method.length; ++i) { @@ -290495,7 +292111,7 @@ export const google = $root.google = (() => { return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -290514,6 +292130,8 @@ export const google = $root.google = (() => { ServiceDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -290526,13 +292144,13 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); message.method = []; for (let i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") + if (!$util.isObject(object.method[i])) throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); } @@ -290562,14 +292180,14 @@ export const google = $root.google = (() => { object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { object.method = []; for (let j = 0; j < message.method.length; ++j) object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, q + 1); return object; }; @@ -290733,7 +292351,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -290823,24 +292441,24 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) if (!$util.isString(message.inputType)) return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) if (!$util.isString(message.outputType)) return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { let error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) if (typeof message.clientStreaming !== "boolean") return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) if (typeof message.serverStreaming !== "boolean") return "serverStreaming: boolean expected"; return null; @@ -290857,6 +292475,8 @@ export const google = $root.google = (() => { MethodDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -290869,7 +292489,7 @@ export const google = $root.google = (() => { if (object.outputType != null) message.outputType = String(object.outputType); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); } @@ -290905,17 +292525,17 @@ export const google = $root.google = (() => { object.clientStreaming = false; object.serverStreaming = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, q + 1); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) object.serverStreaming = message.serverStreaming; return object; }; @@ -291246,7 +292866,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -291398,22 +293018,22 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) if (!$util.isString(message.javaPackage)) return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) if (!$util.isString(message.javaOuterClassname)) return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) if (typeof message.javaMultipleFiles !== "boolean") return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) if (typeof message.javaGenerateEqualsAndHash !== "boolean") return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) if (typeof message.javaStringCheckUtf8 !== "boolean") return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) switch (message.optimizeFor) { default: return "optimizeFor: enum value expected"; @@ -291422,51 +293042,51 @@ export const google = $root.google = (() => { case 3: break; } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) if (!$util.isString(message.goPackage)) return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) if (typeof message.ccGenericServices !== "boolean") return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) if (typeof message.javaGenericServices !== "boolean") return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) if (typeof message.pyGenericServices !== "boolean") return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) if (typeof message.ccEnableArenas !== "boolean") return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) if (!$util.isString(message.objcClassPrefix)) return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) if (!$util.isString(message.csharpNamespace)) return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) if (!$util.isString(message.swiftPrefix)) return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) if (!$util.isString(message.phpClassPrefix)) return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) if (!$util.isString(message.phpNamespace)) return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) if (!$util.isString(message.phpMetadataNamespace)) return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) if (!$util.isString(message.rubyPackage)) return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -291489,6 +293109,8 @@ export const google = $root.google = (() => { FileOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -291551,7 +293173,7 @@ export const google = $root.google = (() => { if (object.rubyPackage != null) message.rubyPackage = String(object.rubyPackage); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.FileOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -291560,7 +293182,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -291609,45 +293231,45 @@ export const google = $root.google = (() => { object.rubyPackage = ""; object.features = null; } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -291845,7 +293467,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -291941,27 +293563,27 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) if (typeof message.messageSetWireFormat !== "boolean") return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) if (typeof message.noStandardDescriptorAccessor !== "boolean") return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -291984,6 +293606,8 @@ export const google = $root.google = (() => { MessageOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MessageOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -292000,7 +293624,7 @@ export const google = $root.google = (() => { if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.MessageOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -292009,7 +293633,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -292044,17 +293668,17 @@ export const google = $root.google = (() => { object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -292317,7 +293941,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -292450,7 +294074,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -292459,10 +294083,10 @@ export const google = $root.google = (() => { case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) switch (message.jstype) { default: return "jstype: enum value expected"; @@ -292471,22 +294095,22 @@ export const google = $root.google = (() => { case 2: break; } - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) if (typeof message.unverifiedLazy !== "boolean") return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) switch (message.retention) { default: return "retention: enum value expected"; @@ -292495,7 +294119,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.targets != null && message.hasOwnProperty("targets")) { + if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) { if (!Array.isArray(message.targets)) return "targets: array expected"; for (let i = 0; i < message.targets.length; ++i) @@ -292515,7 +294139,7 @@ export const google = $root.google = (() => { break; } } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (message.editionDefaults != null && Object.hasOwnProperty.call(message, "editionDefaults")) { if (!Array.isArray(message.editionDefaults)) return "editionDefaults: array expected"; for (let i = 0; i < message.editionDefaults.length; ++i) { @@ -292524,17 +294148,17 @@ export const google = $root.google = (() => { return "editionDefaults." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { let error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -292557,6 +294181,8 @@ export const google = $root.google = (() => { FieldOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -292692,18 +294318,18 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); message.editionDefaults = []; for (let i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") + if (!$util.isObject(object.editionDefaults[i])) throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); } } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") + if (!$util.isObject(object.featureSupport)) throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -292712,7 +294338,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -292755,23 +294381,23 @@ export const google = $root.google = (() => { object.features = null; object.featureSupport = null; } - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; if (message.targets && message.targets.length) { object.targets = []; @@ -292783,9 +294409,9 @@ export const google = $root.google = (() => { for (let j = 0; j < message.editionDefaults.length; ++j) object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options, q + 1); } - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -292985,7 +294611,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -293059,7 +294685,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -293077,7 +294703,7 @@ export const google = $root.google = (() => { case 2147483647: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -293094,6 +294720,8 @@ export const google = $root.google = (() => { EditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -293181,9 +294809,9 @@ export const google = $root.google = (() => { object.value = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; @@ -293325,7 +294953,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -293407,7 +295035,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) switch (message.editionIntroduced) { default: return "editionIntroduced: enum value expected"; @@ -293425,7 +295053,7 @@ export const google = $root.google = (() => { case 2147483647: break; } - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) switch (message.editionDeprecated) { default: return "editionDeprecated: enum value expected"; @@ -293443,10 +295071,10 @@ export const google = $root.google = (() => { case 2147483647: break; } - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) if (!$util.isString(message.deprecationWarning)) return "deprecationWarning: string expected"; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) switch (message.editionRemoved) { default: return "editionRemoved: enum value expected"; @@ -293478,6 +295106,8 @@ export const google = $root.google = (() => { FeatureSupport.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -293679,13 +295309,13 @@ export const google = $root.google = (() => { object.deprecationWarning = ""; object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) object.deprecationWarning = message.deprecationWarning; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; @@ -293810,7 +295440,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -293886,12 +295516,12 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -293914,13 +295544,15 @@ export const google = $root.google = (() => { OneofOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.google.protobuf.OneofOptions(); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.OneofOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -293929,7 +295561,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -293958,7 +295590,7 @@ export const google = $root.google = (() => { object.uninterpretedOption = []; if (options.defaults) object.features = null; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -294118,7 +295750,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -294206,21 +295838,21 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) if (typeof message.allowAlias !== "boolean") return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -294243,6 +295875,8 @@ export const google = $root.google = (() => { EnumOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -294255,7 +295889,7 @@ export const google = $root.google = (() => { if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.EnumOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -294264,7 +295898,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -294297,13 +295931,13 @@ export const google = $root.google = (() => { object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -294463,7 +296097,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -294551,23 +296185,23 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { let error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -294590,6 +296224,8 @@ export const google = $root.google = (() => { EnumValueOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -294598,14 +296234,14 @@ export const google = $root.google = (() => { if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") + if (!$util.isObject(object.featureSupport)) throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -294614,7 +296250,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -294647,13 +296283,13 @@ export const google = $root.google = (() => { object.debugRedact = false; object.featureSupport = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) object.debugRedact = message.debugRedact; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -294791,7 +296427,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -294871,15 +296507,15 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -294902,13 +296538,15 @@ export const google = $root.google = (() => { ServiceOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.google.protobuf.ServiceOptions(); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -294919,7 +296557,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -294950,9 +296588,9 @@ export const google = $root.google = (() => { object.deprecated = false; object.features = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; @@ -295112,7 +296750,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -295200,10 +296838,10 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) switch (message.idempotencyLevel) { default: return "idempotencyLevel: enum value expected"; @@ -295212,12 +296850,12 @@ export const google = $root.google = (() => { case 2: break; } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { let error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (let i = 0; i < message.uninterpretedOption.length; ++i) { @@ -295226,7 +296864,7 @@ export const google = $root.google = (() => { return "uninterpretedOption." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) { let error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); if (error) return ".google.api.http." + error; @@ -295245,6 +296883,8 @@ export const google = $root.google = (() => { MethodOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -295273,7 +296913,7 @@ export const google = $root.google = (() => { break; } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.MethodOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -295282,13 +296922,13 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (let i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") + if (!$util.isObject(object[".google.api.http"])) throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); } @@ -295320,18 +296960,18 @@ export const google = $root.google = (() => { object.features = null; object[".google.api.http"] = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (let j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options, q + 1); return object; }; @@ -295524,7 +297164,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -295620,7 +297260,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) { + if (message.name != null && Object.hasOwnProperty.call(message, "name")) { if (!Array.isArray(message.name)) return "name: array expected"; for (let i = 0; i < message.name.length; ++i) { @@ -295629,22 +297269,22 @@ export const google = $root.google = (() => { return "name." + error; } } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) if (!$util.isString(message.identifierValue)) return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) if (typeof message.doubleValue !== "number") return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) if (!$util.isString(message.aggregateValue)) return "aggregateValue: string expected"; return null; @@ -295661,6 +297301,8 @@ export const google = $root.google = (() => { UninterpretedOption.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -295671,7 +297313,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); message.name = []; for (let i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") + if (!$util.isObject(object.name[i])) throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); } @@ -295754,27 +297396,27 @@ export const google = $root.google = (() => { for (let j = 0; j < message.name.length; ++j) object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, q + 1); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.positiveIntValue = typeof message.positiveIntValue === "number" ? BigInt(message.positiveIntValue) : $util.Long.fromBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0, true).toBigInt(); else if (typeof message.positiveIntValue === "number") object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; else object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.negativeIntValue = typeof message.negativeIntValue === "number" ? BigInt(message.negativeIntValue) : $util.Long.fromBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0, false).toBigInt(); else if (typeof message.negativeIntValue === "number") object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; else object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) object.aggregateValue = message.aggregateValue; return object; }; @@ -295889,7 +297531,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -295929,9 +297571,9 @@ export const google = $root.google = (() => { break; } } - if (!message.hasOwnProperty("namePart")) + if (!Object.hasOwnProperty.call(message, "namePart")) throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) + if (!Object.hasOwnProperty.call(message, "isExtension")) throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; @@ -295985,6 +297627,8 @@ export const google = $root.google = (() => { NamePart.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -296018,9 +297662,9 @@ export const google = $root.google = (() => { object.namePart = ""; object.isExtension = false; } - if (message.namePart != null && message.hasOwnProperty("namePart")) + if (message.namePart != null && Object.hasOwnProperty.call(message, "namePart")) object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) + if (message.isExtension != null && Object.hasOwnProperty.call(message, "isExtension")) object.isExtension = message.isExtension; return object; }; @@ -296209,7 +297853,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -296307,7 +297951,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) switch (message.fieldPresence) { default: return "fieldPresence: enum value expected"; @@ -296317,7 +297961,7 @@ export const google = $root.google = (() => { case 3: break; } - if (message.enumType != null && message.hasOwnProperty("enumType")) + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) switch (message.enumType) { default: return "enumType: enum value expected"; @@ -296326,7 +297970,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) switch (message.repeatedFieldEncoding) { default: return "repeatedFieldEncoding: enum value expected"; @@ -296335,7 +297979,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) switch (message.utf8Validation) { default: return "utf8Validation: enum value expected"; @@ -296344,7 +297988,7 @@ export const google = $root.google = (() => { case 3: break; } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) switch (message.messageEncoding) { default: return "messageEncoding: enum value expected"; @@ -296353,7 +297997,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) switch (message.jsonFormat) { default: return "jsonFormat: enum value expected"; @@ -296362,7 +298006,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) switch (message.enforceNamingStyle) { default: return "enforceNamingStyle: enum value expected"; @@ -296371,7 +298015,7 @@ export const google = $root.google = (() => { case 2: break; } - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) switch (message.defaultSymbolVisibility) { default: return "defaultSymbolVisibility: enum value expected"; @@ -296396,6 +298040,8 @@ export const google = $root.google = (() => { FeatureSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -296603,21 +298249,21 @@ export const google = $root.google = (() => { object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -296826,7 +298472,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -296906,10 +298552,6 @@ export const google = $root.google = (() => { VisibilityFeature.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.FeatureSet.VisibilityFeature(); }; @@ -297077,7 +298719,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -297157,7 +298799,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (message.defaults != null && Object.hasOwnProperty.call(message, "defaults")) { if (!Array.isArray(message.defaults)) return "defaults: array expected"; for (let i = 0; i < message.defaults.length; ++i) { @@ -297166,7 +298808,7 @@ export const google = $root.google = (() => { return "defaults." + error; } } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) switch (message.minimumEdition) { default: return "minimumEdition: enum value expected"; @@ -297184,7 +298826,7 @@ export const google = $root.google = (() => { case 2147483647: break; } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) switch (message.maximumEdition) { default: return "maximumEdition: enum value expected"; @@ -297216,6 +298858,8 @@ export const google = $root.google = (() => { FeatureSetDefaults.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -297226,7 +298870,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); message.defaults = []; for (let i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") + if (!$util.isObject(object.defaults[i])) throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); } @@ -297374,9 +299018,9 @@ export const google = $root.google = (() => { for (let j = 0; j < message.defaults.length; ++j) object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options, q + 1); } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; @@ -297504,7 +299148,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -297582,7 +299226,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -297600,12 +299244,12 @@ export const google = $root.google = (() => { case 2147483647: break; } - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) { let error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); if (error) return "overridableFeatures." + error; } - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) { let error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); if (error) return "fixedFeatures." + error; @@ -297624,6 +299268,8 @@ export const google = $root.google = (() => { FeatureSetEditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -297686,12 +299332,12 @@ export const google = $root.google = (() => { break; } if (object.overridableFeatures != null) { - if (typeof object.overridableFeatures !== "object") + if (!$util.isObject(object.overridableFeatures)) throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); } if (object.fixedFeatures != null) { - if (typeof object.fixedFeatures !== "object") + if (!$util.isObject(object.fixedFeatures)) throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); } @@ -297720,11 +299366,11 @@ export const google = $root.google = (() => { object.overridableFeatures = null; object.fixedFeatures = null; } - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options, q + 1); - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options, q + 1); return object; }; @@ -297838,7 +299484,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -297910,7 +299556,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.location != null && message.hasOwnProperty("location")) { + if (message.location != null && Object.hasOwnProperty.call(message, "location")) { if (!Array.isArray(message.location)) return "location: array expected"; for (let i = 0; i < message.location.length; ++i) { @@ -297933,6 +299579,8 @@ export const google = $root.google = (() => { SourceCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -297943,7 +299591,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); message.location = []; for (let i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") + if (!$util.isObject(object.location[i])) throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); } @@ -298135,7 +299783,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -298237,27 +299885,27 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && message.hasOwnProperty("path")) { + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (let i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { + if (message.span != null && Object.hasOwnProperty.call(message, "span")) { if (!Array.isArray(message.span)) return "span: array expected"; for (let i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) return "span: integer[] expected"; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) if (!$util.isString(message.leadingComments)) return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) if (!$util.isString(message.trailingComments)) return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (message.leadingDetachedComments != null && Object.hasOwnProperty.call(message, "leadingDetachedComments")) { if (!Array.isArray(message.leadingDetachedComments)) return "leadingDetachedComments: array expected"; for (let i = 0; i < message.leadingDetachedComments.length; ++i) @@ -298278,6 +299926,8 @@ export const google = $root.google = (() => { Location.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -298347,9 +299997,9 @@ export const google = $root.google = (() => { for (let j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) object.trailingComments = message.trailingComments; if (message.leadingDetachedComments && message.leadingDetachedComments.length) { object.leadingDetachedComments = []; @@ -298468,7 +300118,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -298540,7 +300190,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) { if (!Array.isArray(message.annotation)) return "annotation: array expected"; for (let i = 0; i < message.annotation.length; ++i) { @@ -298563,6 +300213,8 @@ export const google = $root.google = (() => { GeneratedCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -298573,7 +300225,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); message.annotation = []; for (let i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") + if (!$util.isObject(object.annotation[i])) throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); } @@ -298758,7 +300410,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -298851,23 +300503,23 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && message.hasOwnProperty("path")) { + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (let i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) if (!$util.isString(message.sourceFile)) return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) if (!$util.isInteger(message.begin)) return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) switch (message.semantic) { default: return "semantic: enum value expected"; @@ -298890,6 +300542,8 @@ export const google = $root.google = (() => { Annotation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -298961,13 +300615,13 @@ export const google = $root.google = (() => { for (let j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -299115,7 +300769,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -299206,7 +300860,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fields != null && message.hasOwnProperty("fields")) { + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) { if (!$util.isObject(message.fields)) return "fields: object expected"; let key = Object.keys(message.fields); @@ -299230,19 +300884,21 @@ export const google = $root.google = (() => { Struct.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Struct) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Struct: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.google.protobuf.Struct(); if (object.fields) { - if (typeof object.fields !== "object") + if (!$util.isObject(object.fields)) throw TypeError(".google.protobuf.Struct.fields: object expected"); message.fields = {}; for (let keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.fields, keys[i]); - if (typeof object.fields[keys[i]] !== "object") + if (!$util.isObject(object.fields[keys[i]])) throw TypeError(".google.protobuf.Struct.fields: object expected"); message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]], long + 1); } @@ -299454,7 +301110,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -299545,7 +301201,7 @@ export const google = $root.google = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) { properties.kind = 1; switch (message.nullValue) { default: @@ -299554,28 +301210,28 @@ export const google = $root.google = (() => { break; } } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (typeof message.numberValue !== "number") return "numberValue: number expected"; } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (!$util.isString(message.stringValue)) return "stringValue: string expected"; } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; if (typeof message.boolValue !== "boolean") return "boolValue: boolean expected"; } - if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -299585,7 +301241,7 @@ export const google = $root.google = (() => { return "structValue." + error; } } - if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; @@ -299609,6 +301265,8 @@ export const google = $root.google = (() => { Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -299633,12 +301291,12 @@ export const google = $root.google = (() => { if (object.boolValue != null) message.boolValue = Boolean(object.boolValue); if (object.structValue != null) { - if (typeof object.structValue !== "object") + if (!$util.isObject(object.structValue)) throw TypeError(".google.protobuf.Value.structValue: object expected"); message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue, long + 1); } if (object.listValue != null) { - if (typeof object.listValue !== "object") + if (!$util.isObject(object.listValue)) throw TypeError(".google.protobuf.Value.listValue: object expected"); message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue, long + 1); } @@ -299662,32 +301320,32 @@ export const google = $root.google = (() => { if (q > $util.recursionLimit) throw Error("max depth exceeded"); let object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) { object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.kind = "nullValue"; } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) { object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; if (options.oneofs) object.kind = "numberValue"; } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { object.stringValue = message.stringValue; if (options.oneofs) object.kind = "stringValue"; } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { object.boolValue = message.boolValue; if (options.oneofs) object.kind = "boolValue"; } - if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) { object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options, q + 1); if (options.oneofs) object.kind = "structValue"; } - if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) { object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options, q + 1); if (options.oneofs) object.kind = "listValue"; @@ -299813,7 +301471,7 @@ export const google = $root.google = (() => { * @returns {$protobuf.Writer} Writer */ ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -299885,7 +301543,7 @@ export const google = $root.google = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.values != null && message.hasOwnProperty("values")) { + if (message.values != null && Object.hasOwnProperty.call(message, "values")) { if (!Array.isArray(message.values)) return "values: array expected"; for (let i = 0; i < message.values.length; ++i) { @@ -299908,6 +301566,8 @@ export const google = $root.google = (() => { ListValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ListValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ListValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -299918,7 +301578,7 @@ export const google = $root.google = (() => { throw TypeError(".google.protobuf.ListValue.values: array expected"); message.values = []; for (let i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") + if (!$util.isObject(object.values[i])) throw TypeError(".google.protobuf.ListValue.values: object expected"); message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i], long + 1); } @@ -300124,7 +301784,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -300202,7 +301862,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responseCode != null && message.hasOwnProperty("responseCode")) + if (message.responseCode != null && Object.hasOwnProperty.call(message, "responseCode")) switch (message.responseCode) { default: return "responseCode: enum value expected"; @@ -300218,10 +301878,10 @@ export const Router = $root.Router = (() => { case 9: break; } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; - if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) + if (message.encryptedPayload != null && Object.hasOwnProperty.call(message, "encryptedPayload")) if (!(message.encryptedPayload && typeof message.encryptedPayload.length === "number" || $util.isString(message.encryptedPayload))) return "encryptedPayload: buffer expected"; return null; @@ -300238,6 +301898,8 @@ export const Router = $root.Router = (() => { RouterResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -300329,11 +301991,11 @@ export const Router = $root.Router = (() => { object.encryptedPayload = $util.newBuffer(object.encryptedPayload); } } - if (message.responseCode != null && message.hasOwnProperty("responseCode")) + if (message.responseCode != null && Object.hasOwnProperty.call(message, "responseCode")) object.responseCode = options.enums === String ? $root.Router.RouterResponseCode[message.responseCode] === undefined ? message.responseCode : $root.Router.RouterResponseCode[message.responseCode] : message.responseCode; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; - if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) + if (message.encryptedPayload != null && Object.hasOwnProperty.call(message, "encryptedPayload")) object.encryptedPayload = options.bytes === String ? $util.base64.encode(message.encryptedPayload, 0, message.encryptedPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPayload) : message.encryptedPayload; return object; }; @@ -300497,7 +302159,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterControllerMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -300587,7 +302249,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) switch (message.messageType) { default: return "messageType: enum value expected"; @@ -300602,19 +302264,19 @@ export const Router = $root.Router = (() => { case 8: break; } - if (message.messageUid != null && message.hasOwnProperty("messageUid")) + if (message.messageUid != null && Object.hasOwnProperty.call(message, "messageUid")) if (!(message.messageUid && typeof message.messageUid.length === "number" || $util.isString(message.messageUid))) return "messageUid: buffer expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.streamResponse != null && message.hasOwnProperty("streamResponse")) + if (message.streamResponse != null && Object.hasOwnProperty.call(message, "streamResponse")) if (typeof message.streamResponse !== "boolean") return "streamResponse: boolean expected"; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) if (!$util.isInteger(message.timeout)) return "timeout: integer expected"; return null; @@ -300631,6 +302293,8 @@ export const Router = $root.Router = (() => { RouterControllerMessage.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterControllerMessage) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterControllerMessage: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -300745,17 +302409,17 @@ export const Router = $root.Router = (() => { } object.timeout = 0; } - if (message.messageType != null && message.hasOwnProperty("messageType")) + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) object.messageType = options.enums === String ? $root.PAM.ControllerMessageType[message.messageType] === undefined ? message.messageType : $root.PAM.ControllerMessageType[message.messageType] : message.messageType; - if (message.messageUid != null && message.hasOwnProperty("messageUid")) + if (message.messageUid != null && Object.hasOwnProperty.call(message, "messageUid")) object.messageUid = options.bytes === String ? $util.base64.encode(message.messageUid, 0, message.messageUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageUid) : message.messageUid; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.streamResponse != null && message.hasOwnProperty("streamResponse")) + if (message.streamResponse != null && Object.hasOwnProperty.call(message, "streamResponse")) object.streamResponse = message.streamResponse; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) object.timeout = message.timeout; return object; }; @@ -300807,6 +302471,7 @@ export const Router = $root.Router = (() => { * @property {number|null} [mspEnterpriseId] RouterUserAuth mspEnterpriseId * @property {boolean|null} [isPedmAdmin] RouterUserAuth isPedmAdmin * @property {number|null} [mcEnterpriseId] RouterUserAuth mcEnterpriseId + * @property {number|null} [deviceId] RouterUserAuth deviceId */ /** @@ -300920,6 +302585,23 @@ export const Router = $root.Router = (() => { */ RouterUserAuth.prototype.mcEnterpriseId = 0; + /** + * RouterUserAuth deviceId. + * @member {number|null|undefined} deviceId + * @memberof Router.RouterUserAuth + * @instance + */ + RouterUserAuth.prototype.deviceId = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RouterUserAuth.prototype, "_deviceId", { + get: $util.oneOfGetter($oneOfFields = ["deviceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new RouterUserAuth instance using the specified properties. * @function create @@ -300972,6 +302654,8 @@ export const Router = $root.Router = (() => { writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isPedmAdmin); if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.mcEnterpriseId); + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.deviceId); return writer; }; @@ -300985,7 +302669,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterUserAuth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -301060,6 +302744,10 @@ export const Router = $root.Router = (() => { message.mcEnterpriseId = reader.int32(); break; } + case 13: { + message.deviceId = reader.int64(); + break; + } default: reader.skipType(tag & 7, long); break; @@ -301099,42 +302787,48 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + let properties = {}; + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) if (!(message.transmissionKey && typeof message.transmissionKey.length === "number" || $util.isString(message.transmissionKey))) return "transmissionKey: buffer expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) if (!(message.sessionToken && typeof message.sessionToken.length === "number" || $util.isString(message.sessionToken))) return "sessionToken: buffer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) if (!(message.deviceToken && typeof message.deviceToken.length === "number" || $util.isString(message.deviceToken))) return "deviceToken: buffer expected"; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) if (!$util.isInteger(message.clientVersionId)) return "clientVersionId: integer expected"; - if (message.needUsername != null && message.hasOwnProperty("needUsername")) + if (message.needUsername != null && Object.hasOwnProperty.call(message, "needUsername")) if (typeof message.needUsername !== "boolean") return "needUsername: boolean expected"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.mspEnterpriseId != null && message.hasOwnProperty("mspEnterpriseId")) + if (message.mspEnterpriseId != null && Object.hasOwnProperty.call(message, "mspEnterpriseId")) if (!$util.isInteger(message.mspEnterpriseId)) return "mspEnterpriseId: integer expected"; - if (message.isPedmAdmin != null && message.hasOwnProperty("isPedmAdmin")) + if (message.isPedmAdmin != null && Object.hasOwnProperty.call(message, "isPedmAdmin")) if (typeof message.isPedmAdmin !== "boolean") return "isPedmAdmin: boolean expected"; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) if (!$util.isInteger(message.mcEnterpriseId)) return "mcEnterpriseId: integer expected"; + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) { + properties._deviceId = 1; + if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) + return "deviceId: integer|Long expected"; + } return null; }; @@ -301149,6 +302843,8 @@ export const Router = $root.Router = (() => { RouterUserAuth.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterUserAuth) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterUserAuth: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -301194,6 +302890,15 @@ export const Router = $root.Router = (() => { message.isPedmAdmin = Boolean(object.isPedmAdmin); if (object.mcEnterpriseId != null) message.mcEnterpriseId = object.mcEnterpriseId | 0; + if (object.deviceId != null) + if ($util.Long) + message.deviceId = $util.Long.fromValue(object.deviceId, false); + else if (typeof object.deviceId === "string") + message.deviceId = parseInt(object.deviceId, 10); + else if (typeof object.deviceId === "number") + message.deviceId = object.deviceId; + else if (typeof object.deviceId === "object") + message.deviceId = new $util.LongBits(object.deviceId.low >>> 0, object.deviceId.high >>> 0).toNumber(); return message; }; @@ -301250,35 +302955,45 @@ export const Router = $root.Router = (() => { object.isPedmAdmin = false; object.mcEnterpriseId = 0; } - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) object.transmissionKey = options.bytes === String ? $util.base64.encode(message.transmissionKey, 0, message.transmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.transmissionKey) : message.transmissionKey; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) object.sessionToken = options.bytes === String ? $util.base64.encode(message.sessionToken, 0, message.sessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.sessionToken) : message.sessionToken; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) object.deviceToken = options.bytes === String ? $util.base64.encode(message.deviceToken, 0, message.deviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceToken) : message.deviceToken; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) object.clientVersionId = message.clientVersionId; - if (message.needUsername != null && message.hasOwnProperty("needUsername")) + if (message.needUsername != null && Object.hasOwnProperty.call(message, "needUsername")) object.needUsername = message.needUsername; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.mspEnterpriseId != null && message.hasOwnProperty("mspEnterpriseId")) + if (message.mspEnterpriseId != null && Object.hasOwnProperty.call(message, "mspEnterpriseId")) object.mspEnterpriseId = message.mspEnterpriseId; - if (message.isPedmAdmin != null && message.hasOwnProperty("isPedmAdmin")) + if (message.isPedmAdmin != null && Object.hasOwnProperty.call(message, "isPedmAdmin")) object.isPedmAdmin = message.isPedmAdmin; - if (message.mcEnterpriseId != null && message.hasOwnProperty("mcEnterpriseId")) + if (message.mcEnterpriseId != null && Object.hasOwnProperty.call(message, "mcEnterpriseId")) object.mcEnterpriseId = message.mcEnterpriseId; + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); + else if (typeof message.deviceId === "number") + object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; + else + object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; + if (options.oneofs) + object._deviceId = "deviceId"; + } return object; }; @@ -301518,7 +303233,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterDeviceAuth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -301636,43 +303351,43 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) if (!$util.isString(message.clientId)) return "clientId: string expected"; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) if (!$util.isString(message.clientVersion)) return "clientVersion: string expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) if (!(message.deviceToken && typeof message.deviceToken.length === "number" || $util.isString(message.deviceToken))) return "deviceToken: buffer expected"; - if (message.controllerName != null && message.hasOwnProperty("controllerName")) + if (message.controllerName != null && Object.hasOwnProperty.call(message, "controllerName")) if (!$util.isString(message.controllerName)) return "controllerName: string expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.ownerUser != null && message.hasOwnProperty("ownerUser")) + if (message.ownerUser != null && Object.hasOwnProperty.call(message, "ownerUser")) if (!$util.isString(message.ownerUser)) return "ownerUser: string expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) if (!$util.isString(message.challenge)) return "challenge: string expected"; - if (message.ownerId != null && message.hasOwnProperty("ownerId")) + if (message.ownerId != null && Object.hasOwnProperty.call(message, "ownerId")) if (!$util.isInteger(message.ownerId)) return "ownerId: integer expected"; - if (message.maxInstanceCount != null && message.hasOwnProperty("maxInstanceCount")) + if (message.maxInstanceCount != null && Object.hasOwnProperty.call(message, "maxInstanceCount")) if (!$util.isInteger(message.maxInstanceCount)) return "maxInstanceCount: integer expected"; return null; @@ -301689,6 +303404,8 @@ export const Router = $root.Router = (() => { RouterDeviceAuth.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterDeviceAuth) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterDeviceAuth: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -301793,36 +303510,36 @@ export const Router = $root.Router = (() => { object.ownerId = 0; object.maxInstanceCount = 0; } - if (message.clientId != null && message.hasOwnProperty("clientId")) + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) object.clientId = message.clientId; - if (message.clientVersion != null && message.hasOwnProperty("clientVersion")) + if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion")) object.clientVersion = message.clientVersion; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) object.deviceToken = options.bytes === String ? $util.base64.encode(message.deviceToken, 0, message.deviceToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceToken) : message.deviceToken; - if (message.controllerName != null && message.hasOwnProperty("controllerName")) + if (message.controllerName != null && Object.hasOwnProperty.call(message, "controllerName")) object.controllerName = message.controllerName; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.ownerUser != null && message.hasOwnProperty("ownerUser")) + if (message.ownerUser != null && Object.hasOwnProperty.call(message, "ownerUser")) object.ownerUser = message.ownerUser; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) object.challenge = message.challenge; - if (message.ownerId != null && message.hasOwnProperty("ownerId")) + if (message.ownerId != null && Object.hasOwnProperty.call(message, "ownerId")) object.ownerId = message.ownerId; - if (message.maxInstanceCount != null && message.hasOwnProperty("maxInstanceCount")) + if (message.maxInstanceCount != null && Object.hasOwnProperty.call(message, "maxInstanceCount")) object.maxInstanceCount = message.maxInstanceCount; return object; }; @@ -301975,7 +303692,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterRecordRotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -302061,19 +303778,19 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) if (!(message.resourceUid && typeof message.resourceUid.length === "number" || $util.isString(message.resourceUid))) return "resourceUid: buffer expected"; - if (message.noSchedule != null && message.hasOwnProperty("noSchedule")) + if (message.noSchedule != null && Object.hasOwnProperty.call(message, "noSchedule")) if (typeof message.noSchedule !== "boolean") return "noSchedule: boolean expected"; return null; @@ -302090,6 +303807,8 @@ export const Router = $root.Router = (() => { RouterRecordRotation.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterRecordRotation) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterRecordRotation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -302168,15 +303887,15 @@ export const Router = $root.Router = (() => { } object.noSchedule = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) object.resourceUid = options.bytes === String ? $util.base64.encode(message.resourceUid, 0, message.resourceUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.resourceUid) : message.resourceUid; - if (message.noSchedule != null && message.hasOwnProperty("noSchedule")) + if (message.noSchedule != null && Object.hasOwnProperty.call(message, "noSchedule")) object.noSchedule = message.noSchedule; return object; }; @@ -302298,7 +304017,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterRecordRotationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -302374,10 +304093,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) @@ -302398,6 +304117,8 @@ export const Router = $root.Router = (() => { RouterRecordRotationsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterRecordRotationsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterRecordRotationsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -302439,7 +304160,7 @@ export const Router = $root.Router = (() => { object.records = []; if (options.defaults) object.enterpriseId = 0; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; if (message.records && message.records.length) { object.records = []; @@ -302566,7 +304287,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterRecordRotationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -302642,7 +304363,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rotations != null && message.hasOwnProperty("rotations")) { + if (message.rotations != null && Object.hasOwnProperty.call(message, "rotations")) { if (!Array.isArray(message.rotations)) return "rotations: array expected"; for (let i = 0; i < message.rotations.length; ++i) { @@ -302651,7 +304372,7 @@ export const Router = $root.Router = (() => { return "rotations." + error; } } - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; return null; @@ -302668,6 +304389,8 @@ export const Router = $root.Router = (() => { RouterRecordRotationsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterRecordRotationsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterRecordRotationsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -302678,7 +304401,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.RouterRecordRotationsResponse.rotations: array expected"); message.rotations = []; for (let i = 0; i < object.rotations.length; ++i) { - if (typeof object.rotations[i] !== "object") + if (!$util.isObject(object.rotations[i])) throw TypeError(".Router.RouterRecordRotationsResponse.rotations: object expected"); message.rotations[i] = $root.Router.RouterRecordRotation.fromObject(object.rotations[i], long + 1); } @@ -302714,7 +304437,7 @@ export const Router = $root.Router = (() => { for (let j = 0; j < message.rotations.length; ++j) object.rotations[j] = $root.Router.RouterRecordRotation.toObject(message.rotations[j], options, q + 1); } - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; return object; }; @@ -302929,7 +304652,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterRotationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -303031,7 +304754,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -303041,28 +304764,28 @@ export const Router = $root.Router = (() => { case 3: break; } - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) if (!(message.resourceUid && typeof message.resourceUid.length === "number" || $util.isString(message.resourceUid))) return "resourceUid: buffer expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.controllerName != null && message.hasOwnProperty("controllerName")) + if (message.controllerName != null && Object.hasOwnProperty.call(message, "controllerName")) if (!$util.isString(message.controllerName)) return "controllerName: string expected"; - if (message.scriptName != null && message.hasOwnProperty("scriptName")) + if (message.scriptName != null && Object.hasOwnProperty.call(message, "scriptName")) if (!$util.isString(message.scriptName)) return "scriptName: string expected"; - if (message.pwdComplexity != null && message.hasOwnProperty("pwdComplexity")) + if (message.pwdComplexity != null && Object.hasOwnProperty.call(message, "pwdComplexity")) if (!$util.isString(message.pwdComplexity)) return "pwdComplexity: string expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) if (typeof message.disabled !== "boolean") return "disabled: boolean expected"; return null; @@ -303079,6 +304802,8 @@ export const Router = $root.Router = (() => { RouterRotationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterRotationInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterRotationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -303193,28 +304918,28 @@ export const Router = $root.Router = (() => { object.pwdComplexity = ""; object.disabled = false; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.Router.RouterRotationStatus[message.status] === undefined ? message.status : $root.Router.RouterRotationStatus[message.status] : message.status; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) object.resourceUid = options.bytes === String ? $util.base64.encode(message.resourceUid, 0, message.resourceUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.resourceUid) : message.resourceUid; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.controllerName != null && message.hasOwnProperty("controllerName")) + if (message.controllerName != null && Object.hasOwnProperty.call(message, "controllerName")) object.controllerName = message.controllerName; - if (message.scriptName != null && message.hasOwnProperty("scriptName")) + if (message.scriptName != null && Object.hasOwnProperty.call(message, "scriptName")) object.scriptName = message.scriptName; - if (message.pwdComplexity != null && message.hasOwnProperty("pwdComplexity")) + if (message.pwdComplexity != null && Object.hasOwnProperty.call(message, "pwdComplexity")) object.pwdComplexity = message.pwdComplexity; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) object.disabled = message.disabled; return object; }; @@ -303487,7 +305212,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterRecordRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -303610,50 +305335,50 @@ export const Router = $root.Router = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) return "revision: integer|Long expected"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) if (!(message.resourceUid && typeof message.resourceUid.length === "number" || $util.isString(message.resourceUid))) return "resourceUid: buffer expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) if (!$util.isString(message.schedule)) return "schedule: string expected"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; - if (message.pwdComplexity != null && message.hasOwnProperty("pwdComplexity")) + if (message.pwdComplexity != null && Object.hasOwnProperty.call(message, "pwdComplexity")) if (!(message.pwdComplexity && typeof message.pwdComplexity.length === "number" || $util.isString(message.pwdComplexity))) return "pwdComplexity: buffer expected"; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) if (typeof message.disabled !== "boolean") return "disabled: boolean expected"; - if (message.remoteAddress != null && message.hasOwnProperty("remoteAddress")) + if (message.remoteAddress != null && Object.hasOwnProperty.call(message, "remoteAddress")) if (!$util.isString(message.remoteAddress)) return "remoteAddress: string expected"; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) if (!$util.isInteger(message.clientVersionId)) return "clientVersionId: integer expected"; - if (message.noop != null && message.hasOwnProperty("noop")) + if (message.noop != null && Object.hasOwnProperty.call(message, "noop")) if (typeof message.noop !== "boolean") return "noop: boolean expected"; - if (message.saasConfiguration != null && message.hasOwnProperty("saasConfiguration")) { + if (message.saasConfiguration != null && Object.hasOwnProperty.call(message, "saasConfiguration")) { properties._saasConfiguration = 1; if (!(message.saasConfiguration && typeof message.saasConfiguration.length === "number" || $util.isString(message.saasConfiguration))) return "saasConfiguration: buffer expected"; } - if (message.updateServices != null && message.hasOwnProperty("updateServices")) { + if (message.updateServices != null && Object.hasOwnProperty.call(message, "updateServices")) { properties._updateServices = 1; if (typeof message.updateServices !== "boolean") return "updateServices: boolean expected"; } - if (message.serviceResources != null && message.hasOwnProperty("serviceResources")) { + if (message.serviceResources != null && Object.hasOwnProperty.call(message, "serviceResources")) { properties._serviceResources = 1; { let error = $root.PAM.UidList.verify(message.serviceResources, long + 1); @@ -303675,6 +305400,8 @@ export const Router = $root.Router = (() => { RouterRecordRotationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterRecordRotationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterRecordRotationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -303736,7 +305463,7 @@ export const Router = $root.Router = (() => { if (object.updateServices != null) message.updateServices = Boolean(object.updateServices); if (object.serviceResources != null) { - if (typeof object.serviceResources !== "object") + if (!$util.isObject(object.serviceResources)) throw TypeError(".Router.RouterRecordRotationRequest.serviceResources: object expected"); message.serviceResources = $root.PAM.UidList.fromObject(object.serviceResources, long + 1); } @@ -303805,49 +305532,49 @@ export const Router = $root.Router = (() => { object.clientVersionId = 0; object.noop = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.revision = typeof message.revision === "number" ? BigInt(message.revision) : $util.Long.fromBits(message.revision.low >>> 0, message.revision.high >>> 0, false).toBigInt(); else if (typeof message.revision === "number") object.revision = options.longs === String ? String(message.revision) : message.revision; else object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber() : message.revision; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) object.resourceUid = options.bytes === String ? $util.base64.encode(message.resourceUid, 0, message.resourceUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.resourceUid) : message.resourceUid; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) object.schedule = message.schedule; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") object.enterpriseUserId = options.longs === String ? String(message.enterpriseUserId) : message.enterpriseUserId; else object.enterpriseUserId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserId) : options.longs === Number ? new $util.LongBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0).toNumber() : message.enterpriseUserId; - if (message.pwdComplexity != null && message.hasOwnProperty("pwdComplexity")) + if (message.pwdComplexity != null && Object.hasOwnProperty.call(message, "pwdComplexity")) object.pwdComplexity = options.bytes === String ? $util.base64.encode(message.pwdComplexity, 0, message.pwdComplexity.length) : options.bytes === Array ? Array.prototype.slice.call(message.pwdComplexity) : message.pwdComplexity; - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) object.disabled = message.disabled; - if (message.remoteAddress != null && message.hasOwnProperty("remoteAddress")) + if (message.remoteAddress != null && Object.hasOwnProperty.call(message, "remoteAddress")) object.remoteAddress = message.remoteAddress; - if (message.clientVersionId != null && message.hasOwnProperty("clientVersionId")) + if (message.clientVersionId != null && Object.hasOwnProperty.call(message, "clientVersionId")) object.clientVersionId = message.clientVersionId; - if (message.noop != null && message.hasOwnProperty("noop")) + if (message.noop != null && Object.hasOwnProperty.call(message, "noop")) object.noop = message.noop; - if (message.saasConfiguration != null && message.hasOwnProperty("saasConfiguration")) { + if (message.saasConfiguration != null && Object.hasOwnProperty.call(message, "saasConfiguration")) { object.saasConfiguration = options.bytes === String ? $util.base64.encode(message.saasConfiguration, 0, message.saasConfiguration.length) : options.bytes === Array ? Array.prototype.slice.call(message.saasConfiguration) : message.saasConfiguration; if (options.oneofs) object._saasConfiguration = "saasConfiguration"; } - if (message.updateServices != null && message.hasOwnProperty("updateServices")) { + if (message.updateServices != null && Object.hasOwnProperty.call(message, "updateServices")) { object.updateServices = message.updateServices; if (options.oneofs) object._updateServices = "updateServices"; } - if (message.serviceResources != null && message.hasOwnProperty("serviceResources")) { + if (message.serviceResources != null && Object.hasOwnProperty.call(message, "serviceResources")) { object.serviceResources = $root.PAM.UidList.toObject(message.serviceResources, options, q + 1); if (options.oneofs) object._serviceResources = "serviceResources"; @@ -303970,7 +305697,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserRecordAccessRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -304044,10 +305771,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; return null; @@ -304064,6 +305791,8 @@ export const Router = $root.Router = (() => { UserRecordAccessRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserRecordAccessRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserRecordAccessRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -304106,9 +305835,9 @@ export const Router = $root.Router = (() => { object.recordUid = $util.newBuffer(object.recordUid); } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; return object; }; @@ -304261,7 +305990,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserRecordAccessResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -304339,10 +306068,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.accessLevel != null && message.hasOwnProperty("accessLevel")) + if (message.accessLevel != null && Object.hasOwnProperty.call(message, "accessLevel")) switch (message.accessLevel) { default: return "accessLevel: enum value expected"; @@ -304354,7 +306083,7 @@ export const Router = $root.Router = (() => { case 5: break; } - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) if (typeof message.isShareAdmin !== "boolean") return "isShareAdmin: boolean expected"; return null; @@ -304371,6 +306100,8 @@ export const Router = $root.Router = (() => { UserRecordAccessResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserRecordAccessResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserRecordAccessResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -304446,11 +306177,11 @@ export const Router = $root.Router = (() => { object.accessLevel = options.enums === String ? "RRAL_NONE" : 0; object.isShareAdmin = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.accessLevel != null && message.hasOwnProperty("accessLevel")) + if (message.accessLevel != null && Object.hasOwnProperty.call(message, "accessLevel")) object.accessLevel = options.enums === String ? $root.Router.UserRecordAccessLevel[message.accessLevel] === undefined ? message.accessLevel : $root.Router.UserRecordAccessLevel[message.accessLevel] : message.accessLevel; - if (message.isShareAdmin != null && message.hasOwnProperty("isShareAdmin")) + if (message.isShareAdmin != null && Object.hasOwnProperty.call(message, "isShareAdmin")) object.isShareAdmin = message.isShareAdmin; return object; }; @@ -304561,7 +306292,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserRecordAccessRequests.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -304633,7 +306364,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.requests != null && message.hasOwnProperty("requests")) { + if (message.requests != null && Object.hasOwnProperty.call(message, "requests")) { if (!Array.isArray(message.requests)) return "requests: array expected"; for (let i = 0; i < message.requests.length; ++i) { @@ -304656,6 +306387,8 @@ export const Router = $root.Router = (() => { UserRecordAccessRequests.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserRecordAccessRequests) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserRecordAccessRequests: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -304666,7 +306399,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.UserRecordAccessRequests.requests: array expected"); message.requests = []; for (let i = 0; i < object.requests.length; ++i) { - if (typeof object.requests[i] !== "object") + if (!$util.isObject(object.requests[i])) throw TypeError(".Router.UserRecordAccessRequests.requests: object expected"); message.requests[i] = $root.Router.UserRecordAccessRequest.fromObject(object.requests[i], long + 1); } @@ -304807,7 +306540,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserRecordAccessResponses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -304879,7 +306612,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responses != null && message.hasOwnProperty("responses")) { + if (message.responses != null && Object.hasOwnProperty.call(message, "responses")) { if (!Array.isArray(message.responses)) return "responses: array expected"; for (let i = 0; i < message.responses.length; ++i) { @@ -304902,6 +306635,8 @@ export const Router = $root.Router = (() => { UserRecordAccessResponses.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserRecordAccessResponses) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserRecordAccessResponses: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -304912,7 +306647,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.UserRecordAccessResponses.responses: array expected"); message.responses = []; for (let i = 0; i < object.responses.length; ++i) { - if (typeof object.responses[i] !== "object") + if (!$util.isObject(object.responses[i])) throw TypeError(".Router.UserRecordAccessResponses.responses: object expected"); message.responses[i] = $root.Router.UserRecordAccessResponse.fromObject(object.responses[i], long + 1); } @@ -305064,7 +306799,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserSharedFolderAccessRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -305140,10 +306875,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) { + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) { if (!Array.isArray(message.sharedFolderUid)) return "sharedFolderUid: array expected"; for (let i = 0; i < message.sharedFolderUid.length; ++i) @@ -305164,6 +306899,8 @@ export const Router = $root.Router = (() => { UserSharedFolderAccessRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserSharedFolderAccessRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserSharedFolderAccessRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -305205,7 +306942,7 @@ export const Router = $root.Router = (() => { object.sharedFolderUid = []; if (options.defaults) object.userId = 0; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; if (message.sharedFolderUid && message.sharedFolderUid.length) { object.sharedFolderUid = []; @@ -305330,7 +307067,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserSharedFolderAccessResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -305404,10 +307141,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) if (!(message.sharedFolderUid && typeof message.sharedFolderUid.length === "number" || $util.isString(message.sharedFolderUid))) return "sharedFolderUid: buffer expected"; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) switch (message.accessRoleType) { default: return "accessRoleType: enum value expected"; @@ -305435,6 +307172,8 @@ export const Router = $root.Router = (() => { UserSharedFolderAccessResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserSharedFolderAccessResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserSharedFolderAccessResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -305515,9 +307254,9 @@ export const Router = $root.Router = (() => { } object.accessRoleType = options.enums === String ? "NAVIGATOR" : 0; } - if (message.sharedFolderUid != null && message.hasOwnProperty("sharedFolderUid")) + if (message.sharedFolderUid != null && Object.hasOwnProperty.call(message, "sharedFolderUid")) object.sharedFolderUid = options.bytes === String ? $util.base64.encode(message.sharedFolderUid, 0, message.sharedFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sharedFolderUid) : message.sharedFolderUid; - if (message.accessRoleType != null && message.hasOwnProperty("accessRoleType")) + if (message.accessRoleType != null && Object.hasOwnProperty.call(message, "accessRoleType")) object.accessRoleType = options.enums === String ? $root.Folder.AccessRoleType[message.accessRoleType] === undefined ? message.accessRoleType : $root.Folder.AccessRoleType[message.accessRoleType] : message.accessRoleType; return object; }; @@ -305628,7 +307367,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserSharedFolderAccessResponses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -305700,7 +307439,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responses != null && message.hasOwnProperty("responses")) { + if (message.responses != null && Object.hasOwnProperty.call(message, "responses")) { if (!Array.isArray(message.responses)) return "responses: array expected"; for (let i = 0; i < message.responses.length; ++i) { @@ -305723,6 +307462,8 @@ export const Router = $root.Router = (() => { UserSharedFolderAccessResponses.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserSharedFolderAccessResponses) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserSharedFolderAccessResponses: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -305733,7 +307474,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.UserSharedFolderAccessResponses.responses: array expected"); message.responses = []; for (let i = 0; i < object.responses.length; ++i) { - if (typeof object.responses[i] !== "object") + if (!$util.isObject(object.responses[i])) throw TypeError(".Router.UserSharedFolderAccessResponses.responses: object expected"); message.responses[i] = $root.Router.UserSharedFolderAccessResponse.fromObject(object.responses[i], long + 1); } @@ -305885,7 +307626,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserFolderPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -305961,10 +307702,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) { + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) { if (!Array.isArray(message.folderUid)) return "folderUid: array expected"; for (let i = 0; i < message.folderUid.length; ++i) @@ -305985,6 +307726,8 @@ export const Router = $root.Router = (() => { UserFolderPermissionsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserFolderPermissionsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserFolderPermissionsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -306026,7 +307769,7 @@ export const Router = $root.Router = (() => { object.folderUid = []; if (options.defaults) object.userId = 0; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; if (message.folderUid && message.folderUid.length) { object.folderUid = []; @@ -306151,7 +307894,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserFolderPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -306225,10 +307968,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) { let error = $root.Folder.FolderPermissions.verify(message.permissions, long + 1); if (error) return "permissions." + error; @@ -306247,6 +307990,8 @@ export const Router = $root.Router = (() => { UserFolderPermissionsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserFolderPermissionsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserFolderPermissionsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -306258,7 +308003,7 @@ export const Router = $root.Router = (() => { else if (object.folderUid.length >= 0) message.folderUid = object.folderUid; if (object.permissions != null) { - if (typeof object.permissions !== "object") + if (!$util.isObject(object.permissions)) throw TypeError(".Router.UserFolderPermissionsResponse.permissions: object expected"); message.permissions = $root.Folder.FolderPermissions.fromObject(object.permissions, long + 1); } @@ -306292,9 +308037,9 @@ export const Router = $root.Router = (() => { } object.permissions = null; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.permissions != null && message.hasOwnProperty("permissions")) + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) object.permissions = $root.Folder.FolderPermissions.toObject(message.permissions, options, q + 1); return object; }; @@ -306405,7 +308150,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ UserFolderPermissionsResponses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -306477,7 +308222,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responses != null && message.hasOwnProperty("responses")) { + if (message.responses != null && Object.hasOwnProperty.call(message, "responses")) { if (!Array.isArray(message.responses)) return "responses: array expected"; for (let i = 0; i < message.responses.length; ++i) { @@ -306500,6 +308245,8 @@ export const Router = $root.Router = (() => { UserFolderPermissionsResponses.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.UserFolderPermissionsResponses) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserFolderPermissionsResponses: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -306510,7 +308257,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.UserFolderPermissionsResponses.responses: array expected"); message.responses = []; for (let i = 0; i < object.responses.length; ++i) { - if (typeof object.responses[i] !== "object") + if (!$util.isObject(object.responses[i])) throw TypeError(".Router.UserFolderPermissionsResponses.responses: object expected"); message.responses[i] = $root.Router.UserFolderPermissionsResponse.fromObject(object.responses[i], long + 1); } @@ -306660,7 +308407,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RotationSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -306734,10 +308481,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) if (!$util.isString(message.schedule)) return "schedule: string expected"; return null; @@ -306754,6 +308501,8 @@ export const Router = $root.Router = (() => { RotationSchedule.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RotationSchedule) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RotationSchedule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -306796,9 +308545,9 @@ export const Router = $root.Router = (() => { } object.schedule = ""; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) object.schedule = message.schedule; return object; }; @@ -306958,7 +308707,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ ApiCallbackRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -307042,10 +308791,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) if (!(message.resourceUid && typeof message.resourceUid.length === "number" || $util.isString(message.resourceUid))) return "resourceUid: buffer expected"; - if (message.schedules != null && message.hasOwnProperty("schedules")) { + if (message.schedules != null && Object.hasOwnProperty.call(message, "schedules")) { if (!Array.isArray(message.schedules)) return "schedules: array expected"; for (let i = 0; i < message.schedules.length; ++i) { @@ -307054,10 +308803,10 @@ export const Router = $root.Router = (() => { return "schedules." + error; } } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.serviceType != null && message.hasOwnProperty("serviceType")) + if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType")) switch (message.serviceType) { default: return "serviceType: enum value expected"; @@ -307080,6 +308829,8 @@ export const Router = $root.Router = (() => { ApiCallbackRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.ApiCallbackRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.ApiCallbackRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -307095,7 +308846,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.ApiCallbackRequest.schedules: array expected"); message.schedules = []; for (let i = 0; i < object.schedules.length; ++i) { - if (typeof object.schedules[i] !== "object") + if (!$util.isObject(object.schedules[i])) throw TypeError(".Router.ApiCallbackRequest.schedules: object expected"); message.schedules[i] = $root.Router.ApiCallbackSchedule.fromObject(object.schedules[i], long + 1); } @@ -307155,16 +308906,16 @@ export const Router = $root.Router = (() => { object.url = ""; object.serviceType = options.enums === String ? "UNSPECIFIED" : 0; } - if (message.resourceUid != null && message.hasOwnProperty("resourceUid")) + if (message.resourceUid != null && Object.hasOwnProperty.call(message, "resourceUid")) object.resourceUid = options.bytes === String ? $util.base64.encode(message.resourceUid, 0, message.resourceUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.resourceUid) : message.resourceUid; if (message.schedules && message.schedules.length) { object.schedules = []; for (let j = 0; j < message.schedules.length; ++j) object.schedules[j] = $root.Router.ApiCallbackSchedule.toObject(message.schedules[j], options, q + 1); } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && Object.hasOwnProperty.call(message, "url")) object.url = message.url; - if (message.serviceType != null && message.hasOwnProperty("serviceType")) + if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType")) object.serviceType = options.enums === String ? $root.Router.ServiceType[message.serviceType] === undefined ? message.serviceType : $root.Router.ServiceType[message.serviceType] : message.serviceType; return object; }; @@ -307284,7 +309035,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ ApiCallbackSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -307358,10 +309109,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) if (!$util.isString(message.schedule)) return "schedule: string expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -307378,6 +309129,8 @@ export const Router = $root.Router = (() => { ApiCallbackSchedule.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.ApiCallbackSchedule) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.ApiCallbackSchedule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -307420,9 +309173,9 @@ export const Router = $root.Router = (() => { object.data = $util.newBuffer(object.data); } } - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) object.schedule = message.schedule; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -307544,7 +309297,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterScheduledActions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -307620,10 +309373,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) if (!$util.isString(message.schedule)) return "schedule: string expected"; - if (message.resourceUids != null && message.hasOwnProperty("resourceUids")) { + if (message.resourceUids != null && Object.hasOwnProperty.call(message, "resourceUids")) { if (!Array.isArray(message.resourceUids)) return "resourceUids: array expected"; for (let i = 0; i < message.resourceUids.length; ++i) @@ -307644,6 +309397,8 @@ export const Router = $root.Router = (() => { RouterScheduledActions.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterScheduledActions) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterScheduledActions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -307685,7 +309440,7 @@ export const Router = $root.Router = (() => { object.resourceUids = []; if (options.defaults) object.schedule = ""; - if (message.schedule != null && message.hasOwnProperty("schedule")) + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) object.schedule = message.schedule; if (message.resourceUids && message.resourceUids.length) { object.resourceUids = []; @@ -307801,7 +309556,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ RouterRecordsRotationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -307873,7 +309628,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rotationSchedules != null && message.hasOwnProperty("rotationSchedules")) { + if (message.rotationSchedules != null && Object.hasOwnProperty.call(message, "rotationSchedules")) { if (!Array.isArray(message.rotationSchedules)) return "rotationSchedules: array expected"; for (let i = 0; i < message.rotationSchedules.length; ++i) { @@ -307896,6 +309651,8 @@ export const Router = $root.Router = (() => { RouterRecordsRotationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.RouterRecordsRotationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.RouterRecordsRotationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -307906,7 +309663,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.RouterRecordsRotationRequest.rotationSchedules: array expected"); message.rotationSchedules = []; for (let i = 0; i < object.rotationSchedules.length; ++i) { - if (typeof object.rotationSchedules[i] !== "object") + if (!$util.isObject(object.rotationSchedules[i])) throw TypeError(".Router.RouterRecordsRotationRequest.rotationSchedules: object expected"); message.rotationSchedules[i] = $root.Router.RouterScheduledActions.fromObject(object.rotationSchedules[i], long + 1); } @@ -308089,7 +309846,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ ConnectionParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -308175,19 +309932,19 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) if (!(message.connectionUid && typeof message.connectionUid.length === "number" || $util.isString(message.connectionUid))) return "connectionUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.credentialsRecordUid != null && message.hasOwnProperty("credentialsRecordUid")) + if (message.credentialsRecordUid != null && Object.hasOwnProperty.call(message, "credentialsRecordUid")) if (!(message.credentialsRecordUid && typeof message.credentialsRecordUid.length === "number" || $util.isString(message.credentialsRecordUid))) return "credentialsRecordUid: buffer expected"; return null; @@ -308204,6 +309961,8 @@ export const Router = $root.Router = (() => { ConnectionParameters.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.ConnectionParameters) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.ConnectionParameters: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -308282,15 +310041,15 @@ export const Router = $root.Router = (() => { object.credentialsRecordUid = $util.newBuffer(object.credentialsRecordUid); } } - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) object.connectionUid = options.bytes === String ? $util.base64.encode(message.connectionUid, 0, message.connectionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.connectionUid) : message.connectionUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.credentialsRecordUid != null && message.hasOwnProperty("credentialsRecordUid")) + if (message.credentialsRecordUid != null && Object.hasOwnProperty.call(message, "credentialsRecordUid")) object.credentialsRecordUid = options.bytes === String ? $util.base64.encode(message.credentialsRecordUid, 0, message.credentialsRecordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.credentialsRecordUid) : message.credentialsRecordUid; return object; }; @@ -308401,7 +310160,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ ValidateConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -308473,7 +310232,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.connections != null && message.hasOwnProperty("connections")) { + if (message.connections != null && Object.hasOwnProperty.call(message, "connections")) { if (!Array.isArray(message.connections)) return "connections: array expected"; for (let i = 0; i < message.connections.length; ++i) { @@ -308496,6 +310255,8 @@ export const Router = $root.Router = (() => { ValidateConnectionsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.ValidateConnectionsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.ValidateConnectionsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -308506,7 +310267,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.ValidateConnectionsRequest.connections: array expected"); message.connections = []; for (let i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") + if (!$util.isObject(object.connections[i])) throw TypeError(".Router.ValidateConnectionsRequest.connections: object expected"); message.connections[i] = $root.Router.ConnectionParameters.fromObject(object.connections[i], long + 1); } @@ -308656,7 +310417,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ ConnectionValidationFailure.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -308730,10 +310491,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) if (!(message.connectionUid && typeof message.connectionUid.length === "number" || $util.isString(message.connectionUid))) return "connectionUid: buffer expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -308750,6 +310511,8 @@ export const Router = $root.Router = (() => { ConnectionValidationFailure.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.ConnectionValidationFailure) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.ConnectionValidationFailure: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -308792,9 +310555,9 @@ export const Router = $root.Router = (() => { } object.errorMessage = ""; } - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) object.connectionUid = options.bytes === String ? $util.base64.encode(message.connectionUid, 0, message.connectionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.connectionUid) : message.connectionUid; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -308905,7 +310668,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ ValidateConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -308977,7 +310740,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.failedConnections != null && message.hasOwnProperty("failedConnections")) { + if (message.failedConnections != null && Object.hasOwnProperty.call(message, "failedConnections")) { if (!Array.isArray(message.failedConnections)) return "failedConnections: array expected"; for (let i = 0; i < message.failedConnections.length; ++i) { @@ -309000,6 +310763,8 @@ export const Router = $root.Router = (() => { ValidateConnectionsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.ValidateConnectionsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.ValidateConnectionsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -309010,7 +310775,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.ValidateConnectionsResponse.failedConnections: array expected"); message.failedConnections = []; for (let i = 0; i < object.failedConnections.length; ++i) { - if (typeof object.failedConnections[i] !== "object") + if (!$util.isObject(object.failedConnections[i])) throw TypeError(".Router.ValidateConnectionsResponse.failedConnections: object expected"); message.failedConnections[i] = $root.Router.ConnectionValidationFailure.fromObject(object.failedConnections[i], long + 1); } @@ -309149,7 +310914,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ GetEnforcementRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -309219,7 +310984,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (!$util.isInteger(message.enterpriseUserId) && !(message.enterpriseUserId && $util.isInteger(message.enterpriseUserId.low) && $util.isInteger(message.enterpriseUserId.high))) return "enterpriseUserId: integer|Long expected"; return null; @@ -309236,6 +311001,8 @@ export const Router = $root.Router = (() => { GetEnforcementRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.GetEnforcementRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.GetEnforcementRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -309276,7 +311043,7 @@ export const Router = $root.Router = (() => { object.enterpriseUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else object.enterpriseUserId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.enterpriseUserId != null && message.hasOwnProperty("enterpriseUserId")) + if (message.enterpriseUserId != null && Object.hasOwnProperty.call(message, "enterpriseUserId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseUserId = typeof message.enterpriseUserId === "number" ? BigInt(message.enterpriseUserId) : $util.Long.fromBits(message.enterpriseUserId.low >>> 0, message.enterpriseUserId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseUserId === "number") @@ -309401,7 +311168,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ EnforcementType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -309475,10 +311242,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enforcementTypeId != null && message.hasOwnProperty("enforcementTypeId")) + if (message.enforcementTypeId != null && Object.hasOwnProperty.call(message, "enforcementTypeId")) if (!$util.isInteger(message.enforcementTypeId)) return "enforcementTypeId: integer expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -309495,6 +311262,8 @@ export const Router = $root.Router = (() => { EnforcementType.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.EnforcementType) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.EnforcementType: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -309528,9 +311297,9 @@ export const Router = $root.Router = (() => { object.enforcementTypeId = 0; object.value = ""; } - if (message.enforcementTypeId != null && message.hasOwnProperty("enforcementTypeId")) + if (message.enforcementTypeId != null && Object.hasOwnProperty.call(message, "enforcementTypeId")) object.enforcementTypeId = message.enforcementTypeId; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -309668,7 +311437,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ GetEnforcementResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -309755,7 +311524,7 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enforcementTypes != null && message.hasOwnProperty("enforcementTypes")) { + if (message.enforcementTypes != null && Object.hasOwnProperty.call(message, "enforcementTypes")) { if (!Array.isArray(message.enforcementTypes)) return "enforcementTypes: array expected"; for (let i = 0; i < message.enforcementTypes.length; ++i) { @@ -309764,14 +311533,14 @@ export const Router = $root.Router = (() => { return "enforcementTypes." + error; } } - if (message.addOnIds != null && message.hasOwnProperty("addOnIds")) { + if (message.addOnIds != null && Object.hasOwnProperty.call(message, "addOnIds")) { if (!Array.isArray(message.addOnIds)) return "addOnIds: array expected"; for (let i = 0; i < message.addOnIds.length; ++i) if (!$util.isInteger(message.addOnIds[i])) return "addOnIds: integer[] expected"; } - if (message.isInTrial != null && message.hasOwnProperty("isInTrial")) + if (message.isInTrial != null && Object.hasOwnProperty.call(message, "isInTrial")) if (typeof message.isInTrial !== "boolean") return "isInTrial: boolean expected"; return null; @@ -309788,6 +311557,8 @@ export const Router = $root.Router = (() => { GetEnforcementResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.GetEnforcementResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.GetEnforcementResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -309798,7 +311569,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.GetEnforcementResponse.enforcementTypes: array expected"); message.enforcementTypes = []; for (let i = 0; i < object.enforcementTypes.length; ++i) { - if (typeof object.enforcementTypes[i] !== "object") + if (!$util.isObject(object.enforcementTypes[i])) throw TypeError(".Router.GetEnforcementResponse.enforcementTypes: object expected"); message.enforcementTypes[i] = $root.Router.EnforcementType.fromObject(object.enforcementTypes[i], long + 1); } @@ -309848,7 +311619,7 @@ export const Router = $root.Router = (() => { for (let j = 0; j < message.addOnIds.length; ++j) object.addOnIds[j] = message.addOnIds[j]; } - if (message.isInTrial != null && message.hasOwnProperty("isInTrial")) + if (message.isInTrial != null && Object.hasOwnProperty.call(message, "isInTrial")) object.isInTrial = message.isInTrial; return object; }; @@ -309979,7 +311750,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ PEDMTOTPValidateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -310057,13 +311828,13 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId)) return "enterpriseId: integer expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isInteger(message.code)) return "code: integer expected"; return null; @@ -310080,6 +311851,8 @@ export const Router = $root.Router = (() => { PEDMTOTPValidateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.PEDMTOTPValidateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.PEDMTOTPValidateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -310116,11 +311889,11 @@ export const Router = $root.Router = (() => { object.enterpriseId = 0; object.code = 0; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) object.enterpriseId = message.enterpriseId; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; return object; }; @@ -310240,7 +312013,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ GetPEDMAdminInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -310314,10 +312087,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.isPedmAdmin != null && message.hasOwnProperty("isPedmAdmin")) + if (message.isPedmAdmin != null && Object.hasOwnProperty.call(message, "isPedmAdmin")) if (typeof message.isPedmAdmin !== "boolean") return "isPedmAdmin: boolean expected"; - if (message.pedmAddonActive != null && message.hasOwnProperty("pedmAddonActive")) + if (message.pedmAddonActive != null && Object.hasOwnProperty.call(message, "pedmAddonActive")) if (typeof message.pedmAddonActive !== "boolean") return "pedmAddonActive: boolean expected"; return null; @@ -310334,6 +312107,8 @@ export const Router = $root.Router = (() => { GetPEDMAdminInfoResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.GetPEDMAdminInfoResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.GetPEDMAdminInfoResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -310367,9 +312142,9 @@ export const Router = $root.Router = (() => { object.isPedmAdmin = false; object.pedmAddonActive = false; } - if (message.isPedmAdmin != null && message.hasOwnProperty("isPedmAdmin")) + if (message.isPedmAdmin != null && Object.hasOwnProperty.call(message, "isPedmAdmin")) object.isPedmAdmin = message.isPedmAdmin; - if (message.pedmAddonActive != null && message.hasOwnProperty("pedmAddonActive")) + if (message.pedmAddonActive != null && Object.hasOwnProperty.call(message, "pedmAddonActive")) object.pedmAddonActive = message.pedmAddonActive; return object; }; @@ -310515,7 +312290,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ PAMNetworkSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -310594,15 +312369,15 @@ export const Router = $root.Router = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.allowedSettings != null && message.hasOwnProperty("allowedSettings")) + if (message.allowedSettings != null && Object.hasOwnProperty.call(message, "allowedSettings")) if (!(message.allowedSettings && typeof message.allowedSettings.length === "number" || $util.isString(message.allowedSettings))) return "allowedSettings: buffer expected"; - if (message.idpConfigUid != null && message.hasOwnProperty("idpConfigUid")) { + if (message.idpConfigUid != null && Object.hasOwnProperty.call(message, "idpConfigUid")) { properties._idpConfigUid = 1; if (!(message.idpConfigUid && typeof message.idpConfigUid.length === "number" || $util.isString(message.idpConfigUid))) return "idpConfigUid: buffer expected"; } - if (message.adminUid != null && message.hasOwnProperty("adminUid")) { + if (message.adminUid != null && Object.hasOwnProperty.call(message, "adminUid")) { properties._adminUid = 1; if (!(message.adminUid && typeof message.adminUid.length === "number" || $util.isString(message.adminUid))) return "adminUid: buffer expected"; @@ -310621,6 +312396,8 @@ export const Router = $root.Router = (() => { PAMNetworkSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.PAMNetworkSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.PAMNetworkSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -310669,14 +312446,14 @@ export const Router = $root.Router = (() => { if (options.bytes !== Array) object.allowedSettings = $util.newBuffer(object.allowedSettings); } - if (message.allowedSettings != null && message.hasOwnProperty("allowedSettings")) + if (message.allowedSettings != null && Object.hasOwnProperty.call(message, "allowedSettings")) object.allowedSettings = options.bytes === String ? $util.base64.encode(message.allowedSettings, 0, message.allowedSettings.length) : options.bytes === Array ? Array.prototype.slice.call(message.allowedSettings) : message.allowedSettings; - if (message.idpConfigUid != null && message.hasOwnProperty("idpConfigUid")) { + if (message.idpConfigUid != null && Object.hasOwnProperty.call(message, "idpConfigUid")) { object.idpConfigUid = options.bytes === String ? $util.base64.encode(message.idpConfigUid, 0, message.idpConfigUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.idpConfigUid) : message.idpConfigUid; if (options.oneofs) object._idpConfigUid = "idpConfigUid"; } - if (message.adminUid != null && message.hasOwnProperty("adminUid")) { + if (message.adminUid != null && Object.hasOwnProperty.call(message, "adminUid")) { object.adminUid = options.bytes === String ? $util.base64.encode(message.adminUid, 0, message.adminUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.adminUid) : message.adminUid; if (options.oneofs) object._adminUid = "adminUid"; @@ -310834,7 +312611,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ PAMNetworkConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -310921,10 +312698,10 @@ export const Router = $root.Router = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.networkSettings != null && message.hasOwnProperty("networkSettings")) { + if (message.networkSettings != null && Object.hasOwnProperty.call(message, "networkSettings")) { properties._networkSettings = 1; { let error = $root.Router.PAMNetworkSettings.verify(message.networkSettings, long + 1); @@ -310932,7 +312709,7 @@ export const Router = $root.Router = (() => { return "networkSettings." + error; } } - if (message.resources != null && message.hasOwnProperty("resources")) { + if (message.resources != null && Object.hasOwnProperty.call(message, "resources")) { if (!Array.isArray(message.resources)) return "resources: array expected"; for (let i = 0; i < message.resources.length; ++i) { @@ -310941,7 +312718,7 @@ export const Router = $root.Router = (() => { return "resources." + error; } } - if (message.rotations != null && message.hasOwnProperty("rotations")) { + if (message.rotations != null && Object.hasOwnProperty.call(message, "rotations")) { if (!Array.isArray(message.rotations)) return "rotations: array expected"; for (let i = 0; i < message.rotations.length; ++i) { @@ -310964,6 +312741,8 @@ export const Router = $root.Router = (() => { PAMNetworkConfigurationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.PAMNetworkConfigurationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.PAMNetworkConfigurationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -310975,7 +312754,7 @@ export const Router = $root.Router = (() => { else if (object.recordUid.length >= 0) message.recordUid = object.recordUid; if (object.networkSettings != null) { - if (typeof object.networkSettings !== "object") + if (!$util.isObject(object.networkSettings)) throw TypeError(".Router.PAMNetworkConfigurationRequest.networkSettings: object expected"); message.networkSettings = $root.Router.PAMNetworkSettings.fromObject(object.networkSettings, long + 1); } @@ -310984,7 +312763,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.PAMNetworkConfigurationRequest.resources: array expected"); message.resources = []; for (let i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") + if (!$util.isObject(object.resources[i])) throw TypeError(".Router.PAMNetworkConfigurationRequest.resources: object expected"); message.resources[i] = $root.PAM.PAMResourceConfig.fromObject(object.resources[i], long + 1); } @@ -310994,7 +312773,7 @@ export const Router = $root.Router = (() => { throw TypeError(".Router.PAMNetworkConfigurationRequest.rotations: array expected"); message.rotations = []; for (let i = 0; i < object.rotations.length; ++i) { - if (typeof object.rotations[i] !== "object") + if (!$util.isObject(object.rotations[i])) throw TypeError(".Router.PAMNetworkConfigurationRequest.rotations: object expected"); message.rotations[i] = $root.Router.RouterRecordRotationRequest.fromObject(object.rotations[i], long + 1); } @@ -311031,9 +312810,9 @@ export const Router = $root.Router = (() => { if (options.bytes !== Array) object.recordUid = $util.newBuffer(object.recordUid); } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.networkSettings != null && message.hasOwnProperty("networkSettings")) { + if (message.networkSettings != null && Object.hasOwnProperty.call(message, "networkSettings")) { object.networkSettings = $root.Router.PAMNetworkSettings.toObject(message.networkSettings, options, q + 1); if (options.oneofs) object._networkSettings = "networkSettings"; @@ -311177,7 +312956,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ PAMDiscoveryRulesSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -311255,13 +313034,13 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.networkUid != null && message.hasOwnProperty("networkUid")) + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) if (!(message.networkUid && typeof message.networkUid.length === "number" || $util.isString(message.networkUid))) return "networkUid: buffer expected"; - if (message.rules != null && message.hasOwnProperty("rules")) + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) if (!(message.rules && typeof message.rules.length === "number" || $util.isString(message.rules))) return "rules: buffer expected"; - if (message.rulesKey != null && message.hasOwnProperty("rulesKey")) + if (message.rulesKey != null && Object.hasOwnProperty.call(message, "rulesKey")) if (!(message.rulesKey && typeof message.rulesKey.length === "number" || $util.isString(message.rulesKey))) return "rulesKey: buffer expected"; return null; @@ -311278,6 +313057,8 @@ export const Router = $root.Router = (() => { PAMDiscoveryRulesSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.PAMDiscoveryRulesSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.PAMDiscoveryRulesSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -311341,11 +313122,11 @@ export const Router = $root.Router = (() => { object.rulesKey = $util.newBuffer(object.rulesKey); } } - if (message.networkUid != null && message.hasOwnProperty("networkUid")) + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) object.networkUid = options.bytes === String ? $util.base64.encode(message.networkUid, 0, message.networkUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.networkUid) : message.networkUid; - if (message.rules != null && message.hasOwnProperty("rules")) + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) object.rules = options.bytes === String ? $util.base64.encode(message.rules, 0, message.rules.length) : options.bytes === Array ? Array.prototype.slice.call(message.rules) : message.rules; - if (message.rulesKey != null && message.hasOwnProperty("rulesKey")) + if (message.rulesKey != null && Object.hasOwnProperty.call(message, "rulesKey")) object.rulesKey = options.bytes === String ? $util.base64.encode(message.rulesKey, 0, message.rulesKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rulesKey) : message.rulesKey; return object; }; @@ -311476,7 +313257,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ Router2FAValidateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -311554,13 +313335,13 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) if (!(message.transmissionKey && typeof message.transmissionKey.length === "number" || $util.isString(message.transmissionKey))) return "transmissionKey: buffer expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) if (!(message.sessionToken && typeof message.sessionToken.length === "number" || $util.isString(message.sessionToken))) return "sessionToken: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -311577,6 +313358,8 @@ export const Router = $root.Router = (() => { Router2FAValidateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.Router2FAValidateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.Router2FAValidateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -311631,11 +313414,11 @@ export const Router = $root.Router = (() => { } object.value = ""; } - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) object.transmissionKey = options.bytes === String ? $util.base64.encode(message.transmissionKey, 0, message.transmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.transmissionKey) : message.transmissionKey; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) object.sessionToken = options.bytes === String ? $util.base64.encode(message.sessionToken, 0, message.sessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.sessionToken) : message.sessionToken; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -311766,7 +313549,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ Router2FASendPushRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -311844,13 +313627,13 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) if (!(message.transmissionKey && typeof message.transmissionKey.length === "number" || $util.isString(message.transmissionKey))) return "transmissionKey: buffer expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) if (!(message.sessionToken && typeof message.sessionToken.length === "number" || $util.isString(message.sessionToken))) return "sessionToken: buffer expected"; - if (message.pushType != null && message.hasOwnProperty("pushType")) + if (message.pushType != null && Object.hasOwnProperty.call(message, "pushType")) switch (message.pushType) { default: return "pushType: enum value expected"; @@ -311877,6 +313660,8 @@ export const Router = $root.Router = (() => { Router2FASendPushRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.Router2FASendPushRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.Router2FASendPushRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -311965,11 +313750,11 @@ export const Router = $root.Router = (() => { } object.pushType = options.enums === String ? "TWO_FA_PUSH_NONE" : 0; } - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) object.transmissionKey = options.bytes === String ? $util.base64.encode(message.transmissionKey, 0, message.transmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.transmissionKey) : message.transmissionKey; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) object.sessionToken = options.bytes === String ? $util.base64.encode(message.sessionToken, 0, message.sessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.sessionToken) : message.sessionToken; - if (message.pushType != null && message.hasOwnProperty("pushType")) + if (message.pushType != null && Object.hasOwnProperty.call(message, "pushType")) object.pushType = options.enums === String ? $root.Authentication.TwoFactorPushType[message.pushType] === undefined ? message.pushType : $root.Authentication.TwoFactorPushType[message.pushType] : message.pushType; return object; }; @@ -312089,7 +313874,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ Router2FAGetWebAuthnChallengeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -312163,10 +313948,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) if (!(message.transmissionKey && typeof message.transmissionKey.length === "number" || $util.isString(message.transmissionKey))) return "transmissionKey: buffer expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) if (!(message.sessionToken && typeof message.sessionToken.length === "number" || $util.isString(message.sessionToken))) return "sessionToken: buffer expected"; return null; @@ -312183,6 +313968,8 @@ export const Router = $root.Router = (() => { Router2FAGetWebAuthnChallengeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.Router2FAGetWebAuthnChallengeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.Router2FAGetWebAuthnChallengeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -312234,9 +314021,9 @@ export const Router = $root.Router = (() => { object.sessionToken = $util.newBuffer(object.sessionToken); } } - if (message.transmissionKey != null && message.hasOwnProperty("transmissionKey")) + if (message.transmissionKey != null && Object.hasOwnProperty.call(message, "transmissionKey")) object.transmissionKey = options.bytes === String ? $util.base64.encode(message.transmissionKey, 0, message.transmissionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.transmissionKey) : message.transmissionKey; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) object.sessionToken = options.bytes === String ? $util.base64.encode(message.sessionToken, 0, message.sessionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.sessionToken) : message.sessionToken; return object; }; @@ -312358,7 +314145,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ Router2FAGetWebAuthnChallengeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -312434,10 +314221,10 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) if (!$util.isString(message.challenge)) return "challenge: string expected"; - if (message.capabilities != null && message.hasOwnProperty("capabilities")) { + if (message.capabilities != null && Object.hasOwnProperty.call(message, "capabilities")) { if (!Array.isArray(message.capabilities)) return "capabilities: array expected"; for (let i = 0; i < message.capabilities.length; ++i) @@ -312458,6 +314245,8 @@ export const Router = $root.Router = (() => { Router2FAGetWebAuthnChallengeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.Router2FAGetWebAuthnChallengeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.Router2FAGetWebAuthnChallengeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -312496,7 +314285,7 @@ export const Router = $root.Router = (() => { object.capabilities = []; if (options.defaults) object.challenge = ""; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) object.challenge = message.challenge; if (message.capabilities && message.capabilities.length) { object.capabilities = []; @@ -312632,7 +314421,7 @@ export const Router = $root.Router = (() => { * @returns {$protobuf.Writer} Writer */ CreateEphemeralSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -312710,13 +314499,13 @@ export const Router = $root.Router = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encryptedSecret != null && message.hasOwnProperty("encryptedSecret")) + if (message.encryptedSecret != null && Object.hasOwnProperty.call(message, "encryptedSecret")) if (!(message.encryptedSecret && typeof message.encryptedSecret.length === "number" || $util.isString(message.encryptedSecret))) return "encryptedSecret: buffer expected"; - if (message.secretKeyHash != null && message.hasOwnProperty("secretKeyHash")) + if (message.secretKeyHash != null && Object.hasOwnProperty.call(message, "secretKeyHash")) if (!(message.secretKeyHash && typeof message.secretKeyHash.length === "number" || $util.isString(message.secretKeyHash))) return "secretKeyHash: buffer expected"; - if (message.ttl != null && message.hasOwnProperty("ttl")) + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) if (!$util.isInteger(message.ttl) && !(message.ttl && $util.isInteger(message.ttl.low) && $util.isInteger(message.ttl.high))) return "ttl: integer|Long expected"; return null; @@ -312733,6 +314522,8 @@ export const Router = $root.Router = (() => { CreateEphemeralSecretRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.Router.CreateEphemeralSecretRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".Router.CreateEphemeralSecretRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -312798,11 +314589,11 @@ export const Router = $root.Router = (() => { } else object.ttl = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.encryptedSecret != null && message.hasOwnProperty("encryptedSecret")) + if (message.encryptedSecret != null && Object.hasOwnProperty.call(message, "encryptedSecret")) object.encryptedSecret = options.bytes === String ? $util.base64.encode(message.encryptedSecret, 0, message.encryptedSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedSecret) : message.encryptedSecret; - if (message.secretKeyHash != null && message.hasOwnProperty("secretKeyHash")) + if (message.secretKeyHash != null && Object.hasOwnProperty.call(message, "secretKeyHash")) object.secretKeyHash = options.bytes === String ? $util.base64.encode(message.secretKeyHash, 0, message.secretKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.secretKeyHash) : message.secretKeyHash; - if (message.ttl != null && message.hasOwnProperty("ttl")) + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.ttl = typeof message.ttl === "number" ? BigInt(message.ttl) : $util.Long.fromBits(message.ttl.low >>> 0, message.ttl.high >>> 0, false).toBigInt(); else if (typeof message.ttl === "number") @@ -312841,6 +314632,720 @@ export const Router = $root.Router = (() => { return CreateEphemeralSecretRequest; })(); + /** + * UserAccessLoweredEventType enum. + * @name Router.UserAccessLoweredEventType + * @enum {number} + * @property {number} UALE_UNSPECIFIED=0 UALE_UNSPECIFIED value + * @property {number} UALE_DEVICE_LOGOUT=1 UALE_DEVICE_LOGOUT value + * @property {number} UALE_USER_LOGOUT_ALL_DEVICES=2 UALE_USER_LOGOUT_ALL_DEVICES value + * @property {number} UALE_ENFORCEMENT_REMOVED=3 UALE_ENFORCEMENT_REMOVED value + * @property {number} UALE_RECORD_ACCESS_LOST=4 UALE_RECORD_ACCESS_LOST value + */ + Router.UserAccessLoweredEventType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UALE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UALE_DEVICE_LOGOUT"] = 1; + values[valuesById[2] = "UALE_USER_LOGOUT_ALL_DEVICES"] = 2; + values[valuesById[3] = "UALE_ENFORCEMENT_REMOVED"] = 3; + values[valuesById[4] = "UALE_RECORD_ACCESS_LOST"] = 4; + return values; + })(); + + Router.UserAccessLoweredEvent = (function() { + + /** + * Properties of a UserAccessLoweredEvent. + * @memberof Router + * @interface IUserAccessLoweredEvent + * @property {Router.UserAccessLoweredEventType|null} [eventType] UserAccessLoweredEvent eventType + * @property {Array.|null} [enterpriseUserIds] UserAccessLoweredEvent enterpriseUserIds + * @property {Array.|null} [recordUids] UserAccessLoweredEvent recordUids + * @property {number|null} [deviceId] UserAccessLoweredEvent deviceId + * @property {number|null} [enforcementTypeId] UserAccessLoweredEvent enforcementTypeId + */ + + /** + * Constructs a new UserAccessLoweredEvent. + * @memberof Router + * @classdesc Represents a UserAccessLoweredEvent. + * @implements IUserAccessLoweredEvent + * @constructor + * @param {Router.IUserAccessLoweredEvent=} [properties] Properties to set + */ + function UserAccessLoweredEvent(properties) { + this.enterpriseUserIds = []; + this.recordUids = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserAccessLoweredEvent eventType. + * @member {Router.UserAccessLoweredEventType} eventType + * @memberof Router.UserAccessLoweredEvent + * @instance + */ + UserAccessLoweredEvent.prototype.eventType = 0; + + /** + * UserAccessLoweredEvent enterpriseUserIds. + * @member {Array.} enterpriseUserIds + * @memberof Router.UserAccessLoweredEvent + * @instance + */ + UserAccessLoweredEvent.prototype.enterpriseUserIds = $util.emptyArray; + + /** + * UserAccessLoweredEvent recordUids. + * @member {Array.} recordUids + * @memberof Router.UserAccessLoweredEvent + * @instance + */ + UserAccessLoweredEvent.prototype.recordUids = $util.emptyArray; + + /** + * UserAccessLoweredEvent deviceId. + * @member {number|null|undefined} deviceId + * @memberof Router.UserAccessLoweredEvent + * @instance + */ + UserAccessLoweredEvent.prototype.deviceId = null; + + /** + * UserAccessLoweredEvent enforcementTypeId. + * @member {number|null|undefined} enforcementTypeId + * @memberof Router.UserAccessLoweredEvent + * @instance + */ + UserAccessLoweredEvent.prototype.enforcementTypeId = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAccessLoweredEvent.prototype, "_deviceId", { + get: $util.oneOfGetter($oneOfFields = ["deviceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAccessLoweredEvent.prototype, "_enforcementTypeId", { + get: $util.oneOfGetter($oneOfFields = ["enforcementTypeId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserAccessLoweredEvent instance using the specified properties. + * @function create + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {Router.IUserAccessLoweredEvent=} [properties] Properties to set + * @returns {Router.UserAccessLoweredEvent} UserAccessLoweredEvent instance + */ + UserAccessLoweredEvent.create = function create(properties) { + return new UserAccessLoweredEvent(properties); + }; + + /** + * Encodes the specified UserAccessLoweredEvent message. Does not implicitly {@link Router.UserAccessLoweredEvent.verify|verify} messages. + * @function encode + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {Router.IUserAccessLoweredEvent} message UserAccessLoweredEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAccessLoweredEvent.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventType); + if (message.enterpriseUserIds != null && message.enterpriseUserIds.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.enterpriseUserIds.length; ++i) + writer.int64(message.enterpriseUserIds[i]); + writer.ldelim(); + } + if (message.recordUids != null && message.recordUids.length) + for (let i = 0; i < message.recordUids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.recordUids[i]); + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.deviceId); + if (message.enforcementTypeId != null && Object.hasOwnProperty.call(message, "enforcementTypeId")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.enforcementTypeId); + return writer; + }; + + /** + * Encodes the specified UserAccessLoweredEvent message, length delimited. Does not implicitly {@link Router.UserAccessLoweredEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {Router.IUserAccessLoweredEvent} message UserAccessLoweredEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAccessLoweredEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a UserAccessLoweredEvent message from the specified reader or buffer. + * @function decode + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {Router.UserAccessLoweredEvent} UserAccessLoweredEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAccessLoweredEvent.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.Router.UserAccessLoweredEvent(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.eventType = reader.int32(); + break; + } + case 2: { + if (!(message.enterpriseUserIds && message.enterpriseUserIds.length)) + message.enterpriseUserIds = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.enterpriseUserIds.push(reader.int64()); + } else + message.enterpriseUserIds.push(reader.int64()); + break; + } + case 3: { + if (!(message.recordUids && message.recordUids.length)) + message.recordUids = []; + message.recordUids.push(reader.bytes()); + break; + } + case 4: { + message.deviceId = reader.int64(); + break; + } + case 5: { + message.enforcementTypeId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a UserAccessLoweredEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Router.UserAccessLoweredEvent} UserAccessLoweredEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAccessLoweredEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserAccessLoweredEvent message. + * @function verify + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserAccessLoweredEvent.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + let properties = {}; + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + switch (message.eventType) { + default: + return "eventType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.enterpriseUserIds != null && Object.hasOwnProperty.call(message, "enterpriseUserIds")) { + if (!Array.isArray(message.enterpriseUserIds)) + return "enterpriseUserIds: array expected"; + for (let i = 0; i < message.enterpriseUserIds.length; ++i) + if (!$util.isInteger(message.enterpriseUserIds[i]) && !(message.enterpriseUserIds[i] && $util.isInteger(message.enterpriseUserIds[i].low) && $util.isInteger(message.enterpriseUserIds[i].high))) + return "enterpriseUserIds: integer|Long[] expected"; + } + if (message.recordUids != null && Object.hasOwnProperty.call(message, "recordUids")) { + if (!Array.isArray(message.recordUids)) + return "recordUids: array expected"; + for (let i = 0; i < message.recordUids.length; ++i) + if (!(message.recordUids[i] && typeof message.recordUids[i].length === "number" || $util.isString(message.recordUids[i]))) + return "recordUids: buffer[] expected"; + } + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) { + properties._deviceId = 1; + if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) + return "deviceId: integer|Long expected"; + } + if (message.enforcementTypeId != null && Object.hasOwnProperty.call(message, "enforcementTypeId")) { + properties._enforcementTypeId = 1; + if (!$util.isInteger(message.enforcementTypeId)) + return "enforcementTypeId: integer expected"; + } + return null; + }; + + /** + * Creates a UserAccessLoweredEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {Object.} object Plain object + * @returns {Router.UserAccessLoweredEvent} UserAccessLoweredEvent + */ + UserAccessLoweredEvent.fromObject = function fromObject(object, long) { + if (object instanceof $root.Router.UserAccessLoweredEvent) + return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserAccessLoweredEvent: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.Router.UserAccessLoweredEvent(); + switch (object.eventType) { + default: + if (typeof object.eventType === "number") { + message.eventType = object.eventType; + break; + } + break; + case "UALE_UNSPECIFIED": + case 0: + message.eventType = 0; + break; + case "UALE_DEVICE_LOGOUT": + case 1: + message.eventType = 1; + break; + case "UALE_USER_LOGOUT_ALL_DEVICES": + case 2: + message.eventType = 2; + break; + case "UALE_ENFORCEMENT_REMOVED": + case 3: + message.eventType = 3; + break; + case "UALE_RECORD_ACCESS_LOST": + case 4: + message.eventType = 4; + break; + } + if (object.enterpriseUserIds) { + if (!Array.isArray(object.enterpriseUserIds)) + throw TypeError(".Router.UserAccessLoweredEvent.enterpriseUserIds: array expected"); + message.enterpriseUserIds = []; + for (let i = 0; i < object.enterpriseUserIds.length; ++i) + if ($util.Long) + message.enterpriseUserIds[i] = $util.Long.fromValue(object.enterpriseUserIds[i], false); + else if (typeof object.enterpriseUserIds[i] === "string") + message.enterpriseUserIds[i] = parseInt(object.enterpriseUserIds[i], 10); + else if (typeof object.enterpriseUserIds[i] === "number") + message.enterpriseUserIds[i] = object.enterpriseUserIds[i]; + else if (typeof object.enterpriseUserIds[i] === "object") + message.enterpriseUserIds[i] = new $util.LongBits(object.enterpriseUserIds[i].low >>> 0, object.enterpriseUserIds[i].high >>> 0).toNumber(); + } + if (object.recordUids) { + if (!Array.isArray(object.recordUids)) + throw TypeError(".Router.UserAccessLoweredEvent.recordUids: array expected"); + message.recordUids = []; + for (let i = 0; i < object.recordUids.length; ++i) + if (typeof object.recordUids[i] === "string") + $util.base64.decode(object.recordUids[i], message.recordUids[i] = $util.newBuffer($util.base64.length(object.recordUids[i])), 0); + else if (object.recordUids[i].length >= 0) + message.recordUids[i] = object.recordUids[i]; + } + if (object.deviceId != null) + if ($util.Long) + message.deviceId = $util.Long.fromValue(object.deviceId, false); + else if (typeof object.deviceId === "string") + message.deviceId = parseInt(object.deviceId, 10); + else if (typeof object.deviceId === "number") + message.deviceId = object.deviceId; + else if (typeof object.deviceId === "object") + message.deviceId = new $util.LongBits(object.deviceId.low >>> 0, object.deviceId.high >>> 0).toNumber(); + if (object.enforcementTypeId != null) + message.enforcementTypeId = object.enforcementTypeId | 0; + return message; + }; + + /** + * Creates a plain object from a UserAccessLoweredEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {Router.UserAccessLoweredEvent} message UserAccessLoweredEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserAccessLoweredEvent.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) { + object.enterpriseUserIds = []; + object.recordUids = []; + } + if (options.defaults) + object.eventType = options.enums === String ? "UALE_UNSPECIFIED" : 0; + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + object.eventType = options.enums === String ? $root.Router.UserAccessLoweredEventType[message.eventType] === undefined ? message.eventType : $root.Router.UserAccessLoweredEventType[message.eventType] : message.eventType; + if (message.enterpriseUserIds && message.enterpriseUserIds.length) { + object.enterpriseUserIds = []; + for (let j = 0; j < message.enterpriseUserIds.length; ++j) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.enterpriseUserIds[j] = typeof message.enterpriseUserIds[j] === "number" ? BigInt(message.enterpriseUserIds[j]) : $util.Long.fromBits(message.enterpriseUserIds[j].low >>> 0, message.enterpriseUserIds[j].high >>> 0, false).toBigInt(); + else if (typeof message.enterpriseUserIds[j] === "number") + object.enterpriseUserIds[j] = options.longs === String ? String(message.enterpriseUserIds[j]) : message.enterpriseUserIds[j]; + else + object.enterpriseUserIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseUserIds[j]) : options.longs === Number ? new $util.LongBits(message.enterpriseUserIds[j].low >>> 0, message.enterpriseUserIds[j].high >>> 0).toNumber() : message.enterpriseUserIds[j]; + } + if (message.recordUids && message.recordUids.length) { + object.recordUids = []; + for (let j = 0; j < message.recordUids.length; ++j) + object.recordUids[j] = options.bytes === String ? $util.base64.encode(message.recordUids[j], 0, message.recordUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUids[j]) : message.recordUids[j]; + } + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) { + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); + else if (typeof message.deviceId === "number") + object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; + else + object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; + if (options.oneofs) + object._deviceId = "deviceId"; + } + if (message.enforcementTypeId != null && Object.hasOwnProperty.call(message, "enforcementTypeId")) { + object.enforcementTypeId = message.enforcementTypeId; + if (options.oneofs) + object._enforcementTypeId = "enforcementTypeId"; + } + return object; + }; + + /** + * Converts this UserAccessLoweredEvent to JSON. + * @function toJSON + * @memberof Router.UserAccessLoweredEvent + * @instance + * @returns {Object.} JSON object + */ + UserAccessLoweredEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserAccessLoweredEvent + * @function getTypeUrl + * @memberof Router.UserAccessLoweredEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserAccessLoweredEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/Router.UserAccessLoweredEvent"; + }; + + return UserAccessLoweredEvent; + })(); + + Router.UserAccessLoweredEventsRequest = (function() { + + /** + * Properties of a UserAccessLoweredEventsRequest. + * @memberof Router + * @interface IUserAccessLoweredEventsRequest + * @property {Array.|null} [events] UserAccessLoweredEventsRequest events + */ + + /** + * Constructs a new UserAccessLoweredEventsRequest. + * @memberof Router + * @classdesc Represents a UserAccessLoweredEventsRequest. + * @implements IUserAccessLoweredEventsRequest + * @constructor + * @param {Router.IUserAccessLoweredEventsRequest=} [properties] Properties to set + */ + function UserAccessLoweredEventsRequest(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserAccessLoweredEventsRequest events. + * @member {Array.} events + * @memberof Router.UserAccessLoweredEventsRequest + * @instance + */ + UserAccessLoweredEventsRequest.prototype.events = $util.emptyArray; + + /** + * Creates a new UserAccessLoweredEventsRequest instance using the specified properties. + * @function create + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {Router.IUserAccessLoweredEventsRequest=} [properties] Properties to set + * @returns {Router.UserAccessLoweredEventsRequest} UserAccessLoweredEventsRequest instance + */ + UserAccessLoweredEventsRequest.create = function create(properties) { + return new UserAccessLoweredEventsRequest(properties); + }; + + /** + * Encodes the specified UserAccessLoweredEventsRequest message. Does not implicitly {@link Router.UserAccessLoweredEventsRequest.verify|verify} messages. + * @function encode + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {Router.IUserAccessLoweredEventsRequest} message UserAccessLoweredEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAccessLoweredEventsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.Router.UserAccessLoweredEvent.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserAccessLoweredEventsRequest message, length delimited. Does not implicitly {@link Router.UserAccessLoweredEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {Router.IUserAccessLoweredEventsRequest} message UserAccessLoweredEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAccessLoweredEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a UserAccessLoweredEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {Router.UserAccessLoweredEventsRequest} UserAccessLoweredEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAccessLoweredEventsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.Router.UserAccessLoweredEventsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.Router.UserAccessLoweredEvent.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a UserAccessLoweredEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Router.UserAccessLoweredEventsRequest} UserAccessLoweredEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAccessLoweredEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserAccessLoweredEventsRequest message. + * @function verify + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserAccessLoweredEventsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.events != null && Object.hasOwnProperty.call(message, "events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.Router.UserAccessLoweredEvent.verify(message.events[i], long + 1); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a UserAccessLoweredEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {Router.UserAccessLoweredEventsRequest} UserAccessLoweredEventsRequest + */ + UserAccessLoweredEventsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.Router.UserAccessLoweredEventsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".Router.UserAccessLoweredEventsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.Router.UserAccessLoweredEventsRequest(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".Router.UserAccessLoweredEventsRequest.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (!$util.isObject(object.events[i])) + throw TypeError(".Router.UserAccessLoweredEventsRequest.events: object expected"); + message.events[i] = $root.Router.UserAccessLoweredEvent.fromObject(object.events[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a UserAccessLoweredEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {Router.UserAccessLoweredEventsRequest} message UserAccessLoweredEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserAccessLoweredEventsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.Router.UserAccessLoweredEvent.toObject(message.events[j], options, q + 1); + } + return object; + }; + + /** + * Converts this UserAccessLoweredEventsRequest to JSON. + * @function toJSON + * @memberof Router.UserAccessLoweredEventsRequest + * @instance + * @returns {Object.} JSON object + */ + UserAccessLoweredEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserAccessLoweredEventsRequest + * @function getTypeUrl + * @memberof Router.UserAccessLoweredEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserAccessLoweredEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/Router.UserAccessLoweredEventsRequest"; + }; + + return UserAccessLoweredEventsRequest; + })(); + return Router; })(); @@ -312972,7 +315477,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRotationSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -313058,19 +315563,19 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.scheduleData != null && message.hasOwnProperty("scheduleData")) + if (message.scheduleData != null && Object.hasOwnProperty.call(message, "scheduleData")) if (!$util.isString(message.scheduleData)) return "scheduleData: string expected"; - if (message.noSchedule != null && message.hasOwnProperty("noSchedule")) + if (message.noSchedule != null && Object.hasOwnProperty.call(message, "noSchedule")) if (typeof message.noSchedule !== "boolean") return "noSchedule: boolean expected"; return null; @@ -313087,6 +315592,8 @@ export const PAM = $root.PAM = (() => { PAMRotationSchedule.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRotationSchedule) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRotationSchedule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -313156,15 +315663,15 @@ export const PAM = $root.PAM = (() => { object.scheduleData = ""; object.noSchedule = false; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.scheduleData != null && message.hasOwnProperty("scheduleData")) + if (message.scheduleData != null && Object.hasOwnProperty.call(message, "scheduleData")) object.scheduleData = message.scheduleData; - if (message.noSchedule != null && message.hasOwnProperty("noSchedule")) + if (message.noSchedule != null && Object.hasOwnProperty.call(message, "noSchedule")) object.noSchedule = message.noSchedule; return object; }; @@ -313275,7 +315782,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRotationSchedulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -313347,7 +315854,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.schedules != null && message.hasOwnProperty("schedules")) { + if (message.schedules != null && Object.hasOwnProperty.call(message, "schedules")) { if (!Array.isArray(message.schedules)) return "schedules: array expected"; for (let i = 0; i < message.schedules.length; ++i) { @@ -313370,6 +315877,8 @@ export const PAM = $root.PAM = (() => { PAMRotationSchedulesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRotationSchedulesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRotationSchedulesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -313380,7 +315889,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMRotationSchedulesResponse.schedules: array expected"); message.schedules = []; for (let i = 0; i < object.schedules.length; ++i) { - if (typeof object.schedules[i] !== "object") + if (!$util.isObject(object.schedules[i])) throw TypeError(".PAM.PAMRotationSchedulesResponse.schedules: object expected"); message.schedules[i] = $root.PAM.PAMRotationSchedule.fromObject(object.schedules[i], long + 1); } @@ -313565,7 +316074,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMOnlineController.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -313653,19 +316162,19 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.connectedOn != null && message.hasOwnProperty("connectedOn")) + if (message.connectedOn != null && Object.hasOwnProperty.call(message, "connectedOn")) if (!$util.isInteger(message.connectedOn) && !(message.connectedOn && $util.isInteger(message.connectedOn.low) && $util.isInteger(message.connectedOn.high))) return "connectedOn: integer|Long expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) if (!$util.isString(message.ipAddress)) return "ipAddress: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isString(message.version)) return "version: string expected"; - if (message.connections != null && message.hasOwnProperty("connections")) { + if (message.connections != null && Object.hasOwnProperty.call(message, "connections")) { if (!Array.isArray(message.connections)) return "connections: array expected"; for (let i = 0; i < message.connections.length; ++i) { @@ -313688,6 +316197,8 @@ export const PAM = $root.PAM = (() => { PAMOnlineController.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMOnlineController) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMOnlineController: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -313716,7 +316227,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMOnlineController.connections: array expected"); message.connections = []; for (let i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") + if (!$util.isObject(object.connections[i])) throw TypeError(".PAM.PAMOnlineController.connections: object expected"); message.connections[i] = $root.PAM.PAMWebRtcConnection.fromObject(object.connections[i], long + 1); } @@ -313759,18 +316270,18 @@ export const PAM = $root.PAM = (() => { object.ipAddress = ""; object.version = ""; } - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.connectedOn != null && message.hasOwnProperty("connectedOn")) + if (message.connectedOn != null && Object.hasOwnProperty.call(message, "connectedOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.connectedOn = typeof message.connectedOn === "number" ? BigInt(message.connectedOn) : $util.Long.fromBits(message.connectedOn.low >>> 0, message.connectedOn.high >>> 0, false).toBigInt(); else if (typeof message.connectedOn === "number") object.connectedOn = options.longs === String ? String(message.connectedOn) : message.connectedOn; else object.connectedOn = options.longs === String ? $util.Long.prototype.toString.call(message.connectedOn) : options.longs === Number ? new $util.LongBits(message.connectedOn.low >>> 0, message.connectedOn.high >>> 0).toNumber() : message.connectedOn; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) object.ipAddress = message.ipAddress; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; if (message.connections && message.connections.length) { object.connections = []; @@ -313971,7 +316482,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMWebRtcConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -314061,10 +316572,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) if (!(message.connectionUid && typeof message.connectionUid.length === "number" || $util.isString(message.connectionUid))) return "connectionUid: buffer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -314081,16 +316592,16 @@ export const PAM = $root.PAM = (() => { case 10: break; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) if (!$util.isString(message.userName)) return "userName: string expected"; - if (message.startedOn != null && message.hasOwnProperty("startedOn")) + if (message.startedOn != null && Object.hasOwnProperty.call(message, "startedOn")) if (!$util.isInteger(message.startedOn) && !(message.startedOn && $util.isInteger(message.startedOn.low) && $util.isInteger(message.startedOn.high))) return "startedOn: integer|Long expected"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; return null; @@ -314107,6 +316618,8 @@ export const PAM = $root.PAM = (() => { PAMWebRtcConnection.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMWebRtcConnection) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMWebRtcConnection: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -314240,22 +316753,22 @@ export const PAM = $root.PAM = (() => { object.configurationUid = $util.newBuffer(object.configurationUid); } } - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) object.connectionUid = options.bytes === String ? $util.base64.encode(message.connectionUid, 0, message.connectionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.connectionUid) : message.connectionUid; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = options.enums === String ? $root.PAM.WebRtcConnectionType[message.type] === undefined ? message.type : $root.PAM.WebRtcConnectionType[message.type] : message.type; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) object.userName = message.userName; - if (message.startedOn != null && message.hasOwnProperty("startedOn")) + if (message.startedOn != null && Object.hasOwnProperty.call(message, "startedOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startedOn = typeof message.startedOn === "number" ? BigInt(message.startedOn) : $util.Long.fromBits(message.startedOn.low >>> 0, message.startedOn.high >>> 0, false).toBigInt(); else if (typeof message.startedOn === "number") object.startedOn = options.longs === String ? String(message.startedOn) : message.startedOn; else object.startedOn = options.longs === String ? $util.Long.prototype.toString.call(message.startedOn) : options.longs === Number ? new $util.LongBits(message.startedOn.low >>> 0, message.startedOn.high >>> 0).toNumber() : message.startedOn; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; return object; }; @@ -314379,7 +316892,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMOnlineControllers.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -314457,14 +316970,14 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) { + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) { if (!Array.isArray(message.deprecated)) return "deprecated: array expected"; for (let i = 0; i < message.deprecated.length; ++i) if (!(message.deprecated[i] && typeof message.deprecated[i].length === "number" || $util.isString(message.deprecated[i]))) return "deprecated: buffer[] expected"; } - if (message.controllers != null && message.hasOwnProperty("controllers")) { + if (message.controllers != null && Object.hasOwnProperty.call(message, "controllers")) { if (!Array.isArray(message.controllers)) return "controllers: array expected"; for (let i = 0; i < message.controllers.length; ++i) { @@ -314487,6 +317000,8 @@ export const PAM = $root.PAM = (() => { PAMOnlineControllers.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMOnlineControllers) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMOnlineControllers: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -314507,7 +317022,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMOnlineControllers.controllers: array expected"); message.controllers = []; for (let i = 0; i < object.controllers.length; ++i) { - if (typeof object.controllers[i] !== "object") + if (!$util.isObject(object.controllers[i])) throw TypeError(".PAM.PAMOnlineControllers.controllers: object expected"); message.controllers[i] = $root.PAM.PAMOnlineController.fromObject(object.controllers[i], long + 1); } @@ -314664,7 +317179,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRotateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -314738,10 +317253,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.requestUid != null && message.hasOwnProperty("requestUid")) + if (message.requestUid != null && Object.hasOwnProperty.call(message, "requestUid")) if (!(message.requestUid && typeof message.requestUid.length === "number" || $util.isString(message.requestUid))) return "requestUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; return null; @@ -314758,6 +317273,8 @@ export const PAM = $root.PAM = (() => { PAMRotateRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRotateRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRotateRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -314809,9 +317326,9 @@ export const PAM = $root.PAM = (() => { object.recordUid = $util.newBuffer(object.recordUid); } } - if (message.requestUid != null && message.hasOwnProperty("requestUid")) + if (message.requestUid != null && Object.hasOwnProperty.call(message, "requestUid")) object.requestUid = options.bytes === String ? $util.base64.encode(message.requestUid, 0, message.requestUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.requestUid) : message.requestUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; return object; }; @@ -314922,7 +317439,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMControllersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -314994,7 +317511,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.controllers != null && message.hasOwnProperty("controllers")) { + if (message.controllers != null && Object.hasOwnProperty.call(message, "controllers")) { if (!Array.isArray(message.controllers)) return "controllers: array expected"; for (let i = 0; i < message.controllers.length; ++i) { @@ -315017,6 +317534,8 @@ export const PAM = $root.PAM = (() => { PAMControllersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMControllersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMControllersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -315027,7 +317546,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMControllersResponse.controllers: array expected"); message.controllers = []; for (let i = 0; i < object.controllers.length; ++i) { - if (typeof object.controllers[i] !== "object") + if (!$util.isObject(object.controllers[i])) throw TypeError(".PAM.PAMControllersResponse.controllers: object expected"); message.controllers[i] = $root.PAM.PAMController.fromObject(object.controllers[i], long + 1); } @@ -315177,7 +317696,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRemoveController.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -315251,10 +317770,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -315271,6 +317790,8 @@ export const PAM = $root.PAM = (() => { PAMRemoveController.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRemoveController) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRemoveController: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -315313,9 +317834,9 @@ export const PAM = $root.PAM = (() => { } object.message = ""; } - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -315426,7 +317947,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRemoveControllerResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -315498,7 +318019,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.controllers != null && message.hasOwnProperty("controllers")) { + if (message.controllers != null && Object.hasOwnProperty.call(message, "controllers")) { if (!Array.isArray(message.controllers)) return "controllers: array expected"; for (let i = 0; i < message.controllers.length; ++i) { @@ -315521,6 +318042,8 @@ export const PAM = $root.PAM = (() => { PAMRemoveControllerResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRemoveControllerResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRemoveControllerResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -315531,7 +318054,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMRemoveControllerResponse.controllers: array expected"); message.controllers = []; for (let i = 0; i < object.controllers.length; ++i) { - if (typeof object.controllers[i] !== "object") + if (!$util.isObject(object.controllers[i])) throw TypeError(".PAM.PAMRemoveControllerResponse.controllers: object expected"); message.controllers[i] = $root.PAM.PAMRemoveController.fromObject(object.controllers[i], long + 1); } @@ -315672,7 +318195,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMModifyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -315744,7 +318267,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.operations != null && message.hasOwnProperty("operations")) { + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) { if (!Array.isArray(message.operations)) return "operations: array expected"; for (let i = 0; i < message.operations.length; ++i) { @@ -315767,6 +318290,8 @@ export const PAM = $root.PAM = (() => { PAMModifyRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMModifyRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMModifyRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -315777,7 +318302,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMModifyRequest.operations: array expected"); message.operations = []; for (let i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") + if (!$util.isObject(object.operations[i])) throw TypeError(".PAM.PAMModifyRequest.operations: object expected"); message.operations[i] = $root.PAM.PAMDataOperation.fromObject(object.operations[i], long + 1); } @@ -315938,7 +318463,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMDataOperation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -316016,7 +318541,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) switch (message.operationType) { default: return "operationType: enum value expected"; @@ -316026,12 +318551,12 @@ export const PAM = $root.PAM = (() => { case 3: break; } - if (message.configuration != null && message.hasOwnProperty("configuration")) { + if (message.configuration != null && Object.hasOwnProperty.call(message, "configuration")) { let error = $root.PAM.PAMConfigurationData.verify(message.configuration, long + 1); if (error) return "configuration." + error; } - if (message.element != null && message.hasOwnProperty("element")) { + if (message.element != null && Object.hasOwnProperty.call(message, "element")) { let error = $root.PAM.PAMElementData.verify(message.element, long + 1); if (error) return "element." + error; @@ -316050,6 +318575,8 @@ export const PAM = $root.PAM = (() => { PAMDataOperation.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMDataOperation) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMDataOperation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -316080,12 +318607,12 @@ export const PAM = $root.PAM = (() => { break; } if (object.configuration != null) { - if (typeof object.configuration !== "object") + if (!$util.isObject(object.configuration)) throw TypeError(".PAM.PAMDataOperation.configuration: object expected"); message.configuration = $root.PAM.PAMConfigurationData.fromObject(object.configuration, long + 1); } if (object.element != null) { - if (typeof object.element !== "object") + if (!$util.isObject(object.element)) throw TypeError(".PAM.PAMDataOperation.element: object expected"); message.element = $root.PAM.PAMElementData.fromObject(object.element, long + 1); } @@ -316114,11 +318641,11 @@ export const PAM = $root.PAM = (() => { object.configuration = null; object.element = null; } - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) object.operationType = options.enums === String ? $root.PAM.PAMOperationType[message.operationType] === undefined ? message.operationType : $root.PAM.PAMOperationType[message.operationType] : message.operationType; - if (message.configuration != null && message.hasOwnProperty("configuration")) + if (message.configuration != null && Object.hasOwnProperty.call(message, "configuration")) object.configuration = $root.PAM.PAMConfigurationData.toObject(message.configuration, options, q + 1); - if (message.element != null && message.hasOwnProperty("element")) + if (message.element != null && Object.hasOwnProperty.call(message, "element")) object.element = $root.PAM.PAMElementData.toObject(message.element, options, q + 1); return object; }; @@ -316278,7 +318805,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMConfigurationData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -316360,16 +318887,16 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -316386,6 +318913,8 @@ export const PAM = $root.PAM = (() => { PAMConfigurationData.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMConfigurationData) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMConfigurationData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -316463,18 +318992,18 @@ export const PAM = $root.PAM = (() => { object.data = $util.newBuffer(object.data); } } - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -316605,7 +319134,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMElementData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -316683,13 +319212,13 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.elementUid != null && message.hasOwnProperty("elementUid")) + if (message.elementUid != null && Object.hasOwnProperty.call(message, "elementUid")) if (!(message.elementUid && typeof message.elementUid.length === "number" || $util.isString(message.elementUid))) return "elementUid: buffer expected"; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) if (!(message.parentUid && typeof message.parentUid.length === "number" || $util.isString(message.parentUid))) return "parentUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; return null; @@ -316706,6 +319235,8 @@ export const PAM = $root.PAM = (() => { PAMElementData.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMElementData) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMElementData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -316769,11 +319300,11 @@ export const PAM = $root.PAM = (() => { object.data = $util.newBuffer(object.data); } } - if (message.elementUid != null && message.hasOwnProperty("elementUid")) + if (message.elementUid != null && Object.hasOwnProperty.call(message, "elementUid")) object.elementUid = options.bytes === String ? $util.base64.encode(message.elementUid, 0, message.elementUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.elementUid) : message.elementUid; - if (message.parentUid != null && message.hasOwnProperty("parentUid")) + if (message.parentUid != null && Object.hasOwnProperty.call(message, "parentUid")) object.parentUid = options.bytes === String ? $util.base64.encode(message.parentUid, 0, message.parentUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentUid) : message.parentUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; @@ -316922,7 +319453,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMElementOperationResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -317000,10 +319531,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.elementUid != null && message.hasOwnProperty("elementUid")) + if (message.elementUid != null && Object.hasOwnProperty.call(message, "elementUid")) if (!(message.elementUid && typeof message.elementUid.length === "number" || $util.isString(message.elementUid))) return "elementUid: buffer expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) switch (message.result) { default: return "result: enum value expected"; @@ -317013,7 +319544,7 @@ export const PAM = $root.PAM = (() => { case 3: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -317030,6 +319561,8 @@ export const PAM = $root.PAM = (() => { PAMElementOperationResult.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMElementOperationResult) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMElementOperationResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -317097,11 +319630,11 @@ export const PAM = $root.PAM = (() => { object.result = options.enums === String ? "POT_SUCCESS" : 0; object.message = ""; } - if (message.elementUid != null && message.hasOwnProperty("elementUid")) + if (message.elementUid != null && Object.hasOwnProperty.call(message, "elementUid")) object.elementUid = options.bytes === String ? $util.base64.encode(message.elementUid, 0, message.elementUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.elementUid) : message.elementUid; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && Object.hasOwnProperty.call(message, "result")) object.result = options.enums === String ? $root.PAM.PAMOperationResultType[message.result] === undefined ? message.result : $root.PAM.PAMOperationResultType[message.result] : message.result; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -317212,7 +319745,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMModifyResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -317284,7 +319817,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -317307,6 +319840,8 @@ export const PAM = $root.PAM = (() => { PAMModifyResult.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMModifyResult) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMModifyResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -317317,7 +319852,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMModifyResult.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".PAM.PAMModifyResult.results: object expected"); message.results[i] = $root.PAM.PAMElementOperationResult.fromObject(object.results[i], long + 1); } @@ -317502,7 +320037,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMElement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -317590,19 +320125,19 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.elementUid != null && message.hasOwnProperty("elementUid")) + if (message.elementUid != null && Object.hasOwnProperty.call(message, "elementUid")) if (!(message.elementUid && typeof message.elementUid.length === "number" || $util.isString(message.elementUid))) return "elementUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; - if (message.children != null && message.hasOwnProperty("children")) { + if (message.children != null && Object.hasOwnProperty.call(message, "children")) { if (!Array.isArray(message.children)) return "children: array expected"; for (let i = 0; i < message.children.length; ++i) { @@ -317625,6 +320160,8 @@ export const PAM = $root.PAM = (() => { PAMElement.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMElement) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMElement: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -317663,7 +320200,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMElement.children: array expected"); message.children = []; for (let i = 0; i < object.children.length; ++i) { - if (typeof object.children[i] !== "object") + if (!$util.isObject(object.children[i])) throw TypeError(".PAM.PAMElement.children: object expected"); message.children[i] = $root.PAM.PAMElement.fromObject(object.children[i], long + 1); } @@ -317716,18 +320253,18 @@ export const PAM = $root.PAM = (() => { } else object.lastModified = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.elementUid != null && message.hasOwnProperty("elementUid")) + if (message.elementUid != null && Object.hasOwnProperty.call(message, "elementUid")) object.elementUid = options.bytes === String ? $util.base64.encode(message.elementUid, 0, message.elementUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.elementUid) : message.elementUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") @@ -317846,7 +320383,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMGenericUidRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -317916,7 +320453,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; return null; @@ -317933,6 +320470,8 @@ export const PAM = $root.PAM = (() => { PAMGenericUidRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMGenericUidRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMGenericUidRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -317971,7 +320510,7 @@ export const PAM = $root.PAM = (() => { if (options.bytes !== Array) object.uid = $util.newBuffer(object.uid); } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; return object; }; @@ -318082,7 +320621,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMGenericUidsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -318154,7 +320693,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uids != null && message.hasOwnProperty("uids")) { + if (message.uids != null && Object.hasOwnProperty.call(message, "uids")) { if (!Array.isArray(message.uids)) return "uids: array expected"; for (let i = 0; i < message.uids.length; ++i) @@ -318175,6 +320714,8 @@ export const PAM = $root.PAM = (() => { PAMGenericUidsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMGenericUidsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMGenericUidsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -318392,7 +320933,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMConfiguration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -318488,25 +321029,25 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; - if (message.children != null && message.hasOwnProperty("children")) { + if (message.children != null && Object.hasOwnProperty.call(message, "children")) { if (!Array.isArray(message.children)) return "children: array expected"; for (let i = 0; i < message.children.length; ++i) { @@ -318529,6 +321070,8 @@ export const PAM = $root.PAM = (() => { PAMConfiguration.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMConfiguration) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMConfiguration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -318581,7 +321124,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMConfiguration.children: array expected"); message.children = []; for (let i = 0; i < object.children.length; ++i) { - if (typeof object.children[i] !== "object") + if (!$util.isObject(object.children[i])) throw TypeError(".PAM.PAMConfiguration.children: object expected"); message.children[i] = $root.PAM.PAMElement.fromObject(object.children[i], long + 1); } @@ -318646,27 +321189,27 @@ export const PAM = $root.PAM = (() => { } else object.lastModified = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") @@ -318787,7 +321330,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMConfigurations.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -318859,7 +321402,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.configurations != null && message.hasOwnProperty("configurations")) { + if (message.configurations != null && Object.hasOwnProperty.call(message, "configurations")) { if (!Array.isArray(message.configurations)) return "configurations: array expected"; for (let i = 0; i < message.configurations.length; ++i) { @@ -318882,6 +321425,8 @@ export const PAM = $root.PAM = (() => { PAMConfigurations.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMConfigurations) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMConfigurations: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -318892,7 +321437,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMConfigurations.configurations: array expected"); message.configurations = []; for (let i = 0; i < object.configurations.length; ++i) { - if (typeof object.configurations[i] !== "object") + if (!$util.isObject(object.configurations[i])) throw TypeError(".PAM.PAMConfigurations.configurations: object expected"); message.configurations[i] = $root.PAM.PAMConfiguration.fromObject(object.configurations[i], long + 1); } @@ -319130,7 +321675,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMController.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -319236,31 +321781,31 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.controllerName != null && message.hasOwnProperty("controllerName")) + if (message.controllerName != null && Object.hasOwnProperty.call(message, "controllerName")) if (!$util.isString(message.controllerName)) return "controllerName: string expected"; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) if (!$util.isString(message.deviceToken)) return "deviceToken: string expected"; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) if (!$util.isString(message.deviceName)) return "deviceName: string expected"; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (!$util.isInteger(message.nodeId) && !(message.nodeId && $util.isInteger(message.nodeId.low) && $util.isInteger(message.nodeId.high))) return "nodeId: integer|Long expected"; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (!$util.isInteger(message.created) && !(message.created && $util.isInteger(message.created.low) && $util.isInteger(message.created.high))) return "created: integer|Long expected"; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (!$util.isInteger(message.lastModified) && !(message.lastModified && $util.isInteger(message.lastModified.low) && $util.isInteger(message.lastModified.high))) return "lastModified: integer|Long expected"; - if (message.applicationUid != null && message.hasOwnProperty("applicationUid")) + if (message.applicationUid != null && Object.hasOwnProperty.call(message, "applicationUid")) if (!(message.applicationUid && typeof message.applicationUid.length === "number" || $util.isString(message.applicationUid))) return "applicationUid: buffer expected"; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) switch (message.appClientType) { default: return "appClientType: enum value expected"; @@ -319271,7 +321816,7 @@ export const PAM = $root.PAM = (() => { case 4: break; } - if (message.isInitialized != null && message.hasOwnProperty("isInitialized")) + if (message.isInitialized != null && Object.hasOwnProperty.call(message, "isInitialized")) if (typeof message.isInitialized !== "boolean") return "isInitialized: boolean expected"; return null; @@ -319288,6 +321833,8 @@ export const PAM = $root.PAM = (() => { PAMController.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMController) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMController: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -319422,40 +321969,40 @@ export const PAM = $root.PAM = (() => { object.appClientType = options.enums === String ? "NOT_USED" : 0; object.isInitialized = false; } - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.controllerName != null && message.hasOwnProperty("controllerName")) + if (message.controllerName != null && Object.hasOwnProperty.call(message, "controllerName")) object.controllerName = message.controllerName; - if (message.deviceToken != null && message.hasOwnProperty("deviceToken")) + if (message.deviceToken != null && Object.hasOwnProperty.call(message, "deviceToken")) object.deviceToken = message.deviceToken; - if (message.deviceName != null && message.hasOwnProperty("deviceName")) + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) object.deviceName = message.deviceName; - if (message.nodeId != null && message.hasOwnProperty("nodeId")) + if (message.nodeId != null && Object.hasOwnProperty.call(message, "nodeId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.nodeId = typeof message.nodeId === "number" ? BigInt(message.nodeId) : $util.Long.fromBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0, false).toBigInt(); else if (typeof message.nodeId === "number") object.nodeId = options.longs === String ? String(message.nodeId) : message.nodeId; else object.nodeId = options.longs === String ? $util.Long.prototype.toString.call(message.nodeId) : options.longs === Number ? new $util.LongBits(message.nodeId.low >>> 0, message.nodeId.high >>> 0).toNumber() : message.nodeId; - if (message.created != null && message.hasOwnProperty("created")) + if (message.created != null && Object.hasOwnProperty.call(message, "created")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.created = typeof message.created === "number" ? BigInt(message.created) : $util.Long.fromBits(message.created.low >>> 0, message.created.high >>> 0, false).toBigInt(); else if (typeof message.created === "number") object.created = options.longs === String ? String(message.created) : message.created; else object.created = options.longs === String ? $util.Long.prototype.toString.call(message.created) : options.longs === Number ? new $util.LongBits(message.created.low >>> 0, message.created.high >>> 0).toNumber() : message.created; - if (message.lastModified != null && message.hasOwnProperty("lastModified")) + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); else if (typeof message.lastModified === "number") object.lastModified = options.longs === String ? String(message.lastModified) : message.lastModified; else object.lastModified = options.longs === String ? $util.Long.prototype.toString.call(message.lastModified) : options.longs === Number ? new $util.LongBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0).toNumber() : message.lastModified; - if (message.applicationUid != null && message.hasOwnProperty("applicationUid")) + if (message.applicationUid != null && Object.hasOwnProperty.call(message, "applicationUid")) object.applicationUid = options.bytes === String ? $util.base64.encode(message.applicationUid, 0, message.applicationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.applicationUid) : message.applicationUid; - if (message.appClientType != null && message.hasOwnProperty("appClientType")) + if (message.appClientType != null && Object.hasOwnProperty.call(message, "appClientType")) object.appClientType = options.enums === String ? $root.Enterprise.AppClientType[message.appClientType] === undefined ? message.appClientType : $root.Enterprise.AppClientType[message.appClientType] : message.appClientType; - if (message.isInitialized != null && message.hasOwnProperty("isInitialized")) + if (message.isInitialized != null && Object.hasOwnProperty.call(message, "isInitialized")) object.isInitialized = message.isInitialized; return object; }; @@ -319575,7 +322122,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMSetMaxInstanceCountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -319649,10 +322196,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; - if (message.maxInstanceCount != null && message.hasOwnProperty("maxInstanceCount")) + if (message.maxInstanceCount != null && Object.hasOwnProperty.call(message, "maxInstanceCount")) if (!$util.isInteger(message.maxInstanceCount)) return "maxInstanceCount: integer expected"; return null; @@ -319669,6 +322216,8 @@ export const PAM = $root.PAM = (() => { PAMSetMaxInstanceCountRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMSetMaxInstanceCountRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMSetMaxInstanceCountRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -319711,9 +322260,9 @@ export const PAM = $root.PAM = (() => { } object.maxInstanceCount = 0; } - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; - if (message.maxInstanceCount != null && message.hasOwnProperty("maxInstanceCount")) + if (message.maxInstanceCount != null && Object.hasOwnProperty.call(message, "maxInstanceCount")) object.maxInstanceCount = message.maxInstanceCount; return object; }; @@ -319850,7 +322399,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ ControllerResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -319920,7 +322469,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) if (!$util.isString(message.payload)) return "payload: string expected"; return null; @@ -319937,6 +322486,8 @@ export const PAM = $root.PAM = (() => { ControllerResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.ControllerResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.ControllerResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -319966,7 +322517,7 @@ export const PAM = $root.PAM = (() => { let object = {}; if (options.defaults) object.payload = ""; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) object.payload = message.payload; return object; }; @@ -320086,7 +322637,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMConfigurationController.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -320160,10 +322711,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) if (!(message.controllerUid && typeof message.controllerUid.length === "number" || $util.isString(message.controllerUid))) return "controllerUid: buffer expected"; return null; @@ -320180,6 +322731,8 @@ export const PAM = $root.PAM = (() => { PAMConfigurationController.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMConfigurationController) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMConfigurationController: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -320231,9 +322784,9 @@ export const PAM = $root.PAM = (() => { object.controllerUid = $util.newBuffer(object.controllerUid); } } - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.controllerUid != null && message.hasOwnProperty("controllerUid")) + if (message.controllerUid != null && Object.hasOwnProperty.call(message, "controllerUid")) object.controllerUid = options.bytes === String ? $util.base64.encode(message.controllerUid, 0, message.controllerUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.controllerUid) : message.controllerUid; return object; }; @@ -320388,7 +322941,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ ConfigurationAddRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -320476,16 +323029,16 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) if (!(message.configurationUid && typeof message.configurationUid.length === "number" || $util.isString(message.configurationUid))) return "configurationUid: buffer expected"; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) if (!(message.recordKey && typeof message.recordKey.length === "number" || $util.isString(message.recordKey))) return "recordKey: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) return "data: buffer expected"; - if (message.recordLinks != null && message.hasOwnProperty("recordLinks")) { + if (message.recordLinks != null && Object.hasOwnProperty.call(message, "recordLinks")) { if (!Array.isArray(message.recordLinks)) return "recordLinks: array expected"; for (let i = 0; i < message.recordLinks.length; ++i) { @@ -320494,7 +323047,7 @@ export const PAM = $root.PAM = (() => { return "recordLinks." + error; } } - if (message.audit != null && message.hasOwnProperty("audit")) { + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) { let error = $root.Records.RecordAudit.verify(message.audit, long + 1); if (error) return "audit." + error; @@ -320513,6 +323066,8 @@ export const PAM = $root.PAM = (() => { ConfigurationAddRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.ConfigurationAddRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.ConfigurationAddRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -320538,13 +323093,13 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.ConfigurationAddRequest.recordLinks: array expected"); message.recordLinks = []; for (let i = 0; i < object.recordLinks.length; ++i) { - if (typeof object.recordLinks[i] !== "object") + if (!$util.isObject(object.recordLinks[i])) throw TypeError(".PAM.ConfigurationAddRequest.recordLinks: object expected"); message.recordLinks[i] = $root.Records.RecordLink.fromObject(object.recordLinks[i], long + 1); } } if (object.audit != null) { - if (typeof object.audit !== "object") + if (!$util.isObject(object.audit)) throw TypeError(".PAM.ConfigurationAddRequest.audit: object expected"); message.audit = $root.Records.RecordAudit.fromObject(object.audit, long + 1); } @@ -320594,18 +323149,18 @@ export const PAM = $root.PAM = (() => { } object.audit = null; } - if (message.configurationUid != null && message.hasOwnProperty("configurationUid")) + if (message.configurationUid != null && Object.hasOwnProperty.call(message, "configurationUid")) object.configurationUid = options.bytes === String ? $util.base64.encode(message.configurationUid, 0, message.configurationUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.configurationUid) : message.configurationUid; - if (message.recordKey != null && message.hasOwnProperty("recordKey")) + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) object.recordKey = options.bytes === String ? $util.base64.encode(message.recordKey, 0, message.recordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordKey) : message.recordKey; - if (message.data != null && message.hasOwnProperty("data")) + if (message.data != null && Object.hasOwnProperty.call(message, "data")) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; if (message.recordLinks && message.recordLinks.length) { object.recordLinks = []; for (let j = 0; j < message.recordLinks.length; ++j) object.recordLinks[j] = $root.Records.RecordLink.toObject(message.recordLinks[j], options, q + 1); } - if (message.audit != null && message.hasOwnProperty("audit")) + if (message.audit != null && Object.hasOwnProperty.call(message, "audit")) object.audit = $root.Records.RecordAudit.toObject(message.audit, options, q + 1); return object; }; @@ -320736,7 +323291,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ RelayAccessCreds.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -320814,13 +323369,13 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) if (!$util.isString(message.username)) return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) + if (message.password != null && Object.hasOwnProperty.call(message, "password")) if (!$util.isString(message.password)) return "password: string expected"; - if (message.serverTime != null && message.hasOwnProperty("serverTime")) + if (message.serverTime != null && Object.hasOwnProperty.call(message, "serverTime")) if (!$util.isInteger(message.serverTime) && !(message.serverTime && $util.isInteger(message.serverTime.low) && $util.isInteger(message.serverTime.high))) return "serverTime: integer|Long expected"; return null; @@ -320837,6 +323392,8 @@ export const PAM = $root.PAM = (() => { RelayAccessCreds.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.RelayAccessCreds) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.RelayAccessCreds: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -320884,11 +323441,11 @@ export const PAM = $root.PAM = (() => { } else object.serverTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) + if (message.password != null && Object.hasOwnProperty.call(message, "password")) object.password = message.password; - if (message.serverTime != null && message.hasOwnProperty("serverTime")) + if (message.serverTime != null && Object.hasOwnProperty.call(message, "serverTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.serverTime = typeof message.serverTime === "number" ? BigInt(message.serverTime) : $util.Long.fromBits(message.serverTime.low >>> 0, message.serverTime.high >>> 0, false).toBigInt(); else if (typeof message.serverTime === "number") @@ -321149,7 +323706,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRecordingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -321271,23 +323828,23 @@ export const PAM = $root.PAM = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) if (!$util.isInteger(message.maxCount)) return "maxCount: integer expected"; - if (message.rangeStart != null && message.hasOwnProperty("rangeStart")) { + if (message.rangeStart != null && Object.hasOwnProperty.call(message, "rangeStart")) { properties._rangeStart = 1; if (!$util.isInteger(message.rangeStart) && !(message.rangeStart && $util.isInteger(message.rangeStart.low) && $util.isInteger(message.rangeStart.high))) return "rangeStart: integer|Long expected"; } - if (message.rangeEnd != null && message.hasOwnProperty("rangeEnd")) { + if (message.rangeEnd != null && Object.hasOwnProperty.call(message, "rangeEnd")) { properties._rangeEnd = 1; if (!$util.isInteger(message.rangeEnd) && !(message.rangeEnd && $util.isInteger(message.rangeEnd.low) && $util.isInteger(message.rangeEnd.high))) return "rangeEnd: integer|Long expected"; } - if (message.types != null && message.hasOwnProperty("types")) { + if (message.types != null && Object.hasOwnProperty.call(message, "types")) { if (!Array.isArray(message.types)) return "types: array expected"; for (let i = 0; i < message.types.length; ++i) @@ -321301,7 +323858,7 @@ export const PAM = $root.PAM = (() => { break; } } - if (message.risks != null && message.hasOwnProperty("risks")) { + if (message.risks != null && Object.hasOwnProperty.call(message, "risks")) { if (!Array.isArray(message.risks)) return "risks: array expected"; for (let i = 0; i < message.risks.length; ++i) @@ -321316,14 +323873,14 @@ export const PAM = $root.PAM = (() => { break; } } - if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (message.protocols != null && Object.hasOwnProperty.call(message, "protocols")) { if (!Array.isArray(message.protocols)) return "protocols: array expected"; for (let i = 0; i < message.protocols.length; ++i) if (!$util.isString(message.protocols[i])) return "protocols: string[] expected"; } - if (message.closeReasons != null && message.hasOwnProperty("closeReasons")) { + if (message.closeReasons != null && Object.hasOwnProperty.call(message, "closeReasons")) { if (!Array.isArray(message.closeReasons)) return "closeReasons: array expected"; for (let i = 0; i < message.closeReasons.length; ++i) @@ -321344,6 +323901,8 @@ export const PAM = $root.PAM = (() => { PAMRecordingsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRecordingsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRecordingsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -321486,11 +324045,11 @@ export const PAM = $root.PAM = (() => { } object.maxCount = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) object.maxCount = message.maxCount; - if (message.rangeStart != null && message.hasOwnProperty("rangeStart")) { + if (message.rangeStart != null && Object.hasOwnProperty.call(message, "rangeStart")) { if (typeof BigInt !== "undefined" && options.longs === BigInt) object.rangeStart = typeof message.rangeStart === "number" ? BigInt(message.rangeStart) : $util.Long.fromBits(message.rangeStart.low >>> 0, message.rangeStart.high >>> 0, false).toBigInt(); else if (typeof message.rangeStart === "number") @@ -321500,7 +324059,7 @@ export const PAM = $root.PAM = (() => { if (options.oneofs) object._rangeStart = "rangeStart"; } - if (message.rangeEnd != null && message.hasOwnProperty("rangeEnd")) { + if (message.rangeEnd != null && Object.hasOwnProperty.call(message, "rangeEnd")) { if (typeof BigInt !== "undefined" && options.longs === BigInt) object.rangeEnd = typeof message.rangeEnd === "number" ? BigInt(message.rangeEnd) : $util.Long.fromBits(message.rangeEnd.low >>> 0, message.rangeEnd.high >>> 0, false).toBigInt(); else if (typeof message.rangeEnd === "number") @@ -321769,7 +324328,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRecording.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -321887,10 +324446,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) if (!(message.connectionUid && typeof message.connectionUid.length === "number" || $util.isString(message.connectionUid))) return "connectionUid: buffer expected"; - if (message.recordingType != null && message.hasOwnProperty("recordingType")) + if (message.recordingType != null && Object.hasOwnProperty.call(message, "recordingType")) switch (message.recordingType) { default: return "recordingType: enum value expected"; @@ -321900,34 +324459,34 @@ export const PAM = $root.PAM = (() => { case 3: break; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) if (!$util.isString(message.userName)) return "userName: string expected"; - if (message.startedOn != null && message.hasOwnProperty("startedOn")) + if (message.startedOn != null && Object.hasOwnProperty.call(message, "startedOn")) if (!$util.isInteger(message.startedOn) && !(message.startedOn && $util.isInteger(message.startedOn.low) && $util.isInteger(message.startedOn.high))) return "startedOn: integer|Long expected"; - if (message.length != null && message.hasOwnProperty("length")) + if (message.length != null && Object.hasOwnProperty.call(message, "length")) if (!$util.isInteger(message.length)) return "length: integer expected"; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (!$util.isInteger(message.fileSize) && !(message.fileSize && $util.isInteger(message.fileSize.low) && $util.isInteger(message.fileSize.high))) return "fileSize: integer|Long expected"; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (!$util.isInteger(message.createdOn) && !(message.createdOn && $util.isInteger(message.createdOn.low) && $util.isInteger(message.createdOn.high))) return "createdOn: integer|Long expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) if (!$util.isString(message.protocol)) return "protocol: string expected"; - if (message.closeReason != null && message.hasOwnProperty("closeReason")) + if (message.closeReason != null && Object.hasOwnProperty.call(message, "closeReason")) if (!$util.isInteger(message.closeReason)) return "closeReason: integer expected"; - if (message.recordingDuration != null && message.hasOwnProperty("recordingDuration")) + if (message.recordingDuration != null && Object.hasOwnProperty.call(message, "recordingDuration")) if (!$util.isInteger(message.recordingDuration)) return "recordingDuration: integer expected"; - if (message.aiOverallRiskLevel != null && message.hasOwnProperty("aiOverallRiskLevel")) + if (message.aiOverallRiskLevel != null && Object.hasOwnProperty.call(message, "aiOverallRiskLevel")) switch (message.aiOverallRiskLevel) { default: return "aiOverallRiskLevel: enum value expected"; @@ -321938,7 +324497,7 @@ export const PAM = $root.PAM = (() => { case 4: break; } - if (message.aiOverallSummary != null && message.hasOwnProperty("aiOverallSummary")) + if (message.aiOverallSummary != null && Object.hasOwnProperty.call(message, "aiOverallSummary")) if (!(message.aiOverallSummary && typeof message.aiOverallSummary.length === "number" || $util.isString(message.aiOverallSummary))) return "aiOverallSummary: buffer expected"; return null; @@ -321955,6 +324514,8 @@ export const PAM = $root.PAM = (() => { PAMRecording.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRecording) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRecording: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -322129,46 +324690,46 @@ export const PAM = $root.PAM = (() => { object.aiOverallSummary = $util.newBuffer(object.aiOverallSummary); } } - if (message.connectionUid != null && message.hasOwnProperty("connectionUid")) + if (message.connectionUid != null && Object.hasOwnProperty.call(message, "connectionUid")) object.connectionUid = options.bytes === String ? $util.base64.encode(message.connectionUid, 0, message.connectionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.connectionUid) : message.connectionUid; - if (message.recordingType != null && message.hasOwnProperty("recordingType")) + if (message.recordingType != null && Object.hasOwnProperty.call(message, "recordingType")) object.recordingType = options.enums === String ? $root.PAM.PAMRecordingType[message.recordingType] === undefined ? message.recordingType : $root.PAM.PAMRecordingType[message.recordingType] : message.recordingType; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.userName != null && message.hasOwnProperty("userName")) + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) object.userName = message.userName; - if (message.startedOn != null && message.hasOwnProperty("startedOn")) + if (message.startedOn != null && Object.hasOwnProperty.call(message, "startedOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startedOn = typeof message.startedOn === "number" ? BigInt(message.startedOn) : $util.Long.fromBits(message.startedOn.low >>> 0, message.startedOn.high >>> 0, false).toBigInt(); else if (typeof message.startedOn === "number") object.startedOn = options.longs === String ? String(message.startedOn) : message.startedOn; else object.startedOn = options.longs === String ? $util.Long.prototype.toString.call(message.startedOn) : options.longs === Number ? new $util.LongBits(message.startedOn.low >>> 0, message.startedOn.high >>> 0).toNumber() : message.startedOn; - if (message.length != null && message.hasOwnProperty("length")) + if (message.length != null && Object.hasOwnProperty.call(message, "length")) object.length = message.length; - if (message.fileSize != null && message.hasOwnProperty("fileSize")) + if (message.fileSize != null && Object.hasOwnProperty.call(message, "fileSize")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.fileSize = typeof message.fileSize === "number" ? BigInt(message.fileSize) : $util.Long.fromBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0, false).toBigInt(); else if (typeof message.fileSize === "number") object.fileSize = options.longs === String ? String(message.fileSize) : message.fileSize; else object.fileSize = options.longs === String ? $util.Long.prototype.toString.call(message.fileSize) : options.longs === Number ? new $util.LongBits(message.fileSize.low >>> 0, message.fileSize.high >>> 0).toNumber() : message.fileSize; - if (message.createdOn != null && message.hasOwnProperty("createdOn")) + if (message.createdOn != null && Object.hasOwnProperty.call(message, "createdOn")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.createdOn = typeof message.createdOn === "number" ? BigInt(message.createdOn) : $util.Long.fromBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0, false).toBigInt(); else if (typeof message.createdOn === "number") object.createdOn = options.longs === String ? String(message.createdOn) : message.createdOn; else object.createdOn = options.longs === String ? $util.Long.prototype.toString.call(message.createdOn) : options.longs === Number ? new $util.LongBits(message.createdOn.low >>> 0, message.createdOn.high >>> 0).toNumber() : message.createdOn; - if (message.protocol != null && message.hasOwnProperty("protocol")) + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) object.protocol = message.protocol; - if (message.closeReason != null && message.hasOwnProperty("closeReason")) + if (message.closeReason != null && Object.hasOwnProperty.call(message, "closeReason")) object.closeReason = message.closeReason; - if (message.recordingDuration != null && message.hasOwnProperty("recordingDuration")) + if (message.recordingDuration != null && Object.hasOwnProperty.call(message, "recordingDuration")) object.recordingDuration = message.recordingDuration; - if (message.aiOverallRiskLevel != null && message.hasOwnProperty("aiOverallRiskLevel")) + if (message.aiOverallRiskLevel != null && Object.hasOwnProperty.call(message, "aiOverallRiskLevel")) object.aiOverallRiskLevel = options.enums === String ? $root.PAM.PAMRecordingRiskLevel[message.aiOverallRiskLevel] === undefined ? message.aiOverallRiskLevel : $root.PAM.PAMRecordingRiskLevel[message.aiOverallRiskLevel] : message.aiOverallRiskLevel; - if (message.aiOverallSummary != null && message.hasOwnProperty("aiOverallSummary")) + if (message.aiOverallSummary != null && Object.hasOwnProperty.call(message, "aiOverallSummary")) object.aiOverallSummary = options.bytes === String ? $util.base64.encode(message.aiOverallSummary, 0, message.aiOverallSummary.length) : options.bytes === Array ? Array.prototype.slice.call(message.aiOverallSummary) : message.aiOverallSummary; return object; }; @@ -322290,7 +324851,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMRecordingsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -322366,7 +324927,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordings != null && message.hasOwnProperty("recordings")) { + if (message.recordings != null && Object.hasOwnProperty.call(message, "recordings")) { if (!Array.isArray(message.recordings)) return "recordings: array expected"; for (let i = 0; i < message.recordings.length; ++i) { @@ -322375,7 +324936,7 @@ export const PAM = $root.PAM = (() => { return "recordings." + error; } } - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) if (typeof message.hasMore !== "boolean") return "hasMore: boolean expected"; return null; @@ -322392,6 +324953,8 @@ export const PAM = $root.PAM = (() => { PAMRecordingsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMRecordingsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMRecordingsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -322402,7 +324965,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMRecordingsResponse.recordings: array expected"); message.recordings = []; for (let i = 0; i < object.recordings.length; ++i) { - if (typeof object.recordings[i] !== "object") + if (!$util.isObject(object.recordings[i])) throw TypeError(".PAM.PAMRecordingsResponse.recordings: object expected"); message.recordings[i] = $root.PAM.PAMRecording.fromObject(object.recordings[i], long + 1); } @@ -322438,7 +325001,7 @@ export const PAM = $root.PAM = (() => { for (let j = 0; j < message.recordings.length; ++j) object.recordings[j] = $root.PAM.PAMRecording.toObject(message.recordings[j], options, q + 1); } - if (message.hasMore != null && message.hasOwnProperty("hasMore")) + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) object.hasMore = message.hasMore; return object; }; @@ -322558,7 +325121,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -322632,10 +325195,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.vertex != null && message.hasOwnProperty("vertex")) + if (message.vertex != null && Object.hasOwnProperty.call(message, "vertex")) if (!(message.vertex && typeof message.vertex.length === "number" || $util.isString(message.vertex))) return "vertex: buffer expected"; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; return null; @@ -322652,6 +325215,8 @@ export const PAM = $root.PAM = (() => { PAMData.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMData) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMData: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -322703,9 +325268,9 @@ export const PAM = $root.PAM = (() => { object.content = $util.newBuffer(object.content); } } - if (message.vertex != null && message.hasOwnProperty("vertex")) + if (message.vertex != null && Object.hasOwnProperty.call(message, "vertex")) object.vertex = options.bytes === String ? $util.base64.encode(message.vertex, 0, message.vertex.length) : options.bytes === Array ? Array.prototype.slice.call(message.vertex) : message.vertex; - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; return object; }; @@ -322816,7 +325381,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ UidList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -322888,7 +325453,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uids != null && message.hasOwnProperty("uids")) { + if (message.uids != null && Object.hasOwnProperty.call(message, "uids")) { if (!Array.isArray(message.uids)) return "uids: array expected"; for (let i = 0; i < message.uids.length; ++i) @@ -322909,6 +325474,8 @@ export const PAM = $root.PAM = (() => { UidList.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.UidList) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.UidList: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -323214,7 +325781,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMResourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -323321,30 +325888,30 @@ export const PAM = $root.PAM = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.networkUid != null && message.hasOwnProperty("networkUid")) { + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) { properties._networkUid = 1; if (!(message.networkUid && typeof message.networkUid.length === "number" || $util.isString(message.networkUid))) return "networkUid: buffer expected"; } - if (message.adminUid != null && message.hasOwnProperty("adminUid")) { + if (message.adminUid != null && Object.hasOwnProperty.call(message, "adminUid")) { properties._adminUid = 1; if (!(message.adminUid && typeof message.adminUid.length === "number" || $util.isString(message.adminUid))) return "adminUid: buffer expected"; } - if (message.meta != null && message.hasOwnProperty("meta")) { + if (message.meta != null && Object.hasOwnProperty.call(message, "meta")) { properties._meta = 1; if (!(message.meta && typeof message.meta.length === "number" || $util.isString(message.meta))) return "meta: buffer expected"; } - if (message.connectionSettings != null && message.hasOwnProperty("connectionSettings")) { + if (message.connectionSettings != null && Object.hasOwnProperty.call(message, "connectionSettings")) { properties._connectionSettings = 1; if (!(message.connectionSettings && typeof message.connectionSettings.length === "number" || $util.isString(message.connectionSettings))) return "connectionSettings: buffer expected"; } - if (message.connectUsers != null && message.hasOwnProperty("connectUsers")) { + if (message.connectUsers != null && Object.hasOwnProperty.call(message, "connectUsers")) { properties._connectUsers = 1; { let error = $root.PAM.UidList.verify(message.connectUsers, long + 1); @@ -323352,22 +325919,22 @@ export const PAM = $root.PAM = (() => { return "connectUsers." + error; } } - if (message.domainUid != null && message.hasOwnProperty("domainUid")) { + if (message.domainUid != null && Object.hasOwnProperty.call(message, "domainUid")) { properties._domainUid = 1; if (!(message.domainUid && typeof message.domainUid.length === "number" || $util.isString(message.domainUid))) return "domainUid: buffer expected"; } - if (message.jitSettings != null && message.hasOwnProperty("jitSettings")) { + if (message.jitSettings != null && Object.hasOwnProperty.call(message, "jitSettings")) { properties._jitSettings = 1; if (!(message.jitSettings && typeof message.jitSettings.length === "number" || $util.isString(message.jitSettings))) return "jitSettings: buffer expected"; } - if (message.keeperAiSettings != null && message.hasOwnProperty("keeperAiSettings")) { + if (message.keeperAiSettings != null && Object.hasOwnProperty.call(message, "keeperAiSettings")) { properties._keeperAiSettings = 1; if (!(message.keeperAiSettings && typeof message.keeperAiSettings.length === "number" || $util.isString(message.keeperAiSettings))) return "keeperAiSettings: buffer expected"; } - if (message.updateServices != null && message.hasOwnProperty("updateServices")) { + if (message.updateServices != null && Object.hasOwnProperty.call(message, "updateServices")) { properties._updateServices = 1; if (typeof message.updateServices !== "boolean") return "updateServices: boolean expected"; @@ -323386,6 +325953,8 @@ export const PAM = $root.PAM = (() => { PAMResourceConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMResourceConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMResourceConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -323417,7 +325986,7 @@ export const PAM = $root.PAM = (() => { else if (object.connectionSettings.length >= 0) message.connectionSettings = object.connectionSettings; if (object.connectUsers != null) { - if (typeof object.connectUsers !== "object") + if (!$util.isObject(object.connectUsers)) throw TypeError(".PAM.PAMResourceConfig.connectUsers: object expected"); message.connectUsers = $root.PAM.UidList.fromObject(object.connectUsers, long + 1); } @@ -323466,49 +326035,49 @@ export const PAM = $root.PAM = (() => { if (options.bytes !== Array) object.recordUid = $util.newBuffer(object.recordUid); } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.networkUid != null && message.hasOwnProperty("networkUid")) { + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) { object.networkUid = options.bytes === String ? $util.base64.encode(message.networkUid, 0, message.networkUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.networkUid) : message.networkUid; if (options.oneofs) object._networkUid = "networkUid"; } - if (message.adminUid != null && message.hasOwnProperty("adminUid")) { + if (message.adminUid != null && Object.hasOwnProperty.call(message, "adminUid")) { object.adminUid = options.bytes === String ? $util.base64.encode(message.adminUid, 0, message.adminUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.adminUid) : message.adminUid; if (options.oneofs) object._adminUid = "adminUid"; } - if (message.meta != null && message.hasOwnProperty("meta")) { + if (message.meta != null && Object.hasOwnProperty.call(message, "meta")) { object.meta = options.bytes === String ? $util.base64.encode(message.meta, 0, message.meta.length) : options.bytes === Array ? Array.prototype.slice.call(message.meta) : message.meta; if (options.oneofs) object._meta = "meta"; } - if (message.connectionSettings != null && message.hasOwnProperty("connectionSettings")) { + if (message.connectionSettings != null && Object.hasOwnProperty.call(message, "connectionSettings")) { object.connectionSettings = options.bytes === String ? $util.base64.encode(message.connectionSettings, 0, message.connectionSettings.length) : options.bytes === Array ? Array.prototype.slice.call(message.connectionSettings) : message.connectionSettings; if (options.oneofs) object._connectionSettings = "connectionSettings"; } - if (message.connectUsers != null && message.hasOwnProperty("connectUsers")) { + if (message.connectUsers != null && Object.hasOwnProperty.call(message, "connectUsers")) { object.connectUsers = $root.PAM.UidList.toObject(message.connectUsers, options, q + 1); if (options.oneofs) object._connectUsers = "connectUsers"; } - if (message.domainUid != null && message.hasOwnProperty("domainUid")) { + if (message.domainUid != null && Object.hasOwnProperty.call(message, "domainUid")) { object.domainUid = options.bytes === String ? $util.base64.encode(message.domainUid, 0, message.domainUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.domainUid) : message.domainUid; if (options.oneofs) object._domainUid = "domainUid"; } - if (message.jitSettings != null && message.hasOwnProperty("jitSettings")) { + if (message.jitSettings != null && Object.hasOwnProperty.call(message, "jitSettings")) { object.jitSettings = options.bytes === String ? $util.base64.encode(message.jitSettings, 0, message.jitSettings.length) : options.bytes === Array ? Array.prototype.slice.call(message.jitSettings) : message.jitSettings; if (options.oneofs) object._jitSettings = "jitSettings"; } - if (message.keeperAiSettings != null && message.hasOwnProperty("keeperAiSettings")) { + if (message.keeperAiSettings != null && Object.hasOwnProperty.call(message, "keeperAiSettings")) { object.keeperAiSettings = options.bytes === String ? $util.base64.encode(message.keeperAiSettings, 0, message.keeperAiSettings.length) : options.bytes === Array ? Array.prototype.slice.call(message.keeperAiSettings) : message.keeperAiSettings; if (options.oneofs) object._keeperAiSettings = "keeperAiSettings"; } - if (message.updateServices != null && message.hasOwnProperty("updateServices")) { + if (message.updateServices != null && Object.hasOwnProperty.call(message, "updateServices")) { object.updateServices = message.updateServices; if (options.oneofs) object._updateServices = "updateServices"; @@ -323620,7 +326189,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMUniversalSyncFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -323690,7 +326259,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!(message.uid && typeof message.uid.length === "number" || $util.isString(message.uid))) return "uid: buffer expected"; return null; @@ -323707,6 +326276,8 @@ export const PAM = $root.PAM = (() => { PAMUniversalSyncFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMUniversalSyncFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMUniversalSyncFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -323745,7 +326316,7 @@ export const PAM = $root.PAM = (() => { if (options.bytes !== Array) object.uid = $util.newBuffer(object.uid); } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = options.bytes === String ? $util.base64.encode(message.uid, 0, message.uid.length) : options.bytes === Array ? Array.prototype.slice.call(message.uid) : message.uid; return object; }; @@ -323938,7 +326509,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMUniversalSyncConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -324031,20 +326602,20 @@ export const PAM = $root.PAM = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.networkUid != null && message.hasOwnProperty("networkUid")) + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) if (!(message.networkUid && typeof message.networkUid.length === "number" || $util.isString(message.networkUid))) return "networkUid: buffer expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) { + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) { properties._enabled = 1; if (typeof message.enabled !== "boolean") return "enabled: boolean expected"; } - if (message.dryRunEnabled != null && message.hasOwnProperty("dryRunEnabled")) { + if (message.dryRunEnabled != null && Object.hasOwnProperty.call(message, "dryRunEnabled")) { properties._dryRunEnabled = 1; if (typeof message.dryRunEnabled !== "boolean") return "dryRunEnabled: boolean expected"; } - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -324053,12 +326624,12 @@ export const PAM = $root.PAM = (() => { return "folders." + error; } } - if (message.syncIdentity != null && message.hasOwnProperty("syncIdentity")) { + if (message.syncIdentity != null && Object.hasOwnProperty.call(message, "syncIdentity")) { properties._syncIdentity = 1; if (!(message.syncIdentity && typeof message.syncIdentity.length === "number" || $util.isString(message.syncIdentity))) return "syncIdentity: buffer expected"; } - if (message.vaultName != null && message.hasOwnProperty("vaultName")) { + if (message.vaultName != null && Object.hasOwnProperty.call(message, "vaultName")) { properties._vaultName = 1; if (!(message.vaultName && typeof message.vaultName.length === "number" || $util.isString(message.vaultName))) return "vaultName: buffer expected"; @@ -324077,6 +326648,8 @@ export const PAM = $root.PAM = (() => { PAMUniversalSyncConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMUniversalSyncConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMUniversalSyncConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -324096,7 +326669,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMUniversalSyncConfig.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".PAM.PAMUniversalSyncConfig.folders: object expected"); message.folders[i] = $root.PAM.PAMUniversalSyncFolder.fromObject(object.folders[i], long + 1); } @@ -324141,14 +326714,14 @@ export const PAM = $root.PAM = (() => { if (options.bytes !== Array) object.networkUid = $util.newBuffer(object.networkUid); } - if (message.networkUid != null && message.hasOwnProperty("networkUid")) + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) object.networkUid = options.bytes === String ? $util.base64.encode(message.networkUid, 0, message.networkUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.networkUid) : message.networkUid; - if (message.enabled != null && message.hasOwnProperty("enabled")) { + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) { object.enabled = message.enabled; if (options.oneofs) object._enabled = "enabled"; } - if (message.dryRunEnabled != null && message.hasOwnProperty("dryRunEnabled")) { + if (message.dryRunEnabled != null && Object.hasOwnProperty.call(message, "dryRunEnabled")) { object.dryRunEnabled = message.dryRunEnabled; if (options.oneofs) object._dryRunEnabled = "dryRunEnabled"; @@ -324158,12 +326731,12 @@ export const PAM = $root.PAM = (() => { for (let j = 0; j < message.folders.length; ++j) object.folders[j] = $root.PAM.PAMUniversalSyncFolder.toObject(message.folders[j], options, q + 1); } - if (message.syncIdentity != null && message.hasOwnProperty("syncIdentity")) { + if (message.syncIdentity != null && Object.hasOwnProperty.call(message, "syncIdentity")) { object.syncIdentity = options.bytes === String ? $util.base64.encode(message.syncIdentity, 0, message.syncIdentity.length) : options.bytes === Array ? Array.prototype.slice.call(message.syncIdentity) : message.syncIdentity; if (options.oneofs) object._syncIdentity = "syncIdentity"; } - if (message.vaultName != null && message.hasOwnProperty("vaultName")) { + if (message.vaultName != null && Object.hasOwnProperty.call(message, "vaultName")) { object.vaultName = options.bytes === String ? $util.base64.encode(message.vaultName, 0, message.vaultName.length) : options.bytes === Array ? Array.prototype.slice.call(message.vaultName) : message.vaultName; if (options.oneofs) object._vaultName = "vaultName"; @@ -324286,7 +326859,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ NhiMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -324360,10 +326933,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) return "endTime: integer|Long expected"; return null; @@ -324380,6 +326953,8 @@ export const PAM = $root.PAM = (() => { NhiMetricsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.NhiMetricsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.NhiMetricsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -324435,14 +327010,14 @@ export const PAM = $root.PAM = (() => { } else object.endTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startTime = typeof message.startTime === "number" ? BigInt(message.startTime) : $util.Long.fromBits(message.startTime.low >>> 0, message.startTime.high >>> 0, false).toBigInt(); else if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endTime = typeof message.endTime === "number" ? BigInt(message.endTime) : $util.Long.fromBits(message.endTime.low >>> 0, message.endTime.high >>> 0, false).toBigInt(); else if (typeof message.endTime === "number") @@ -324644,7 +327219,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PamUsageByUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -324746,31 +327321,31 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.recordRotationScheduledOk != null && message.hasOwnProperty("recordRotationScheduledOk")) + if (message.recordRotationScheduledOk != null && Object.hasOwnProperty.call(message, "recordRotationScheduledOk")) if (!$util.isInteger(message.recordRotationScheduledOk)) return "recordRotationScheduledOk: integer expected"; - if (message.pamConnectionStarted != null && message.hasOwnProperty("pamConnectionStarted")) + if (message.pamConnectionStarted != null && Object.hasOwnProperty.call(message, "pamConnectionStarted")) if (!$util.isInteger(message.pamConnectionStarted)) return "pamConnectionStarted: integer expected"; - if (message.pamTunnelStarted != null && message.hasOwnProperty("pamTunnelStarted")) + if (message.pamTunnelStarted != null && Object.hasOwnProperty.call(message, "pamTunnelStarted")) if (!$util.isInteger(message.pamTunnelStarted)) return "pamTunnelStarted: integer expected"; - if (message.discoveryJobStarted != null && message.hasOwnProperty("discoveryJobStarted")) + if (message.discoveryJobStarted != null && Object.hasOwnProperty.call(message, "discoveryJobStarted")) if (!$util.isInteger(message.discoveryJobStarted)) return "discoveryJobStarted: integer expected"; - if (message.recordRotationOnDemandOk != null && message.hasOwnProperty("recordRotationOnDemandOk")) + if (message.recordRotationOnDemandOk != null && Object.hasOwnProperty.call(message, "recordRotationOnDemandOk")) if (!$util.isInteger(message.recordRotationOnDemandOk)) return "recordRotationOnDemandOk: integer expected"; - if (message.pamSessionRecordingStarted != null && message.hasOwnProperty("pamSessionRecordingStarted")) + if (message.pamSessionRecordingStarted != null && Object.hasOwnProperty.call(message, "pamSessionRecordingStarted")) if (!$util.isInteger(message.pamSessionRecordingStarted)) return "pamSessionRecordingStarted: integer expected"; - if (message.pamRbiStarted != null && message.hasOwnProperty("pamRbiStarted")) + if (message.pamRbiStarted != null && Object.hasOwnProperty.call(message, "pamRbiStarted")) if (!$util.isInteger(message.pamRbiStarted)) return "pamRbiStarted: integer expected"; - if (message.pamSessionRbiRecordingStarted != null && message.hasOwnProperty("pamSessionRbiRecordingStarted")) + if (message.pamSessionRbiRecordingStarted != null && Object.hasOwnProperty.call(message, "pamSessionRbiRecordingStarted")) if (!$util.isInteger(message.pamSessionRbiRecordingStarted)) return "pamSessionRbiRecordingStarted: integer expected"; return null; @@ -324787,6 +327362,8 @@ export const PAM = $root.PAM = (() => { PamUsageByUser.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PamUsageByUser) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PamUsageByUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -324841,23 +327418,23 @@ export const PAM = $root.PAM = (() => { object.pamRbiStarted = 0; object.pamSessionRbiRecordingStarted = 0; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.recordRotationScheduledOk != null && message.hasOwnProperty("recordRotationScheduledOk")) + if (message.recordRotationScheduledOk != null && Object.hasOwnProperty.call(message, "recordRotationScheduledOk")) object.recordRotationScheduledOk = message.recordRotationScheduledOk; - if (message.pamConnectionStarted != null && message.hasOwnProperty("pamConnectionStarted")) + if (message.pamConnectionStarted != null && Object.hasOwnProperty.call(message, "pamConnectionStarted")) object.pamConnectionStarted = message.pamConnectionStarted; - if (message.pamTunnelStarted != null && message.hasOwnProperty("pamTunnelStarted")) + if (message.pamTunnelStarted != null && Object.hasOwnProperty.call(message, "pamTunnelStarted")) object.pamTunnelStarted = message.pamTunnelStarted; - if (message.discoveryJobStarted != null && message.hasOwnProperty("discoveryJobStarted")) + if (message.discoveryJobStarted != null && Object.hasOwnProperty.call(message, "discoveryJobStarted")) object.discoveryJobStarted = message.discoveryJobStarted; - if (message.recordRotationOnDemandOk != null && message.hasOwnProperty("recordRotationOnDemandOk")) + if (message.recordRotationOnDemandOk != null && Object.hasOwnProperty.call(message, "recordRotationOnDemandOk")) object.recordRotationOnDemandOk = message.recordRotationOnDemandOk; - if (message.pamSessionRecordingStarted != null && message.hasOwnProperty("pamSessionRecordingStarted")) + if (message.pamSessionRecordingStarted != null && Object.hasOwnProperty.call(message, "pamSessionRecordingStarted")) object.pamSessionRecordingStarted = message.pamSessionRecordingStarted; - if (message.pamRbiStarted != null && message.hasOwnProperty("pamRbiStarted")) + if (message.pamRbiStarted != null && Object.hasOwnProperty.call(message, "pamRbiStarted")) object.pamRbiStarted = message.pamRbiStarted; - if (message.pamSessionRbiRecordingStarted != null && message.hasOwnProperty("pamSessionRbiRecordingStarted")) + if (message.pamSessionRbiRecordingStarted != null && Object.hasOwnProperty.call(message, "pamSessionRbiRecordingStarted")) object.pamSessionRbiRecordingStarted = message.pamSessionRbiRecordingStarted; return object; }; @@ -325010,7 +327587,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ NhiUsageByUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -325096,19 +327673,19 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.rotations != null && message.hasOwnProperty("rotations")) + if (message.rotations != null && Object.hasOwnProperty.call(message, "rotations")) if (!$util.isInteger(message.rotations)) return "rotations: integer expected"; - if (message.tunnels != null && message.hasOwnProperty("tunnels")) + if (message.tunnels != null && Object.hasOwnProperty.call(message, "tunnels")) if (!$util.isInteger(message.tunnels)) return "tunnels: integer expected"; - if (message.connections != null && message.hasOwnProperty("connections")) + if (message.connections != null && Object.hasOwnProperty.call(message, "connections")) if (!$util.isInteger(message.connections)) return "connections: integer expected"; - if (message.discoveryJobs != null && message.hasOwnProperty("discoveryJobs")) + if (message.discoveryJobs != null && Object.hasOwnProperty.call(message, "discoveryJobs")) if (!$util.isInteger(message.discoveryJobs)) return "discoveryJobs: integer expected"; return null; @@ -325125,6 +327702,8 @@ export const PAM = $root.PAM = (() => { NhiUsageByUser.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.NhiUsageByUser) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.NhiUsageByUser: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -325167,15 +327746,15 @@ export const PAM = $root.PAM = (() => { object.connections = 0; object.discoveryJobs = 0; } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.rotations != null && message.hasOwnProperty("rotations")) + if (message.rotations != null && Object.hasOwnProperty.call(message, "rotations")) object.rotations = message.rotations; - if (message.tunnels != null && message.hasOwnProperty("tunnels")) + if (message.tunnels != null && Object.hasOwnProperty.call(message, "tunnels")) object.tunnels = message.tunnels; - if (message.connections != null && message.hasOwnProperty("connections")) + if (message.connections != null && Object.hasOwnProperty.call(message, "connections")) object.connections = message.connections; - if (message.discoveryJobs != null && message.hasOwnProperty("discoveryJobs")) + if (message.discoveryJobs != null && Object.hasOwnProperty.call(message, "discoveryJobs")) object.discoveryJobs = message.discoveryJobs; return object; }; @@ -325376,7 +327955,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ NhiMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -325482,22 +328061,22 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (!$util.isInteger(message.enterpriseId) && !(message.enterpriseId && $util.isInteger(message.enterpriseId.low) && $util.isInteger(message.enterpriseId.high))) return "enterpriseId: integer|Long expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) return "endTime: integer|Long expected"; - if (message.uniqueKsmDevices != null && message.hasOwnProperty("uniqueKsmDevices")) + if (message.uniqueKsmDevices != null && Object.hasOwnProperty.call(message, "uniqueKsmDevices")) if (!$util.isInteger(message.uniqueKsmDevices)) return "uniqueKsmDevices: integer expected"; - if (message.pamGatewayOnline != null && message.hasOwnProperty("pamGatewayOnline")) + if (message.pamGatewayOnline != null && Object.hasOwnProperty.call(message, "pamGatewayOnline")) if (!$util.isInteger(message.pamGatewayOnline)) return "pamGatewayOnline: integer expected"; - if (message.pamUsageByUser != null && message.hasOwnProperty("pamUsageByUser")) { + if (message.pamUsageByUser != null && Object.hasOwnProperty.call(message, "pamUsageByUser")) { if (!Array.isArray(message.pamUsageByUser)) return "pamUsageByUser: array expected"; for (let i = 0; i < message.pamUsageByUser.length; ++i) { @@ -325506,13 +328085,13 @@ export const PAM = $root.PAM = (() => { return "pamUsageByUser." + error; } } - if (message.nhiCount != null && message.hasOwnProperty("nhiCount")) + if (message.nhiCount != null && Object.hasOwnProperty.call(message, "nhiCount")) if (!$util.isInteger(message.nhiCount)) return "nhiCount: integer expected"; - if (message.ksmNhiCount != null && message.hasOwnProperty("ksmNhiCount")) + if (message.ksmNhiCount != null && Object.hasOwnProperty.call(message, "ksmNhiCount")) if (!$util.isInteger(message.ksmNhiCount)) return "ksmNhiCount: integer expected"; - if (message.usageByUser != null && message.hasOwnProperty("usageByUser")) { + if (message.usageByUser != null && Object.hasOwnProperty.call(message, "usageByUser")) { if (!Array.isArray(message.usageByUser)) return "usageByUser: array expected"; for (let i = 0; i < message.usageByUser.length; ++i) { @@ -325535,6 +328114,8 @@ export const PAM = $root.PAM = (() => { NhiMetricsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.NhiMetricsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.NhiMetricsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -325576,7 +328157,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.NhiMetricsResponse.pamUsageByUser: array expected"); message.pamUsageByUser = []; for (let i = 0; i < object.pamUsageByUser.length; ++i) { - if (typeof object.pamUsageByUser[i] !== "object") + if (!$util.isObject(object.pamUsageByUser[i])) throw TypeError(".PAM.NhiMetricsResponse.pamUsageByUser: object expected"); message.pamUsageByUser[i] = $root.PAM.PamUsageByUser.fromObject(object.pamUsageByUser[i], long + 1); } @@ -325590,7 +328171,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.NhiMetricsResponse.usageByUser: array expected"); message.usageByUser = []; for (let i = 0; i < object.usageByUser.length; ++i) { - if (typeof object.usageByUser[i] !== "object") + if (!$util.isObject(object.usageByUser[i])) throw TypeError(".PAM.NhiMetricsResponse.usageByUser: object expected"); message.usageByUser[i] = $root.PAM.NhiUsageByUser.fromObject(object.usageByUser[i], long + 1); } @@ -325640,39 +328221,39 @@ export const PAM = $root.PAM = (() => { object.nhiCount = 0; object.ksmNhiCount = 0; } - if (message.enterpriseId != null && message.hasOwnProperty("enterpriseId")) + if (message.enterpriseId != null && Object.hasOwnProperty.call(message, "enterpriseId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.enterpriseId = typeof message.enterpriseId === "number" ? BigInt(message.enterpriseId) : $util.Long.fromBits(message.enterpriseId.low >>> 0, message.enterpriseId.high >>> 0, false).toBigInt(); else if (typeof message.enterpriseId === "number") object.enterpriseId = options.longs === String ? String(message.enterpriseId) : message.enterpriseId; else object.enterpriseId = options.longs === String ? $util.Long.prototype.toString.call(message.enterpriseId) : options.longs === Number ? new $util.LongBits(message.enterpriseId.low >>> 0, message.enterpriseId.high >>> 0).toNumber() : message.enterpriseId; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startTime = typeof message.startTime === "number" ? BigInt(message.startTime) : $util.Long.fromBits(message.startTime.low >>> 0, message.startTime.high >>> 0, false).toBigInt(); else if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endTime = typeof message.endTime === "number" ? BigInt(message.endTime) : $util.Long.fromBits(message.endTime.low >>> 0, message.endTime.high >>> 0, false).toBigInt(); else if (typeof message.endTime === "number") object.endTime = options.longs === String ? String(message.endTime) : message.endTime; else object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; - if (message.uniqueKsmDevices != null && message.hasOwnProperty("uniqueKsmDevices")) + if (message.uniqueKsmDevices != null && Object.hasOwnProperty.call(message, "uniqueKsmDevices")) object.uniqueKsmDevices = message.uniqueKsmDevices; - if (message.pamGatewayOnline != null && message.hasOwnProperty("pamGatewayOnline")) + if (message.pamGatewayOnline != null && Object.hasOwnProperty.call(message, "pamGatewayOnline")) object.pamGatewayOnline = message.pamGatewayOnline; if (message.pamUsageByUser && message.pamUsageByUser.length) { object.pamUsageByUser = []; for (let j = 0; j < message.pamUsageByUser.length; ++j) object.pamUsageByUser[j] = $root.PAM.PamUsageByUser.toObject(message.pamUsageByUser[j], options, q + 1); } - if (message.nhiCount != null && message.hasOwnProperty("nhiCount")) + if (message.nhiCount != null && Object.hasOwnProperty.call(message, "nhiCount")) object.nhiCount = message.nhiCount; - if (message.ksmNhiCount != null && message.hasOwnProperty("ksmNhiCount")) + if (message.ksmNhiCount != null && Object.hasOwnProperty.call(message, "ksmNhiCount")) object.ksmNhiCount = message.ksmNhiCount; if (message.usageByUser && message.usageByUser.length) { object.usageByUser = []; @@ -325788,7 +328369,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ NhiBulkMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -325860,7 +328441,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responses != null && message.hasOwnProperty("responses")) { + if (message.responses != null && Object.hasOwnProperty.call(message, "responses")) { if (!Array.isArray(message.responses)) return "responses: array expected"; for (let i = 0; i < message.responses.length; ++i) { @@ -325883,6 +328464,8 @@ export const PAM = $root.PAM = (() => { NhiBulkMetricsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.NhiBulkMetricsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.NhiBulkMetricsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -325893,7 +328476,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.NhiBulkMetricsResponse.responses: array expected"); message.responses = []; for (let i = 0; i < object.responses.length; ++i) { - if (typeof object.responses[i] !== "object") + if (!$util.isObject(object.responses[i])) throw TypeError(".PAM.NhiBulkMetricsResponse.responses: object expected"); message.responses[i] = $root.PAM.NhiMetricsResponse.fromObject(object.responses[i], long + 1); } @@ -325986,6 +328569,7 @@ export const PAM = $root.PAM = (() => { * @property {string|null} [uid] NhiUidEntry uid * @property {PAM.NhiCategory|null} [category] NhiUidEntry category * @property {boolean|null} [ksmNhi] NhiUidEntry ksmNhi + * @property {string|null} [appUid] NhiUidEntry appUid */ /** @@ -326027,6 +328611,14 @@ export const PAM = $root.PAM = (() => { */ NhiUidEntry.prototype.ksmNhi = false; + /** + * NhiUidEntry appUid. + * @member {string} appUid + * @memberof PAM.NhiUidEntry + * @instance + */ + NhiUidEntry.prototype.appUid = ""; + /** * Creates a new NhiUidEntry instance using the specified properties. * @function create @@ -326061,6 +328653,8 @@ export const PAM = $root.PAM = (() => { writer.uint32(/* id 2, wireType 0 =*/16).int32(message.category); if (message.ksmNhi != null && Object.hasOwnProperty.call(message, "ksmNhi")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ksmNhi); + if (message.appUid != null && Object.hasOwnProperty.call(message, "appUid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appUid); return writer; }; @@ -326074,7 +328668,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ NhiUidEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -326113,6 +328707,10 @@ export const PAM = $root.PAM = (() => { message.ksmNhi = reader.bool(); break; } + case 4: { + message.appUid = reader.string(); + break; + } default: reader.skipType(tag & 7, long); break; @@ -326152,10 +328750,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && Object.hasOwnProperty.call(message, "category")) switch (message.category) { default: return "category: enum value expected"; @@ -326166,9 +328764,12 @@ export const PAM = $root.PAM = (() => { case 4: break; } - if (message.ksmNhi != null && message.hasOwnProperty("ksmNhi")) + if (message.ksmNhi != null && Object.hasOwnProperty.call(message, "ksmNhi")) if (typeof message.ksmNhi !== "boolean") return "ksmNhi: boolean expected"; + if (message.appUid != null && Object.hasOwnProperty.call(message, "appUid")) + if (!$util.isString(message.appUid)) + return "appUid: string expected"; return null; }; @@ -326183,6 +328784,8 @@ export const PAM = $root.PAM = (() => { NhiUidEntry.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.NhiUidEntry) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.NhiUidEntry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -326220,6 +328823,8 @@ export const PAM = $root.PAM = (() => { } if (object.ksmNhi != null) message.ksmNhi = Boolean(object.ksmNhi); + if (object.appUid != null) + message.appUid = String(object.appUid); return message; }; @@ -326244,13 +328849,16 @@ export const PAM = $root.PAM = (() => { object.uid = ""; object.category = options.enums === String ? "NHI_CATEGORY_UNKNOWN" : 0; object.ksmNhi = false; + object.appUid = ""; } - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = message.uid; - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && Object.hasOwnProperty.call(message, "category")) object.category = options.enums === String ? $root.PAM.NhiCategory[message.category] === undefined ? message.category : $root.PAM.NhiCategory[message.category] : message.category; - if (message.ksmNhi != null && message.hasOwnProperty("ksmNhi")) + if (message.ksmNhi != null && Object.hasOwnProperty.call(message, "ksmNhi")) object.ksmNhi = message.ksmNhi; + if (message.appUid != null && Object.hasOwnProperty.call(message, "appUid")) + object.appUid = message.appUid; return object; }; @@ -326369,7 +328977,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ GetNhiUidsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -326443,10 +329051,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) return "endTime: integer|Long expected"; return null; @@ -326463,6 +329071,8 @@ export const PAM = $root.PAM = (() => { GetNhiUidsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.GetNhiUidsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.GetNhiUidsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -326518,14 +329128,14 @@ export const PAM = $root.PAM = (() => { } else object.endTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.startTime = typeof message.startTime === "number" ? BigInt(message.startTime) : $util.Long.fromBits(message.startTime.low >>> 0, message.startTime.high >>> 0, false).toBigInt(); else if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.endTime != null && message.hasOwnProperty("endTime")) + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.endTime = typeof message.endTime === "number" ? BigInt(message.endTime) : $util.Long.fromBits(message.endTime.low >>> 0, message.endTime.high >>> 0, false).toBigInt(); else if (typeof message.endTime === "number") @@ -326641,7 +329251,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ GetNhiUidsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -326713,7 +329323,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uids != null && message.hasOwnProperty("uids")) { + if (message.uids != null && Object.hasOwnProperty.call(message, "uids")) { if (!Array.isArray(message.uids)) return "uids: array expected"; for (let i = 0; i < message.uids.length; ++i) { @@ -326736,6 +329346,8 @@ export const PAM = $root.PAM = (() => { GetNhiUidsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.GetNhiUidsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.GetNhiUidsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -326746,7 +329358,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.GetNhiUidsResponse.uids: array expected"); message.uids = []; for (let i = 0; i < object.uids.length; ++i) { - if (typeof object.uids[i] !== "object") + if (!$util.isObject(object.uids[i])) throw TypeError(".PAM.GetNhiUidsResponse.uids: object expected"); message.uids[i] = $root.PAM.NhiUidEntry.fromObject(object.uids[i], long + 1); } @@ -326810,6 +329422,532 @@ export const PAM = $root.PAM = (() => { return GetNhiUidsResponse; })(); + PAM.SetNhiKsmEffectiveDateRequest = (function() { + + /** + * Properties of a SetNhiKsmEffectiveDateRequest. + * @memberof PAM + * @interface ISetNhiKsmEffectiveDateRequest + * @property {number|null} [effectiveDate] SetNhiKsmEffectiveDateRequest effectiveDate + */ + + /** + * Constructs a new SetNhiKsmEffectiveDateRequest. + * @memberof PAM + * @classdesc Represents a SetNhiKsmEffectiveDateRequest. + * @implements ISetNhiKsmEffectiveDateRequest + * @constructor + * @param {PAM.ISetNhiKsmEffectiveDateRequest=} [properties] Properties to set + */ + function SetNhiKsmEffectiveDateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetNhiKsmEffectiveDateRequest effectiveDate. + * @member {number} effectiveDate + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @instance + */ + SetNhiKsmEffectiveDateRequest.prototype.effectiveDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SetNhiKsmEffectiveDateRequest instance using the specified properties. + * @function create + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {PAM.ISetNhiKsmEffectiveDateRequest=} [properties] Properties to set + * @returns {PAM.SetNhiKsmEffectiveDateRequest} SetNhiKsmEffectiveDateRequest instance + */ + SetNhiKsmEffectiveDateRequest.create = function create(properties) { + return new SetNhiKsmEffectiveDateRequest(properties); + }; + + /** + * Encodes the specified SetNhiKsmEffectiveDateRequest message. Does not implicitly {@link PAM.SetNhiKsmEffectiveDateRequest.verify|verify} messages. + * @function encode + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {PAM.ISetNhiKsmEffectiveDateRequest} message SetNhiKsmEffectiveDateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNhiKsmEffectiveDateRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.effectiveDate != null && Object.hasOwnProperty.call(message, "effectiveDate")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.effectiveDate); + return writer; + }; + + /** + * Encodes the specified SetNhiKsmEffectiveDateRequest message, length delimited. Does not implicitly {@link PAM.SetNhiKsmEffectiveDateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {PAM.ISetNhiKsmEffectiveDateRequest} message SetNhiKsmEffectiveDateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetNhiKsmEffectiveDateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a SetNhiKsmEffectiveDateRequest message from the specified reader or buffer. + * @function decode + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {PAM.SetNhiKsmEffectiveDateRequest} SetNhiKsmEffectiveDateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNhiKsmEffectiveDateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.PAM.SetNhiKsmEffectiveDateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.effectiveDate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SetNhiKsmEffectiveDateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {PAM.SetNhiKsmEffectiveDateRequest} SetNhiKsmEffectiveDateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetNhiKsmEffectiveDateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetNhiKsmEffectiveDateRequest message. + * @function verify + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetNhiKsmEffectiveDateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.effectiveDate != null && Object.hasOwnProperty.call(message, "effectiveDate")) + if (!$util.isInteger(message.effectiveDate) && !(message.effectiveDate && $util.isInteger(message.effectiveDate.low) && $util.isInteger(message.effectiveDate.high))) + return "effectiveDate: integer|Long expected"; + return null; + }; + + /** + * Creates a SetNhiKsmEffectiveDateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {Object.} object Plain object + * @returns {PAM.SetNhiKsmEffectiveDateRequest} SetNhiKsmEffectiveDateRequest + */ + SetNhiKsmEffectiveDateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.PAM.SetNhiKsmEffectiveDateRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.SetNhiKsmEffectiveDateRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.PAM.SetNhiKsmEffectiveDateRequest(); + if (object.effectiveDate != null) + if ($util.Long) + message.effectiveDate = $util.Long.fromValue(object.effectiveDate, false); + else if (typeof object.effectiveDate === "string") + message.effectiveDate = parseInt(object.effectiveDate, 10); + else if (typeof object.effectiveDate === "number") + message.effectiveDate = object.effectiveDate; + else if (typeof object.effectiveDate === "object") + message.effectiveDate = new $util.LongBits(object.effectiveDate.low >>> 0, object.effectiveDate.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SetNhiKsmEffectiveDateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {PAM.SetNhiKsmEffectiveDateRequest} message SetNhiKsmEffectiveDateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetNhiKsmEffectiveDateRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.effectiveDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.effectiveDate = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.effectiveDate != null && Object.hasOwnProperty.call(message, "effectiveDate")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.effectiveDate = typeof message.effectiveDate === "number" ? BigInt(message.effectiveDate) : $util.Long.fromBits(message.effectiveDate.low >>> 0, message.effectiveDate.high >>> 0, false).toBigInt(); + else if (typeof message.effectiveDate === "number") + object.effectiveDate = options.longs === String ? String(message.effectiveDate) : message.effectiveDate; + else + object.effectiveDate = options.longs === String ? $util.Long.prototype.toString.call(message.effectiveDate) : options.longs === Number ? new $util.LongBits(message.effectiveDate.low >>> 0, message.effectiveDate.high >>> 0).toNumber() : message.effectiveDate; + return object; + }; + + /** + * Converts this SetNhiKsmEffectiveDateRequest to JSON. + * @function toJSON + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @instance + * @returns {Object.} JSON object + */ + SetNhiKsmEffectiveDateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetNhiKsmEffectiveDateRequest + * @function getTypeUrl + * @memberof PAM.SetNhiKsmEffectiveDateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetNhiKsmEffectiveDateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/PAM.SetNhiKsmEffectiveDateRequest"; + }; + + return SetNhiKsmEffectiveDateRequest; + })(); + + PAM.GetNhiKsmEffectiveDateResponse = (function() { + + /** + * Properties of a GetNhiKsmEffectiveDateResponse. + * @memberof PAM + * @interface IGetNhiKsmEffectiveDateResponse + * @property {number|null} [effectiveDate] GetNhiKsmEffectiveDateResponse effectiveDate + * @property {number|null} [defaultDate] GetNhiKsmEffectiveDateResponse defaultDate + */ + + /** + * Constructs a new GetNhiKsmEffectiveDateResponse. + * @memberof PAM + * @classdesc Represents a GetNhiKsmEffectiveDateResponse. + * @implements IGetNhiKsmEffectiveDateResponse + * @constructor + * @param {PAM.IGetNhiKsmEffectiveDateResponse=} [properties] Properties to set + */ + function GetNhiKsmEffectiveDateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNhiKsmEffectiveDateResponse effectiveDate. + * @member {number} effectiveDate + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @instance + */ + GetNhiKsmEffectiveDateResponse.prototype.effectiveDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GetNhiKsmEffectiveDateResponse defaultDate. + * @member {number} defaultDate + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @instance + */ + GetNhiKsmEffectiveDateResponse.prototype.defaultDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GetNhiKsmEffectiveDateResponse instance using the specified properties. + * @function create + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {PAM.IGetNhiKsmEffectiveDateResponse=} [properties] Properties to set + * @returns {PAM.GetNhiKsmEffectiveDateResponse} GetNhiKsmEffectiveDateResponse instance + */ + GetNhiKsmEffectiveDateResponse.create = function create(properties) { + return new GetNhiKsmEffectiveDateResponse(properties); + }; + + /** + * Encodes the specified GetNhiKsmEffectiveDateResponse message. Does not implicitly {@link PAM.GetNhiKsmEffectiveDateResponse.verify|verify} messages. + * @function encode + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {PAM.IGetNhiKsmEffectiveDateResponse} message GetNhiKsmEffectiveDateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNhiKsmEffectiveDateResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.effectiveDate != null && Object.hasOwnProperty.call(message, "effectiveDate")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.effectiveDate); + if (message.defaultDate != null && Object.hasOwnProperty.call(message, "defaultDate")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.defaultDate); + return writer; + }; + + /** + * Encodes the specified GetNhiKsmEffectiveDateResponse message, length delimited. Does not implicitly {@link PAM.GetNhiKsmEffectiveDateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {PAM.IGetNhiKsmEffectiveDateResponse} message GetNhiKsmEffectiveDateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNhiKsmEffectiveDateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + }; + + /** + * Decodes a GetNhiKsmEffectiveDateResponse message from the specified reader or buffer. + * @function decode + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {PAM.GetNhiKsmEffectiveDateResponse} GetNhiKsmEffectiveDateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNhiKsmEffectiveDateResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.PAM.GetNhiKsmEffectiveDateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.effectiveDate = reader.int64(); + break; + } + case 2: { + message.defaultDate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetNhiKsmEffectiveDateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {PAM.GetNhiKsmEffectiveDateResponse} GetNhiKsmEffectiveDateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNhiKsmEffectiveDateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNhiKsmEffectiveDateResponse message. + * @function verify + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNhiKsmEffectiveDateResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.effectiveDate != null && Object.hasOwnProperty.call(message, "effectiveDate")) + if (!$util.isInteger(message.effectiveDate) && !(message.effectiveDate && $util.isInteger(message.effectiveDate.low) && $util.isInteger(message.effectiveDate.high))) + return "effectiveDate: integer|Long expected"; + if (message.defaultDate != null && Object.hasOwnProperty.call(message, "defaultDate")) + if (!$util.isInteger(message.defaultDate) && !(message.defaultDate && $util.isInteger(message.defaultDate.low) && $util.isInteger(message.defaultDate.high))) + return "defaultDate: integer|Long expected"; + return null; + }; + + /** + * Creates a GetNhiKsmEffectiveDateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {Object.} object Plain object + * @returns {PAM.GetNhiKsmEffectiveDateResponse} GetNhiKsmEffectiveDateResponse + */ + GetNhiKsmEffectiveDateResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.PAM.GetNhiKsmEffectiveDateResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.GetNhiKsmEffectiveDateResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.PAM.GetNhiKsmEffectiveDateResponse(); + if (object.effectiveDate != null) + if ($util.Long) + message.effectiveDate = $util.Long.fromValue(object.effectiveDate, false); + else if (typeof object.effectiveDate === "string") + message.effectiveDate = parseInt(object.effectiveDate, 10); + else if (typeof object.effectiveDate === "number") + message.effectiveDate = object.effectiveDate; + else if (typeof object.effectiveDate === "object") + message.effectiveDate = new $util.LongBits(object.effectiveDate.low >>> 0, object.effectiveDate.high >>> 0).toNumber(); + if (object.defaultDate != null) + if ($util.Long) + message.defaultDate = $util.Long.fromValue(object.defaultDate, false); + else if (typeof object.defaultDate === "string") + message.defaultDate = parseInt(object.defaultDate, 10); + else if (typeof object.defaultDate === "number") + message.defaultDate = object.defaultDate; + else if (typeof object.defaultDate === "object") + message.defaultDate = new $util.LongBits(object.defaultDate.low >>> 0, object.defaultDate.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GetNhiKsmEffectiveDateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {PAM.GetNhiKsmEffectiveDateResponse} message GetNhiKsmEffectiveDateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNhiKsmEffectiveDateResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.effectiveDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.effectiveDate = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.defaultDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.defaultDate = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + } + if (message.effectiveDate != null && Object.hasOwnProperty.call(message, "effectiveDate")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.effectiveDate = typeof message.effectiveDate === "number" ? BigInt(message.effectiveDate) : $util.Long.fromBits(message.effectiveDate.low >>> 0, message.effectiveDate.high >>> 0, false).toBigInt(); + else if (typeof message.effectiveDate === "number") + object.effectiveDate = options.longs === String ? String(message.effectiveDate) : message.effectiveDate; + else + object.effectiveDate = options.longs === String ? $util.Long.prototype.toString.call(message.effectiveDate) : options.longs === Number ? new $util.LongBits(message.effectiveDate.low >>> 0, message.effectiveDate.high >>> 0).toNumber() : message.effectiveDate; + if (message.defaultDate != null && Object.hasOwnProperty.call(message, "defaultDate")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.defaultDate = typeof message.defaultDate === "number" ? BigInt(message.defaultDate) : $util.Long.fromBits(message.defaultDate.low >>> 0, message.defaultDate.high >>> 0, false).toBigInt(); + else if (typeof message.defaultDate === "number") + object.defaultDate = options.longs === String ? String(message.defaultDate) : message.defaultDate; + else + object.defaultDate = options.longs === String ? $util.Long.prototype.toString.call(message.defaultDate) : options.longs === Number ? new $util.LongBits(message.defaultDate.low >>> 0, message.defaultDate.high >>> 0).toNumber() : message.defaultDate; + return object; + }; + + /** + * Converts this GetNhiKsmEffectiveDateResponse to JSON. + * @function toJSON + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @instance + * @returns {Object.} JSON object + */ + GetNhiKsmEffectiveDateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNhiKsmEffectiveDateResponse + * @function getTypeUrl + * @memberof PAM.GetNhiKsmEffectiveDateResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNhiKsmEffectiveDateResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/PAM.GetNhiKsmEffectiveDateResponse"; + }; + + return GetNhiKsmEffectiveDateResponse; + })(); + PAM.PAMUniversalSyncPreCheckRequest = (function() { /** @@ -326898,7 +330036,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMUniversalSyncPreCheckRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -326974,10 +330112,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.networkUid != null && message.hasOwnProperty("networkUid")) + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) if (!(message.networkUid && typeof message.networkUid.length === "number" || $util.isString(message.networkUid))) return "networkUid: buffer expected"; - if (message.folderUids != null && message.hasOwnProperty("folderUids")) { + if (message.folderUids != null && Object.hasOwnProperty.call(message, "folderUids")) { if (!Array.isArray(message.folderUids)) return "folderUids: array expected"; for (let i = 0; i < message.folderUids.length; ++i) @@ -326998,6 +330136,8 @@ export const PAM = $root.PAM = (() => { PAMUniversalSyncPreCheckRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMUniversalSyncPreCheckRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMUniversalSyncPreCheckRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -327048,7 +330188,7 @@ export const PAM = $root.PAM = (() => { if (options.bytes !== Array) object.networkUid = $util.newBuffer(object.networkUid); } - if (message.networkUid != null && message.hasOwnProperty("networkUid")) + if (message.networkUid != null && Object.hasOwnProperty.call(message, "networkUid")) object.networkUid = options.bytes === String ? $util.base64.encode(message.networkUid, 0, message.networkUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.networkUid) : message.networkUid; if (message.folderUids && message.folderUids.length) { object.folderUids = []; @@ -327173,7 +330313,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMUniversalSyncPreCheckResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -327247,10 +330387,10 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.isUsed != null && message.hasOwnProperty("isUsed")) + if (message.isUsed != null && Object.hasOwnProperty.call(message, "isUsed")) if (typeof message.isUsed !== "boolean") return "isUsed: boolean expected"; return null; @@ -327267,6 +330407,8 @@ export const PAM = $root.PAM = (() => { PAMUniversalSyncPreCheckResult.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMUniversalSyncPreCheckResult) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMUniversalSyncPreCheckResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -327309,9 +330451,9 @@ export const PAM = $root.PAM = (() => { } object.isUsed = false; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.isUsed != null && message.hasOwnProperty("isUsed")) + if (message.isUsed != null && Object.hasOwnProperty.call(message, "isUsed")) object.isUsed = message.isUsed; return object; }; @@ -327422,7 +330564,7 @@ export const PAM = $root.PAM = (() => { * @returns {$protobuf.Writer} Writer */ PAMUniversalSyncPreCheckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -327494,7 +330636,7 @@ export const PAM = $root.PAM = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -327517,6 +330659,8 @@ export const PAM = $root.PAM = (() => { PAMUniversalSyncPreCheckResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.PAM.PAMUniversalSyncPreCheckResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".PAM.PAMUniversalSyncPreCheckResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -327527,7 +330671,7 @@ export const PAM = $root.PAM = (() => { throw TypeError(".PAM.PAMUniversalSyncPreCheckResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".PAM.PAMUniversalSyncPreCheckResponse.results: object expected"); message.results[i] = $root.PAM.PAMUniversalSyncPreCheckResult.fromObject(object.results[i], long + 1); } @@ -327675,7 +330819,7 @@ export const folder = $root.folder = (() => { * @variation 1 */ Object.defineProperty(RemoveService.prototype.removeRecord = function removeRecord(request, callback) { - return this.rpcCall(removeRecord, $root.folder.v3.remove.RemoveRecordRequest, $root.folder.v3.remove.RemoveResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, removeRecord, $root.folder.v3.remove.RemoveRecordRequest, $root.folder.v3.remove.RemoveResponse, request, callback); }, "name", { value: "RemoveRecord" }); /** @@ -327712,7 +330856,7 @@ export const folder = $root.folder = (() => { * @variation 1 */ Object.defineProperty(RemoveService.prototype.removeFolder = function removeFolder(request, callback) { - return this.rpcCall(removeFolder, $root.folder.v3.remove.RemoveFolderRequest, $root.folder.v3.remove.RemoveResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, removeFolder, $root.folder.v3.remove.RemoveFolderRequest, $root.folder.v3.remove.RemoveResponse, request, callback); }, "name", { value: "RemoveFolder" }); /** @@ -327749,7 +330893,7 @@ export const folder = $root.folder = (() => { * @variation 1 */ Object.defineProperty(RemoveService.prototype.trashcanRestore = function trashcanRestore(request, callback) { - return this.rpcCall(trashcanRestore, $root.folder.v3.remove.TrashcanRestoreRequest, $root.folder.v3.remove.TrashcanRestoreResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, trashcanRestore, $root.folder.v3.remove.TrashcanRestoreRequest, $root.folder.v3.remove.TrashcanRestoreResponse, request, callback); }, "name", { value: "TrashcanRestore" }); /** @@ -327960,7 +331104,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordRemoval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -328038,13 +331182,13 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) switch (message.operationType) { default: return "operationType: enum value expected"; @@ -328068,6 +331212,8 @@ export const folder = $root.folder = (() => { RecordRemoval.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RecordRemoval) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RecordRemoval: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -328144,11 +331290,11 @@ export const folder = $root.folder = (() => { } object.operationType = options.enums === String ? "RECORD_OPERATION_UNKNOWN" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) object.operationType = options.enums === String ? $root.folder.v3.remove.RecordOperationType[message.operationType] === undefined ? message.operationType : $root.folder.v3.remove.RecordOperationType[message.operationType] : message.operationType; return object; }; @@ -328268,7 +331414,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderRemoval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -328342,10 +331488,10 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) switch (message.operationType) { default: return "operationType: enum value expected"; @@ -328369,6 +331515,8 @@ export const folder = $root.folder = (() => { FolderRemoval.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.FolderRemoval) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.FolderRemoval: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -328433,9 +331581,9 @@ export const folder = $root.folder = (() => { } object.operationType = options.enums === String ? "FOLDER_OPERATION_UNKNOWN" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) object.operationType = options.enums === String ? $root.folder.v3.remove.FolderOperationType[message.operationType] === undefined ? message.operationType : $root.folder.v3.remove.FolderOperationType[message.operationType] : message.operationType; return object; }; @@ -328568,7 +331716,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RemoveRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -328648,7 +331796,7 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) switch (message.action) { default: return "action: enum value expected"; @@ -328656,7 +331804,7 @@ export const folder = $root.folder = (() => { case 1: break; } - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -328665,7 +331813,7 @@ export const folder = $root.folder = (() => { return "records." + error; } } - if (message.confirmationToken != null && message.hasOwnProperty("confirmationToken")) + if (message.confirmationToken != null && Object.hasOwnProperty.call(message, "confirmationToken")) if (!(message.confirmationToken && typeof message.confirmationToken.length === "number" || $util.isString(message.confirmationToken))) return "confirmationToken: buffer expected"; return null; @@ -328682,6 +331830,8 @@ export const folder = $root.folder = (() => { RemoveRecordRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RemoveRecordRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RemoveRecordRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -328708,7 +331858,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.RemoveRecordRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".folder.v3.remove.RemoveRecordRequest.records: object expected"); message.records[i] = $root.folder.v3.remove.RecordRemoval.fromObject(object.records[i], long + 1); } @@ -328750,14 +331900,14 @@ export const folder = $root.folder = (() => { object.confirmationToken = $util.newBuffer(object.confirmationToken); } } - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) object.action = options.enums === String ? $root.folder.v3.remove.RemoveAction[message.action] === undefined ? message.action : $root.folder.v3.remove.RemoveAction[message.action] : message.action; if (message.records && message.records.length) { object.records = []; for (let j = 0; j < message.records.length; ++j) object.records[j] = $root.folder.v3.remove.RecordRemoval.toObject(message.records[j], options, q + 1); } - if (message.confirmationToken != null && message.hasOwnProperty("confirmationToken")) + if (message.confirmationToken != null && Object.hasOwnProperty.call(message, "confirmationToken")) object.confirmationToken = options.bytes === String ? $util.base64.encode(message.confirmationToken, 0, message.confirmationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.confirmationToken) : message.confirmationToken; return object; }; @@ -328890,7 +332040,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RemoveFolderRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -328970,7 +332120,7 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) switch (message.action) { default: return "action: enum value expected"; @@ -328978,7 +332128,7 @@ export const folder = $root.folder = (() => { case 1: break; } - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -328987,7 +332137,7 @@ export const folder = $root.folder = (() => { return "folders." + error; } } - if (message.confirmationToken != null && message.hasOwnProperty("confirmationToken")) + if (message.confirmationToken != null && Object.hasOwnProperty.call(message, "confirmationToken")) if (!(message.confirmationToken && typeof message.confirmationToken.length === "number" || $util.isString(message.confirmationToken))) return "confirmationToken: buffer expected"; return null; @@ -329004,6 +332154,8 @@ export const folder = $root.folder = (() => { RemoveFolderRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RemoveFolderRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RemoveFolderRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -329030,7 +332182,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.RemoveFolderRequest.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".folder.v3.remove.RemoveFolderRequest.folders: object expected"); message.folders[i] = $root.folder.v3.remove.FolderRemoval.fromObject(object.folders[i], long + 1); } @@ -329072,14 +332224,14 @@ export const folder = $root.folder = (() => { object.confirmationToken = $util.newBuffer(object.confirmationToken); } } - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && Object.hasOwnProperty.call(message, "action")) object.action = options.enums === String ? $root.folder.v3.remove.RemoveAction[message.action] === undefined ? message.action : $root.folder.v3.remove.RemoveAction[message.action] : message.action; if (message.folders && message.folders.length) { object.folders = []; for (let j = 0; j < message.folders.length; ++j) object.folders[j] = $root.folder.v3.remove.FolderRemoval.toObject(message.folders[j], options, q + 1); } - if (message.confirmationToken != null && message.hasOwnProperty("confirmationToken")) + if (message.confirmationToken != null && Object.hasOwnProperty.call(message, "confirmationToken")) object.confirmationToken = options.bytes === String ? $util.base64.encode(message.confirmationToken, 0, message.confirmationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.confirmationToken) : message.confirmationToken; return object; }; @@ -329226,7 +332378,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RemoveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -329310,13 +332462,13 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.confirmationToken != null && message.hasOwnProperty("confirmationToken")) + if (message.confirmationToken != null && Object.hasOwnProperty.call(message, "confirmationToken")) if (!(message.confirmationToken && typeof message.confirmationToken.length === "number" || $util.isString(message.confirmationToken))) return "confirmationToken: buffer expected"; - if (message.tokenExpiresAt != null && message.hasOwnProperty("tokenExpiresAt")) + if (message.tokenExpiresAt != null && Object.hasOwnProperty.call(message, "tokenExpiresAt")) if (!$util.isInteger(message.tokenExpiresAt) && !(message.tokenExpiresAt && $util.isInteger(message.tokenExpiresAt.low) && $util.isInteger(message.tokenExpiresAt.high))) return "tokenExpiresAt: integer|Long expected"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -329325,7 +332477,7 @@ export const folder = $root.folder = (() => { return "results." + error; } } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -329342,6 +332494,8 @@ export const folder = $root.folder = (() => { RemoveResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RemoveResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RemoveResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -329366,7 +332520,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.RemoveResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".folder.v3.remove.RemoveResponse.results: object expected"); message.results[i] = $root.folder.v3.remove.RemoveResult.fromObject(object.results[i], long + 1); } @@ -329410,9 +332564,9 @@ export const folder = $root.folder = (() => { object.tokenExpiresAt = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.errorMessage = ""; } - if (message.confirmationToken != null && message.hasOwnProperty("confirmationToken")) + if (message.confirmationToken != null && Object.hasOwnProperty.call(message, "confirmationToken")) object.confirmationToken = options.bytes === String ? $util.base64.encode(message.confirmationToken, 0, message.confirmationToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.confirmationToken) : message.confirmationToken; - if (message.tokenExpiresAt != null && message.hasOwnProperty("tokenExpiresAt")) + if (message.tokenExpiresAt != null && Object.hasOwnProperty.call(message, "tokenExpiresAt")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.tokenExpiresAt = typeof message.tokenExpiresAt === "number" ? BigInt(message.tokenExpiresAt) : $util.Long.fromBits(message.tokenExpiresAt.low >>> 0, message.tokenExpiresAt.high >>> 0, false).toBigInt(); else if (typeof message.tokenExpiresAt === "number") @@ -329424,7 +332578,7 @@ export const folder = $root.folder = (() => { for (let j = 0; j < message.results.length; ++j) object.results[j] = $root.folder.v3.remove.RemoveResult.toObject(message.results[j], options, q + 1); } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -329577,7 +332731,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RemoveResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -329663,13 +332817,13 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.itemUid != null && message.hasOwnProperty("itemUid")) + if (message.itemUid != null && Object.hasOwnProperty.call(message, "itemUid")) if (!(message.itemUid && typeof message.itemUid.length === "number" || $util.isString(message.itemUid))) return "itemUid: buffer expected"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -329682,12 +332836,12 @@ export const folder = $root.folder = (() => { case 6: break; } - if (message.impact != null && message.hasOwnProperty("impact")) { + if (message.impact != null && Object.hasOwnProperty.call(message, "impact")) { let error = $root.folder.v3.remove.Impact.verify(message.impact, long + 1); if (error) return "impact." + error; } - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { let error = $root.folder.v3.remove.ItemError.verify(message.error, long + 1); if (error) return "error." + error; @@ -329706,6 +332860,8 @@ export const folder = $root.folder = (() => { RemoveResult.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RemoveResult) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RemoveResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -329758,12 +332914,12 @@ export const folder = $root.folder = (() => { break; } if (object.impact != null) { - if (typeof object.impact !== "object") + if (!$util.isObject(object.impact)) throw TypeError(".folder.v3.remove.RemoveResult.impact: object expected"); message.impact = $root.folder.v3.remove.Impact.fromObject(object.impact, long + 1); } if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".folder.v3.remove.RemoveResult.error: object expected"); message.error = $root.folder.v3.remove.ItemError.fromObject(object.error, long + 1); } @@ -329806,15 +332962,15 @@ export const folder = $root.folder = (() => { object.impact = null; object.error = null; } - if (message.itemUid != null && message.hasOwnProperty("itemUid")) + if (message.itemUid != null && Object.hasOwnProperty.call(message, "itemUid")) object.itemUid = options.bytes === String ? $util.base64.encode(message.itemUid, 0, message.itemUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.itemUid) : message.itemUid; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.folder.v3.remove.RemoveStatus[message.status] === undefined ? message.status : $root.folder.v3.remove.RemoveStatus[message.status] : message.status; - if (message.impact != null && message.hasOwnProperty("impact")) + if (message.impact != null && Object.hasOwnProperty.call(message, "impact")) object.impact = $root.folder.v3.remove.Impact.toObject(message.impact, options, q + 1); - if (message.error != null && message.hasOwnProperty("error")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) object.error = $root.folder.v3.remove.ItemError.toObject(message.error, options, q + 1); return object; }; @@ -329982,7 +333138,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ Impact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -330076,19 +333232,19 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.foldersCount != null && message.hasOwnProperty("foldersCount")) + if (message.foldersCount != null && Object.hasOwnProperty.call(message, "foldersCount")) if (!$util.isInteger(message.foldersCount)) return "foldersCount: integer expected"; - if (message.recordsCount != null && message.hasOwnProperty("recordsCount")) + if (message.recordsCount != null && Object.hasOwnProperty.call(message, "recordsCount")) if (!$util.isInteger(message.recordsCount)) return "recordsCount: integer expected"; - if (message.affectedUsersCount != null && message.hasOwnProperty("affectedUsersCount")) + if (message.affectedUsersCount != null && Object.hasOwnProperty.call(message, "affectedUsersCount")) if (!$util.isInteger(message.affectedUsersCount)) return "affectedUsersCount: integer expected"; - if (message.affectedTeamsCount != null && message.hasOwnProperty("affectedTeamsCount")) + if (message.affectedTeamsCount != null && Object.hasOwnProperty.call(message, "affectedTeamsCount")) if (!$util.isInteger(message.affectedTeamsCount)) return "affectedTeamsCount: integer expected"; - if (message.recordInfo != null && message.hasOwnProperty("recordInfo")) { + if (message.recordInfo != null && Object.hasOwnProperty.call(message, "recordInfo")) { if (!Array.isArray(message.recordInfo)) return "recordInfo: array expected"; for (let i = 0; i < message.recordInfo.length; ++i) { @@ -330097,7 +333253,7 @@ export const folder = $root.folder = (() => { return "recordInfo." + error; } } - if (message.warnings != null && message.hasOwnProperty("warnings")) { + if (message.warnings != null && Object.hasOwnProperty.call(message, "warnings")) { if (!Array.isArray(message.warnings)) return "warnings: array expected"; for (let i = 0; i < message.warnings.length; ++i) @@ -330118,6 +333274,8 @@ export const folder = $root.folder = (() => { Impact.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.Impact) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.Impact: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -330136,7 +333294,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.Impact.recordInfo: array expected"); message.recordInfo = []; for (let i = 0; i < object.recordInfo.length; ++i) { - if (typeof object.recordInfo[i] !== "object") + if (!$util.isObject(object.recordInfo[i])) throw TypeError(".folder.v3.remove.Impact.recordInfo: object expected"); message.recordInfo[i] = $root.folder.v3.remove.RecordInfo.fromObject(object.recordInfo[i], long + 1); } @@ -330178,13 +333336,13 @@ export const folder = $root.folder = (() => { object.affectedUsersCount = 0; object.affectedTeamsCount = 0; } - if (message.foldersCount != null && message.hasOwnProperty("foldersCount")) + if (message.foldersCount != null && Object.hasOwnProperty.call(message, "foldersCount")) object.foldersCount = message.foldersCount; - if (message.recordsCount != null && message.hasOwnProperty("recordsCount")) + if (message.recordsCount != null && Object.hasOwnProperty.call(message, "recordsCount")) object.recordsCount = message.recordsCount; - if (message.affectedUsersCount != null && message.hasOwnProperty("affectedUsersCount")) + if (message.affectedUsersCount != null && Object.hasOwnProperty.call(message, "affectedUsersCount")) object.affectedUsersCount = message.affectedUsersCount; - if (message.affectedTeamsCount != null && message.hasOwnProperty("affectedTeamsCount")) + if (message.affectedTeamsCount != null && Object.hasOwnProperty.call(message, "affectedTeamsCount")) object.affectedTeamsCount = message.affectedTeamsCount; if (message.recordInfo && message.recordInfo.length) { object.recordInfo = []; @@ -330315,7 +333473,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -330389,10 +333547,10 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.locationsCount != null && message.hasOwnProperty("locationsCount")) + if (message.locationsCount != null && Object.hasOwnProperty.call(message, "locationsCount")) if (!$util.isInteger(message.locationsCount)) return "locationsCount: integer expected"; return null; @@ -330409,6 +333567,8 @@ export const folder = $root.folder = (() => { RecordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RecordInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RecordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -330451,9 +333611,9 @@ export const folder = $root.folder = (() => { } object.locationsCount = 0; } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.locationsCount != null && message.hasOwnProperty("locationsCount")) + if (message.locationsCount != null && Object.hasOwnProperty.call(message, "locationsCount")) object.locationsCount = message.locationsCount; return object; }; @@ -330573,7 +333733,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ ItemError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -330647,7 +333807,7 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) switch (message.code) { default: return "code: enum value expected"; @@ -330659,7 +333819,7 @@ export const folder = $root.folder = (() => { case 5: break; } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -330676,6 +333836,8 @@ export const folder = $root.folder = (() => { ItemError.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.ItemError) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.ItemError: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -330739,9 +333901,9 @@ export const folder = $root.folder = (() => { object.code = options.enums === String ? "REMOVE_ERROR_UNKNOWN" : 0; object.message = ""; } - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = options.enums === String ? $root.folder.v3.remove.RemoveErrorCode[message.code] === undefined ? message.code : $root.folder.v3.remove.RemoveErrorCode[message.code] : message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -330896,7 +334058,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RemovalTokenPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -330984,7 +334146,7 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.itemFingerprints != null && message.hasOwnProperty("itemFingerprints")) { + if (message.itemFingerprints != null && Object.hasOwnProperty.call(message, "itemFingerprints")) { if (!Array.isArray(message.itemFingerprints)) return "itemFingerprints: array expected"; for (let i = 0; i < message.itemFingerprints.length; ++i) { @@ -330993,16 +334155,16 @@ export const folder = $root.folder = (() => { return "itemFingerprints." + error; } } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) if (!$util.isInteger(message.userId)) return "userId: integer expected"; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (!$util.isInteger(message.deviceId) && !(message.deviceId && $util.isInteger(message.deviceId.low) && $util.isInteger(message.deviceId.high))) return "deviceId: integer|Long expected"; - if (message.sessionUid != null && message.hasOwnProperty("sessionUid")) + if (message.sessionUid != null && Object.hasOwnProperty.call(message, "sessionUid")) if (!(message.sessionUid && typeof message.sessionUid.length === "number" || $util.isString(message.sessionUid))) return "sessionUid: buffer expected"; - if (message.expiresAtMillis != null && message.hasOwnProperty("expiresAtMillis")) + if (message.expiresAtMillis != null && Object.hasOwnProperty.call(message, "expiresAtMillis")) if (!$util.isInteger(message.expiresAtMillis) && !(message.expiresAtMillis && $util.isInteger(message.expiresAtMillis.low) && $util.isInteger(message.expiresAtMillis.high))) return "expiresAtMillis: integer|Long expected"; return null; @@ -331019,6 +334181,8 @@ export const folder = $root.folder = (() => { RemovalTokenPayload.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RemovalTokenPayload) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RemovalTokenPayload: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -331029,7 +334193,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.RemovalTokenPayload.itemFingerprints: array expected"); message.itemFingerprints = []; for (let i = 0; i < object.itemFingerprints.length; ++i) { - if (typeof object.itemFingerprints[i] !== "object") + if (!$util.isObject(object.itemFingerprints[i])) throw TypeError(".folder.v3.remove.RemovalTokenPayload.itemFingerprints: object expected"); message.itemFingerprints[i] = $root.folder.v3.remove.ItemFingerprint.fromObject(object.itemFingerprints[i], long + 1); } @@ -331106,18 +334270,18 @@ export const folder = $root.folder = (() => { for (let j = 0; j < message.itemFingerprints.length; ++j) object.itemFingerprints[j] = $root.folder.v3.remove.ItemFingerprint.toObject(message.itemFingerprints[j], options, q + 1); } - if (message.userId != null && message.hasOwnProperty("userId")) + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) object.userId = message.userId; - if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.deviceId = typeof message.deviceId === "number" ? BigInt(message.deviceId) : $util.Long.fromBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0, false).toBigInt(); else if (typeof message.deviceId === "number") object.deviceId = options.longs === String ? String(message.deviceId) : message.deviceId; else object.deviceId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceId) : options.longs === Number ? new $util.LongBits(message.deviceId.low >>> 0, message.deviceId.high >>> 0).toNumber() : message.deviceId; - if (message.sessionUid != null && message.hasOwnProperty("sessionUid")) + if (message.sessionUid != null && Object.hasOwnProperty.call(message, "sessionUid")) object.sessionUid = options.bytes === String ? $util.base64.encode(message.sessionUid, 0, message.sessionUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sessionUid) : message.sessionUid; - if (message.expiresAtMillis != null && message.hasOwnProperty("expiresAtMillis")) + if (message.expiresAtMillis != null && Object.hasOwnProperty.call(message, "expiresAtMillis")) if (typeof BigInt !== "undefined" && options.longs === BigInt) object.expiresAtMillis = typeof message.expiresAtMillis === "number" ? BigInt(message.expiresAtMillis) : $util.Long.fromBits(message.expiresAtMillis.low >>> 0, message.expiresAtMillis.high >>> 0, false).toBigInt(); else if (typeof message.expiresAtMillis === "number") @@ -331267,7 +334431,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ ItemFingerprint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -331346,7 +334510,7 @@ export const folder = $root.folder = (() => { if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; let properties = {}; - if (message.record != null && message.hasOwnProperty("record")) { + if (message.record != null && Object.hasOwnProperty.call(message, "record")) { properties.target = 1; { let error = $root.folder.v3.remove.RecordTarget.verify(message.record, long + 1); @@ -331354,7 +334518,7 @@ export const folder = $root.folder = (() => { return "record." + error; } } - if (message.folder != null && message.hasOwnProperty("folder")) { + if (message.folder != null && Object.hasOwnProperty.call(message, "folder")) { if (properties.target === 1) return "target: multiple values"; properties.target = 1; @@ -331364,7 +334528,7 @@ export const folder = $root.folder = (() => { return "folder." + error; } } - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) if (!(message.fingerprint && typeof message.fingerprint.length === "number" || $util.isString(message.fingerprint))) return "fingerprint: buffer expected"; return null; @@ -331381,18 +334545,20 @@ export const folder = $root.folder = (() => { ItemFingerprint.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.ItemFingerprint) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.ItemFingerprint: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); let message = new $root.folder.v3.remove.ItemFingerprint(); if (object.record != null) { - if (typeof object.record !== "object") + if (!$util.isObject(object.record)) throw TypeError(".folder.v3.remove.ItemFingerprint.record: object expected"); message.record = $root.folder.v3.remove.RecordTarget.fromObject(object.record, long + 1); } if (object.folder != null) { - if (typeof object.folder !== "object") + if (!$util.isObject(object.folder)) throw TypeError(".folder.v3.remove.ItemFingerprint.folder: object expected"); message.folder = $root.folder.v3.remove.FolderTarget.fromObject(object.folder, long + 1); } @@ -331429,17 +334595,17 @@ export const folder = $root.folder = (() => { if (options.bytes !== Array) object.fingerprint = $util.newBuffer(object.fingerprint); } - if (message.record != null && message.hasOwnProperty("record")) { + if (message.record != null && Object.hasOwnProperty.call(message, "record")) { object.record = $root.folder.v3.remove.RecordTarget.toObject(message.record, options, q + 1); if (options.oneofs) object.target = "record"; } - if (message.folder != null && message.hasOwnProperty("folder")) { + if (message.folder != null && Object.hasOwnProperty.call(message, "folder")) { object.folder = $root.folder.v3.remove.FolderTarget.toObject(message.folder, options, q + 1); if (options.oneofs) object.target = "folder"; } - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) object.fingerprint = options.bytes === String ? $util.base64.encode(message.fingerprint, 0, message.fingerprint.length) : options.bytes === Array ? Array.prototype.slice.call(message.fingerprint) : message.fingerprint; return object; }; @@ -331570,7 +334736,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RecordTarget.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -331648,13 +334814,13 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) switch (message.operationType) { default: return "operationType: enum value expected"; @@ -331678,6 +334844,8 @@ export const folder = $root.folder = (() => { RecordTarget.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RecordTarget) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RecordTarget: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -331754,11 +334922,11 @@ export const folder = $root.folder = (() => { } object.operationType = options.enums === String ? "RECORD_OPERATION_UNKNOWN" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) object.operationType = options.enums === String ? $root.folder.v3.remove.RecordOperationType[message.operationType] === undefined ? message.operationType : $root.folder.v3.remove.RecordOperationType[message.operationType] : message.operationType; return object; }; @@ -331878,7 +335046,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ FolderTarget.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -331952,10 +335120,10 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) switch (message.operationType) { default: return "operationType: enum value expected"; @@ -331979,6 +335147,8 @@ export const folder = $root.folder = (() => { FolderTarget.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.FolderTarget) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.FolderTarget: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -332043,9 +335213,9 @@ export const folder = $root.folder = (() => { } object.operationType = options.enums === String ? "FOLDER_OPERATION_UNKNOWN" : 0; } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.operationType != null && message.hasOwnProperty("operationType")) + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) object.operationType = options.enums === String ? $root.folder.v3.remove.FolderOperationType[message.operationType] === undefined ? message.operationType : $root.folder.v3.remove.FolderOperationType[message.operationType] : message.operationType; return object; }; @@ -332227,7 +335397,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RestoreResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -332309,10 +335479,10 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.itemUid != null && message.hasOwnProperty("itemUid")) + if (message.itemUid != null && Object.hasOwnProperty.call(message, "itemUid")) if (!(message.itemUid && typeof message.itemUid.length === "number" || $util.isString(message.itemUid))) return "itemUid: buffer expected"; - if (message.itemType != null && message.hasOwnProperty("itemType")) + if (message.itemType != null && Object.hasOwnProperty.call(message, "itemType")) switch (message.itemType) { default: return "itemType: enum value expected"; @@ -332321,7 +335491,7 @@ export const folder = $root.folder = (() => { case 2: break; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -332334,7 +335504,7 @@ export const folder = $root.folder = (() => { case 6: break; } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -332351,6 +335521,8 @@ export const folder = $root.folder = (() => { RestoreResult.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RestoreResult) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RestoreResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -332451,13 +335623,13 @@ export const folder = $root.folder = (() => { object.status = options.enums === String ? "RESTORE_STATUS_UNKNOWN" : 0; object.errorMessage = ""; } - if (message.itemUid != null && message.hasOwnProperty("itemUid")) + if (message.itemUid != null && Object.hasOwnProperty.call(message, "itemUid")) object.itemUid = options.bytes === String ? $util.base64.encode(message.itemUid, 0, message.itemUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.itemUid) : message.itemUid; - if (message.itemType != null && message.hasOwnProperty("itemType")) + if (message.itemType != null && Object.hasOwnProperty.call(message, "itemType")) object.itemType = options.enums === String ? $root.folder.v3.remove.RestoreItemType[message.itemType] === undefined ? message.itemType : $root.folder.v3.remove.RestoreItemType[message.itemType] : message.itemType; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) object.status = options.enums === String ? $root.folder.v3.remove.RestoreStatus[message.status] === undefined ? message.status : $root.folder.v3.remove.RestoreStatus[message.status] : message.status; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -332579,7 +335751,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ TrashcanRestoreResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -332655,7 +335827,7 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (let i = 0; i < message.results.length; ++i) { @@ -332664,7 +335836,7 @@ export const folder = $root.folder = (() => { return "results." + error; } } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) if (!$util.isString(message.errorMessage)) return "errorMessage: string expected"; return null; @@ -332681,6 +335853,8 @@ export const folder = $root.folder = (() => { TrashcanRestoreResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.TrashcanRestoreResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.TrashcanRestoreResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -332691,7 +335865,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.TrashcanRestoreResponse.results: array expected"); message.results = []; for (let i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".folder.v3.remove.TrashcanRestoreResponse.results: object expected"); message.results[i] = $root.folder.v3.remove.RestoreResult.fromObject(object.results[i], long + 1); } @@ -332727,7 +335901,7 @@ export const folder = $root.folder = (() => { for (let j = 0; j < message.results.length; ++j) object.results[j] = $root.folder.v3.remove.RestoreResult.toObject(message.results[j], options, q + 1); } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) object.errorMessage = message.errorMessage; return object; }; @@ -332858,7 +336032,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RestoreRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -332936,13 +336110,13 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) if (!(message.recordUid && typeof message.recordUid.length === "number" || $util.isString(message.recordUid))) return "recordUid: buffer expected"; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) if (!(message.encryptedRecordKey && typeof message.encryptedRecordKey.length === "number" || $util.isString(message.encryptedRecordKey))) return "encryptedRecordKey: buffer expected"; - if (message.sourceFolderUid != null && message.hasOwnProperty("sourceFolderUid")) + if (message.sourceFolderUid != null && Object.hasOwnProperty.call(message, "sourceFolderUid")) if (!(message.sourceFolderUid && typeof message.sourceFolderUid.length === "number" || $util.isString(message.sourceFolderUid))) return "sourceFolderUid: buffer expected"; return null; @@ -332959,6 +336133,8 @@ export const folder = $root.folder = (() => { RestoreRecord.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RestoreRecord) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RestoreRecord: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -333022,11 +336198,11 @@ export const folder = $root.folder = (() => { object.sourceFolderUid = $util.newBuffer(object.sourceFolderUid); } } - if (message.recordUid != null && message.hasOwnProperty("recordUid")) + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; - if (message.encryptedRecordKey != null && message.hasOwnProperty("encryptedRecordKey")) + if (message.encryptedRecordKey != null && Object.hasOwnProperty.call(message, "encryptedRecordKey")) object.encryptedRecordKey = options.bytes === String ? $util.base64.encode(message.encryptedRecordKey, 0, message.encryptedRecordKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedRecordKey) : message.encryptedRecordKey; - if (message.sourceFolderUid != null && message.hasOwnProperty("sourceFolderUid")) + if (message.sourceFolderUid != null && Object.hasOwnProperty.call(message, "sourceFolderUid")) object.sourceFolderUid = options.bytes === String ? $util.base64.encode(message.sourceFolderUid, 0, message.sourceFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.sourceFolderUid) : message.sourceFolderUid; return object; }; @@ -333146,7 +336322,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ RestoreFolder.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -333220,10 +336396,10 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) if (!(message.folderUid && typeof message.folderUid.length === "number" || $util.isString(message.folderUid))) return "folderUid: buffer expected"; - if (message.encryptedFolderKey != null && message.hasOwnProperty("encryptedFolderKey")) + if (message.encryptedFolderKey != null && Object.hasOwnProperty.call(message, "encryptedFolderKey")) if (!(message.encryptedFolderKey && typeof message.encryptedFolderKey.length === "number" || $util.isString(message.encryptedFolderKey))) return "encryptedFolderKey: buffer expected"; return null; @@ -333240,6 +336416,8 @@ export const folder = $root.folder = (() => { RestoreFolder.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.RestoreFolder) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.RestoreFolder: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -333291,9 +336469,9 @@ export const folder = $root.folder = (() => { object.encryptedFolderKey = $util.newBuffer(object.encryptedFolderKey); } } - if (message.folderUid != null && message.hasOwnProperty("folderUid")) + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; - if (message.encryptedFolderKey != null && message.hasOwnProperty("encryptedFolderKey")) + if (message.encryptedFolderKey != null && Object.hasOwnProperty.call(message, "encryptedFolderKey")) object.encryptedFolderKey = options.bytes === String ? $util.base64.encode(message.encryptedFolderKey, 0, message.encryptedFolderKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedFolderKey) : message.encryptedFolderKey; return object; }; @@ -333428,7 +336606,7 @@ export const folder = $root.folder = (() => { * @returns {$protobuf.Writer} Writer */ TrashcanRestoreRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -333510,7 +336688,7 @@ export const folder = $root.folder = (() => { long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.records != null && message.hasOwnProperty("records")) { + if (message.records != null && Object.hasOwnProperty.call(message, "records")) { if (!Array.isArray(message.records)) return "records: array expected"; for (let i = 0; i < message.records.length; ++i) { @@ -333519,7 +336697,7 @@ export const folder = $root.folder = (() => { return "records." + error; } } - if (message.folders != null && message.hasOwnProperty("folders")) { + if (message.folders != null && Object.hasOwnProperty.call(message, "folders")) { if (!Array.isArray(message.folders)) return "folders: array expected"; for (let i = 0; i < message.folders.length; ++i) { @@ -333528,7 +336706,7 @@ export const folder = $root.folder = (() => { return "folders." + error; } } - if (message.targetFolderUid != null && message.hasOwnProperty("targetFolderUid")) + if (message.targetFolderUid != null && Object.hasOwnProperty.call(message, "targetFolderUid")) if (!(message.targetFolderUid && typeof message.targetFolderUid.length === "number" || $util.isString(message.targetFolderUid))) return "targetFolderUid: buffer expected"; return null; @@ -333545,6 +336723,8 @@ export const folder = $root.folder = (() => { TrashcanRestoreRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.folder.v3.remove.TrashcanRestoreRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.remove.TrashcanRestoreRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -333555,7 +336735,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.TrashcanRestoreRequest.records: array expected"); message.records = []; for (let i = 0; i < object.records.length; ++i) { - if (typeof object.records[i] !== "object") + if (!$util.isObject(object.records[i])) throw TypeError(".folder.v3.remove.TrashcanRestoreRequest.records: object expected"); message.records[i] = $root.folder.v3.remove.RestoreRecord.fromObject(object.records[i], long + 1); } @@ -333565,7 +336745,7 @@ export const folder = $root.folder = (() => { throw TypeError(".folder.v3.remove.TrashcanRestoreRequest.folders: array expected"); message.folders = []; for (let i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") + if (!$util.isObject(object.folders[i])) throw TypeError(".folder.v3.remove.TrashcanRestoreRequest.folders: object expected"); message.folders[i] = $root.folder.v3.remove.RestoreFolder.fromObject(object.folders[i], long + 1); } @@ -333617,7 +336797,7 @@ export const folder = $root.folder = (() => { for (let j = 0; j < message.folders.length; ++j) object.folders[j] = $root.folder.v3.remove.RestoreFolder.toObject(message.folders[j], options, q + 1); } - if (message.targetFolderUid != null && message.hasOwnProperty("targetFolderUid")) + if (message.targetFolderUid != null && Object.hasOwnProperty.call(message, "targetFolderUid")) object.targetFolderUid = options.bytes === String ? $util.base64.encode(message.targetFolderUid, 0, message.targetFolderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.targetFolderUid) : message.targetFolderUid; return object; };