@headspace/protos-events 1.43.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/index.d.ts +630 -830
  2. package/lib/index.js +1631 -1917
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2569,1929 +2569,1643 @@ $root.subscription = (function() {
2569
2569
  return subscription;
2570
2570
  })();
2571
2571
 
2572
- $root.com = (function() {
2572
+ $root.userdomain = (function() {
2573
2573
 
2574
2574
  /**
2575
- * Namespace com.
2576
- * @exports com
2575
+ * Namespace userdomain.
2576
+ * @exports userdomain
2577
2577
  * @namespace
2578
2578
  */
2579
- var com = {};
2580
-
2581
- com.headspace = (function() {
2582
-
2583
- /**
2584
- * Namespace headspace.
2585
- * @memberof com
2586
- * @namespace
2587
- */
2588
- var headspace = {};
2589
-
2590
- headspace.userdomain = (function() {
2591
-
2592
- /**
2593
- * Namespace userdomain.
2594
- * @memberof com.headspace
2595
- * @namespace
2596
- */
2597
- var userdomain = {};
2598
-
2599
- userdomain.grpc = (function() {
2600
-
2601
- /**
2602
- * Namespace grpc.
2603
- * @memberof com.headspace.userdomain
2604
- * @namespace
2605
- */
2606
- var grpc = {};
2607
-
2608
- grpc.user = (function() {
2609
-
2610
- /**
2611
- * Namespace user.
2612
- * @memberof com.headspace.userdomain.grpc
2613
- * @namespace
2614
- */
2615
- var user = {};
2616
-
2617
- /**
2618
- * PLATFORM enum.
2619
- * @name com.headspace.userdomain.grpc.user.PLATFORM
2620
- * @enum {string}
2621
- * @property {number} DESKTOP=0 DESKTOP value
2622
- * @property {number} IOS=1 IOS value
2623
- * @property {number} ANDROID=2 ANDROID value
2624
- * @property {number} ALEXA=3 ALEXA value
2625
- * @property {number} GOOGLE_ASSISTANT=4 GOOGLE_ASSISTANT value
2626
- */
2627
- user.PLATFORM = (function() {
2628
- var valuesById = {}, values = Object.create(valuesById);
2629
- values[valuesById[0] = "DESKTOP"] = 0;
2630
- values[valuesById[1] = "IOS"] = 1;
2631
- values[valuesById[2] = "ANDROID"] = 2;
2632
- values[valuesById[3] = "ALEXA"] = 3;
2633
- values[valuesById[4] = "GOOGLE_ASSISTANT"] = 4;
2634
- return values;
2635
- })();
2636
-
2637
- user.User = (function() {
2638
-
2639
- /**
2640
- * Properties of a User.
2641
- * @memberof com.headspace.userdomain.grpc.user
2642
- * @interface IUser
2643
- * @property {string|null} [hsId] User hsId
2644
- * @property {string|null} [auth0Id] User auth0Id
2645
- * @property {string|null} [firstName] User firstName
2646
- * @property {string|null} [lastName] User lastName
2647
- * @property {string|null} [email] User email
2648
- * @property {string|null} [countryCode] User countryCode
2649
- * @property {string|null} [stateCode] User stateCode
2650
- * @property {com.headspace.userdomain.grpc.user.PLATFORM|null} [signupPlatform] User signupPlatform
2651
- * @property {number|Long|null} [createdAt] User createdAt
2652
- * @property {number|Long|null} [updatedAt] User updatedAt
2653
- */
2654
-
2655
- /**
2656
- * Constructs a new User.
2657
- * @memberof com.headspace.userdomain.grpc.user
2658
- * @classdesc Represents a User.
2659
- * @implements IUser
2660
- * @constructor
2661
- * @param {com.headspace.userdomain.grpc.user.IUser=} [properties] Properties to set
2662
- */
2663
- function User(properties) {
2664
- if (properties)
2665
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2666
- if (properties[keys[i]] != null)
2667
- this[keys[i]] = properties[keys[i]];
2668
- }
2669
-
2670
- /**
2671
- * User hsId.
2672
- * @member {string} hsId
2673
- * @memberof com.headspace.userdomain.grpc.user.User
2674
- * @instance
2675
- */
2676
- User.prototype.hsId = "";
2677
-
2678
- /**
2679
- * User auth0Id.
2680
- * @member {string} auth0Id
2681
- * @memberof com.headspace.userdomain.grpc.user.User
2682
- * @instance
2683
- */
2684
- User.prototype.auth0Id = "";
2685
-
2686
- /**
2687
- * User firstName.
2688
- * @member {string} firstName
2689
- * @memberof com.headspace.userdomain.grpc.user.User
2690
- * @instance
2691
- */
2692
- User.prototype.firstName = "";
2693
-
2694
- /**
2695
- * User lastName.
2696
- * @member {string} lastName
2697
- * @memberof com.headspace.userdomain.grpc.user.User
2698
- * @instance
2699
- */
2700
- User.prototype.lastName = "";
2701
-
2702
- /**
2703
- * User email.
2704
- * @member {string} email
2705
- * @memberof com.headspace.userdomain.grpc.user.User
2706
- * @instance
2707
- */
2708
- User.prototype.email = "";
2709
-
2710
- /**
2711
- * User countryCode.
2712
- * @member {string} countryCode
2713
- * @memberof com.headspace.userdomain.grpc.user.User
2714
- * @instance
2715
- */
2716
- User.prototype.countryCode = "";
2717
-
2718
- /**
2719
- * User stateCode.
2720
- * @member {string} stateCode
2721
- * @memberof com.headspace.userdomain.grpc.user.User
2722
- * @instance
2723
- */
2724
- User.prototype.stateCode = "";
2725
-
2726
- /**
2727
- * User signupPlatform.
2728
- * @member {com.headspace.userdomain.grpc.user.PLATFORM} signupPlatform
2729
- * @memberof com.headspace.userdomain.grpc.user.User
2730
- * @instance
2731
- */
2732
- User.prototype.signupPlatform = 0;
2733
-
2734
- /**
2735
- * User createdAt.
2736
- * @member {number|Long} createdAt
2737
- * @memberof com.headspace.userdomain.grpc.user.User
2738
- * @instance
2739
- */
2740
- User.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2741
-
2742
- /**
2743
- * User updatedAt.
2744
- * @member {number|Long} updatedAt
2745
- * @memberof com.headspace.userdomain.grpc.user.User
2746
- * @instance
2747
- */
2748
- User.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2749
-
2750
- /**
2751
- * Creates a new User instance using the specified properties.
2752
- * @function create
2753
- * @memberof com.headspace.userdomain.grpc.user.User
2754
- * @static
2755
- * @param {com.headspace.userdomain.grpc.user.IUser=} [properties] Properties to set
2756
- * @returns {com.headspace.userdomain.grpc.user.User} User instance
2757
- */
2758
- User.create = function create(properties) {
2759
- return new User(properties);
2760
- };
2761
-
2762
- /**
2763
- * Encodes the specified User message. Does not implicitly {@link com.headspace.userdomain.grpc.user.User.verify|verify} messages.
2764
- * @function encode
2765
- * @memberof com.headspace.userdomain.grpc.user.User
2766
- * @static
2767
- * @param {com.headspace.userdomain.grpc.user.IUser} message User message or plain object to encode
2768
- * @param {$protobuf.Writer} [writer] Writer to encode to
2769
- * @returns {$protobuf.Writer} Writer
2770
- */
2771
- User.encode = function encode(message, writer) {
2772
- if (!writer)
2773
- writer = $Writer.create();
2774
- if (message.hsId != null && message.hasOwnProperty("hsId"))
2775
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
2776
- if (message.auth0Id != null && message.hasOwnProperty("auth0Id"))
2777
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.auth0Id);
2778
- if (message.firstName != null && message.hasOwnProperty("firstName"))
2779
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.firstName);
2780
- if (message.lastName != null && message.hasOwnProperty("lastName"))
2781
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.lastName);
2782
- if (message.email != null && message.hasOwnProperty("email"))
2783
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.email);
2784
- if (message.countryCode != null && message.hasOwnProperty("countryCode"))
2785
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.countryCode);
2786
- if (message.stateCode != null && message.hasOwnProperty("stateCode"))
2787
- writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateCode);
2788
- if (message.signupPlatform != null && message.hasOwnProperty("signupPlatform"))
2789
- writer.uint32(/* id 8, wireType 0 =*/64).int32(message.signupPlatform);
2790
- if (message.createdAt != null && message.hasOwnProperty("createdAt"))
2791
- writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.createdAt);
2792
- if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
2793
- writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.updatedAt);
2794
- return writer;
2795
- };
2796
-
2797
- /**
2798
- * Encodes the specified User message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.User.verify|verify} messages.
2799
- * @function encodeDelimited
2800
- * @memberof com.headspace.userdomain.grpc.user.User
2801
- * @static
2802
- * @param {com.headspace.userdomain.grpc.user.IUser} message User message or plain object to encode
2803
- * @param {$protobuf.Writer} [writer] Writer to encode to
2804
- * @returns {$protobuf.Writer} Writer
2805
- */
2806
- User.encodeDelimited = function encodeDelimited(message, writer) {
2807
- return this.encode(message, writer).ldelim();
2808
- };
2809
-
2810
- /**
2811
- * Decodes a User message from the specified reader or buffer.
2812
- * @function decode
2813
- * @memberof com.headspace.userdomain.grpc.user.User
2814
- * @static
2815
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2816
- * @param {number} [length] Message length if known beforehand
2817
- * @returns {com.headspace.userdomain.grpc.user.User} User
2818
- * @throws {Error} If the payload is not a reader or valid buffer
2819
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
2820
- */
2821
- User.decode = function decode(reader, length) {
2822
- if (!(reader instanceof $Reader))
2823
- reader = $Reader.create(reader);
2824
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.User();
2825
- while (reader.pos < end) {
2826
- var tag = reader.uint32();
2827
- switch (tag >>> 3) {
2828
- case 1:
2829
- message.hsId = reader.string();
2830
- break;
2831
- case 2:
2832
- message.auth0Id = reader.string();
2833
- break;
2834
- case 3:
2835
- message.firstName = reader.string();
2836
- break;
2837
- case 4:
2838
- message.lastName = reader.string();
2839
- break;
2840
- case 5:
2841
- message.email = reader.string();
2842
- break;
2843
- case 6:
2844
- message.countryCode = reader.string();
2845
- break;
2846
- case 7:
2847
- message.stateCode = reader.string();
2848
- break;
2849
- case 8:
2850
- message.signupPlatform = reader.int32();
2851
- break;
2852
- case 9:
2853
- message.createdAt = reader.uint64();
2854
- break;
2855
- case 10:
2856
- message.updatedAt = reader.uint64();
2857
- break;
2858
- default:
2859
- reader.skipType(tag & 7);
2860
- break;
2861
- }
2862
- }
2863
- return message;
2864
- };
2865
-
2866
- /**
2867
- * Decodes a User message from the specified reader or buffer, length delimited.
2868
- * @function decodeDelimited
2869
- * @memberof com.headspace.userdomain.grpc.user.User
2870
- * @static
2871
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2872
- * @returns {com.headspace.userdomain.grpc.user.User} User
2873
- * @throws {Error} If the payload is not a reader or valid buffer
2874
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
2875
- */
2876
- User.decodeDelimited = function decodeDelimited(reader) {
2877
- if (!(reader instanceof $Reader))
2878
- reader = new $Reader(reader);
2879
- return this.decode(reader, reader.uint32());
2880
- };
2881
-
2882
- /**
2883
- * Verifies a User message.
2884
- * @function verify
2885
- * @memberof com.headspace.userdomain.grpc.user.User
2886
- * @static
2887
- * @param {Object.<string,*>} message Plain object to verify
2888
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
2889
- */
2890
- User.verify = function verify(message) {
2891
- if (typeof message !== "object" || message === null)
2892
- return "object expected";
2893
- if (message.hsId != null && message.hasOwnProperty("hsId"))
2894
- if (!$util.isString(message.hsId))
2895
- return "hsId: string expected";
2896
- if (message.auth0Id != null && message.hasOwnProperty("auth0Id"))
2897
- if (!$util.isString(message.auth0Id))
2898
- return "auth0Id: string expected";
2899
- if (message.firstName != null && message.hasOwnProperty("firstName"))
2900
- if (!$util.isString(message.firstName))
2901
- return "firstName: string expected";
2902
- if (message.lastName != null && message.hasOwnProperty("lastName"))
2903
- if (!$util.isString(message.lastName))
2904
- return "lastName: string expected";
2905
- if (message.email != null && message.hasOwnProperty("email"))
2906
- if (!$util.isString(message.email))
2907
- return "email: string expected";
2908
- if (message.countryCode != null && message.hasOwnProperty("countryCode"))
2909
- if (!$util.isString(message.countryCode))
2910
- return "countryCode: string expected";
2911
- if (message.stateCode != null && message.hasOwnProperty("stateCode"))
2912
- if (!$util.isString(message.stateCode))
2913
- return "stateCode: string expected";
2914
- if (message.signupPlatform != null && message.hasOwnProperty("signupPlatform"))
2915
- switch (message.signupPlatform) {
2916
- default:
2917
- return "signupPlatform: enum value expected";
2918
- case 0:
2919
- case 1:
2920
- case 2:
2921
- case 3:
2922
- case 4:
2923
- break;
2924
- }
2925
- if (message.createdAt != null && message.hasOwnProperty("createdAt"))
2926
- if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
2927
- return "createdAt: integer|Long expected";
2928
- if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
2929
- if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
2930
- return "updatedAt: integer|Long expected";
2931
- return null;
2932
- };
2933
-
2934
- /**
2935
- * Creates a User message from a plain object. Also converts values to their respective internal types.
2936
- * @function fromObject
2937
- * @memberof com.headspace.userdomain.grpc.user.User
2938
- * @static
2939
- * @param {Object.<string,*>} object Plain object
2940
- * @returns {com.headspace.userdomain.grpc.user.User} User
2941
- */
2942
- User.fromObject = function fromObject(object) {
2943
- if (object instanceof $root.com.headspace.userdomain.grpc.user.User)
2944
- return object;
2945
- var message = new $root.com.headspace.userdomain.grpc.user.User();
2946
- if (object.hsId != null)
2947
- message.hsId = String(object.hsId);
2948
- if (object.auth0Id != null)
2949
- message.auth0Id = String(object.auth0Id);
2950
- if (object.firstName != null)
2951
- message.firstName = String(object.firstName);
2952
- if (object.lastName != null)
2953
- message.lastName = String(object.lastName);
2954
- if (object.email != null)
2955
- message.email = String(object.email);
2956
- if (object.countryCode != null)
2957
- message.countryCode = String(object.countryCode);
2958
- if (object.stateCode != null)
2959
- message.stateCode = String(object.stateCode);
2960
- switch (object.signupPlatform) {
2961
- case "DESKTOP":
2962
- case 0:
2963
- message.signupPlatform = 0;
2964
- break;
2965
- case "IOS":
2966
- case 1:
2967
- message.signupPlatform = 1;
2968
- break;
2969
- case "ANDROID":
2970
- case 2:
2971
- message.signupPlatform = 2;
2972
- break;
2973
- case "ALEXA":
2974
- case 3:
2975
- message.signupPlatform = 3;
2976
- break;
2977
- case "GOOGLE_ASSISTANT":
2978
- case 4:
2979
- message.signupPlatform = 4;
2980
- break;
2981
- }
2982
- if (object.createdAt != null)
2983
- if ($util.Long)
2984
- (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
2985
- else if (typeof object.createdAt === "string")
2986
- message.createdAt = parseInt(object.createdAt, 10);
2987
- else if (typeof object.createdAt === "number")
2988
- message.createdAt = object.createdAt;
2989
- else if (typeof object.createdAt === "object")
2990
- message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
2991
- if (object.updatedAt != null)
2992
- if ($util.Long)
2993
- (message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
2994
- else if (typeof object.updatedAt === "string")
2995
- message.updatedAt = parseInt(object.updatedAt, 10);
2996
- else if (typeof object.updatedAt === "number")
2997
- message.updatedAt = object.updatedAt;
2998
- else if (typeof object.updatedAt === "object")
2999
- message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
3000
- return message;
3001
- };
3002
-
3003
- /**
3004
- * Creates a plain object from a User message. Also converts values to other types if specified.
3005
- * @function toObject
3006
- * @memberof com.headspace.userdomain.grpc.user.User
3007
- * @static
3008
- * @param {com.headspace.userdomain.grpc.user.User} message User
3009
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3010
- * @returns {Object.<string,*>} Plain object
3011
- */
3012
- User.toObject = function toObject(message, options) {
3013
- if (!options)
3014
- options = {};
3015
- var object = {};
3016
- if (options.defaults) {
3017
- object.hsId = "";
3018
- object.auth0Id = "";
3019
- object.firstName = "";
3020
- object.lastName = "";
3021
- object.email = "";
3022
- object.countryCode = "";
3023
- object.stateCode = "";
3024
- object.signupPlatform = options.enums === String ? "DESKTOP" : 0;
3025
- if ($util.Long) {
3026
- var long = new $util.Long(0, 0, true);
3027
- object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3028
- } else
3029
- object.createdAt = options.longs === String ? "0" : 0;
3030
- if ($util.Long) {
3031
- var long = new $util.Long(0, 0, true);
3032
- object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3033
- } else
3034
- object.updatedAt = options.longs === String ? "0" : 0;
3035
- }
3036
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3037
- object.hsId = message.hsId;
3038
- if (message.auth0Id != null && message.hasOwnProperty("auth0Id"))
3039
- object.auth0Id = message.auth0Id;
3040
- if (message.firstName != null && message.hasOwnProperty("firstName"))
3041
- object.firstName = message.firstName;
3042
- if (message.lastName != null && message.hasOwnProperty("lastName"))
3043
- object.lastName = message.lastName;
3044
- if (message.email != null && message.hasOwnProperty("email"))
3045
- object.email = message.email;
3046
- if (message.countryCode != null && message.hasOwnProperty("countryCode"))
3047
- object.countryCode = message.countryCode;
3048
- if (message.stateCode != null && message.hasOwnProperty("stateCode"))
3049
- object.stateCode = message.stateCode;
3050
- if (message.signupPlatform != null && message.hasOwnProperty("signupPlatform"))
3051
- object.signupPlatform = options.enums === String ? $root.com.headspace.userdomain.grpc.user.PLATFORM[message.signupPlatform] : message.signupPlatform;
3052
- if (message.createdAt != null && message.hasOwnProperty("createdAt"))
3053
- if (typeof message.createdAt === "number")
3054
- object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
3055
- else
3056
- object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
3057
- if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3058
- if (typeof message.updatedAt === "number")
3059
- object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
3060
- else
3061
- object.updatedAt = options.longs === String ? $util.Long.prototype.toString.call(message.updatedAt) : options.longs === Number ? new $util.LongBits(message.updatedAt.low >>> 0, message.updatedAt.high >>> 0).toNumber(true) : message.updatedAt;
3062
- return object;
3063
- };
3064
-
3065
- /**
3066
- * Converts this User to JSON.
3067
- * @function toJSON
3068
- * @memberof com.headspace.userdomain.grpc.user.User
3069
- * @instance
3070
- * @returns {Object.<string,*>} JSON object
3071
- */
3072
- User.prototype.toJSON = function toJSON() {
3073
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3074
- };
3075
-
3076
- return User;
3077
- })();
3078
-
3079
- user.DeleteUserRequest = (function() {
3080
-
3081
- /**
3082
- * Properties of a DeleteUserRequest.
3083
- * @memberof com.headspace.userdomain.grpc.user
3084
- * @interface IDeleteUserRequest
3085
- * @property {string|null} [hsId] DeleteUserRequest hsId
3086
- */
3087
-
3088
- /**
3089
- * Constructs a new DeleteUserRequest.
3090
- * @memberof com.headspace.userdomain.grpc.user
3091
- * @classdesc Represents a DeleteUserRequest.
3092
- * @implements IDeleteUserRequest
3093
- * @constructor
3094
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserRequest=} [properties] Properties to set
3095
- */
3096
- function DeleteUserRequest(properties) {
3097
- if (properties)
3098
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3099
- if (properties[keys[i]] != null)
3100
- this[keys[i]] = properties[keys[i]];
3101
- }
3102
-
3103
- /**
3104
- * DeleteUserRequest hsId.
3105
- * @member {string} hsId
3106
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3107
- * @instance
3108
- */
3109
- DeleteUserRequest.prototype.hsId = "";
3110
-
3111
- /**
3112
- * Creates a new DeleteUserRequest instance using the specified properties.
3113
- * @function create
3114
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3115
- * @static
3116
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserRequest=} [properties] Properties to set
3117
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserRequest} DeleteUserRequest instance
3118
- */
3119
- DeleteUserRequest.create = function create(properties) {
3120
- return new DeleteUserRequest(properties);
3121
- };
3122
-
3123
- /**
3124
- * Encodes the specified DeleteUserRequest message. Does not implicitly {@link com.headspace.userdomain.grpc.user.DeleteUserRequest.verify|verify} messages.
3125
- * @function encode
3126
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3127
- * @static
3128
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserRequest} message DeleteUserRequest message or plain object to encode
3129
- * @param {$protobuf.Writer} [writer] Writer to encode to
3130
- * @returns {$protobuf.Writer} Writer
3131
- */
3132
- DeleteUserRequest.encode = function encode(message, writer) {
3133
- if (!writer)
3134
- writer = $Writer.create();
3135
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3136
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
3137
- return writer;
3138
- };
3139
-
3140
- /**
3141
- * Encodes the specified DeleteUserRequest message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.DeleteUserRequest.verify|verify} messages.
3142
- * @function encodeDelimited
3143
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3144
- * @static
3145
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserRequest} message DeleteUserRequest message or plain object to encode
3146
- * @param {$protobuf.Writer} [writer] Writer to encode to
3147
- * @returns {$protobuf.Writer} Writer
3148
- */
3149
- DeleteUserRequest.encodeDelimited = function encodeDelimited(message, writer) {
3150
- return this.encode(message, writer).ldelim();
3151
- };
3152
-
3153
- /**
3154
- * Decodes a DeleteUserRequest message from the specified reader or buffer.
3155
- * @function decode
3156
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3157
- * @static
3158
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3159
- * @param {number} [length] Message length if known beforehand
3160
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserRequest} DeleteUserRequest
3161
- * @throws {Error} If the payload is not a reader or valid buffer
3162
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3163
- */
3164
- DeleteUserRequest.decode = function decode(reader, length) {
3165
- if (!(reader instanceof $Reader))
3166
- reader = $Reader.create(reader);
3167
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.DeleteUserRequest();
3168
- while (reader.pos < end) {
3169
- var tag = reader.uint32();
3170
- switch (tag >>> 3) {
3171
- case 1:
3172
- message.hsId = reader.string();
3173
- break;
3174
- default:
3175
- reader.skipType(tag & 7);
3176
- break;
3177
- }
3178
- }
3179
- return message;
3180
- };
3181
-
3182
- /**
3183
- * Decodes a DeleteUserRequest message from the specified reader or buffer, length delimited.
3184
- * @function decodeDelimited
3185
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3186
- * @static
3187
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3188
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserRequest} DeleteUserRequest
3189
- * @throws {Error} If the payload is not a reader or valid buffer
3190
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3191
- */
3192
- DeleteUserRequest.decodeDelimited = function decodeDelimited(reader) {
3193
- if (!(reader instanceof $Reader))
3194
- reader = new $Reader(reader);
3195
- return this.decode(reader, reader.uint32());
3196
- };
3197
-
3198
- /**
3199
- * Verifies a DeleteUserRequest message.
3200
- * @function verify
3201
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3202
- * @static
3203
- * @param {Object.<string,*>} message Plain object to verify
3204
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
3205
- */
3206
- DeleteUserRequest.verify = function verify(message) {
3207
- if (typeof message !== "object" || message === null)
3208
- return "object expected";
3209
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3210
- if (!$util.isString(message.hsId))
3211
- return "hsId: string expected";
3212
- return null;
3213
- };
3214
-
3215
- /**
3216
- * Creates a DeleteUserRequest message from a plain object. Also converts values to their respective internal types.
3217
- * @function fromObject
3218
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3219
- * @static
3220
- * @param {Object.<string,*>} object Plain object
3221
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserRequest} DeleteUserRequest
3222
- */
3223
- DeleteUserRequest.fromObject = function fromObject(object) {
3224
- if (object instanceof $root.com.headspace.userdomain.grpc.user.DeleteUserRequest)
3225
- return object;
3226
- var message = new $root.com.headspace.userdomain.grpc.user.DeleteUserRequest();
3227
- if (object.hsId != null)
3228
- message.hsId = String(object.hsId);
3229
- return message;
3230
- };
3231
-
3232
- /**
3233
- * Creates a plain object from a DeleteUserRequest message. Also converts values to other types if specified.
3234
- * @function toObject
3235
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3236
- * @static
3237
- * @param {com.headspace.userdomain.grpc.user.DeleteUserRequest} message DeleteUserRequest
3238
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3239
- * @returns {Object.<string,*>} Plain object
3240
- */
3241
- DeleteUserRequest.toObject = function toObject(message, options) {
3242
- if (!options)
3243
- options = {};
3244
- var object = {};
3245
- if (options.defaults)
3246
- object.hsId = "";
3247
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3248
- object.hsId = message.hsId;
3249
- return object;
3250
- };
3251
-
3252
- /**
3253
- * Converts this DeleteUserRequest to JSON.
3254
- * @function toJSON
3255
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserRequest
3256
- * @instance
3257
- * @returns {Object.<string,*>} JSON object
3258
- */
3259
- DeleteUserRequest.prototype.toJSON = function toJSON() {
3260
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3261
- };
3262
-
3263
- return DeleteUserRequest;
3264
- })();
3265
-
3266
- user.DeleteUserResponse = (function() {
3267
-
3268
- /**
3269
- * Properties of a DeleteUserResponse.
3270
- * @memberof com.headspace.userdomain.grpc.user
3271
- * @interface IDeleteUserResponse
3272
- */
3273
-
3274
- /**
3275
- * Constructs a new DeleteUserResponse.
3276
- * @memberof com.headspace.userdomain.grpc.user
3277
- * @classdesc Represents a DeleteUserResponse.
3278
- * @implements IDeleteUserResponse
3279
- * @constructor
3280
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserResponse=} [properties] Properties to set
3281
- */
3282
- function DeleteUserResponse(properties) {
3283
- if (properties)
3284
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3285
- if (properties[keys[i]] != null)
3286
- this[keys[i]] = properties[keys[i]];
3287
- }
3288
-
3289
- /**
3290
- * Creates a new DeleteUserResponse instance using the specified properties.
3291
- * @function create
3292
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3293
- * @static
3294
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserResponse=} [properties] Properties to set
3295
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserResponse} DeleteUserResponse instance
3296
- */
3297
- DeleteUserResponse.create = function create(properties) {
3298
- return new DeleteUserResponse(properties);
3299
- };
3300
-
3301
- /**
3302
- * Encodes the specified DeleteUserResponse message. Does not implicitly {@link com.headspace.userdomain.grpc.user.DeleteUserResponse.verify|verify} messages.
3303
- * @function encode
3304
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3305
- * @static
3306
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserResponse} message DeleteUserResponse message or plain object to encode
3307
- * @param {$protobuf.Writer} [writer] Writer to encode to
3308
- * @returns {$protobuf.Writer} Writer
3309
- */
3310
- DeleteUserResponse.encode = function encode(message, writer) {
3311
- if (!writer)
3312
- writer = $Writer.create();
3313
- return writer;
3314
- };
3315
-
3316
- /**
3317
- * Encodes the specified DeleteUserResponse message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.DeleteUserResponse.verify|verify} messages.
3318
- * @function encodeDelimited
3319
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3320
- * @static
3321
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserResponse} message DeleteUserResponse message or plain object to encode
3322
- * @param {$protobuf.Writer} [writer] Writer to encode to
3323
- * @returns {$protobuf.Writer} Writer
3324
- */
3325
- DeleteUserResponse.encodeDelimited = function encodeDelimited(message, writer) {
3326
- return this.encode(message, writer).ldelim();
3327
- };
3328
-
3329
- /**
3330
- * Decodes a DeleteUserResponse message from the specified reader or buffer.
3331
- * @function decode
3332
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3333
- * @static
3334
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3335
- * @param {number} [length] Message length if known beforehand
3336
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserResponse} DeleteUserResponse
3337
- * @throws {Error} If the payload is not a reader or valid buffer
3338
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3339
- */
3340
- DeleteUserResponse.decode = function decode(reader, length) {
3341
- if (!(reader instanceof $Reader))
3342
- reader = $Reader.create(reader);
3343
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.DeleteUserResponse();
3344
- while (reader.pos < end) {
3345
- var tag = reader.uint32();
3346
- switch (tag >>> 3) {
3347
- default:
3348
- reader.skipType(tag & 7);
3349
- break;
3350
- }
3351
- }
3352
- return message;
3353
- };
3354
-
3355
- /**
3356
- * Decodes a DeleteUserResponse message from the specified reader or buffer, length delimited.
3357
- * @function decodeDelimited
3358
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3359
- * @static
3360
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3361
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserResponse} DeleteUserResponse
3362
- * @throws {Error} If the payload is not a reader or valid buffer
3363
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3364
- */
3365
- DeleteUserResponse.decodeDelimited = function decodeDelimited(reader) {
3366
- if (!(reader instanceof $Reader))
3367
- reader = new $Reader(reader);
3368
- return this.decode(reader, reader.uint32());
3369
- };
3370
-
3371
- /**
3372
- * Verifies a DeleteUserResponse message.
3373
- * @function verify
3374
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3375
- * @static
3376
- * @param {Object.<string,*>} message Plain object to verify
3377
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
3378
- */
3379
- DeleteUserResponse.verify = function verify(message) {
3380
- if (typeof message !== "object" || message === null)
3381
- return "object expected";
3382
- return null;
3383
- };
3384
-
3385
- /**
3386
- * Creates a DeleteUserResponse message from a plain object. Also converts values to their respective internal types.
3387
- * @function fromObject
3388
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3389
- * @static
3390
- * @param {Object.<string,*>} object Plain object
3391
- * @returns {com.headspace.userdomain.grpc.user.DeleteUserResponse} DeleteUserResponse
3392
- */
3393
- DeleteUserResponse.fromObject = function fromObject(object) {
3394
- if (object instanceof $root.com.headspace.userdomain.grpc.user.DeleteUserResponse)
3395
- return object;
3396
- return new $root.com.headspace.userdomain.grpc.user.DeleteUserResponse();
3397
- };
3398
-
3399
- /**
3400
- * Creates a plain object from a DeleteUserResponse message. Also converts values to other types if specified.
3401
- * @function toObject
3402
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3403
- * @static
3404
- * @param {com.headspace.userdomain.grpc.user.DeleteUserResponse} message DeleteUserResponse
3405
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3406
- * @returns {Object.<string,*>} Plain object
3407
- */
3408
- DeleteUserResponse.toObject = function toObject() {
3409
- return {};
3410
- };
3411
-
3412
- /**
3413
- * Converts this DeleteUserResponse to JSON.
3414
- * @function toJSON
3415
- * @memberof com.headspace.userdomain.grpc.user.DeleteUserResponse
3416
- * @instance
3417
- * @returns {Object.<string,*>} JSON object
3418
- */
3419
- DeleteUserResponse.prototype.toJSON = function toJSON() {
3420
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3421
- };
3422
-
3423
- return DeleteUserResponse;
3424
- })();
3425
-
3426
- user.FindUserRequest = (function() {
3427
-
3428
- /**
3429
- * Properties of a FindUserRequest.
3430
- * @memberof com.headspace.userdomain.grpc.user
3431
- * @interface IFindUserRequest
3432
- * @property {string|null} [hsId] FindUserRequest hsId
3433
- * @property {string|null} [email] FindUserRequest email
3434
- */
3435
-
3436
- /**
3437
- * Constructs a new FindUserRequest.
3438
- * @memberof com.headspace.userdomain.grpc.user
3439
- * @classdesc Represents a FindUserRequest.
3440
- * @implements IFindUserRequest
3441
- * @constructor
3442
- * @param {com.headspace.userdomain.grpc.user.IFindUserRequest=} [properties] Properties to set
3443
- */
3444
- function FindUserRequest(properties) {
3445
- if (properties)
3446
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3447
- if (properties[keys[i]] != null)
3448
- this[keys[i]] = properties[keys[i]];
3449
- }
3450
-
3451
- /**
3452
- * FindUserRequest hsId.
3453
- * @member {string} hsId
3454
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3455
- * @instance
3456
- */
3457
- FindUserRequest.prototype.hsId = "";
3458
-
3459
- /**
3460
- * FindUserRequest email.
3461
- * @member {string} email
3462
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3463
- * @instance
3464
- */
3465
- FindUserRequest.prototype.email = "";
3466
-
3467
- /**
3468
- * Creates a new FindUserRequest instance using the specified properties.
3469
- * @function create
3470
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3471
- * @static
3472
- * @param {com.headspace.userdomain.grpc.user.IFindUserRequest=} [properties] Properties to set
3473
- * @returns {com.headspace.userdomain.grpc.user.FindUserRequest} FindUserRequest instance
3474
- */
3475
- FindUserRequest.create = function create(properties) {
3476
- return new FindUserRequest(properties);
3477
- };
3478
-
3479
- /**
3480
- * Encodes the specified FindUserRequest message. Does not implicitly {@link com.headspace.userdomain.grpc.user.FindUserRequest.verify|verify} messages.
3481
- * @function encode
3482
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3483
- * @static
3484
- * @param {com.headspace.userdomain.grpc.user.IFindUserRequest} message FindUserRequest message or plain object to encode
3485
- * @param {$protobuf.Writer} [writer] Writer to encode to
3486
- * @returns {$protobuf.Writer} Writer
3487
- */
3488
- FindUserRequest.encode = function encode(message, writer) {
3489
- if (!writer)
3490
- writer = $Writer.create();
3491
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3492
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
3493
- if (message.email != null && message.hasOwnProperty("email"))
3494
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
3495
- return writer;
3496
- };
3497
-
3498
- /**
3499
- * Encodes the specified FindUserRequest message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.FindUserRequest.verify|verify} messages.
3500
- * @function encodeDelimited
3501
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3502
- * @static
3503
- * @param {com.headspace.userdomain.grpc.user.IFindUserRequest} message FindUserRequest message or plain object to encode
3504
- * @param {$protobuf.Writer} [writer] Writer to encode to
3505
- * @returns {$protobuf.Writer} Writer
3506
- */
3507
- FindUserRequest.encodeDelimited = function encodeDelimited(message, writer) {
3508
- return this.encode(message, writer).ldelim();
3509
- };
3510
-
3511
- /**
3512
- * Decodes a FindUserRequest message from the specified reader or buffer.
3513
- * @function decode
3514
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3515
- * @static
3516
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3517
- * @param {number} [length] Message length if known beforehand
3518
- * @returns {com.headspace.userdomain.grpc.user.FindUserRequest} FindUserRequest
3519
- * @throws {Error} If the payload is not a reader or valid buffer
3520
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3521
- */
3522
- FindUserRequest.decode = function decode(reader, length) {
3523
- if (!(reader instanceof $Reader))
3524
- reader = $Reader.create(reader);
3525
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.FindUserRequest();
3526
- while (reader.pos < end) {
3527
- var tag = reader.uint32();
3528
- switch (tag >>> 3) {
3529
- case 1:
3530
- message.hsId = reader.string();
3531
- break;
3532
- case 2:
3533
- message.email = reader.string();
3534
- break;
3535
- default:
3536
- reader.skipType(tag & 7);
3537
- break;
3538
- }
3539
- }
3540
- return message;
3541
- };
3542
-
3543
- /**
3544
- * Decodes a FindUserRequest message from the specified reader or buffer, length delimited.
3545
- * @function decodeDelimited
3546
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3547
- * @static
3548
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3549
- * @returns {com.headspace.userdomain.grpc.user.FindUserRequest} FindUserRequest
3550
- * @throws {Error} If the payload is not a reader or valid buffer
3551
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3552
- */
3553
- FindUserRequest.decodeDelimited = function decodeDelimited(reader) {
3554
- if (!(reader instanceof $Reader))
3555
- reader = new $Reader(reader);
3556
- return this.decode(reader, reader.uint32());
3557
- };
3558
-
3559
- /**
3560
- * Verifies a FindUserRequest message.
3561
- * @function verify
3562
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3563
- * @static
3564
- * @param {Object.<string,*>} message Plain object to verify
3565
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
3566
- */
3567
- FindUserRequest.verify = function verify(message) {
3568
- if (typeof message !== "object" || message === null)
3569
- return "object expected";
3570
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3571
- if (!$util.isString(message.hsId))
3572
- return "hsId: string expected";
3573
- if (message.email != null && message.hasOwnProperty("email"))
3574
- if (!$util.isString(message.email))
3575
- return "email: string expected";
3576
- return null;
3577
- };
3578
-
3579
- /**
3580
- * Creates a FindUserRequest message from a plain object. Also converts values to their respective internal types.
3581
- * @function fromObject
3582
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3583
- * @static
3584
- * @param {Object.<string,*>} object Plain object
3585
- * @returns {com.headspace.userdomain.grpc.user.FindUserRequest} FindUserRequest
3586
- */
3587
- FindUserRequest.fromObject = function fromObject(object) {
3588
- if (object instanceof $root.com.headspace.userdomain.grpc.user.FindUserRequest)
3589
- return object;
3590
- var message = new $root.com.headspace.userdomain.grpc.user.FindUserRequest();
3591
- if (object.hsId != null)
3592
- message.hsId = String(object.hsId);
3593
- if (object.email != null)
3594
- message.email = String(object.email);
3595
- return message;
3596
- };
3597
-
3598
- /**
3599
- * Creates a plain object from a FindUserRequest message. Also converts values to other types if specified.
3600
- * @function toObject
3601
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3602
- * @static
3603
- * @param {com.headspace.userdomain.grpc.user.FindUserRequest} message FindUserRequest
3604
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3605
- * @returns {Object.<string,*>} Plain object
3606
- */
3607
- FindUserRequest.toObject = function toObject(message, options) {
3608
- if (!options)
3609
- options = {};
3610
- var object = {};
3611
- if (options.defaults) {
3612
- object.hsId = "";
3613
- object.email = "";
3614
- }
3615
- if (message.hsId != null && message.hasOwnProperty("hsId"))
3616
- object.hsId = message.hsId;
3617
- if (message.email != null && message.hasOwnProperty("email"))
3618
- object.email = message.email;
3619
- return object;
3620
- };
3621
-
3622
- /**
3623
- * Converts this FindUserRequest to JSON.
3624
- * @function toJSON
3625
- * @memberof com.headspace.userdomain.grpc.user.FindUserRequest
3626
- * @instance
3627
- * @returns {Object.<string,*>} JSON object
3628
- */
3629
- FindUserRequest.prototype.toJSON = function toJSON() {
3630
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3631
- };
3632
-
3633
- return FindUserRequest;
3634
- })();
3635
-
3636
- user.UserService = (function() {
3637
-
3638
- /**
3639
- * Constructs a new UserService service.
3640
- * @memberof com.headspace.userdomain.grpc.user
3641
- * @classdesc Represents a UserService
3642
- * @extends $protobuf.rpc.Service
3643
- * @constructor
3644
- * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
3645
- * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
3646
- * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
3647
- */
3648
- function UserService(rpcImpl, requestDelimited, responseDelimited) {
3649
- $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
3650
- }
3651
-
3652
- (UserService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserService;
3653
-
3654
- /**
3655
- * Creates new UserService service using the specified rpc implementation.
3656
- * @function create
3657
- * @memberof com.headspace.userdomain.grpc.user.UserService
3658
- * @static
3659
- * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
3660
- * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
3661
- * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
3662
- * @returns {UserService} RPC service. Useful where requests and/or responses are streamed.
3663
- */
3664
- UserService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
3665
- return new this(rpcImpl, requestDelimited, responseDelimited);
3666
- };
3667
-
3668
- /**
3669
- * Callback as used by {@link com.headspace.userdomain.grpc.user.UserService#createUser}.
3670
- * @memberof com.headspace.userdomain.grpc.user.UserService
3671
- * @typedef CreateUserCallback
3672
- * @type {function}
3673
- * @param {Error|null} error Error, if any
3674
- * @param {com.headspace.userdomain.grpc.user.User} [response] User
3675
- */
3676
-
3677
- /**
3678
- * Calls CreateUser.
3679
- * @function createUser
3680
- * @memberof com.headspace.userdomain.grpc.user.UserService
3681
- * @instance
3682
- * @param {com.headspace.userdomain.grpc.user.IUser} request User message or plain object
3683
- * @param {com.headspace.userdomain.grpc.user.UserService.CreateUserCallback} callback Node-style callback called with the error, if any, and User
3684
- * @returns {undefined}
3685
- * @variation 1
3686
- */
3687
- Object.defineProperty(UserService.prototype.createUser = function createUser(request, callback) {
3688
- return this.rpcCall(createUser, $root.com.headspace.userdomain.grpc.user.User, $root.com.headspace.userdomain.grpc.user.User, request, callback);
3689
- }, "name", { value: "CreateUser" });
3690
-
3691
- /**
3692
- * Calls CreateUser.
3693
- * @function createUser
3694
- * @memberof com.headspace.userdomain.grpc.user.UserService
3695
- * @instance
3696
- * @param {com.headspace.userdomain.grpc.user.IUser} request User message or plain object
3697
- * @returns {Promise<com.headspace.userdomain.grpc.user.User>} Promise
3698
- * @variation 2
3699
- */
3700
-
3701
- /**
3702
- * Callback as used by {@link com.headspace.userdomain.grpc.user.UserService#deleteUser}.
3703
- * @memberof com.headspace.userdomain.grpc.user.UserService
3704
- * @typedef DeleteUserCallback
3705
- * @type {function}
3706
- * @param {Error|null} error Error, if any
3707
- * @param {com.headspace.userdomain.grpc.user.DeleteUserResponse} [response] DeleteUserResponse
3708
- */
3709
-
3710
- /**
3711
- * Calls DeleteUser.
3712
- * @function deleteUser
3713
- * @memberof com.headspace.userdomain.grpc.user.UserService
3714
- * @instance
3715
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserRequest} request DeleteUserRequest message or plain object
3716
- * @param {com.headspace.userdomain.grpc.user.UserService.DeleteUserCallback} callback Node-style callback called with the error, if any, and DeleteUserResponse
3717
- * @returns {undefined}
3718
- * @variation 1
3719
- */
3720
- Object.defineProperty(UserService.prototype.deleteUser = function deleteUser(request, callback) {
3721
- return this.rpcCall(deleteUser, $root.com.headspace.userdomain.grpc.user.DeleteUserRequest, $root.com.headspace.userdomain.grpc.user.DeleteUserResponse, request, callback);
3722
- }, "name", { value: "DeleteUser" });
3723
-
3724
- /**
3725
- * Calls DeleteUser.
3726
- * @function deleteUser
3727
- * @memberof com.headspace.userdomain.grpc.user.UserService
3728
- * @instance
3729
- * @param {com.headspace.userdomain.grpc.user.IDeleteUserRequest} request DeleteUserRequest message or plain object
3730
- * @returns {Promise<com.headspace.userdomain.grpc.user.DeleteUserResponse>} Promise
3731
- * @variation 2
3732
- */
3733
-
3734
- /**
3735
- * Callback as used by {@link com.headspace.userdomain.grpc.user.UserService#updateUser}.
3736
- * @memberof com.headspace.userdomain.grpc.user.UserService
3737
- * @typedef UpdateUserCallback
3738
- * @type {function}
3739
- * @param {Error|null} error Error, if any
3740
- * @param {com.headspace.userdomain.grpc.user.User} [response] User
3741
- */
3742
-
3743
- /**
3744
- * Calls UpdateUser.
3745
- * @function updateUser
3746
- * @memberof com.headspace.userdomain.grpc.user.UserService
3747
- * @instance
3748
- * @param {com.headspace.userdomain.grpc.user.IUser} request User message or plain object
3749
- * @param {com.headspace.userdomain.grpc.user.UserService.UpdateUserCallback} callback Node-style callback called with the error, if any, and User
3750
- * @returns {undefined}
3751
- * @variation 1
3752
- */
3753
- Object.defineProperty(UserService.prototype.updateUser = function updateUser(request, callback) {
3754
- return this.rpcCall(updateUser, $root.com.headspace.userdomain.grpc.user.User, $root.com.headspace.userdomain.grpc.user.User, request, callback);
3755
- }, "name", { value: "UpdateUser" });
3756
-
3757
- /**
3758
- * Calls UpdateUser.
3759
- * @function updateUser
3760
- * @memberof com.headspace.userdomain.grpc.user.UserService
3761
- * @instance
3762
- * @param {com.headspace.userdomain.grpc.user.IUser} request User message or plain object
3763
- * @returns {Promise<com.headspace.userdomain.grpc.user.User>} Promise
3764
- * @variation 2
3765
- */
3766
-
3767
- /**
3768
- * Callback as used by {@link com.headspace.userdomain.grpc.user.UserService#findUser}.
3769
- * @memberof com.headspace.userdomain.grpc.user.UserService
3770
- * @typedef FindUserCallback
3771
- * @type {function}
3772
- * @param {Error|null} error Error, if any
3773
- * @param {com.headspace.userdomain.grpc.user.User} [response] User
3774
- */
3775
-
3776
- /**
3777
- * Calls FindUser.
3778
- * @function findUser
3779
- * @memberof com.headspace.userdomain.grpc.user.UserService
3780
- * @instance
3781
- * @param {com.headspace.userdomain.grpc.user.IFindUserRequest} request FindUserRequest message or plain object
3782
- * @param {com.headspace.userdomain.grpc.user.UserService.FindUserCallback} callback Node-style callback called with the error, if any, and User
3783
- * @returns {undefined}
3784
- * @variation 1
3785
- */
3786
- Object.defineProperty(UserService.prototype.findUser = function findUser(request, callback) {
3787
- return this.rpcCall(findUser, $root.com.headspace.userdomain.grpc.user.FindUserRequest, $root.com.headspace.userdomain.grpc.user.User, request, callback);
3788
- }, "name", { value: "FindUser" });
3789
-
3790
- /**
3791
- * Calls FindUser.
3792
- * @function findUser
3793
- * @memberof com.headspace.userdomain.grpc.user.UserService
3794
- * @instance
3795
- * @param {com.headspace.userdomain.grpc.user.IFindUserRequest} request FindUserRequest message or plain object
3796
- * @returns {Promise<com.headspace.userdomain.grpc.user.User>} Promise
3797
- * @variation 2
3798
- */
3799
-
3800
- return UserService;
3801
- })();
3802
-
3803
- user.events = (function() {
3804
-
3805
- /**
3806
- * Namespace events.
3807
- * @memberof com.headspace.userdomain.grpc.user
3808
- * @namespace
3809
- */
3810
- var events = {};
3811
-
3812
- events.UserCreated = (function() {
3813
-
3814
- /**
3815
- * Properties of a UserCreated.
3816
- * @memberof com.headspace.userdomain.grpc.user.events
3817
- * @interface IUserCreated
3818
- * @property {com.headspace.userdomain.grpc.user.IUser|null} [user] UserCreated user
3819
- */
3820
-
3821
- /**
3822
- * Constructs a new UserCreated.
3823
- * @memberof com.headspace.userdomain.grpc.user.events
3824
- * @classdesc Represents a UserCreated.
3825
- * @implements IUserCreated
3826
- * @constructor
3827
- * @param {com.headspace.userdomain.grpc.user.events.IUserCreated=} [properties] Properties to set
3828
- */
3829
- function UserCreated(properties) {
3830
- if (properties)
3831
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3832
- if (properties[keys[i]] != null)
3833
- this[keys[i]] = properties[keys[i]];
3834
- }
3835
-
3836
- /**
3837
- * UserCreated user.
3838
- * @member {com.headspace.userdomain.grpc.user.IUser|null|undefined} user
3839
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3840
- * @instance
3841
- */
3842
- UserCreated.prototype.user = null;
3843
-
3844
- /**
3845
- * Creates a new UserCreated instance using the specified properties.
3846
- * @function create
3847
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3848
- * @static
3849
- * @param {com.headspace.userdomain.grpc.user.events.IUserCreated=} [properties] Properties to set
3850
- * @returns {com.headspace.userdomain.grpc.user.events.UserCreated} UserCreated instance
3851
- */
3852
- UserCreated.create = function create(properties) {
3853
- return new UserCreated(properties);
3854
- };
3855
-
3856
- /**
3857
- * Encodes the specified UserCreated message. Does not implicitly {@link com.headspace.userdomain.grpc.user.events.UserCreated.verify|verify} messages.
3858
- * @function encode
3859
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3860
- * @static
3861
- * @param {com.headspace.userdomain.grpc.user.events.IUserCreated} message UserCreated message or plain object to encode
3862
- * @param {$protobuf.Writer} [writer] Writer to encode to
3863
- * @returns {$protobuf.Writer} Writer
3864
- */
3865
- UserCreated.encode = function encode(message, writer) {
3866
- if (!writer)
3867
- writer = $Writer.create();
3868
- if (message.user != null && message.hasOwnProperty("user"))
3869
- $root.com.headspace.userdomain.grpc.user.User.encode(message.user, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3870
- return writer;
3871
- };
3872
-
3873
- /**
3874
- * Encodes the specified UserCreated message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.events.UserCreated.verify|verify} messages.
3875
- * @function encodeDelimited
3876
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3877
- * @static
3878
- * @param {com.headspace.userdomain.grpc.user.events.IUserCreated} message UserCreated message or plain object to encode
3879
- * @param {$protobuf.Writer} [writer] Writer to encode to
3880
- * @returns {$protobuf.Writer} Writer
3881
- */
3882
- UserCreated.encodeDelimited = function encodeDelimited(message, writer) {
3883
- return this.encode(message, writer).ldelim();
3884
- };
3885
-
3886
- /**
3887
- * Decodes a UserCreated message from the specified reader or buffer.
3888
- * @function decode
3889
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3890
- * @static
3891
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3892
- * @param {number} [length] Message length if known beforehand
3893
- * @returns {com.headspace.userdomain.grpc.user.events.UserCreated} UserCreated
3894
- * @throws {Error} If the payload is not a reader or valid buffer
3895
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3896
- */
3897
- UserCreated.decode = function decode(reader, length) {
3898
- if (!(reader instanceof $Reader))
3899
- reader = $Reader.create(reader);
3900
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.events.UserCreated();
3901
- while (reader.pos < end) {
3902
- var tag = reader.uint32();
3903
- switch (tag >>> 3) {
3904
- case 1:
3905
- message.user = $root.com.headspace.userdomain.grpc.user.User.decode(reader, reader.uint32());
3906
- break;
3907
- default:
3908
- reader.skipType(tag & 7);
3909
- break;
3910
- }
3911
- }
3912
- return message;
3913
- };
3914
-
3915
- /**
3916
- * Decodes a UserCreated message from the specified reader or buffer, length delimited.
3917
- * @function decodeDelimited
3918
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3919
- * @static
3920
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3921
- * @returns {com.headspace.userdomain.grpc.user.events.UserCreated} UserCreated
3922
- * @throws {Error} If the payload is not a reader or valid buffer
3923
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3924
- */
3925
- UserCreated.decodeDelimited = function decodeDelimited(reader) {
3926
- if (!(reader instanceof $Reader))
3927
- reader = new $Reader(reader);
3928
- return this.decode(reader, reader.uint32());
3929
- };
3930
-
3931
- /**
3932
- * Verifies a UserCreated message.
3933
- * @function verify
3934
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3935
- * @static
3936
- * @param {Object.<string,*>} message Plain object to verify
3937
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
3938
- */
3939
- UserCreated.verify = function verify(message) {
3940
- if (typeof message !== "object" || message === null)
3941
- return "object expected";
3942
- if (message.user != null && message.hasOwnProperty("user")) {
3943
- var error = $root.com.headspace.userdomain.grpc.user.User.verify(message.user);
3944
- if (error)
3945
- return "user." + error;
3946
- }
3947
- return null;
3948
- };
3949
-
3950
- /**
3951
- * Creates a UserCreated message from a plain object. Also converts values to their respective internal types.
3952
- * @function fromObject
3953
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3954
- * @static
3955
- * @param {Object.<string,*>} object Plain object
3956
- * @returns {com.headspace.userdomain.grpc.user.events.UserCreated} UserCreated
3957
- */
3958
- UserCreated.fromObject = function fromObject(object) {
3959
- if (object instanceof $root.com.headspace.userdomain.grpc.user.events.UserCreated)
3960
- return object;
3961
- var message = new $root.com.headspace.userdomain.grpc.user.events.UserCreated();
3962
- if (object.user != null) {
3963
- if (typeof object.user !== "object")
3964
- throw TypeError(".com.headspace.userdomain.grpc.user.events.UserCreated.user: object expected");
3965
- message.user = $root.com.headspace.userdomain.grpc.user.User.fromObject(object.user);
3966
- }
3967
- return message;
3968
- };
3969
-
3970
- /**
3971
- * Creates a plain object from a UserCreated message. Also converts values to other types if specified.
3972
- * @function toObject
3973
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3974
- * @static
3975
- * @param {com.headspace.userdomain.grpc.user.events.UserCreated} message UserCreated
3976
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3977
- * @returns {Object.<string,*>} Plain object
3978
- */
3979
- UserCreated.toObject = function toObject(message, options) {
3980
- if (!options)
3981
- options = {};
3982
- var object = {};
3983
- if (options.defaults)
3984
- object.user = null;
3985
- if (message.user != null && message.hasOwnProperty("user"))
3986
- object.user = $root.com.headspace.userdomain.grpc.user.User.toObject(message.user, options);
3987
- return object;
3988
- };
3989
-
3990
- /**
3991
- * Converts this UserCreated to JSON.
3992
- * @function toJSON
3993
- * @memberof com.headspace.userdomain.grpc.user.events.UserCreated
3994
- * @instance
3995
- * @returns {Object.<string,*>} JSON object
3996
- */
3997
- UserCreated.prototype.toJSON = function toJSON() {
3998
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3999
- };
4000
-
4001
- return UserCreated;
4002
- })();
4003
-
4004
- events.UserUpdated = (function() {
4005
-
4006
- /**
4007
- * Properties of a UserUpdated.
4008
- * @memberof com.headspace.userdomain.grpc.user.events
4009
- * @interface IUserUpdated
4010
- * @property {string|null} [hsId] UserUpdated hsId
4011
- * @property {number|Long|null} [updatedAt] UserUpdated updatedAt
4012
- * @property {com.headspace.userdomain.grpc.user.IUser|null} [updatedAttributes] UserUpdated updatedAttributes
4013
- */
4014
-
4015
- /**
4016
- * Constructs a new UserUpdated.
4017
- * @memberof com.headspace.userdomain.grpc.user.events
4018
- * @classdesc Represents a UserUpdated.
4019
- * @implements IUserUpdated
4020
- * @constructor
4021
- * @param {com.headspace.userdomain.grpc.user.events.IUserUpdated=} [properties] Properties to set
4022
- */
4023
- function UserUpdated(properties) {
4024
- if (properties)
4025
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4026
- if (properties[keys[i]] != null)
4027
- this[keys[i]] = properties[keys[i]];
4028
- }
4029
-
4030
- /**
4031
- * UserUpdated hsId.
4032
- * @member {string} hsId
4033
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4034
- * @instance
4035
- */
4036
- UserUpdated.prototype.hsId = "";
4037
-
4038
- /**
4039
- * UserUpdated updatedAt.
4040
- * @member {number|Long} updatedAt
4041
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4042
- * @instance
4043
- */
4044
- UserUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4045
-
4046
- /**
4047
- * UserUpdated updatedAttributes.
4048
- * @member {com.headspace.userdomain.grpc.user.IUser|null|undefined} updatedAttributes
4049
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4050
- * @instance
4051
- */
4052
- UserUpdated.prototype.updatedAttributes = null;
4053
-
4054
- /**
4055
- * Creates a new UserUpdated instance using the specified properties.
4056
- * @function create
4057
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4058
- * @static
4059
- * @param {com.headspace.userdomain.grpc.user.events.IUserUpdated=} [properties] Properties to set
4060
- * @returns {com.headspace.userdomain.grpc.user.events.UserUpdated} UserUpdated instance
4061
- */
4062
- UserUpdated.create = function create(properties) {
4063
- return new UserUpdated(properties);
4064
- };
4065
-
4066
- /**
4067
- * Encodes the specified UserUpdated message. Does not implicitly {@link com.headspace.userdomain.grpc.user.events.UserUpdated.verify|verify} messages.
4068
- * @function encode
4069
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4070
- * @static
4071
- * @param {com.headspace.userdomain.grpc.user.events.IUserUpdated} message UserUpdated message or plain object to encode
4072
- * @param {$protobuf.Writer} [writer] Writer to encode to
4073
- * @returns {$protobuf.Writer} Writer
4074
- */
4075
- UserUpdated.encode = function encode(message, writer) {
4076
- if (!writer)
4077
- writer = $Writer.create();
4078
- if (message.hsId != null && message.hasOwnProperty("hsId"))
4079
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
4080
- if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
4081
- writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedAt);
4082
- if (message.updatedAttributes != null && message.hasOwnProperty("updatedAttributes"))
4083
- $root.com.headspace.userdomain.grpc.user.User.encode(message.updatedAttributes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4084
- return writer;
4085
- };
4086
-
4087
- /**
4088
- * Encodes the specified UserUpdated message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.events.UserUpdated.verify|verify} messages.
4089
- * @function encodeDelimited
4090
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4091
- * @static
4092
- * @param {com.headspace.userdomain.grpc.user.events.IUserUpdated} message UserUpdated message or plain object to encode
4093
- * @param {$protobuf.Writer} [writer] Writer to encode to
4094
- * @returns {$protobuf.Writer} Writer
4095
- */
4096
- UserUpdated.encodeDelimited = function encodeDelimited(message, writer) {
4097
- return this.encode(message, writer).ldelim();
4098
- };
4099
-
4100
- /**
4101
- * Decodes a UserUpdated message from the specified reader or buffer.
4102
- * @function decode
4103
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4104
- * @static
4105
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4106
- * @param {number} [length] Message length if known beforehand
4107
- * @returns {com.headspace.userdomain.grpc.user.events.UserUpdated} UserUpdated
4108
- * @throws {Error} If the payload is not a reader or valid buffer
4109
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4110
- */
4111
- UserUpdated.decode = function decode(reader, length) {
4112
- if (!(reader instanceof $Reader))
4113
- reader = $Reader.create(reader);
4114
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.events.UserUpdated();
4115
- while (reader.pos < end) {
4116
- var tag = reader.uint32();
4117
- switch (tag >>> 3) {
4118
- case 1:
4119
- message.hsId = reader.string();
4120
- break;
4121
- case 2:
4122
- message.updatedAt = reader.uint64();
4123
- break;
4124
- case 3:
4125
- message.updatedAttributes = $root.com.headspace.userdomain.grpc.user.User.decode(reader, reader.uint32());
4126
- break;
4127
- default:
4128
- reader.skipType(tag & 7);
4129
- break;
4130
- }
4131
- }
4132
- return message;
4133
- };
4134
-
4135
- /**
4136
- * Decodes a UserUpdated message from the specified reader or buffer, length delimited.
4137
- * @function decodeDelimited
4138
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4139
- * @static
4140
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4141
- * @returns {com.headspace.userdomain.grpc.user.events.UserUpdated} UserUpdated
4142
- * @throws {Error} If the payload is not a reader or valid buffer
4143
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4144
- */
4145
- UserUpdated.decodeDelimited = function decodeDelimited(reader) {
4146
- if (!(reader instanceof $Reader))
4147
- reader = new $Reader(reader);
4148
- return this.decode(reader, reader.uint32());
4149
- };
4150
-
4151
- /**
4152
- * Verifies a UserUpdated message.
4153
- * @function verify
4154
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4155
- * @static
4156
- * @param {Object.<string,*>} message Plain object to verify
4157
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
4158
- */
4159
- UserUpdated.verify = function verify(message) {
4160
- if (typeof message !== "object" || message === null)
4161
- return "object expected";
4162
- if (message.hsId != null && message.hasOwnProperty("hsId"))
4163
- if (!$util.isString(message.hsId))
4164
- return "hsId: string expected";
4165
- if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
4166
- if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
4167
- return "updatedAt: integer|Long expected";
4168
- if (message.updatedAttributes != null && message.hasOwnProperty("updatedAttributes")) {
4169
- var error = $root.com.headspace.userdomain.grpc.user.User.verify(message.updatedAttributes);
4170
- if (error)
4171
- return "updatedAttributes." + error;
4172
- }
4173
- return null;
4174
- };
4175
-
4176
- /**
4177
- * Creates a UserUpdated message from a plain object. Also converts values to their respective internal types.
4178
- * @function fromObject
4179
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4180
- * @static
4181
- * @param {Object.<string,*>} object Plain object
4182
- * @returns {com.headspace.userdomain.grpc.user.events.UserUpdated} UserUpdated
4183
- */
4184
- UserUpdated.fromObject = function fromObject(object) {
4185
- if (object instanceof $root.com.headspace.userdomain.grpc.user.events.UserUpdated)
4186
- return object;
4187
- var message = new $root.com.headspace.userdomain.grpc.user.events.UserUpdated();
4188
- if (object.hsId != null)
4189
- message.hsId = String(object.hsId);
4190
- if (object.updatedAt != null)
4191
- if ($util.Long)
4192
- (message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
4193
- else if (typeof object.updatedAt === "string")
4194
- message.updatedAt = parseInt(object.updatedAt, 10);
4195
- else if (typeof object.updatedAt === "number")
4196
- message.updatedAt = object.updatedAt;
4197
- else if (typeof object.updatedAt === "object")
4198
- message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
4199
- if (object.updatedAttributes != null) {
4200
- if (typeof object.updatedAttributes !== "object")
4201
- throw TypeError(".com.headspace.userdomain.grpc.user.events.UserUpdated.updatedAttributes: object expected");
4202
- message.updatedAttributes = $root.com.headspace.userdomain.grpc.user.User.fromObject(object.updatedAttributes);
4203
- }
4204
- return message;
4205
- };
4206
-
4207
- /**
4208
- * Creates a plain object from a UserUpdated message. Also converts values to other types if specified.
4209
- * @function toObject
4210
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4211
- * @static
4212
- * @param {com.headspace.userdomain.grpc.user.events.UserUpdated} message UserUpdated
4213
- * @param {$protobuf.IConversionOptions} [options] Conversion options
4214
- * @returns {Object.<string,*>} Plain object
4215
- */
4216
- UserUpdated.toObject = function toObject(message, options) {
4217
- if (!options)
4218
- options = {};
4219
- var object = {};
4220
- if (options.defaults) {
4221
- object.hsId = "";
4222
- if ($util.Long) {
4223
- var long = new $util.Long(0, 0, true);
4224
- object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4225
- } else
4226
- object.updatedAt = options.longs === String ? "0" : 0;
4227
- object.updatedAttributes = null;
4228
- }
4229
- if (message.hsId != null && message.hasOwnProperty("hsId"))
4230
- object.hsId = message.hsId;
4231
- if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
4232
- if (typeof message.updatedAt === "number")
4233
- object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
4234
- else
4235
- object.updatedAt = options.longs === String ? $util.Long.prototype.toString.call(message.updatedAt) : options.longs === Number ? new $util.LongBits(message.updatedAt.low >>> 0, message.updatedAt.high >>> 0).toNumber(true) : message.updatedAt;
4236
- if (message.updatedAttributes != null && message.hasOwnProperty("updatedAttributes"))
4237
- object.updatedAttributes = $root.com.headspace.userdomain.grpc.user.User.toObject(message.updatedAttributes, options);
4238
- return object;
4239
- };
4240
-
4241
- /**
4242
- * Converts this UserUpdated to JSON.
4243
- * @function toJSON
4244
- * @memberof com.headspace.userdomain.grpc.user.events.UserUpdated
4245
- * @instance
4246
- * @returns {Object.<string,*>} JSON object
4247
- */
4248
- UserUpdated.prototype.toJSON = function toJSON() {
4249
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4250
- };
4251
-
4252
- return UserUpdated;
4253
- })();
4254
-
4255
- events.UserDeleted = (function() {
4256
-
4257
- /**
4258
- * Properties of a UserDeleted.
4259
- * @memberof com.headspace.userdomain.grpc.user.events
4260
- * @interface IUserDeleted
4261
- * @property {string|null} [hsId] UserDeleted hsId
4262
- * @property {number|Long|null} [deletedAt] UserDeleted deletedAt
4263
- */
4264
-
4265
- /**
4266
- * Constructs a new UserDeleted.
4267
- * @memberof com.headspace.userdomain.grpc.user.events
4268
- * @classdesc Represents a UserDeleted.
4269
- * @implements IUserDeleted
4270
- * @constructor
4271
- * @param {com.headspace.userdomain.grpc.user.events.IUserDeleted=} [properties] Properties to set
4272
- */
4273
- function UserDeleted(properties) {
4274
- if (properties)
4275
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4276
- if (properties[keys[i]] != null)
4277
- this[keys[i]] = properties[keys[i]];
4278
- }
4279
-
4280
- /**
4281
- * UserDeleted hsId.
4282
- * @member {string} hsId
4283
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4284
- * @instance
4285
- */
4286
- UserDeleted.prototype.hsId = "";
4287
-
4288
- /**
4289
- * UserDeleted deletedAt.
4290
- * @member {number|Long} deletedAt
4291
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4292
- * @instance
4293
- */
4294
- UserDeleted.prototype.deletedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4295
-
4296
- /**
4297
- * Creates a new UserDeleted instance using the specified properties.
4298
- * @function create
4299
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4300
- * @static
4301
- * @param {com.headspace.userdomain.grpc.user.events.IUserDeleted=} [properties] Properties to set
4302
- * @returns {com.headspace.userdomain.grpc.user.events.UserDeleted} UserDeleted instance
4303
- */
4304
- UserDeleted.create = function create(properties) {
4305
- return new UserDeleted(properties);
4306
- };
4307
-
4308
- /**
4309
- * Encodes the specified UserDeleted message. Does not implicitly {@link com.headspace.userdomain.grpc.user.events.UserDeleted.verify|verify} messages.
4310
- * @function encode
4311
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4312
- * @static
4313
- * @param {com.headspace.userdomain.grpc.user.events.IUserDeleted} message UserDeleted message or plain object to encode
4314
- * @param {$protobuf.Writer} [writer] Writer to encode to
4315
- * @returns {$protobuf.Writer} Writer
4316
- */
4317
- UserDeleted.encode = function encode(message, writer) {
4318
- if (!writer)
4319
- writer = $Writer.create();
4320
- if (message.hsId != null && message.hasOwnProperty("hsId"))
4321
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
4322
- if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
4323
- writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.deletedAt);
4324
- return writer;
4325
- };
4326
-
4327
- /**
4328
- * Encodes the specified UserDeleted message, length delimited. Does not implicitly {@link com.headspace.userdomain.grpc.user.events.UserDeleted.verify|verify} messages.
4329
- * @function encodeDelimited
4330
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4331
- * @static
4332
- * @param {com.headspace.userdomain.grpc.user.events.IUserDeleted} message UserDeleted message or plain object to encode
4333
- * @param {$protobuf.Writer} [writer] Writer to encode to
4334
- * @returns {$protobuf.Writer} Writer
4335
- */
4336
- UserDeleted.encodeDelimited = function encodeDelimited(message, writer) {
4337
- return this.encode(message, writer).ldelim();
4338
- };
4339
-
4340
- /**
4341
- * Decodes a UserDeleted message from the specified reader or buffer.
4342
- * @function decode
4343
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4344
- * @static
4345
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4346
- * @param {number} [length] Message length if known beforehand
4347
- * @returns {com.headspace.userdomain.grpc.user.events.UserDeleted} UserDeleted
4348
- * @throws {Error} If the payload is not a reader or valid buffer
4349
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4350
- */
4351
- UserDeleted.decode = function decode(reader, length) {
4352
- if (!(reader instanceof $Reader))
4353
- reader = $Reader.create(reader);
4354
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.com.headspace.userdomain.grpc.user.events.UserDeleted();
4355
- while (reader.pos < end) {
4356
- var tag = reader.uint32();
4357
- switch (tag >>> 3) {
4358
- case 1:
4359
- message.hsId = reader.string();
4360
- break;
4361
- case 2:
4362
- message.deletedAt = reader.uint64();
4363
- break;
4364
- default:
4365
- reader.skipType(tag & 7);
4366
- break;
4367
- }
4368
- }
4369
- return message;
4370
- };
4371
-
4372
- /**
4373
- * Decodes a UserDeleted message from the specified reader or buffer, length delimited.
4374
- * @function decodeDelimited
4375
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4376
- * @static
4377
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4378
- * @returns {com.headspace.userdomain.grpc.user.events.UserDeleted} UserDeleted
4379
- * @throws {Error} If the payload is not a reader or valid buffer
4380
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4381
- */
4382
- UserDeleted.decodeDelimited = function decodeDelimited(reader) {
4383
- if (!(reader instanceof $Reader))
4384
- reader = new $Reader(reader);
4385
- return this.decode(reader, reader.uint32());
4386
- };
4387
-
4388
- /**
4389
- * Verifies a UserDeleted message.
4390
- * @function verify
4391
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4392
- * @static
4393
- * @param {Object.<string,*>} message Plain object to verify
4394
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
4395
- */
4396
- UserDeleted.verify = function verify(message) {
4397
- if (typeof message !== "object" || message === null)
4398
- return "object expected";
4399
- if (message.hsId != null && message.hasOwnProperty("hsId"))
4400
- if (!$util.isString(message.hsId))
4401
- return "hsId: string expected";
4402
- if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
4403
- if (!$util.isInteger(message.deletedAt) && !(message.deletedAt && $util.isInteger(message.deletedAt.low) && $util.isInteger(message.deletedAt.high)))
4404
- return "deletedAt: integer|Long expected";
4405
- return null;
4406
- };
4407
-
4408
- /**
4409
- * Creates a UserDeleted message from a plain object. Also converts values to their respective internal types.
4410
- * @function fromObject
4411
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4412
- * @static
4413
- * @param {Object.<string,*>} object Plain object
4414
- * @returns {com.headspace.userdomain.grpc.user.events.UserDeleted} UserDeleted
4415
- */
4416
- UserDeleted.fromObject = function fromObject(object) {
4417
- if (object instanceof $root.com.headspace.userdomain.grpc.user.events.UserDeleted)
4418
- return object;
4419
- var message = new $root.com.headspace.userdomain.grpc.user.events.UserDeleted();
4420
- if (object.hsId != null)
4421
- message.hsId = String(object.hsId);
4422
- if (object.deletedAt != null)
4423
- if ($util.Long)
4424
- (message.deletedAt = $util.Long.fromValue(object.deletedAt)).unsigned = true;
4425
- else if (typeof object.deletedAt === "string")
4426
- message.deletedAt = parseInt(object.deletedAt, 10);
4427
- else if (typeof object.deletedAt === "number")
4428
- message.deletedAt = object.deletedAt;
4429
- else if (typeof object.deletedAt === "object")
4430
- message.deletedAt = new $util.LongBits(object.deletedAt.low >>> 0, object.deletedAt.high >>> 0).toNumber(true);
4431
- return message;
4432
- };
4433
-
4434
- /**
4435
- * Creates a plain object from a UserDeleted message. Also converts values to other types if specified.
4436
- * @function toObject
4437
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4438
- * @static
4439
- * @param {com.headspace.userdomain.grpc.user.events.UserDeleted} message UserDeleted
4440
- * @param {$protobuf.IConversionOptions} [options] Conversion options
4441
- * @returns {Object.<string,*>} Plain object
4442
- */
4443
- UserDeleted.toObject = function toObject(message, options) {
4444
- if (!options)
4445
- options = {};
4446
- var object = {};
4447
- if (options.defaults) {
4448
- object.hsId = "";
4449
- if ($util.Long) {
4450
- var long = new $util.Long(0, 0, true);
4451
- object.deletedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4452
- } else
4453
- object.deletedAt = options.longs === String ? "0" : 0;
4454
- }
4455
- if (message.hsId != null && message.hasOwnProperty("hsId"))
4456
- object.hsId = message.hsId;
4457
- if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
4458
- if (typeof message.deletedAt === "number")
4459
- object.deletedAt = options.longs === String ? String(message.deletedAt) : message.deletedAt;
4460
- else
4461
- object.deletedAt = options.longs === String ? $util.Long.prototype.toString.call(message.deletedAt) : options.longs === Number ? new $util.LongBits(message.deletedAt.low >>> 0, message.deletedAt.high >>> 0).toNumber(true) : message.deletedAt;
4462
- return object;
4463
- };
4464
-
4465
- /**
4466
- * Converts this UserDeleted to JSON.
4467
- * @function toJSON
4468
- * @memberof com.headspace.userdomain.grpc.user.events.UserDeleted
4469
- * @instance
4470
- * @returns {Object.<string,*>} JSON object
4471
- */
4472
- UserDeleted.prototype.toJSON = function toJSON() {
4473
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4474
- };
4475
-
4476
- return UserDeleted;
4477
- })();
4478
-
4479
- return events;
4480
- })();
4481
-
4482
- return user;
4483
- })();
4484
-
4485
- return grpc;
4486
- })();
4487
-
4488
- return userdomain;
4489
- })();
4490
-
4491
- return headspace;
2579
+ var userdomain = {};
2580
+
2581
+ userdomain.UserRole = (function() {
2582
+
2583
+ /**
2584
+ * Properties of a UserRole.
2585
+ * @memberof userdomain
2586
+ * @interface IUserRole
2587
+ * @property {Array.<userdomain.Role>|null} [roles] UserRole roles
2588
+ */
2589
+
2590
+ /**
2591
+ * Constructs a new UserRole.
2592
+ * @memberof userdomain
2593
+ * @classdesc Represents a UserRole.
2594
+ * @implements IUserRole
2595
+ * @constructor
2596
+ * @param {userdomain.IUserRole=} [properties] Properties to set
2597
+ */
2598
+ function UserRole(properties) {
2599
+ this.roles = [];
2600
+ if (properties)
2601
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2602
+ if (properties[keys[i]] != null)
2603
+ this[keys[i]] = properties[keys[i]];
2604
+ }
2605
+
2606
+ /**
2607
+ * UserRole roles.
2608
+ * @member {Array.<userdomain.Role>} roles
2609
+ * @memberof userdomain.UserRole
2610
+ * @instance
2611
+ */
2612
+ UserRole.prototype.roles = $util.emptyArray;
2613
+
2614
+ /**
2615
+ * Creates a new UserRole instance using the specified properties.
2616
+ * @function create
2617
+ * @memberof userdomain.UserRole
2618
+ * @static
2619
+ * @param {userdomain.IUserRole=} [properties] Properties to set
2620
+ * @returns {userdomain.UserRole} UserRole instance
2621
+ */
2622
+ UserRole.create = function create(properties) {
2623
+ return new UserRole(properties);
2624
+ };
2625
+
2626
+ /**
2627
+ * Encodes the specified UserRole message. Does not implicitly {@link userdomain.UserRole.verify|verify} messages.
2628
+ * @function encode
2629
+ * @memberof userdomain.UserRole
2630
+ * @static
2631
+ * @param {userdomain.IUserRole} message UserRole message or plain object to encode
2632
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2633
+ * @returns {$protobuf.Writer} Writer
2634
+ */
2635
+ UserRole.encode = function encode(message, writer) {
2636
+ if (!writer)
2637
+ writer = $Writer.create();
2638
+ if (message.roles != null && message.roles.length) {
2639
+ writer.uint32(/* id 1, wireType 2 =*/10).fork();
2640
+ for (var i = 0; i < message.roles.length; ++i)
2641
+ writer.int32(message.roles[i]);
2642
+ writer.ldelim();
2643
+ }
2644
+ return writer;
2645
+ };
2646
+
2647
+ /**
2648
+ * Encodes the specified UserRole message, length delimited. Does not implicitly {@link userdomain.UserRole.verify|verify} messages.
2649
+ * @function encodeDelimited
2650
+ * @memberof userdomain.UserRole
2651
+ * @static
2652
+ * @param {userdomain.IUserRole} message UserRole message or plain object to encode
2653
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2654
+ * @returns {$protobuf.Writer} Writer
2655
+ */
2656
+ UserRole.encodeDelimited = function encodeDelimited(message, writer) {
2657
+ return this.encode(message, writer).ldelim();
2658
+ };
2659
+
2660
+ /**
2661
+ * Decodes a UserRole message from the specified reader or buffer.
2662
+ * @function decode
2663
+ * @memberof userdomain.UserRole
2664
+ * @static
2665
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2666
+ * @param {number} [length] Message length if known beforehand
2667
+ * @returns {userdomain.UserRole} UserRole
2668
+ * @throws {Error} If the payload is not a reader or valid buffer
2669
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2670
+ */
2671
+ UserRole.decode = function decode(reader, length) {
2672
+ if (!(reader instanceof $Reader))
2673
+ reader = $Reader.create(reader);
2674
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.userdomain.UserRole();
2675
+ while (reader.pos < end) {
2676
+ var tag = reader.uint32();
2677
+ switch (tag >>> 3) {
2678
+ case 1:
2679
+ if (!(message.roles && message.roles.length))
2680
+ message.roles = [];
2681
+ if ((tag & 7) === 2) {
2682
+ var end2 = reader.uint32() + reader.pos;
2683
+ while (reader.pos < end2)
2684
+ message.roles.push(reader.int32());
2685
+ } else
2686
+ message.roles.push(reader.int32());
2687
+ break;
2688
+ default:
2689
+ reader.skipType(tag & 7);
2690
+ break;
2691
+ }
2692
+ }
2693
+ return message;
2694
+ };
2695
+
2696
+ /**
2697
+ * Decodes a UserRole message from the specified reader or buffer, length delimited.
2698
+ * @function decodeDelimited
2699
+ * @memberof userdomain.UserRole
2700
+ * @static
2701
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2702
+ * @returns {userdomain.UserRole} UserRole
2703
+ * @throws {Error} If the payload is not a reader or valid buffer
2704
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2705
+ */
2706
+ UserRole.decodeDelimited = function decodeDelimited(reader) {
2707
+ if (!(reader instanceof $Reader))
2708
+ reader = new $Reader(reader);
2709
+ return this.decode(reader, reader.uint32());
2710
+ };
2711
+
2712
+ /**
2713
+ * Verifies a UserRole message.
2714
+ * @function verify
2715
+ * @memberof userdomain.UserRole
2716
+ * @static
2717
+ * @param {Object.<string,*>} message Plain object to verify
2718
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2719
+ */
2720
+ UserRole.verify = function verify(message) {
2721
+ if (typeof message !== "object" || message === null)
2722
+ return "object expected";
2723
+ if (message.roles != null && message.hasOwnProperty("roles")) {
2724
+ if (!Array.isArray(message.roles))
2725
+ return "roles: array expected";
2726
+ for (var i = 0; i < message.roles.length; ++i)
2727
+ switch (message.roles[i]) {
2728
+ default:
2729
+ return "roles: enum value[] expected";
2730
+ case 0:
2731
+ case 1:
2732
+ case 2:
2733
+ case 3:
2734
+ case 4:
2735
+ case 5:
2736
+ case 6:
2737
+ break;
2738
+ }
2739
+ }
2740
+ return null;
2741
+ };
2742
+
2743
+ /**
2744
+ * Creates a UserRole message from a plain object. Also converts values to their respective internal types.
2745
+ * @function fromObject
2746
+ * @memberof userdomain.UserRole
2747
+ * @static
2748
+ * @param {Object.<string,*>} object Plain object
2749
+ * @returns {userdomain.UserRole} UserRole
2750
+ */
2751
+ UserRole.fromObject = function fromObject(object) {
2752
+ if (object instanceof $root.userdomain.UserRole)
2753
+ return object;
2754
+ var message = new $root.userdomain.UserRole();
2755
+ if (object.roles) {
2756
+ if (!Array.isArray(object.roles))
2757
+ throw TypeError(".userdomain.UserRole.roles: array expected");
2758
+ message.roles = [];
2759
+ for (var i = 0; i < object.roles.length; ++i)
2760
+ switch (object.roles[i]) {
2761
+ default:
2762
+ case "UNKNOWN_ROLE":
2763
+ case 0:
2764
+ message.roles[i] = 0;
2765
+ break;
2766
+ case "ROLEADMIN":
2767
+ case 1:
2768
+ message.roles[i] = 1;
2769
+ break;
2770
+ case "NORMALUSER":
2771
+ case 2:
2772
+ message.roles[i] = 2;
2773
+ break;
2774
+ case "CONTENTADMIN":
2775
+ case 3:
2776
+ message.roles[i] = 3;
2777
+ break;
2778
+ case "USERADMIN":
2779
+ case 4:
2780
+ message.roles[i] = 4;
2781
+ break;
2782
+ case "CORPORATEADMIN":
2783
+ case 5:
2784
+ message.roles[i] = 5;
2785
+ break;
2786
+ case "SPECIALADMIN":
2787
+ case 6:
2788
+ message.roles[i] = 6;
2789
+ break;
2790
+ }
2791
+ }
2792
+ return message;
2793
+ };
2794
+
2795
+ /**
2796
+ * Creates a plain object from a UserRole message. Also converts values to other types if specified.
2797
+ * @function toObject
2798
+ * @memberof userdomain.UserRole
2799
+ * @static
2800
+ * @param {userdomain.UserRole} message UserRole
2801
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2802
+ * @returns {Object.<string,*>} Plain object
2803
+ */
2804
+ UserRole.toObject = function toObject(message, options) {
2805
+ if (!options)
2806
+ options = {};
2807
+ var object = {};
2808
+ if (options.arrays || options.defaults)
2809
+ object.roles = [];
2810
+ if (message.roles && message.roles.length) {
2811
+ object.roles = [];
2812
+ for (var j = 0; j < message.roles.length; ++j)
2813
+ object.roles[j] = options.enums === String ? $root.userdomain.Role[message.roles[j]] : message.roles[j];
2814
+ }
2815
+ return object;
2816
+ };
2817
+
2818
+ /**
2819
+ * Converts this UserRole to JSON.
2820
+ * @function toJSON
2821
+ * @memberof userdomain.UserRole
2822
+ * @instance
2823
+ * @returns {Object.<string,*>} JSON object
2824
+ */
2825
+ UserRole.prototype.toJSON = function toJSON() {
2826
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2827
+ };
2828
+
2829
+ return UserRole;
2830
+ })();
2831
+
2832
+ /**
2833
+ * Role enum.
2834
+ * @name userdomain.Role
2835
+ * @enum {string}
2836
+ * @property {number} UNKNOWN_ROLE=0 UNKNOWN_ROLE value
2837
+ * @property {number} ROLEADMIN=1 ROLEADMIN value
2838
+ * @property {number} NORMALUSER=2 NORMALUSER value
2839
+ * @property {number} CONTENTADMIN=3 CONTENTADMIN value
2840
+ * @property {number} USERADMIN=4 USERADMIN value
2841
+ * @property {number} CORPORATEADMIN=5 CORPORATEADMIN value
2842
+ * @property {number} SPECIALADMIN=6 SPECIALADMIN value
2843
+ */
2844
+ userdomain.Role = (function() {
2845
+ var valuesById = {}, values = Object.create(valuesById);
2846
+ values[valuesById[0] = "UNKNOWN_ROLE"] = 0;
2847
+ values[valuesById[1] = "ROLEADMIN"] = 1;
2848
+ values[valuesById[2] = "NORMALUSER"] = 2;
2849
+ values[valuesById[3] = "CONTENTADMIN"] = 3;
2850
+ values[valuesById[4] = "USERADMIN"] = 4;
2851
+ values[valuesById[5] = "CORPORATEADMIN"] = 5;
2852
+ values[valuesById[6] = "SPECIALADMIN"] = 6;
2853
+ return values;
4492
2854
  })();
4493
2855
 
4494
- return com;
2856
+ userdomain.User = (function() {
2857
+
2858
+ /**
2859
+ * Properties of a User.
2860
+ * @memberof userdomain
2861
+ * @interface IUser
2862
+ * @property {string|null} [hsId] User hsId
2863
+ * @property {string|null} [auth0Id] User auth0Id
2864
+ * @property {string|null} [firstName] User firstName
2865
+ * @property {string|null} [lastName] User lastName
2866
+ * @property {string|null} [email] User email
2867
+ * @property {string|null} [countryCode] User countryCode
2868
+ * @property {string|null} [stateCode] User stateCode
2869
+ * @property {userdomain.Platform|null} [signupPlatform] User signupPlatform
2870
+ */
2871
+
2872
+ /**
2873
+ * Constructs a new User.
2874
+ * @memberof userdomain
2875
+ * @classdesc Represents a User.
2876
+ * @implements IUser
2877
+ * @constructor
2878
+ * @param {userdomain.IUser=} [properties] Properties to set
2879
+ */
2880
+ function User(properties) {
2881
+ if (properties)
2882
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2883
+ if (properties[keys[i]] != null)
2884
+ this[keys[i]] = properties[keys[i]];
2885
+ }
2886
+
2887
+ /**
2888
+ * User hsId.
2889
+ * @member {string} hsId
2890
+ * @memberof userdomain.User
2891
+ * @instance
2892
+ */
2893
+ User.prototype.hsId = "";
2894
+
2895
+ /**
2896
+ * User auth0Id.
2897
+ * @member {string} auth0Id
2898
+ * @memberof userdomain.User
2899
+ * @instance
2900
+ */
2901
+ User.prototype.auth0Id = "";
2902
+
2903
+ /**
2904
+ * User firstName.
2905
+ * @member {string} firstName
2906
+ * @memberof userdomain.User
2907
+ * @instance
2908
+ */
2909
+ User.prototype.firstName = "";
2910
+
2911
+ /**
2912
+ * User lastName.
2913
+ * @member {string} lastName
2914
+ * @memberof userdomain.User
2915
+ * @instance
2916
+ */
2917
+ User.prototype.lastName = "";
2918
+
2919
+ /**
2920
+ * User email.
2921
+ * @member {string} email
2922
+ * @memberof userdomain.User
2923
+ * @instance
2924
+ */
2925
+ User.prototype.email = "";
2926
+
2927
+ /**
2928
+ * User countryCode.
2929
+ * @member {string} countryCode
2930
+ * @memberof userdomain.User
2931
+ * @instance
2932
+ */
2933
+ User.prototype.countryCode = "";
2934
+
2935
+ /**
2936
+ * User stateCode.
2937
+ * @member {string} stateCode
2938
+ * @memberof userdomain.User
2939
+ * @instance
2940
+ */
2941
+ User.prototype.stateCode = "";
2942
+
2943
+ /**
2944
+ * User signupPlatform.
2945
+ * @member {userdomain.Platform} signupPlatform
2946
+ * @memberof userdomain.User
2947
+ * @instance
2948
+ */
2949
+ User.prototype.signupPlatform = 0;
2950
+
2951
+ /**
2952
+ * Creates a new User instance using the specified properties.
2953
+ * @function create
2954
+ * @memberof userdomain.User
2955
+ * @static
2956
+ * @param {userdomain.IUser=} [properties] Properties to set
2957
+ * @returns {userdomain.User} User instance
2958
+ */
2959
+ User.create = function create(properties) {
2960
+ return new User(properties);
2961
+ };
2962
+
2963
+ /**
2964
+ * Encodes the specified User message. Does not implicitly {@link userdomain.User.verify|verify} messages.
2965
+ * @function encode
2966
+ * @memberof userdomain.User
2967
+ * @static
2968
+ * @param {userdomain.IUser} message User message or plain object to encode
2969
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2970
+ * @returns {$protobuf.Writer} Writer
2971
+ */
2972
+ User.encode = function encode(message, writer) {
2973
+ if (!writer)
2974
+ writer = $Writer.create();
2975
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
2976
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
2977
+ if (message.auth0Id != null && message.hasOwnProperty("auth0Id"))
2978
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.auth0Id);
2979
+ if (message.firstName != null && message.hasOwnProperty("firstName"))
2980
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.firstName);
2981
+ if (message.lastName != null && message.hasOwnProperty("lastName"))
2982
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.lastName);
2983
+ if (message.email != null && message.hasOwnProperty("email"))
2984
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.email);
2985
+ if (message.countryCode != null && message.hasOwnProperty("countryCode"))
2986
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.countryCode);
2987
+ if (message.stateCode != null && message.hasOwnProperty("stateCode"))
2988
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateCode);
2989
+ if (message.signupPlatform != null && message.hasOwnProperty("signupPlatform"))
2990
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.signupPlatform);
2991
+ return writer;
2992
+ };
2993
+
2994
+ /**
2995
+ * Encodes the specified User message, length delimited. Does not implicitly {@link userdomain.User.verify|verify} messages.
2996
+ * @function encodeDelimited
2997
+ * @memberof userdomain.User
2998
+ * @static
2999
+ * @param {userdomain.IUser} message User message or plain object to encode
3000
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3001
+ * @returns {$protobuf.Writer} Writer
3002
+ */
3003
+ User.encodeDelimited = function encodeDelimited(message, writer) {
3004
+ return this.encode(message, writer).ldelim();
3005
+ };
3006
+
3007
+ /**
3008
+ * Decodes a User message from the specified reader or buffer.
3009
+ * @function decode
3010
+ * @memberof userdomain.User
3011
+ * @static
3012
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3013
+ * @param {number} [length] Message length if known beforehand
3014
+ * @returns {userdomain.User} User
3015
+ * @throws {Error} If the payload is not a reader or valid buffer
3016
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3017
+ */
3018
+ User.decode = function decode(reader, length) {
3019
+ if (!(reader instanceof $Reader))
3020
+ reader = $Reader.create(reader);
3021
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.userdomain.User();
3022
+ while (reader.pos < end) {
3023
+ var tag = reader.uint32();
3024
+ switch (tag >>> 3) {
3025
+ case 1:
3026
+ message.hsId = reader.string();
3027
+ break;
3028
+ case 2:
3029
+ message.auth0Id = reader.string();
3030
+ break;
3031
+ case 3:
3032
+ message.firstName = reader.string();
3033
+ break;
3034
+ case 4:
3035
+ message.lastName = reader.string();
3036
+ break;
3037
+ case 5:
3038
+ message.email = reader.string();
3039
+ break;
3040
+ case 6:
3041
+ message.countryCode = reader.string();
3042
+ break;
3043
+ case 7:
3044
+ message.stateCode = reader.string();
3045
+ break;
3046
+ case 8:
3047
+ message.signupPlatform = reader.int32();
3048
+ break;
3049
+ default:
3050
+ reader.skipType(tag & 7);
3051
+ break;
3052
+ }
3053
+ }
3054
+ return message;
3055
+ };
3056
+
3057
+ /**
3058
+ * Decodes a User message from the specified reader or buffer, length delimited.
3059
+ * @function decodeDelimited
3060
+ * @memberof userdomain.User
3061
+ * @static
3062
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3063
+ * @returns {userdomain.User} User
3064
+ * @throws {Error} If the payload is not a reader or valid buffer
3065
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3066
+ */
3067
+ User.decodeDelimited = function decodeDelimited(reader) {
3068
+ if (!(reader instanceof $Reader))
3069
+ reader = new $Reader(reader);
3070
+ return this.decode(reader, reader.uint32());
3071
+ };
3072
+
3073
+ /**
3074
+ * Verifies a User message.
3075
+ * @function verify
3076
+ * @memberof userdomain.User
3077
+ * @static
3078
+ * @param {Object.<string,*>} message Plain object to verify
3079
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3080
+ */
3081
+ User.verify = function verify(message) {
3082
+ if (typeof message !== "object" || message === null)
3083
+ return "object expected";
3084
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3085
+ if (!$util.isString(message.hsId))
3086
+ return "hsId: string expected";
3087
+ if (message.auth0Id != null && message.hasOwnProperty("auth0Id"))
3088
+ if (!$util.isString(message.auth0Id))
3089
+ return "auth0Id: string expected";
3090
+ if (message.firstName != null && message.hasOwnProperty("firstName"))
3091
+ if (!$util.isString(message.firstName))
3092
+ return "firstName: string expected";
3093
+ if (message.lastName != null && message.hasOwnProperty("lastName"))
3094
+ if (!$util.isString(message.lastName))
3095
+ return "lastName: string expected";
3096
+ if (message.email != null && message.hasOwnProperty("email"))
3097
+ if (!$util.isString(message.email))
3098
+ return "email: string expected";
3099
+ if (message.countryCode != null && message.hasOwnProperty("countryCode"))
3100
+ if (!$util.isString(message.countryCode))
3101
+ return "countryCode: string expected";
3102
+ if (message.stateCode != null && message.hasOwnProperty("stateCode"))
3103
+ if (!$util.isString(message.stateCode))
3104
+ return "stateCode: string expected";
3105
+ if (message.signupPlatform != null && message.hasOwnProperty("signupPlatform"))
3106
+ switch (message.signupPlatform) {
3107
+ default:
3108
+ return "signupPlatform: enum value expected";
3109
+ case 0:
3110
+ case 1:
3111
+ case 2:
3112
+ case 3:
3113
+ case 4:
3114
+ case 5:
3115
+ break;
3116
+ }
3117
+ return null;
3118
+ };
3119
+
3120
+ /**
3121
+ * Creates a User message from a plain object. Also converts values to their respective internal types.
3122
+ * @function fromObject
3123
+ * @memberof userdomain.User
3124
+ * @static
3125
+ * @param {Object.<string,*>} object Plain object
3126
+ * @returns {userdomain.User} User
3127
+ */
3128
+ User.fromObject = function fromObject(object) {
3129
+ if (object instanceof $root.userdomain.User)
3130
+ return object;
3131
+ var message = new $root.userdomain.User();
3132
+ if (object.hsId != null)
3133
+ message.hsId = String(object.hsId);
3134
+ if (object.auth0Id != null)
3135
+ message.auth0Id = String(object.auth0Id);
3136
+ if (object.firstName != null)
3137
+ message.firstName = String(object.firstName);
3138
+ if (object.lastName != null)
3139
+ message.lastName = String(object.lastName);
3140
+ if (object.email != null)
3141
+ message.email = String(object.email);
3142
+ if (object.countryCode != null)
3143
+ message.countryCode = String(object.countryCode);
3144
+ if (object.stateCode != null)
3145
+ message.stateCode = String(object.stateCode);
3146
+ switch (object.signupPlatform) {
3147
+ case "UNKNOWN_PLATFORM":
3148
+ case 0:
3149
+ message.signupPlatform = 0;
3150
+ break;
3151
+ case "DESKTOP":
3152
+ case 1:
3153
+ message.signupPlatform = 1;
3154
+ break;
3155
+ case "IOS":
3156
+ case 2:
3157
+ message.signupPlatform = 2;
3158
+ break;
3159
+ case "ANDROID":
3160
+ case 3:
3161
+ message.signupPlatform = 3;
3162
+ break;
3163
+ case "ALEXA":
3164
+ case 4:
3165
+ message.signupPlatform = 4;
3166
+ break;
3167
+ case "GOOGLE_ASSISTANT":
3168
+ case 5:
3169
+ message.signupPlatform = 5;
3170
+ break;
3171
+ }
3172
+ return message;
3173
+ };
3174
+
3175
+ /**
3176
+ * Creates a plain object from a User message. Also converts values to other types if specified.
3177
+ * @function toObject
3178
+ * @memberof userdomain.User
3179
+ * @static
3180
+ * @param {userdomain.User} message User
3181
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3182
+ * @returns {Object.<string,*>} Plain object
3183
+ */
3184
+ User.toObject = function toObject(message, options) {
3185
+ if (!options)
3186
+ options = {};
3187
+ var object = {};
3188
+ if (options.defaults) {
3189
+ object.hsId = "";
3190
+ object.auth0Id = "";
3191
+ object.firstName = "";
3192
+ object.lastName = "";
3193
+ object.email = "";
3194
+ object.countryCode = "";
3195
+ object.stateCode = "";
3196
+ object.signupPlatform = options.enums === String ? "UNKNOWN_PLATFORM" : 0;
3197
+ }
3198
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3199
+ object.hsId = message.hsId;
3200
+ if (message.auth0Id != null && message.hasOwnProperty("auth0Id"))
3201
+ object.auth0Id = message.auth0Id;
3202
+ if (message.firstName != null && message.hasOwnProperty("firstName"))
3203
+ object.firstName = message.firstName;
3204
+ if (message.lastName != null && message.hasOwnProperty("lastName"))
3205
+ object.lastName = message.lastName;
3206
+ if (message.email != null && message.hasOwnProperty("email"))
3207
+ object.email = message.email;
3208
+ if (message.countryCode != null && message.hasOwnProperty("countryCode"))
3209
+ object.countryCode = message.countryCode;
3210
+ if (message.stateCode != null && message.hasOwnProperty("stateCode"))
3211
+ object.stateCode = message.stateCode;
3212
+ if (message.signupPlatform != null && message.hasOwnProperty("signupPlatform"))
3213
+ object.signupPlatform = options.enums === String ? $root.userdomain.Platform[message.signupPlatform] : message.signupPlatform;
3214
+ return object;
3215
+ };
3216
+
3217
+ /**
3218
+ * Converts this User to JSON.
3219
+ * @function toJSON
3220
+ * @memberof userdomain.User
3221
+ * @instance
3222
+ * @returns {Object.<string,*>} JSON object
3223
+ */
3224
+ User.prototype.toJSON = function toJSON() {
3225
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3226
+ };
3227
+
3228
+ return User;
3229
+ })();
3230
+
3231
+ /**
3232
+ * Platform enum.
3233
+ * @name userdomain.Platform
3234
+ * @enum {string}
3235
+ * @property {number} UNKNOWN_PLATFORM=0 UNKNOWN_PLATFORM value
3236
+ * @property {number} DESKTOP=1 DESKTOP value
3237
+ * @property {number} IOS=2 IOS value
3238
+ * @property {number} ANDROID=3 ANDROID value
3239
+ * @property {number} ALEXA=4 ALEXA value
3240
+ * @property {number} GOOGLE_ASSISTANT=5 GOOGLE_ASSISTANT value
3241
+ */
3242
+ userdomain.Platform = (function() {
3243
+ var valuesById = {}, values = Object.create(valuesById);
3244
+ values[valuesById[0] = "UNKNOWN_PLATFORM"] = 0;
3245
+ values[valuesById[1] = "DESKTOP"] = 1;
3246
+ values[valuesById[2] = "IOS"] = 2;
3247
+ values[valuesById[3] = "ANDROID"] = 3;
3248
+ values[valuesById[4] = "ALEXA"] = 4;
3249
+ values[valuesById[5] = "GOOGLE_ASSISTANT"] = 5;
3250
+ return values;
3251
+ })();
3252
+
3253
+ return userdomain;
3254
+ })();
3255
+
3256
+ $root.UserRoleUpdated = (function() {
3257
+
3258
+ /**
3259
+ * Properties of a UserRoleUpdated.
3260
+ * @exports IUserRoleUpdated
3261
+ * @interface IUserRoleUpdated
3262
+ * @property {string|null} [hsId] UserRoleUpdated hsId
3263
+ * @property {userdomain.IUserRole|null} [userRole] UserRoleUpdated userRole
3264
+ * @property {number|Long|null} [updatedAt] UserRoleUpdated updatedAt
3265
+ */
3266
+
3267
+ /**
3268
+ * Constructs a new UserRoleUpdated.
3269
+ * @exports UserRoleUpdated
3270
+ * @classdesc Represents a UserRoleUpdated.
3271
+ * @implements IUserRoleUpdated
3272
+ * @constructor
3273
+ * @param {IUserRoleUpdated=} [properties] Properties to set
3274
+ */
3275
+ function UserRoleUpdated(properties) {
3276
+ if (properties)
3277
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3278
+ if (properties[keys[i]] != null)
3279
+ this[keys[i]] = properties[keys[i]];
3280
+ }
3281
+
3282
+ /**
3283
+ * UserRoleUpdated hsId.
3284
+ * @member {string} hsId
3285
+ * @memberof UserRoleUpdated
3286
+ * @instance
3287
+ */
3288
+ UserRoleUpdated.prototype.hsId = "";
3289
+
3290
+ /**
3291
+ * UserRoleUpdated userRole.
3292
+ * @member {userdomain.IUserRole|null|undefined} userRole
3293
+ * @memberof UserRoleUpdated
3294
+ * @instance
3295
+ */
3296
+ UserRoleUpdated.prototype.userRole = null;
3297
+
3298
+ /**
3299
+ * UserRoleUpdated updatedAt.
3300
+ * @member {number|Long} updatedAt
3301
+ * @memberof UserRoleUpdated
3302
+ * @instance
3303
+ */
3304
+ UserRoleUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3305
+
3306
+ /**
3307
+ * Creates a new UserRoleUpdated instance using the specified properties.
3308
+ * @function create
3309
+ * @memberof UserRoleUpdated
3310
+ * @static
3311
+ * @param {IUserRoleUpdated=} [properties] Properties to set
3312
+ * @returns {UserRoleUpdated} UserRoleUpdated instance
3313
+ */
3314
+ UserRoleUpdated.create = function create(properties) {
3315
+ return new UserRoleUpdated(properties);
3316
+ };
3317
+
3318
+ /**
3319
+ * Encodes the specified UserRoleUpdated message. Does not implicitly {@link UserRoleUpdated.verify|verify} messages.
3320
+ * @function encode
3321
+ * @memberof UserRoleUpdated
3322
+ * @static
3323
+ * @param {IUserRoleUpdated} message UserRoleUpdated message or plain object to encode
3324
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3325
+ * @returns {$protobuf.Writer} Writer
3326
+ */
3327
+ UserRoleUpdated.encode = function encode(message, writer) {
3328
+ if (!writer)
3329
+ writer = $Writer.create();
3330
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3331
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
3332
+ if (message.userRole != null && message.hasOwnProperty("userRole"))
3333
+ $root.userdomain.UserRole.encode(message.userRole, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
3334
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3335
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.updatedAt);
3336
+ return writer;
3337
+ };
3338
+
3339
+ /**
3340
+ * Encodes the specified UserRoleUpdated message, length delimited. Does not implicitly {@link UserRoleUpdated.verify|verify} messages.
3341
+ * @function encodeDelimited
3342
+ * @memberof UserRoleUpdated
3343
+ * @static
3344
+ * @param {IUserRoleUpdated} message UserRoleUpdated message or plain object to encode
3345
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3346
+ * @returns {$protobuf.Writer} Writer
3347
+ */
3348
+ UserRoleUpdated.encodeDelimited = function encodeDelimited(message, writer) {
3349
+ return this.encode(message, writer).ldelim();
3350
+ };
3351
+
3352
+ /**
3353
+ * Decodes a UserRoleUpdated message from the specified reader or buffer.
3354
+ * @function decode
3355
+ * @memberof UserRoleUpdated
3356
+ * @static
3357
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3358
+ * @param {number} [length] Message length if known beforehand
3359
+ * @returns {UserRoleUpdated} UserRoleUpdated
3360
+ * @throws {Error} If the payload is not a reader or valid buffer
3361
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3362
+ */
3363
+ UserRoleUpdated.decode = function decode(reader, length) {
3364
+ if (!(reader instanceof $Reader))
3365
+ reader = $Reader.create(reader);
3366
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserRoleUpdated();
3367
+ while (reader.pos < end) {
3368
+ var tag = reader.uint32();
3369
+ switch (tag >>> 3) {
3370
+ case 1:
3371
+ message.hsId = reader.string();
3372
+ break;
3373
+ case 2:
3374
+ message.userRole = $root.userdomain.UserRole.decode(reader, reader.uint32());
3375
+ break;
3376
+ case 3:
3377
+ message.updatedAt = reader.uint64();
3378
+ break;
3379
+ default:
3380
+ reader.skipType(tag & 7);
3381
+ break;
3382
+ }
3383
+ }
3384
+ return message;
3385
+ };
3386
+
3387
+ /**
3388
+ * Decodes a UserRoleUpdated message from the specified reader or buffer, length delimited.
3389
+ * @function decodeDelimited
3390
+ * @memberof UserRoleUpdated
3391
+ * @static
3392
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3393
+ * @returns {UserRoleUpdated} UserRoleUpdated
3394
+ * @throws {Error} If the payload is not a reader or valid buffer
3395
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3396
+ */
3397
+ UserRoleUpdated.decodeDelimited = function decodeDelimited(reader) {
3398
+ if (!(reader instanceof $Reader))
3399
+ reader = new $Reader(reader);
3400
+ return this.decode(reader, reader.uint32());
3401
+ };
3402
+
3403
+ /**
3404
+ * Verifies a UserRoleUpdated message.
3405
+ * @function verify
3406
+ * @memberof UserRoleUpdated
3407
+ * @static
3408
+ * @param {Object.<string,*>} message Plain object to verify
3409
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3410
+ */
3411
+ UserRoleUpdated.verify = function verify(message) {
3412
+ if (typeof message !== "object" || message === null)
3413
+ return "object expected";
3414
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3415
+ if (!$util.isString(message.hsId))
3416
+ return "hsId: string expected";
3417
+ if (message.userRole != null && message.hasOwnProperty("userRole")) {
3418
+ var error = $root.userdomain.UserRole.verify(message.userRole);
3419
+ if (error)
3420
+ return "userRole." + error;
3421
+ }
3422
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3423
+ if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
3424
+ return "updatedAt: integer|Long expected";
3425
+ return null;
3426
+ };
3427
+
3428
+ /**
3429
+ * Creates a UserRoleUpdated message from a plain object. Also converts values to their respective internal types.
3430
+ * @function fromObject
3431
+ * @memberof UserRoleUpdated
3432
+ * @static
3433
+ * @param {Object.<string,*>} object Plain object
3434
+ * @returns {UserRoleUpdated} UserRoleUpdated
3435
+ */
3436
+ UserRoleUpdated.fromObject = function fromObject(object) {
3437
+ if (object instanceof $root.UserRoleUpdated)
3438
+ return object;
3439
+ var message = new $root.UserRoleUpdated();
3440
+ if (object.hsId != null)
3441
+ message.hsId = String(object.hsId);
3442
+ if (object.userRole != null) {
3443
+ if (typeof object.userRole !== "object")
3444
+ throw TypeError(".UserRoleUpdated.userRole: object expected");
3445
+ message.userRole = $root.userdomain.UserRole.fromObject(object.userRole);
3446
+ }
3447
+ if (object.updatedAt != null)
3448
+ if ($util.Long)
3449
+ (message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
3450
+ else if (typeof object.updatedAt === "string")
3451
+ message.updatedAt = parseInt(object.updatedAt, 10);
3452
+ else if (typeof object.updatedAt === "number")
3453
+ message.updatedAt = object.updatedAt;
3454
+ else if (typeof object.updatedAt === "object")
3455
+ message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
3456
+ return message;
3457
+ };
3458
+
3459
+ /**
3460
+ * Creates a plain object from a UserRoleUpdated message. Also converts values to other types if specified.
3461
+ * @function toObject
3462
+ * @memberof UserRoleUpdated
3463
+ * @static
3464
+ * @param {UserRoleUpdated} message UserRoleUpdated
3465
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3466
+ * @returns {Object.<string,*>} Plain object
3467
+ */
3468
+ UserRoleUpdated.toObject = function toObject(message, options) {
3469
+ if (!options)
3470
+ options = {};
3471
+ var object = {};
3472
+ if (options.defaults) {
3473
+ object.hsId = "";
3474
+ object.userRole = null;
3475
+ if ($util.Long) {
3476
+ var long = new $util.Long(0, 0, true);
3477
+ object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3478
+ } else
3479
+ object.updatedAt = options.longs === String ? "0" : 0;
3480
+ }
3481
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3482
+ object.hsId = message.hsId;
3483
+ if (message.userRole != null && message.hasOwnProperty("userRole"))
3484
+ object.userRole = $root.userdomain.UserRole.toObject(message.userRole, options);
3485
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3486
+ if (typeof message.updatedAt === "number")
3487
+ object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
3488
+ else
3489
+ object.updatedAt = options.longs === String ? $util.Long.prototype.toString.call(message.updatedAt) : options.longs === Number ? new $util.LongBits(message.updatedAt.low >>> 0, message.updatedAt.high >>> 0).toNumber(true) : message.updatedAt;
3490
+ return object;
3491
+ };
3492
+
3493
+ /**
3494
+ * Converts this UserRoleUpdated to JSON.
3495
+ * @function toJSON
3496
+ * @memberof UserRoleUpdated
3497
+ * @instance
3498
+ * @returns {Object.<string,*>} JSON object
3499
+ */
3500
+ UserRoleUpdated.prototype.toJSON = function toJSON() {
3501
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3502
+ };
3503
+
3504
+ return UserRoleUpdated;
3505
+ })();
3506
+
3507
+ $root.UserCreated = (function() {
3508
+
3509
+ /**
3510
+ * Properties of a UserCreated.
3511
+ * @exports IUserCreated
3512
+ * @interface IUserCreated
3513
+ * @property {userdomain.IUser|null} [user] UserCreated user
3514
+ * @property {number|Long|null} [createdAt] UserCreated createdAt
3515
+ */
3516
+
3517
+ /**
3518
+ * Constructs a new UserCreated.
3519
+ * @exports UserCreated
3520
+ * @classdesc Represents a UserCreated.
3521
+ * @implements IUserCreated
3522
+ * @constructor
3523
+ * @param {IUserCreated=} [properties] Properties to set
3524
+ */
3525
+ function UserCreated(properties) {
3526
+ if (properties)
3527
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3528
+ if (properties[keys[i]] != null)
3529
+ this[keys[i]] = properties[keys[i]];
3530
+ }
3531
+
3532
+ /**
3533
+ * UserCreated user.
3534
+ * @member {userdomain.IUser|null|undefined} user
3535
+ * @memberof UserCreated
3536
+ * @instance
3537
+ */
3538
+ UserCreated.prototype.user = null;
3539
+
3540
+ /**
3541
+ * UserCreated createdAt.
3542
+ * @member {number|Long} createdAt
3543
+ * @memberof UserCreated
3544
+ * @instance
3545
+ */
3546
+ UserCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3547
+
3548
+ /**
3549
+ * Creates a new UserCreated instance using the specified properties.
3550
+ * @function create
3551
+ * @memberof UserCreated
3552
+ * @static
3553
+ * @param {IUserCreated=} [properties] Properties to set
3554
+ * @returns {UserCreated} UserCreated instance
3555
+ */
3556
+ UserCreated.create = function create(properties) {
3557
+ return new UserCreated(properties);
3558
+ };
3559
+
3560
+ /**
3561
+ * Encodes the specified UserCreated message. Does not implicitly {@link UserCreated.verify|verify} messages.
3562
+ * @function encode
3563
+ * @memberof UserCreated
3564
+ * @static
3565
+ * @param {IUserCreated} message UserCreated message or plain object to encode
3566
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3567
+ * @returns {$protobuf.Writer} Writer
3568
+ */
3569
+ UserCreated.encode = function encode(message, writer) {
3570
+ if (!writer)
3571
+ writer = $Writer.create();
3572
+ if (message.user != null && message.hasOwnProperty("user"))
3573
+ $root.userdomain.User.encode(message.user, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3574
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
3575
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.createdAt);
3576
+ return writer;
3577
+ };
3578
+
3579
+ /**
3580
+ * Encodes the specified UserCreated message, length delimited. Does not implicitly {@link UserCreated.verify|verify} messages.
3581
+ * @function encodeDelimited
3582
+ * @memberof UserCreated
3583
+ * @static
3584
+ * @param {IUserCreated} message UserCreated message or plain object to encode
3585
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3586
+ * @returns {$protobuf.Writer} Writer
3587
+ */
3588
+ UserCreated.encodeDelimited = function encodeDelimited(message, writer) {
3589
+ return this.encode(message, writer).ldelim();
3590
+ };
3591
+
3592
+ /**
3593
+ * Decodes a UserCreated message from the specified reader or buffer.
3594
+ * @function decode
3595
+ * @memberof UserCreated
3596
+ * @static
3597
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3598
+ * @param {number} [length] Message length if known beforehand
3599
+ * @returns {UserCreated} UserCreated
3600
+ * @throws {Error} If the payload is not a reader or valid buffer
3601
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3602
+ */
3603
+ UserCreated.decode = function decode(reader, length) {
3604
+ if (!(reader instanceof $Reader))
3605
+ reader = $Reader.create(reader);
3606
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserCreated();
3607
+ while (reader.pos < end) {
3608
+ var tag = reader.uint32();
3609
+ switch (tag >>> 3) {
3610
+ case 1:
3611
+ message.user = $root.userdomain.User.decode(reader, reader.uint32());
3612
+ break;
3613
+ case 2:
3614
+ message.createdAt = reader.uint64();
3615
+ break;
3616
+ default:
3617
+ reader.skipType(tag & 7);
3618
+ break;
3619
+ }
3620
+ }
3621
+ return message;
3622
+ };
3623
+
3624
+ /**
3625
+ * Decodes a UserCreated message from the specified reader or buffer, length delimited.
3626
+ * @function decodeDelimited
3627
+ * @memberof UserCreated
3628
+ * @static
3629
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3630
+ * @returns {UserCreated} UserCreated
3631
+ * @throws {Error} If the payload is not a reader or valid buffer
3632
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3633
+ */
3634
+ UserCreated.decodeDelimited = function decodeDelimited(reader) {
3635
+ if (!(reader instanceof $Reader))
3636
+ reader = new $Reader(reader);
3637
+ return this.decode(reader, reader.uint32());
3638
+ };
3639
+
3640
+ /**
3641
+ * Verifies a UserCreated message.
3642
+ * @function verify
3643
+ * @memberof UserCreated
3644
+ * @static
3645
+ * @param {Object.<string,*>} message Plain object to verify
3646
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3647
+ */
3648
+ UserCreated.verify = function verify(message) {
3649
+ if (typeof message !== "object" || message === null)
3650
+ return "object expected";
3651
+ if (message.user != null && message.hasOwnProperty("user")) {
3652
+ var error = $root.userdomain.User.verify(message.user);
3653
+ if (error)
3654
+ return "user." + error;
3655
+ }
3656
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
3657
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
3658
+ return "createdAt: integer|Long expected";
3659
+ return null;
3660
+ };
3661
+
3662
+ /**
3663
+ * Creates a UserCreated message from a plain object. Also converts values to their respective internal types.
3664
+ * @function fromObject
3665
+ * @memberof UserCreated
3666
+ * @static
3667
+ * @param {Object.<string,*>} object Plain object
3668
+ * @returns {UserCreated} UserCreated
3669
+ */
3670
+ UserCreated.fromObject = function fromObject(object) {
3671
+ if (object instanceof $root.UserCreated)
3672
+ return object;
3673
+ var message = new $root.UserCreated();
3674
+ if (object.user != null) {
3675
+ if (typeof object.user !== "object")
3676
+ throw TypeError(".UserCreated.user: object expected");
3677
+ message.user = $root.userdomain.User.fromObject(object.user);
3678
+ }
3679
+ if (object.createdAt != null)
3680
+ if ($util.Long)
3681
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
3682
+ else if (typeof object.createdAt === "string")
3683
+ message.createdAt = parseInt(object.createdAt, 10);
3684
+ else if (typeof object.createdAt === "number")
3685
+ message.createdAt = object.createdAt;
3686
+ else if (typeof object.createdAt === "object")
3687
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
3688
+ return message;
3689
+ };
3690
+
3691
+ /**
3692
+ * Creates a plain object from a UserCreated message. Also converts values to other types if specified.
3693
+ * @function toObject
3694
+ * @memberof UserCreated
3695
+ * @static
3696
+ * @param {UserCreated} message UserCreated
3697
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3698
+ * @returns {Object.<string,*>} Plain object
3699
+ */
3700
+ UserCreated.toObject = function toObject(message, options) {
3701
+ if (!options)
3702
+ options = {};
3703
+ var object = {};
3704
+ if (options.defaults) {
3705
+ object.user = null;
3706
+ if ($util.Long) {
3707
+ var long = new $util.Long(0, 0, true);
3708
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3709
+ } else
3710
+ object.createdAt = options.longs === String ? "0" : 0;
3711
+ }
3712
+ if (message.user != null && message.hasOwnProperty("user"))
3713
+ object.user = $root.userdomain.User.toObject(message.user, options);
3714
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
3715
+ if (typeof message.createdAt === "number")
3716
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
3717
+ else
3718
+ object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
3719
+ return object;
3720
+ };
3721
+
3722
+ /**
3723
+ * Converts this UserCreated to JSON.
3724
+ * @function toJSON
3725
+ * @memberof UserCreated
3726
+ * @instance
3727
+ * @returns {Object.<string,*>} JSON object
3728
+ */
3729
+ UserCreated.prototype.toJSON = function toJSON() {
3730
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3731
+ };
3732
+
3733
+ return UserCreated;
3734
+ })();
3735
+
3736
+ $root.UserUpdated = (function() {
3737
+
3738
+ /**
3739
+ * Properties of a UserUpdated.
3740
+ * @exports IUserUpdated
3741
+ * @interface IUserUpdated
3742
+ * @property {string|null} [hsId] UserUpdated hsId
3743
+ * @property {number|Long|null} [updatedAt] UserUpdated updatedAt
3744
+ * @property {userdomain.IUser|null} [user] UserUpdated user
3745
+ */
3746
+
3747
+ /**
3748
+ * Constructs a new UserUpdated.
3749
+ * @exports UserUpdated
3750
+ * @classdesc Represents a UserUpdated.
3751
+ * @implements IUserUpdated
3752
+ * @constructor
3753
+ * @param {IUserUpdated=} [properties] Properties to set
3754
+ */
3755
+ function UserUpdated(properties) {
3756
+ if (properties)
3757
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3758
+ if (properties[keys[i]] != null)
3759
+ this[keys[i]] = properties[keys[i]];
3760
+ }
3761
+
3762
+ /**
3763
+ * UserUpdated hsId.
3764
+ * @member {string} hsId
3765
+ * @memberof UserUpdated
3766
+ * @instance
3767
+ */
3768
+ UserUpdated.prototype.hsId = "";
3769
+
3770
+ /**
3771
+ * UserUpdated updatedAt.
3772
+ * @member {number|Long} updatedAt
3773
+ * @memberof UserUpdated
3774
+ * @instance
3775
+ */
3776
+ UserUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3777
+
3778
+ /**
3779
+ * UserUpdated user.
3780
+ * @member {userdomain.IUser|null|undefined} user
3781
+ * @memberof UserUpdated
3782
+ * @instance
3783
+ */
3784
+ UserUpdated.prototype.user = null;
3785
+
3786
+ /**
3787
+ * Creates a new UserUpdated instance using the specified properties.
3788
+ * @function create
3789
+ * @memberof UserUpdated
3790
+ * @static
3791
+ * @param {IUserUpdated=} [properties] Properties to set
3792
+ * @returns {UserUpdated} UserUpdated instance
3793
+ */
3794
+ UserUpdated.create = function create(properties) {
3795
+ return new UserUpdated(properties);
3796
+ };
3797
+
3798
+ /**
3799
+ * Encodes the specified UserUpdated message. Does not implicitly {@link UserUpdated.verify|verify} messages.
3800
+ * @function encode
3801
+ * @memberof UserUpdated
3802
+ * @static
3803
+ * @param {IUserUpdated} message UserUpdated message or plain object to encode
3804
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3805
+ * @returns {$protobuf.Writer} Writer
3806
+ */
3807
+ UserUpdated.encode = function encode(message, writer) {
3808
+ if (!writer)
3809
+ writer = $Writer.create();
3810
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3811
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
3812
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3813
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedAt);
3814
+ if (message.user != null && message.hasOwnProperty("user"))
3815
+ $root.userdomain.User.encode(message.user, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3816
+ return writer;
3817
+ };
3818
+
3819
+ /**
3820
+ * Encodes the specified UserUpdated message, length delimited. Does not implicitly {@link UserUpdated.verify|verify} messages.
3821
+ * @function encodeDelimited
3822
+ * @memberof UserUpdated
3823
+ * @static
3824
+ * @param {IUserUpdated} message UserUpdated message or plain object to encode
3825
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3826
+ * @returns {$protobuf.Writer} Writer
3827
+ */
3828
+ UserUpdated.encodeDelimited = function encodeDelimited(message, writer) {
3829
+ return this.encode(message, writer).ldelim();
3830
+ };
3831
+
3832
+ /**
3833
+ * Decodes a UserUpdated message from the specified reader or buffer.
3834
+ * @function decode
3835
+ * @memberof UserUpdated
3836
+ * @static
3837
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3838
+ * @param {number} [length] Message length if known beforehand
3839
+ * @returns {UserUpdated} UserUpdated
3840
+ * @throws {Error} If the payload is not a reader or valid buffer
3841
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3842
+ */
3843
+ UserUpdated.decode = function decode(reader, length) {
3844
+ if (!(reader instanceof $Reader))
3845
+ reader = $Reader.create(reader);
3846
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserUpdated();
3847
+ while (reader.pos < end) {
3848
+ var tag = reader.uint32();
3849
+ switch (tag >>> 3) {
3850
+ case 1:
3851
+ message.hsId = reader.string();
3852
+ break;
3853
+ case 2:
3854
+ message.updatedAt = reader.uint64();
3855
+ break;
3856
+ case 3:
3857
+ message.user = $root.userdomain.User.decode(reader, reader.uint32());
3858
+ break;
3859
+ default:
3860
+ reader.skipType(tag & 7);
3861
+ break;
3862
+ }
3863
+ }
3864
+ return message;
3865
+ };
3866
+
3867
+ /**
3868
+ * Decodes a UserUpdated message from the specified reader or buffer, length delimited.
3869
+ * @function decodeDelimited
3870
+ * @memberof UserUpdated
3871
+ * @static
3872
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3873
+ * @returns {UserUpdated} UserUpdated
3874
+ * @throws {Error} If the payload is not a reader or valid buffer
3875
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3876
+ */
3877
+ UserUpdated.decodeDelimited = function decodeDelimited(reader) {
3878
+ if (!(reader instanceof $Reader))
3879
+ reader = new $Reader(reader);
3880
+ return this.decode(reader, reader.uint32());
3881
+ };
3882
+
3883
+ /**
3884
+ * Verifies a UserUpdated message.
3885
+ * @function verify
3886
+ * @memberof UserUpdated
3887
+ * @static
3888
+ * @param {Object.<string,*>} message Plain object to verify
3889
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3890
+ */
3891
+ UserUpdated.verify = function verify(message) {
3892
+ if (typeof message !== "object" || message === null)
3893
+ return "object expected";
3894
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3895
+ if (!$util.isString(message.hsId))
3896
+ return "hsId: string expected";
3897
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3898
+ if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
3899
+ return "updatedAt: integer|Long expected";
3900
+ if (message.user != null && message.hasOwnProperty("user")) {
3901
+ var error = $root.userdomain.User.verify(message.user);
3902
+ if (error)
3903
+ return "user." + error;
3904
+ }
3905
+ return null;
3906
+ };
3907
+
3908
+ /**
3909
+ * Creates a UserUpdated message from a plain object. Also converts values to their respective internal types.
3910
+ * @function fromObject
3911
+ * @memberof UserUpdated
3912
+ * @static
3913
+ * @param {Object.<string,*>} object Plain object
3914
+ * @returns {UserUpdated} UserUpdated
3915
+ */
3916
+ UserUpdated.fromObject = function fromObject(object) {
3917
+ if (object instanceof $root.UserUpdated)
3918
+ return object;
3919
+ var message = new $root.UserUpdated();
3920
+ if (object.hsId != null)
3921
+ message.hsId = String(object.hsId);
3922
+ if (object.updatedAt != null)
3923
+ if ($util.Long)
3924
+ (message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
3925
+ else if (typeof object.updatedAt === "string")
3926
+ message.updatedAt = parseInt(object.updatedAt, 10);
3927
+ else if (typeof object.updatedAt === "number")
3928
+ message.updatedAt = object.updatedAt;
3929
+ else if (typeof object.updatedAt === "object")
3930
+ message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
3931
+ if (object.user != null) {
3932
+ if (typeof object.user !== "object")
3933
+ throw TypeError(".UserUpdated.user: object expected");
3934
+ message.user = $root.userdomain.User.fromObject(object.user);
3935
+ }
3936
+ return message;
3937
+ };
3938
+
3939
+ /**
3940
+ * Creates a plain object from a UserUpdated message. Also converts values to other types if specified.
3941
+ * @function toObject
3942
+ * @memberof UserUpdated
3943
+ * @static
3944
+ * @param {UserUpdated} message UserUpdated
3945
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3946
+ * @returns {Object.<string,*>} Plain object
3947
+ */
3948
+ UserUpdated.toObject = function toObject(message, options) {
3949
+ if (!options)
3950
+ options = {};
3951
+ var object = {};
3952
+ if (options.defaults) {
3953
+ object.hsId = "";
3954
+ if ($util.Long) {
3955
+ var long = new $util.Long(0, 0, true);
3956
+ object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3957
+ } else
3958
+ object.updatedAt = options.longs === String ? "0" : 0;
3959
+ object.user = null;
3960
+ }
3961
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
3962
+ object.hsId = message.hsId;
3963
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
3964
+ if (typeof message.updatedAt === "number")
3965
+ object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
3966
+ else
3967
+ object.updatedAt = options.longs === String ? $util.Long.prototype.toString.call(message.updatedAt) : options.longs === Number ? new $util.LongBits(message.updatedAt.low >>> 0, message.updatedAt.high >>> 0).toNumber(true) : message.updatedAt;
3968
+ if (message.user != null && message.hasOwnProperty("user"))
3969
+ object.user = $root.userdomain.User.toObject(message.user, options);
3970
+ return object;
3971
+ };
3972
+
3973
+ /**
3974
+ * Converts this UserUpdated to JSON.
3975
+ * @function toJSON
3976
+ * @memberof UserUpdated
3977
+ * @instance
3978
+ * @returns {Object.<string,*>} JSON object
3979
+ */
3980
+ UserUpdated.prototype.toJSON = function toJSON() {
3981
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3982
+ };
3983
+
3984
+ return UserUpdated;
3985
+ })();
3986
+
3987
+ $root.UserDeleted = (function() {
3988
+
3989
+ /**
3990
+ * Properties of a UserDeleted.
3991
+ * @exports IUserDeleted
3992
+ * @interface IUserDeleted
3993
+ * @property {string|null} [hsId] UserDeleted hsId
3994
+ * @property {number|Long|null} [deletedAt] UserDeleted deletedAt
3995
+ */
3996
+
3997
+ /**
3998
+ * Constructs a new UserDeleted.
3999
+ * @exports UserDeleted
4000
+ * @classdesc Represents a UserDeleted.
4001
+ * @implements IUserDeleted
4002
+ * @constructor
4003
+ * @param {IUserDeleted=} [properties] Properties to set
4004
+ */
4005
+ function UserDeleted(properties) {
4006
+ if (properties)
4007
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4008
+ if (properties[keys[i]] != null)
4009
+ this[keys[i]] = properties[keys[i]];
4010
+ }
4011
+
4012
+ /**
4013
+ * UserDeleted hsId.
4014
+ * @member {string} hsId
4015
+ * @memberof UserDeleted
4016
+ * @instance
4017
+ */
4018
+ UserDeleted.prototype.hsId = "";
4019
+
4020
+ /**
4021
+ * UserDeleted deletedAt.
4022
+ * @member {number|Long} deletedAt
4023
+ * @memberof UserDeleted
4024
+ * @instance
4025
+ */
4026
+ UserDeleted.prototype.deletedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4027
+
4028
+ /**
4029
+ * Creates a new UserDeleted instance using the specified properties.
4030
+ * @function create
4031
+ * @memberof UserDeleted
4032
+ * @static
4033
+ * @param {IUserDeleted=} [properties] Properties to set
4034
+ * @returns {UserDeleted} UserDeleted instance
4035
+ */
4036
+ UserDeleted.create = function create(properties) {
4037
+ return new UserDeleted(properties);
4038
+ };
4039
+
4040
+ /**
4041
+ * Encodes the specified UserDeleted message. Does not implicitly {@link UserDeleted.verify|verify} messages.
4042
+ * @function encode
4043
+ * @memberof UserDeleted
4044
+ * @static
4045
+ * @param {IUserDeleted} message UserDeleted message or plain object to encode
4046
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4047
+ * @returns {$protobuf.Writer} Writer
4048
+ */
4049
+ UserDeleted.encode = function encode(message, writer) {
4050
+ if (!writer)
4051
+ writer = $Writer.create();
4052
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
4053
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsId);
4054
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
4055
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.deletedAt);
4056
+ return writer;
4057
+ };
4058
+
4059
+ /**
4060
+ * Encodes the specified UserDeleted message, length delimited. Does not implicitly {@link UserDeleted.verify|verify} messages.
4061
+ * @function encodeDelimited
4062
+ * @memberof UserDeleted
4063
+ * @static
4064
+ * @param {IUserDeleted} message UserDeleted message or plain object to encode
4065
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4066
+ * @returns {$protobuf.Writer} Writer
4067
+ */
4068
+ UserDeleted.encodeDelimited = function encodeDelimited(message, writer) {
4069
+ return this.encode(message, writer).ldelim();
4070
+ };
4071
+
4072
+ /**
4073
+ * Decodes a UserDeleted message from the specified reader or buffer.
4074
+ * @function decode
4075
+ * @memberof UserDeleted
4076
+ * @static
4077
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4078
+ * @param {number} [length] Message length if known beforehand
4079
+ * @returns {UserDeleted} UserDeleted
4080
+ * @throws {Error} If the payload is not a reader or valid buffer
4081
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4082
+ */
4083
+ UserDeleted.decode = function decode(reader, length) {
4084
+ if (!(reader instanceof $Reader))
4085
+ reader = $Reader.create(reader);
4086
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserDeleted();
4087
+ while (reader.pos < end) {
4088
+ var tag = reader.uint32();
4089
+ switch (tag >>> 3) {
4090
+ case 1:
4091
+ message.hsId = reader.string();
4092
+ break;
4093
+ case 2:
4094
+ message.deletedAt = reader.uint64();
4095
+ break;
4096
+ default:
4097
+ reader.skipType(tag & 7);
4098
+ break;
4099
+ }
4100
+ }
4101
+ return message;
4102
+ };
4103
+
4104
+ /**
4105
+ * Decodes a UserDeleted message from the specified reader or buffer, length delimited.
4106
+ * @function decodeDelimited
4107
+ * @memberof UserDeleted
4108
+ * @static
4109
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4110
+ * @returns {UserDeleted} UserDeleted
4111
+ * @throws {Error} If the payload is not a reader or valid buffer
4112
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4113
+ */
4114
+ UserDeleted.decodeDelimited = function decodeDelimited(reader) {
4115
+ if (!(reader instanceof $Reader))
4116
+ reader = new $Reader(reader);
4117
+ return this.decode(reader, reader.uint32());
4118
+ };
4119
+
4120
+ /**
4121
+ * Verifies a UserDeleted message.
4122
+ * @function verify
4123
+ * @memberof UserDeleted
4124
+ * @static
4125
+ * @param {Object.<string,*>} message Plain object to verify
4126
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4127
+ */
4128
+ UserDeleted.verify = function verify(message) {
4129
+ if (typeof message !== "object" || message === null)
4130
+ return "object expected";
4131
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
4132
+ if (!$util.isString(message.hsId))
4133
+ return "hsId: string expected";
4134
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
4135
+ if (!$util.isInteger(message.deletedAt) && !(message.deletedAt && $util.isInteger(message.deletedAt.low) && $util.isInteger(message.deletedAt.high)))
4136
+ return "deletedAt: integer|Long expected";
4137
+ return null;
4138
+ };
4139
+
4140
+ /**
4141
+ * Creates a UserDeleted message from a plain object. Also converts values to their respective internal types.
4142
+ * @function fromObject
4143
+ * @memberof UserDeleted
4144
+ * @static
4145
+ * @param {Object.<string,*>} object Plain object
4146
+ * @returns {UserDeleted} UserDeleted
4147
+ */
4148
+ UserDeleted.fromObject = function fromObject(object) {
4149
+ if (object instanceof $root.UserDeleted)
4150
+ return object;
4151
+ var message = new $root.UserDeleted();
4152
+ if (object.hsId != null)
4153
+ message.hsId = String(object.hsId);
4154
+ if (object.deletedAt != null)
4155
+ if ($util.Long)
4156
+ (message.deletedAt = $util.Long.fromValue(object.deletedAt)).unsigned = true;
4157
+ else if (typeof object.deletedAt === "string")
4158
+ message.deletedAt = parseInt(object.deletedAt, 10);
4159
+ else if (typeof object.deletedAt === "number")
4160
+ message.deletedAt = object.deletedAt;
4161
+ else if (typeof object.deletedAt === "object")
4162
+ message.deletedAt = new $util.LongBits(object.deletedAt.low >>> 0, object.deletedAt.high >>> 0).toNumber(true);
4163
+ return message;
4164
+ };
4165
+
4166
+ /**
4167
+ * Creates a plain object from a UserDeleted message. Also converts values to other types if specified.
4168
+ * @function toObject
4169
+ * @memberof UserDeleted
4170
+ * @static
4171
+ * @param {UserDeleted} message UserDeleted
4172
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4173
+ * @returns {Object.<string,*>} Plain object
4174
+ */
4175
+ UserDeleted.toObject = function toObject(message, options) {
4176
+ if (!options)
4177
+ options = {};
4178
+ var object = {};
4179
+ if (options.defaults) {
4180
+ object.hsId = "";
4181
+ if ($util.Long) {
4182
+ var long = new $util.Long(0, 0, true);
4183
+ object.deletedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4184
+ } else
4185
+ object.deletedAt = options.longs === String ? "0" : 0;
4186
+ }
4187
+ if (message.hsId != null && message.hasOwnProperty("hsId"))
4188
+ object.hsId = message.hsId;
4189
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
4190
+ if (typeof message.deletedAt === "number")
4191
+ object.deletedAt = options.longs === String ? String(message.deletedAt) : message.deletedAt;
4192
+ else
4193
+ object.deletedAt = options.longs === String ? $util.Long.prototype.toString.call(message.deletedAt) : options.longs === Number ? new $util.LongBits(message.deletedAt.low >>> 0, message.deletedAt.high >>> 0).toNumber(true) : message.deletedAt;
4194
+ return object;
4195
+ };
4196
+
4197
+ /**
4198
+ * Converts this UserDeleted to JSON.
4199
+ * @function toJSON
4200
+ * @memberof UserDeleted
4201
+ * @instance
4202
+ * @returns {Object.<string,*>} JSON object
4203
+ */
4204
+ UserDeleted.prototype.toJSON = function toJSON() {
4205
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4206
+ };
4207
+
4208
+ return UserDeleted;
4495
4209
  })();
4496
4210
 
4497
4211
  $root.UserPasswordResetCreated = (function() {