@headspace/protos-events 1.126.0 → 1.127.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 +408 -0
  2. package/lib/index.js +1324 -0
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -12399,6 +12399,1330 @@ $root.ContentfulCategoryDeleted = (function() {
12399
12399
  return ContentfulCategoryDeleted;
12400
12400
  })();
12401
12401
 
12402
+ $root.ContentfulTopicCreated = (function() {
12403
+
12404
+ /**
12405
+ * Properties of a ContentfulTopicCreated.
12406
+ * @exports IContentfulTopicCreated
12407
+ * @interface IContentfulTopicCreated
12408
+ * @property {string|null} [name] ContentfulTopicCreated name
12409
+ * @property {string|null} [slug] ContentfulTopicCreated slug
12410
+ * @property {string|null} [description] ContentfulTopicCreated description
12411
+ * @property {string|null} [location] ContentfulTopicCreated location
12412
+ * @property {string|null} [primaryColor] ContentfulTopicCreated primaryColor
12413
+ * @property {string|null} [secondaryColor] ContentfulTopicCreated secondaryColor
12414
+ * @property {string|null} [tertiaryColor] ContentfulTopicCreated tertiaryColor
12415
+ * @property {Object.<string,contentful.IIdReference>|null} [iconMedia] ContentfulTopicCreated iconMedia
12416
+ * @property {Object.<string,contentful.IIdReference>|null} [headerPatternMedia] ContentfulTopicCreated headerPatternMedia
12417
+ * @property {Object.<string,contentful.IIdReference>|null} [menuPatternMedia] ContentfulTopicCreated menuPatternMedia
12418
+ * @property {Array.<contentful.ISlugReference>|null} [accessGroups] ContentfulTopicCreated accessGroups
12419
+ * @property {number|Long|null} [createdAt] ContentfulTopicCreated createdAt
12420
+ */
12421
+
12422
+ /**
12423
+ * Constructs a new ContentfulTopicCreated.
12424
+ * @exports ContentfulTopicCreated
12425
+ * @classdesc Represents a ContentfulTopicCreated.
12426
+ * @implements IContentfulTopicCreated
12427
+ * @constructor
12428
+ * @param {IContentfulTopicCreated=} [properties] Properties to set
12429
+ */
12430
+ function ContentfulTopicCreated(properties) {
12431
+ this.iconMedia = {};
12432
+ this.headerPatternMedia = {};
12433
+ this.menuPatternMedia = {};
12434
+ this.accessGroups = [];
12435
+ if (properties)
12436
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12437
+ if (properties[keys[i]] != null)
12438
+ this[keys[i]] = properties[keys[i]];
12439
+ }
12440
+
12441
+ /**
12442
+ * ContentfulTopicCreated name.
12443
+ * @member {string} name
12444
+ * @memberof ContentfulTopicCreated
12445
+ * @instance
12446
+ */
12447
+ ContentfulTopicCreated.prototype.name = "";
12448
+
12449
+ /**
12450
+ * ContentfulTopicCreated slug.
12451
+ * @member {string} slug
12452
+ * @memberof ContentfulTopicCreated
12453
+ * @instance
12454
+ */
12455
+ ContentfulTopicCreated.prototype.slug = "";
12456
+
12457
+ /**
12458
+ * ContentfulTopicCreated description.
12459
+ * @member {string} description
12460
+ * @memberof ContentfulTopicCreated
12461
+ * @instance
12462
+ */
12463
+ ContentfulTopicCreated.prototype.description = "";
12464
+
12465
+ /**
12466
+ * ContentfulTopicCreated location.
12467
+ * @member {string} location
12468
+ * @memberof ContentfulTopicCreated
12469
+ * @instance
12470
+ */
12471
+ ContentfulTopicCreated.prototype.location = "";
12472
+
12473
+ /**
12474
+ * ContentfulTopicCreated primaryColor.
12475
+ * @member {string} primaryColor
12476
+ * @memberof ContentfulTopicCreated
12477
+ * @instance
12478
+ */
12479
+ ContentfulTopicCreated.prototype.primaryColor = "";
12480
+
12481
+ /**
12482
+ * ContentfulTopicCreated secondaryColor.
12483
+ * @member {string} secondaryColor
12484
+ * @memberof ContentfulTopicCreated
12485
+ * @instance
12486
+ */
12487
+ ContentfulTopicCreated.prototype.secondaryColor = "";
12488
+
12489
+ /**
12490
+ * ContentfulTopicCreated tertiaryColor.
12491
+ * @member {string} tertiaryColor
12492
+ * @memberof ContentfulTopicCreated
12493
+ * @instance
12494
+ */
12495
+ ContentfulTopicCreated.prototype.tertiaryColor = "";
12496
+
12497
+ /**
12498
+ * ContentfulTopicCreated iconMedia.
12499
+ * @member {Object.<string,contentful.IIdReference>} iconMedia
12500
+ * @memberof ContentfulTopicCreated
12501
+ * @instance
12502
+ */
12503
+ ContentfulTopicCreated.prototype.iconMedia = $util.emptyObject;
12504
+
12505
+ /**
12506
+ * ContentfulTopicCreated headerPatternMedia.
12507
+ * @member {Object.<string,contentful.IIdReference>} headerPatternMedia
12508
+ * @memberof ContentfulTopicCreated
12509
+ * @instance
12510
+ */
12511
+ ContentfulTopicCreated.prototype.headerPatternMedia = $util.emptyObject;
12512
+
12513
+ /**
12514
+ * ContentfulTopicCreated menuPatternMedia.
12515
+ * @member {Object.<string,contentful.IIdReference>} menuPatternMedia
12516
+ * @memberof ContentfulTopicCreated
12517
+ * @instance
12518
+ */
12519
+ ContentfulTopicCreated.prototype.menuPatternMedia = $util.emptyObject;
12520
+
12521
+ /**
12522
+ * ContentfulTopicCreated accessGroups.
12523
+ * @member {Array.<contentful.ISlugReference>} accessGroups
12524
+ * @memberof ContentfulTopicCreated
12525
+ * @instance
12526
+ */
12527
+ ContentfulTopicCreated.prototype.accessGroups = $util.emptyArray;
12528
+
12529
+ /**
12530
+ * ContentfulTopicCreated createdAt.
12531
+ * @member {number|Long} createdAt
12532
+ * @memberof ContentfulTopicCreated
12533
+ * @instance
12534
+ */
12535
+ ContentfulTopicCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12536
+
12537
+ /**
12538
+ * Creates a new ContentfulTopicCreated instance using the specified properties.
12539
+ * @function create
12540
+ * @memberof ContentfulTopicCreated
12541
+ * @static
12542
+ * @param {IContentfulTopicCreated=} [properties] Properties to set
12543
+ * @returns {ContentfulTopicCreated} ContentfulTopicCreated instance
12544
+ */
12545
+ ContentfulTopicCreated.create = function create(properties) {
12546
+ return new ContentfulTopicCreated(properties);
12547
+ };
12548
+
12549
+ /**
12550
+ * Encodes the specified ContentfulTopicCreated message. Does not implicitly {@link ContentfulTopicCreated.verify|verify} messages.
12551
+ * @function encode
12552
+ * @memberof ContentfulTopicCreated
12553
+ * @static
12554
+ * @param {IContentfulTopicCreated} message ContentfulTopicCreated message or plain object to encode
12555
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12556
+ * @returns {$protobuf.Writer} Writer
12557
+ */
12558
+ ContentfulTopicCreated.encode = function encode(message, writer) {
12559
+ if (!writer)
12560
+ writer = $Writer.create();
12561
+ if (message.name != null && message.hasOwnProperty("name"))
12562
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
12563
+ if (message.slug != null && message.hasOwnProperty("slug"))
12564
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.slug);
12565
+ if (message.description != null && message.hasOwnProperty("description"))
12566
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
12567
+ if (message.location != null && message.hasOwnProperty("location"))
12568
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.location);
12569
+ if (message.primaryColor != null && message.hasOwnProperty("primaryColor"))
12570
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.primaryColor);
12571
+ if (message.secondaryColor != null && message.hasOwnProperty("secondaryColor"))
12572
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.secondaryColor);
12573
+ if (message.tertiaryColor != null && message.hasOwnProperty("tertiaryColor"))
12574
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.tertiaryColor);
12575
+ if (message.iconMedia != null && message.hasOwnProperty("iconMedia"))
12576
+ for (var keys = Object.keys(message.iconMedia), i = 0; i < keys.length; ++i) {
12577
+ writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
12578
+ $root.contentful.IdReference.encode(message.iconMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
12579
+ }
12580
+ if (message.headerPatternMedia != null && message.hasOwnProperty("headerPatternMedia"))
12581
+ for (var keys = Object.keys(message.headerPatternMedia), i = 0; i < keys.length; ++i) {
12582
+ writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
12583
+ $root.contentful.IdReference.encode(message.headerPatternMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
12584
+ }
12585
+ if (message.menuPatternMedia != null && message.hasOwnProperty("menuPatternMedia"))
12586
+ for (var keys = Object.keys(message.menuPatternMedia), i = 0; i < keys.length; ++i) {
12587
+ writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
12588
+ $root.contentful.IdReference.encode(message.menuPatternMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
12589
+ }
12590
+ if (message.accessGroups != null && message.accessGroups.length)
12591
+ for (var i = 0; i < message.accessGroups.length; ++i)
12592
+ $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
12593
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
12594
+ writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.createdAt);
12595
+ return writer;
12596
+ };
12597
+
12598
+ /**
12599
+ * Encodes the specified ContentfulTopicCreated message, length delimited. Does not implicitly {@link ContentfulTopicCreated.verify|verify} messages.
12600
+ * @function encodeDelimited
12601
+ * @memberof ContentfulTopicCreated
12602
+ * @static
12603
+ * @param {IContentfulTopicCreated} message ContentfulTopicCreated message or plain object to encode
12604
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12605
+ * @returns {$protobuf.Writer} Writer
12606
+ */
12607
+ ContentfulTopicCreated.encodeDelimited = function encodeDelimited(message, writer) {
12608
+ return this.encode(message, writer).ldelim();
12609
+ };
12610
+
12611
+ /**
12612
+ * Decodes a ContentfulTopicCreated message from the specified reader or buffer.
12613
+ * @function decode
12614
+ * @memberof ContentfulTopicCreated
12615
+ * @static
12616
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12617
+ * @param {number} [length] Message length if known beforehand
12618
+ * @returns {ContentfulTopicCreated} ContentfulTopicCreated
12619
+ * @throws {Error} If the payload is not a reader or valid buffer
12620
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12621
+ */
12622
+ ContentfulTopicCreated.decode = function decode(reader, length) {
12623
+ if (!(reader instanceof $Reader))
12624
+ reader = $Reader.create(reader);
12625
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulTopicCreated(), key;
12626
+ while (reader.pos < end) {
12627
+ var tag = reader.uint32();
12628
+ switch (tag >>> 3) {
12629
+ case 1:
12630
+ message.name = reader.string();
12631
+ break;
12632
+ case 2:
12633
+ message.slug = reader.string();
12634
+ break;
12635
+ case 3:
12636
+ message.description = reader.string();
12637
+ break;
12638
+ case 4:
12639
+ message.location = reader.string();
12640
+ break;
12641
+ case 5:
12642
+ message.primaryColor = reader.string();
12643
+ break;
12644
+ case 6:
12645
+ message.secondaryColor = reader.string();
12646
+ break;
12647
+ case 7:
12648
+ message.tertiaryColor = reader.string();
12649
+ break;
12650
+ case 8:
12651
+ reader.skip().pos++;
12652
+ if (message.iconMedia === $util.emptyObject)
12653
+ message.iconMedia = {};
12654
+ key = reader.string();
12655
+ reader.pos++;
12656
+ message.iconMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
12657
+ break;
12658
+ case 9:
12659
+ reader.skip().pos++;
12660
+ if (message.headerPatternMedia === $util.emptyObject)
12661
+ message.headerPatternMedia = {};
12662
+ key = reader.string();
12663
+ reader.pos++;
12664
+ message.headerPatternMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
12665
+ break;
12666
+ case 10:
12667
+ reader.skip().pos++;
12668
+ if (message.menuPatternMedia === $util.emptyObject)
12669
+ message.menuPatternMedia = {};
12670
+ key = reader.string();
12671
+ reader.pos++;
12672
+ message.menuPatternMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
12673
+ break;
12674
+ case 11:
12675
+ if (!(message.accessGroups && message.accessGroups.length))
12676
+ message.accessGroups = [];
12677
+ message.accessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
12678
+ break;
12679
+ case 12:
12680
+ message.createdAt = reader.uint64();
12681
+ break;
12682
+ default:
12683
+ reader.skipType(tag & 7);
12684
+ break;
12685
+ }
12686
+ }
12687
+ return message;
12688
+ };
12689
+
12690
+ /**
12691
+ * Decodes a ContentfulTopicCreated message from the specified reader or buffer, length delimited.
12692
+ * @function decodeDelimited
12693
+ * @memberof ContentfulTopicCreated
12694
+ * @static
12695
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12696
+ * @returns {ContentfulTopicCreated} ContentfulTopicCreated
12697
+ * @throws {Error} If the payload is not a reader or valid buffer
12698
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12699
+ */
12700
+ ContentfulTopicCreated.decodeDelimited = function decodeDelimited(reader) {
12701
+ if (!(reader instanceof $Reader))
12702
+ reader = new $Reader(reader);
12703
+ return this.decode(reader, reader.uint32());
12704
+ };
12705
+
12706
+ /**
12707
+ * Verifies a ContentfulTopicCreated message.
12708
+ * @function verify
12709
+ * @memberof ContentfulTopicCreated
12710
+ * @static
12711
+ * @param {Object.<string,*>} message Plain object to verify
12712
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12713
+ */
12714
+ ContentfulTopicCreated.verify = function verify(message) {
12715
+ if (typeof message !== "object" || message === null)
12716
+ return "object expected";
12717
+ if (message.name != null && message.hasOwnProperty("name"))
12718
+ if (!$util.isString(message.name))
12719
+ return "name: string expected";
12720
+ if (message.slug != null && message.hasOwnProperty("slug"))
12721
+ if (!$util.isString(message.slug))
12722
+ return "slug: string expected";
12723
+ if (message.description != null && message.hasOwnProperty("description"))
12724
+ if (!$util.isString(message.description))
12725
+ return "description: string expected";
12726
+ if (message.location != null && message.hasOwnProperty("location"))
12727
+ if (!$util.isString(message.location))
12728
+ return "location: string expected";
12729
+ if (message.primaryColor != null && message.hasOwnProperty("primaryColor"))
12730
+ if (!$util.isString(message.primaryColor))
12731
+ return "primaryColor: string expected";
12732
+ if (message.secondaryColor != null && message.hasOwnProperty("secondaryColor"))
12733
+ if (!$util.isString(message.secondaryColor))
12734
+ return "secondaryColor: string expected";
12735
+ if (message.tertiaryColor != null && message.hasOwnProperty("tertiaryColor"))
12736
+ if (!$util.isString(message.tertiaryColor))
12737
+ return "tertiaryColor: string expected";
12738
+ if (message.iconMedia != null && message.hasOwnProperty("iconMedia")) {
12739
+ if (!$util.isObject(message.iconMedia))
12740
+ return "iconMedia: object expected";
12741
+ var key = Object.keys(message.iconMedia);
12742
+ for (var i = 0; i < key.length; ++i) {
12743
+ var error = $root.contentful.IdReference.verify(message.iconMedia[key[i]]);
12744
+ if (error)
12745
+ return "iconMedia." + error;
12746
+ }
12747
+ }
12748
+ if (message.headerPatternMedia != null && message.hasOwnProperty("headerPatternMedia")) {
12749
+ if (!$util.isObject(message.headerPatternMedia))
12750
+ return "headerPatternMedia: object expected";
12751
+ var key = Object.keys(message.headerPatternMedia);
12752
+ for (var i = 0; i < key.length; ++i) {
12753
+ var error = $root.contentful.IdReference.verify(message.headerPatternMedia[key[i]]);
12754
+ if (error)
12755
+ return "headerPatternMedia." + error;
12756
+ }
12757
+ }
12758
+ if (message.menuPatternMedia != null && message.hasOwnProperty("menuPatternMedia")) {
12759
+ if (!$util.isObject(message.menuPatternMedia))
12760
+ return "menuPatternMedia: object expected";
12761
+ var key = Object.keys(message.menuPatternMedia);
12762
+ for (var i = 0; i < key.length; ++i) {
12763
+ var error = $root.contentful.IdReference.verify(message.menuPatternMedia[key[i]]);
12764
+ if (error)
12765
+ return "menuPatternMedia." + error;
12766
+ }
12767
+ }
12768
+ if (message.accessGroups != null && message.hasOwnProperty("accessGroups")) {
12769
+ if (!Array.isArray(message.accessGroups))
12770
+ return "accessGroups: array expected";
12771
+ for (var i = 0; i < message.accessGroups.length; ++i) {
12772
+ var error = $root.contentful.SlugReference.verify(message.accessGroups[i]);
12773
+ if (error)
12774
+ return "accessGroups." + error;
12775
+ }
12776
+ }
12777
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
12778
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
12779
+ return "createdAt: integer|Long expected";
12780
+ return null;
12781
+ };
12782
+
12783
+ /**
12784
+ * Creates a ContentfulTopicCreated message from a plain object. Also converts values to their respective internal types.
12785
+ * @function fromObject
12786
+ * @memberof ContentfulTopicCreated
12787
+ * @static
12788
+ * @param {Object.<string,*>} object Plain object
12789
+ * @returns {ContentfulTopicCreated} ContentfulTopicCreated
12790
+ */
12791
+ ContentfulTopicCreated.fromObject = function fromObject(object) {
12792
+ if (object instanceof $root.ContentfulTopicCreated)
12793
+ return object;
12794
+ var message = new $root.ContentfulTopicCreated();
12795
+ if (object.name != null)
12796
+ message.name = String(object.name);
12797
+ if (object.slug != null)
12798
+ message.slug = String(object.slug);
12799
+ if (object.description != null)
12800
+ message.description = String(object.description);
12801
+ if (object.location != null)
12802
+ message.location = String(object.location);
12803
+ if (object.primaryColor != null)
12804
+ message.primaryColor = String(object.primaryColor);
12805
+ if (object.secondaryColor != null)
12806
+ message.secondaryColor = String(object.secondaryColor);
12807
+ if (object.tertiaryColor != null)
12808
+ message.tertiaryColor = String(object.tertiaryColor);
12809
+ if (object.iconMedia) {
12810
+ if (typeof object.iconMedia !== "object")
12811
+ throw TypeError(".ContentfulTopicCreated.iconMedia: object expected");
12812
+ message.iconMedia = {};
12813
+ for (var keys = Object.keys(object.iconMedia), i = 0; i < keys.length; ++i) {
12814
+ if (typeof object.iconMedia[keys[i]] !== "object")
12815
+ throw TypeError(".ContentfulTopicCreated.iconMedia: object expected");
12816
+ message.iconMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.iconMedia[keys[i]]);
12817
+ }
12818
+ }
12819
+ if (object.headerPatternMedia) {
12820
+ if (typeof object.headerPatternMedia !== "object")
12821
+ throw TypeError(".ContentfulTopicCreated.headerPatternMedia: object expected");
12822
+ message.headerPatternMedia = {};
12823
+ for (var keys = Object.keys(object.headerPatternMedia), i = 0; i < keys.length; ++i) {
12824
+ if (typeof object.headerPatternMedia[keys[i]] !== "object")
12825
+ throw TypeError(".ContentfulTopicCreated.headerPatternMedia: object expected");
12826
+ message.headerPatternMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.headerPatternMedia[keys[i]]);
12827
+ }
12828
+ }
12829
+ if (object.menuPatternMedia) {
12830
+ if (typeof object.menuPatternMedia !== "object")
12831
+ throw TypeError(".ContentfulTopicCreated.menuPatternMedia: object expected");
12832
+ message.menuPatternMedia = {};
12833
+ for (var keys = Object.keys(object.menuPatternMedia), i = 0; i < keys.length; ++i) {
12834
+ if (typeof object.menuPatternMedia[keys[i]] !== "object")
12835
+ throw TypeError(".ContentfulTopicCreated.menuPatternMedia: object expected");
12836
+ message.menuPatternMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.menuPatternMedia[keys[i]]);
12837
+ }
12838
+ }
12839
+ if (object.accessGroups) {
12840
+ if (!Array.isArray(object.accessGroups))
12841
+ throw TypeError(".ContentfulTopicCreated.accessGroups: array expected");
12842
+ message.accessGroups = [];
12843
+ for (var i = 0; i < object.accessGroups.length; ++i) {
12844
+ if (typeof object.accessGroups[i] !== "object")
12845
+ throw TypeError(".ContentfulTopicCreated.accessGroups: object expected");
12846
+ message.accessGroups[i] = $root.contentful.SlugReference.fromObject(object.accessGroups[i]);
12847
+ }
12848
+ }
12849
+ if (object.createdAt != null)
12850
+ if ($util.Long)
12851
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
12852
+ else if (typeof object.createdAt === "string")
12853
+ message.createdAt = parseInt(object.createdAt, 10);
12854
+ else if (typeof object.createdAt === "number")
12855
+ message.createdAt = object.createdAt;
12856
+ else if (typeof object.createdAt === "object")
12857
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
12858
+ return message;
12859
+ };
12860
+
12861
+ /**
12862
+ * Creates a plain object from a ContentfulTopicCreated message. Also converts values to other types if specified.
12863
+ * @function toObject
12864
+ * @memberof ContentfulTopicCreated
12865
+ * @static
12866
+ * @param {ContentfulTopicCreated} message ContentfulTopicCreated
12867
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12868
+ * @returns {Object.<string,*>} Plain object
12869
+ */
12870
+ ContentfulTopicCreated.toObject = function toObject(message, options) {
12871
+ if (!options)
12872
+ options = {};
12873
+ var object = {};
12874
+ if (options.arrays || options.defaults)
12875
+ object.accessGroups = [];
12876
+ if (options.objects || options.defaults) {
12877
+ object.iconMedia = {};
12878
+ object.headerPatternMedia = {};
12879
+ object.menuPatternMedia = {};
12880
+ }
12881
+ if (options.defaults) {
12882
+ object.name = "";
12883
+ object.slug = "";
12884
+ object.description = "";
12885
+ object.location = "";
12886
+ object.primaryColor = "";
12887
+ object.secondaryColor = "";
12888
+ object.tertiaryColor = "";
12889
+ if ($util.Long) {
12890
+ var long = new $util.Long(0, 0, true);
12891
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
12892
+ } else
12893
+ object.createdAt = options.longs === String ? "0" : 0;
12894
+ }
12895
+ if (message.name != null && message.hasOwnProperty("name"))
12896
+ object.name = message.name;
12897
+ if (message.slug != null && message.hasOwnProperty("slug"))
12898
+ object.slug = message.slug;
12899
+ if (message.description != null && message.hasOwnProperty("description"))
12900
+ object.description = message.description;
12901
+ if (message.location != null && message.hasOwnProperty("location"))
12902
+ object.location = message.location;
12903
+ if (message.primaryColor != null && message.hasOwnProperty("primaryColor"))
12904
+ object.primaryColor = message.primaryColor;
12905
+ if (message.secondaryColor != null && message.hasOwnProperty("secondaryColor"))
12906
+ object.secondaryColor = message.secondaryColor;
12907
+ if (message.tertiaryColor != null && message.hasOwnProperty("tertiaryColor"))
12908
+ object.tertiaryColor = message.tertiaryColor;
12909
+ var keys2;
12910
+ if (message.iconMedia && (keys2 = Object.keys(message.iconMedia)).length) {
12911
+ object.iconMedia = {};
12912
+ for (var j = 0; j < keys2.length; ++j)
12913
+ object.iconMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.iconMedia[keys2[j]], options);
12914
+ }
12915
+ if (message.headerPatternMedia && (keys2 = Object.keys(message.headerPatternMedia)).length) {
12916
+ object.headerPatternMedia = {};
12917
+ for (var j = 0; j < keys2.length; ++j)
12918
+ object.headerPatternMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.headerPatternMedia[keys2[j]], options);
12919
+ }
12920
+ if (message.menuPatternMedia && (keys2 = Object.keys(message.menuPatternMedia)).length) {
12921
+ object.menuPatternMedia = {};
12922
+ for (var j = 0; j < keys2.length; ++j)
12923
+ object.menuPatternMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.menuPatternMedia[keys2[j]], options);
12924
+ }
12925
+ if (message.accessGroups && message.accessGroups.length) {
12926
+ object.accessGroups = [];
12927
+ for (var j = 0; j < message.accessGroups.length; ++j)
12928
+ object.accessGroups[j] = $root.contentful.SlugReference.toObject(message.accessGroups[j], options);
12929
+ }
12930
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
12931
+ if (typeof message.createdAt === "number")
12932
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
12933
+ else
12934
+ 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;
12935
+ return object;
12936
+ };
12937
+
12938
+ /**
12939
+ * Converts this ContentfulTopicCreated to JSON.
12940
+ * @function toJSON
12941
+ * @memberof ContentfulTopicCreated
12942
+ * @instance
12943
+ * @returns {Object.<string,*>} JSON object
12944
+ */
12945
+ ContentfulTopicCreated.prototype.toJSON = function toJSON() {
12946
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12947
+ };
12948
+
12949
+ return ContentfulTopicCreated;
12950
+ })();
12951
+
12952
+ $root.ContentfulTopicUpdated = (function() {
12953
+
12954
+ /**
12955
+ * Properties of a ContentfulTopicUpdated.
12956
+ * @exports IContentfulTopicUpdated
12957
+ * @interface IContentfulTopicUpdated
12958
+ * @property {string|null} [name] ContentfulTopicUpdated name
12959
+ * @property {string|null} [slug] ContentfulTopicUpdated slug
12960
+ * @property {string|null} [description] ContentfulTopicUpdated description
12961
+ * @property {string|null} [location] ContentfulTopicUpdated location
12962
+ * @property {string|null} [primaryColor] ContentfulTopicUpdated primaryColor
12963
+ * @property {string|null} [secondaryColor] ContentfulTopicUpdated secondaryColor
12964
+ * @property {string|null} [tertiaryColor] ContentfulTopicUpdated tertiaryColor
12965
+ * @property {Object.<string,contentful.IIdReference>|null} [iconMedia] ContentfulTopicUpdated iconMedia
12966
+ * @property {Object.<string,contentful.IIdReference>|null} [headerPatternMedia] ContentfulTopicUpdated headerPatternMedia
12967
+ * @property {Object.<string,contentful.IIdReference>|null} [menuPatternMedia] ContentfulTopicUpdated menuPatternMedia
12968
+ * @property {Array.<contentful.ISlugReference>|null} [accessGroups] ContentfulTopicUpdated accessGroups
12969
+ * @property {number|Long|null} [updatedAt] ContentfulTopicUpdated updatedAt
12970
+ */
12971
+
12972
+ /**
12973
+ * Constructs a new ContentfulTopicUpdated.
12974
+ * @exports ContentfulTopicUpdated
12975
+ * @classdesc Represents a ContentfulTopicUpdated.
12976
+ * @implements IContentfulTopicUpdated
12977
+ * @constructor
12978
+ * @param {IContentfulTopicUpdated=} [properties] Properties to set
12979
+ */
12980
+ function ContentfulTopicUpdated(properties) {
12981
+ this.iconMedia = {};
12982
+ this.headerPatternMedia = {};
12983
+ this.menuPatternMedia = {};
12984
+ this.accessGroups = [];
12985
+ if (properties)
12986
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12987
+ if (properties[keys[i]] != null)
12988
+ this[keys[i]] = properties[keys[i]];
12989
+ }
12990
+
12991
+ /**
12992
+ * ContentfulTopicUpdated name.
12993
+ * @member {string} name
12994
+ * @memberof ContentfulTopicUpdated
12995
+ * @instance
12996
+ */
12997
+ ContentfulTopicUpdated.prototype.name = "";
12998
+
12999
+ /**
13000
+ * ContentfulTopicUpdated slug.
13001
+ * @member {string} slug
13002
+ * @memberof ContentfulTopicUpdated
13003
+ * @instance
13004
+ */
13005
+ ContentfulTopicUpdated.prototype.slug = "";
13006
+
13007
+ /**
13008
+ * ContentfulTopicUpdated description.
13009
+ * @member {string} description
13010
+ * @memberof ContentfulTopicUpdated
13011
+ * @instance
13012
+ */
13013
+ ContentfulTopicUpdated.prototype.description = "";
13014
+
13015
+ /**
13016
+ * ContentfulTopicUpdated location.
13017
+ * @member {string} location
13018
+ * @memberof ContentfulTopicUpdated
13019
+ * @instance
13020
+ */
13021
+ ContentfulTopicUpdated.prototype.location = "";
13022
+
13023
+ /**
13024
+ * ContentfulTopicUpdated primaryColor.
13025
+ * @member {string} primaryColor
13026
+ * @memberof ContentfulTopicUpdated
13027
+ * @instance
13028
+ */
13029
+ ContentfulTopicUpdated.prototype.primaryColor = "";
13030
+
13031
+ /**
13032
+ * ContentfulTopicUpdated secondaryColor.
13033
+ * @member {string} secondaryColor
13034
+ * @memberof ContentfulTopicUpdated
13035
+ * @instance
13036
+ */
13037
+ ContentfulTopicUpdated.prototype.secondaryColor = "";
13038
+
13039
+ /**
13040
+ * ContentfulTopicUpdated tertiaryColor.
13041
+ * @member {string} tertiaryColor
13042
+ * @memberof ContentfulTopicUpdated
13043
+ * @instance
13044
+ */
13045
+ ContentfulTopicUpdated.prototype.tertiaryColor = "";
13046
+
13047
+ /**
13048
+ * ContentfulTopicUpdated iconMedia.
13049
+ * @member {Object.<string,contentful.IIdReference>} iconMedia
13050
+ * @memberof ContentfulTopicUpdated
13051
+ * @instance
13052
+ */
13053
+ ContentfulTopicUpdated.prototype.iconMedia = $util.emptyObject;
13054
+
13055
+ /**
13056
+ * ContentfulTopicUpdated headerPatternMedia.
13057
+ * @member {Object.<string,contentful.IIdReference>} headerPatternMedia
13058
+ * @memberof ContentfulTopicUpdated
13059
+ * @instance
13060
+ */
13061
+ ContentfulTopicUpdated.prototype.headerPatternMedia = $util.emptyObject;
13062
+
13063
+ /**
13064
+ * ContentfulTopicUpdated menuPatternMedia.
13065
+ * @member {Object.<string,contentful.IIdReference>} menuPatternMedia
13066
+ * @memberof ContentfulTopicUpdated
13067
+ * @instance
13068
+ */
13069
+ ContentfulTopicUpdated.prototype.menuPatternMedia = $util.emptyObject;
13070
+
13071
+ /**
13072
+ * ContentfulTopicUpdated accessGroups.
13073
+ * @member {Array.<contentful.ISlugReference>} accessGroups
13074
+ * @memberof ContentfulTopicUpdated
13075
+ * @instance
13076
+ */
13077
+ ContentfulTopicUpdated.prototype.accessGroups = $util.emptyArray;
13078
+
13079
+ /**
13080
+ * ContentfulTopicUpdated updatedAt.
13081
+ * @member {number|Long} updatedAt
13082
+ * @memberof ContentfulTopicUpdated
13083
+ * @instance
13084
+ */
13085
+ ContentfulTopicUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
13086
+
13087
+ /**
13088
+ * Creates a new ContentfulTopicUpdated instance using the specified properties.
13089
+ * @function create
13090
+ * @memberof ContentfulTopicUpdated
13091
+ * @static
13092
+ * @param {IContentfulTopicUpdated=} [properties] Properties to set
13093
+ * @returns {ContentfulTopicUpdated} ContentfulTopicUpdated instance
13094
+ */
13095
+ ContentfulTopicUpdated.create = function create(properties) {
13096
+ return new ContentfulTopicUpdated(properties);
13097
+ };
13098
+
13099
+ /**
13100
+ * Encodes the specified ContentfulTopicUpdated message. Does not implicitly {@link ContentfulTopicUpdated.verify|verify} messages.
13101
+ * @function encode
13102
+ * @memberof ContentfulTopicUpdated
13103
+ * @static
13104
+ * @param {IContentfulTopicUpdated} message ContentfulTopicUpdated message or plain object to encode
13105
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13106
+ * @returns {$protobuf.Writer} Writer
13107
+ */
13108
+ ContentfulTopicUpdated.encode = function encode(message, writer) {
13109
+ if (!writer)
13110
+ writer = $Writer.create();
13111
+ if (message.name != null && message.hasOwnProperty("name"))
13112
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
13113
+ if (message.slug != null && message.hasOwnProperty("slug"))
13114
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.slug);
13115
+ if (message.description != null && message.hasOwnProperty("description"))
13116
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
13117
+ if (message.location != null && message.hasOwnProperty("location"))
13118
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.location);
13119
+ if (message.primaryColor != null && message.hasOwnProperty("primaryColor"))
13120
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.primaryColor);
13121
+ if (message.secondaryColor != null && message.hasOwnProperty("secondaryColor"))
13122
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.secondaryColor);
13123
+ if (message.tertiaryColor != null && message.hasOwnProperty("tertiaryColor"))
13124
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.tertiaryColor);
13125
+ if (message.iconMedia != null && message.hasOwnProperty("iconMedia"))
13126
+ for (var keys = Object.keys(message.iconMedia), i = 0; i < keys.length; ++i) {
13127
+ writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
13128
+ $root.contentful.IdReference.encode(message.iconMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
13129
+ }
13130
+ if (message.headerPatternMedia != null && message.hasOwnProperty("headerPatternMedia"))
13131
+ for (var keys = Object.keys(message.headerPatternMedia), i = 0; i < keys.length; ++i) {
13132
+ writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
13133
+ $root.contentful.IdReference.encode(message.headerPatternMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
13134
+ }
13135
+ if (message.menuPatternMedia != null && message.hasOwnProperty("menuPatternMedia"))
13136
+ for (var keys = Object.keys(message.menuPatternMedia), i = 0; i < keys.length; ++i) {
13137
+ writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
13138
+ $root.contentful.IdReference.encode(message.menuPatternMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
13139
+ }
13140
+ if (message.accessGroups != null && message.accessGroups.length)
13141
+ for (var i = 0; i < message.accessGroups.length; ++i)
13142
+ $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
13143
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
13144
+ writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.updatedAt);
13145
+ return writer;
13146
+ };
13147
+
13148
+ /**
13149
+ * Encodes the specified ContentfulTopicUpdated message, length delimited. Does not implicitly {@link ContentfulTopicUpdated.verify|verify} messages.
13150
+ * @function encodeDelimited
13151
+ * @memberof ContentfulTopicUpdated
13152
+ * @static
13153
+ * @param {IContentfulTopicUpdated} message ContentfulTopicUpdated message or plain object to encode
13154
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13155
+ * @returns {$protobuf.Writer} Writer
13156
+ */
13157
+ ContentfulTopicUpdated.encodeDelimited = function encodeDelimited(message, writer) {
13158
+ return this.encode(message, writer).ldelim();
13159
+ };
13160
+
13161
+ /**
13162
+ * Decodes a ContentfulTopicUpdated message from the specified reader or buffer.
13163
+ * @function decode
13164
+ * @memberof ContentfulTopicUpdated
13165
+ * @static
13166
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13167
+ * @param {number} [length] Message length if known beforehand
13168
+ * @returns {ContentfulTopicUpdated} ContentfulTopicUpdated
13169
+ * @throws {Error} If the payload is not a reader or valid buffer
13170
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13171
+ */
13172
+ ContentfulTopicUpdated.decode = function decode(reader, length) {
13173
+ if (!(reader instanceof $Reader))
13174
+ reader = $Reader.create(reader);
13175
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulTopicUpdated(), key;
13176
+ while (reader.pos < end) {
13177
+ var tag = reader.uint32();
13178
+ switch (tag >>> 3) {
13179
+ case 1:
13180
+ message.name = reader.string();
13181
+ break;
13182
+ case 2:
13183
+ message.slug = reader.string();
13184
+ break;
13185
+ case 3:
13186
+ message.description = reader.string();
13187
+ break;
13188
+ case 4:
13189
+ message.location = reader.string();
13190
+ break;
13191
+ case 5:
13192
+ message.primaryColor = reader.string();
13193
+ break;
13194
+ case 6:
13195
+ message.secondaryColor = reader.string();
13196
+ break;
13197
+ case 7:
13198
+ message.tertiaryColor = reader.string();
13199
+ break;
13200
+ case 8:
13201
+ reader.skip().pos++;
13202
+ if (message.iconMedia === $util.emptyObject)
13203
+ message.iconMedia = {};
13204
+ key = reader.string();
13205
+ reader.pos++;
13206
+ message.iconMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
13207
+ break;
13208
+ case 9:
13209
+ reader.skip().pos++;
13210
+ if (message.headerPatternMedia === $util.emptyObject)
13211
+ message.headerPatternMedia = {};
13212
+ key = reader.string();
13213
+ reader.pos++;
13214
+ message.headerPatternMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
13215
+ break;
13216
+ case 10:
13217
+ reader.skip().pos++;
13218
+ if (message.menuPatternMedia === $util.emptyObject)
13219
+ message.menuPatternMedia = {};
13220
+ key = reader.string();
13221
+ reader.pos++;
13222
+ message.menuPatternMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
13223
+ break;
13224
+ case 11:
13225
+ if (!(message.accessGroups && message.accessGroups.length))
13226
+ message.accessGroups = [];
13227
+ message.accessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
13228
+ break;
13229
+ case 12:
13230
+ message.updatedAt = reader.uint64();
13231
+ break;
13232
+ default:
13233
+ reader.skipType(tag & 7);
13234
+ break;
13235
+ }
13236
+ }
13237
+ return message;
13238
+ };
13239
+
13240
+ /**
13241
+ * Decodes a ContentfulTopicUpdated message from the specified reader or buffer, length delimited.
13242
+ * @function decodeDelimited
13243
+ * @memberof ContentfulTopicUpdated
13244
+ * @static
13245
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13246
+ * @returns {ContentfulTopicUpdated} ContentfulTopicUpdated
13247
+ * @throws {Error} If the payload is not a reader or valid buffer
13248
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13249
+ */
13250
+ ContentfulTopicUpdated.decodeDelimited = function decodeDelimited(reader) {
13251
+ if (!(reader instanceof $Reader))
13252
+ reader = new $Reader(reader);
13253
+ return this.decode(reader, reader.uint32());
13254
+ };
13255
+
13256
+ /**
13257
+ * Verifies a ContentfulTopicUpdated message.
13258
+ * @function verify
13259
+ * @memberof ContentfulTopicUpdated
13260
+ * @static
13261
+ * @param {Object.<string,*>} message Plain object to verify
13262
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
13263
+ */
13264
+ ContentfulTopicUpdated.verify = function verify(message) {
13265
+ if (typeof message !== "object" || message === null)
13266
+ return "object expected";
13267
+ if (message.name != null && message.hasOwnProperty("name"))
13268
+ if (!$util.isString(message.name))
13269
+ return "name: string expected";
13270
+ if (message.slug != null && message.hasOwnProperty("slug"))
13271
+ if (!$util.isString(message.slug))
13272
+ return "slug: string expected";
13273
+ if (message.description != null && message.hasOwnProperty("description"))
13274
+ if (!$util.isString(message.description))
13275
+ return "description: string expected";
13276
+ if (message.location != null && message.hasOwnProperty("location"))
13277
+ if (!$util.isString(message.location))
13278
+ return "location: string expected";
13279
+ if (message.primaryColor != null && message.hasOwnProperty("primaryColor"))
13280
+ if (!$util.isString(message.primaryColor))
13281
+ return "primaryColor: string expected";
13282
+ if (message.secondaryColor != null && message.hasOwnProperty("secondaryColor"))
13283
+ if (!$util.isString(message.secondaryColor))
13284
+ return "secondaryColor: string expected";
13285
+ if (message.tertiaryColor != null && message.hasOwnProperty("tertiaryColor"))
13286
+ if (!$util.isString(message.tertiaryColor))
13287
+ return "tertiaryColor: string expected";
13288
+ if (message.iconMedia != null && message.hasOwnProperty("iconMedia")) {
13289
+ if (!$util.isObject(message.iconMedia))
13290
+ return "iconMedia: object expected";
13291
+ var key = Object.keys(message.iconMedia);
13292
+ for (var i = 0; i < key.length; ++i) {
13293
+ var error = $root.contentful.IdReference.verify(message.iconMedia[key[i]]);
13294
+ if (error)
13295
+ return "iconMedia." + error;
13296
+ }
13297
+ }
13298
+ if (message.headerPatternMedia != null && message.hasOwnProperty("headerPatternMedia")) {
13299
+ if (!$util.isObject(message.headerPatternMedia))
13300
+ return "headerPatternMedia: object expected";
13301
+ var key = Object.keys(message.headerPatternMedia);
13302
+ for (var i = 0; i < key.length; ++i) {
13303
+ var error = $root.contentful.IdReference.verify(message.headerPatternMedia[key[i]]);
13304
+ if (error)
13305
+ return "headerPatternMedia." + error;
13306
+ }
13307
+ }
13308
+ if (message.menuPatternMedia != null && message.hasOwnProperty("menuPatternMedia")) {
13309
+ if (!$util.isObject(message.menuPatternMedia))
13310
+ return "menuPatternMedia: object expected";
13311
+ var key = Object.keys(message.menuPatternMedia);
13312
+ for (var i = 0; i < key.length; ++i) {
13313
+ var error = $root.contentful.IdReference.verify(message.menuPatternMedia[key[i]]);
13314
+ if (error)
13315
+ return "menuPatternMedia." + error;
13316
+ }
13317
+ }
13318
+ if (message.accessGroups != null && message.hasOwnProperty("accessGroups")) {
13319
+ if (!Array.isArray(message.accessGroups))
13320
+ return "accessGroups: array expected";
13321
+ for (var i = 0; i < message.accessGroups.length; ++i) {
13322
+ var error = $root.contentful.SlugReference.verify(message.accessGroups[i]);
13323
+ if (error)
13324
+ return "accessGroups." + error;
13325
+ }
13326
+ }
13327
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
13328
+ if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
13329
+ return "updatedAt: integer|Long expected";
13330
+ return null;
13331
+ };
13332
+
13333
+ /**
13334
+ * Creates a ContentfulTopicUpdated message from a plain object. Also converts values to their respective internal types.
13335
+ * @function fromObject
13336
+ * @memberof ContentfulTopicUpdated
13337
+ * @static
13338
+ * @param {Object.<string,*>} object Plain object
13339
+ * @returns {ContentfulTopicUpdated} ContentfulTopicUpdated
13340
+ */
13341
+ ContentfulTopicUpdated.fromObject = function fromObject(object) {
13342
+ if (object instanceof $root.ContentfulTopicUpdated)
13343
+ return object;
13344
+ var message = new $root.ContentfulTopicUpdated();
13345
+ if (object.name != null)
13346
+ message.name = String(object.name);
13347
+ if (object.slug != null)
13348
+ message.slug = String(object.slug);
13349
+ if (object.description != null)
13350
+ message.description = String(object.description);
13351
+ if (object.location != null)
13352
+ message.location = String(object.location);
13353
+ if (object.primaryColor != null)
13354
+ message.primaryColor = String(object.primaryColor);
13355
+ if (object.secondaryColor != null)
13356
+ message.secondaryColor = String(object.secondaryColor);
13357
+ if (object.tertiaryColor != null)
13358
+ message.tertiaryColor = String(object.tertiaryColor);
13359
+ if (object.iconMedia) {
13360
+ if (typeof object.iconMedia !== "object")
13361
+ throw TypeError(".ContentfulTopicUpdated.iconMedia: object expected");
13362
+ message.iconMedia = {};
13363
+ for (var keys = Object.keys(object.iconMedia), i = 0; i < keys.length; ++i) {
13364
+ if (typeof object.iconMedia[keys[i]] !== "object")
13365
+ throw TypeError(".ContentfulTopicUpdated.iconMedia: object expected");
13366
+ message.iconMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.iconMedia[keys[i]]);
13367
+ }
13368
+ }
13369
+ if (object.headerPatternMedia) {
13370
+ if (typeof object.headerPatternMedia !== "object")
13371
+ throw TypeError(".ContentfulTopicUpdated.headerPatternMedia: object expected");
13372
+ message.headerPatternMedia = {};
13373
+ for (var keys = Object.keys(object.headerPatternMedia), i = 0; i < keys.length; ++i) {
13374
+ if (typeof object.headerPatternMedia[keys[i]] !== "object")
13375
+ throw TypeError(".ContentfulTopicUpdated.headerPatternMedia: object expected");
13376
+ message.headerPatternMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.headerPatternMedia[keys[i]]);
13377
+ }
13378
+ }
13379
+ if (object.menuPatternMedia) {
13380
+ if (typeof object.menuPatternMedia !== "object")
13381
+ throw TypeError(".ContentfulTopicUpdated.menuPatternMedia: object expected");
13382
+ message.menuPatternMedia = {};
13383
+ for (var keys = Object.keys(object.menuPatternMedia), i = 0; i < keys.length; ++i) {
13384
+ if (typeof object.menuPatternMedia[keys[i]] !== "object")
13385
+ throw TypeError(".ContentfulTopicUpdated.menuPatternMedia: object expected");
13386
+ message.menuPatternMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.menuPatternMedia[keys[i]]);
13387
+ }
13388
+ }
13389
+ if (object.accessGroups) {
13390
+ if (!Array.isArray(object.accessGroups))
13391
+ throw TypeError(".ContentfulTopicUpdated.accessGroups: array expected");
13392
+ message.accessGroups = [];
13393
+ for (var i = 0; i < object.accessGroups.length; ++i) {
13394
+ if (typeof object.accessGroups[i] !== "object")
13395
+ throw TypeError(".ContentfulTopicUpdated.accessGroups: object expected");
13396
+ message.accessGroups[i] = $root.contentful.SlugReference.fromObject(object.accessGroups[i]);
13397
+ }
13398
+ }
13399
+ if (object.updatedAt != null)
13400
+ if ($util.Long)
13401
+ (message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
13402
+ else if (typeof object.updatedAt === "string")
13403
+ message.updatedAt = parseInt(object.updatedAt, 10);
13404
+ else if (typeof object.updatedAt === "number")
13405
+ message.updatedAt = object.updatedAt;
13406
+ else if (typeof object.updatedAt === "object")
13407
+ message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
13408
+ return message;
13409
+ };
13410
+
13411
+ /**
13412
+ * Creates a plain object from a ContentfulTopicUpdated message. Also converts values to other types if specified.
13413
+ * @function toObject
13414
+ * @memberof ContentfulTopicUpdated
13415
+ * @static
13416
+ * @param {ContentfulTopicUpdated} message ContentfulTopicUpdated
13417
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
13418
+ * @returns {Object.<string,*>} Plain object
13419
+ */
13420
+ ContentfulTopicUpdated.toObject = function toObject(message, options) {
13421
+ if (!options)
13422
+ options = {};
13423
+ var object = {};
13424
+ if (options.arrays || options.defaults)
13425
+ object.accessGroups = [];
13426
+ if (options.objects || options.defaults) {
13427
+ object.iconMedia = {};
13428
+ object.headerPatternMedia = {};
13429
+ object.menuPatternMedia = {};
13430
+ }
13431
+ if (options.defaults) {
13432
+ object.name = "";
13433
+ object.slug = "";
13434
+ object.description = "";
13435
+ object.location = "";
13436
+ object.primaryColor = "";
13437
+ object.secondaryColor = "";
13438
+ object.tertiaryColor = "";
13439
+ if ($util.Long) {
13440
+ var long = new $util.Long(0, 0, true);
13441
+ object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13442
+ } else
13443
+ object.updatedAt = options.longs === String ? "0" : 0;
13444
+ }
13445
+ if (message.name != null && message.hasOwnProperty("name"))
13446
+ object.name = message.name;
13447
+ if (message.slug != null && message.hasOwnProperty("slug"))
13448
+ object.slug = message.slug;
13449
+ if (message.description != null && message.hasOwnProperty("description"))
13450
+ object.description = message.description;
13451
+ if (message.location != null && message.hasOwnProperty("location"))
13452
+ object.location = message.location;
13453
+ if (message.primaryColor != null && message.hasOwnProperty("primaryColor"))
13454
+ object.primaryColor = message.primaryColor;
13455
+ if (message.secondaryColor != null && message.hasOwnProperty("secondaryColor"))
13456
+ object.secondaryColor = message.secondaryColor;
13457
+ if (message.tertiaryColor != null && message.hasOwnProperty("tertiaryColor"))
13458
+ object.tertiaryColor = message.tertiaryColor;
13459
+ var keys2;
13460
+ if (message.iconMedia && (keys2 = Object.keys(message.iconMedia)).length) {
13461
+ object.iconMedia = {};
13462
+ for (var j = 0; j < keys2.length; ++j)
13463
+ object.iconMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.iconMedia[keys2[j]], options);
13464
+ }
13465
+ if (message.headerPatternMedia && (keys2 = Object.keys(message.headerPatternMedia)).length) {
13466
+ object.headerPatternMedia = {};
13467
+ for (var j = 0; j < keys2.length; ++j)
13468
+ object.headerPatternMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.headerPatternMedia[keys2[j]], options);
13469
+ }
13470
+ if (message.menuPatternMedia && (keys2 = Object.keys(message.menuPatternMedia)).length) {
13471
+ object.menuPatternMedia = {};
13472
+ for (var j = 0; j < keys2.length; ++j)
13473
+ object.menuPatternMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.menuPatternMedia[keys2[j]], options);
13474
+ }
13475
+ if (message.accessGroups && message.accessGroups.length) {
13476
+ object.accessGroups = [];
13477
+ for (var j = 0; j < message.accessGroups.length; ++j)
13478
+ object.accessGroups[j] = $root.contentful.SlugReference.toObject(message.accessGroups[j], options);
13479
+ }
13480
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
13481
+ if (typeof message.updatedAt === "number")
13482
+ object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
13483
+ else
13484
+ 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;
13485
+ return object;
13486
+ };
13487
+
13488
+ /**
13489
+ * Converts this ContentfulTopicUpdated to JSON.
13490
+ * @function toJSON
13491
+ * @memberof ContentfulTopicUpdated
13492
+ * @instance
13493
+ * @returns {Object.<string,*>} JSON object
13494
+ */
13495
+ ContentfulTopicUpdated.prototype.toJSON = function toJSON() {
13496
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
13497
+ };
13498
+
13499
+ return ContentfulTopicUpdated;
13500
+ })();
13501
+
13502
+ $root.ContentfulTopicDeleted = (function() {
13503
+
13504
+ /**
13505
+ * Properties of a ContentfulTopicDeleted.
13506
+ * @exports IContentfulTopicDeleted
13507
+ * @interface IContentfulTopicDeleted
13508
+ * @property {string|null} [slug] ContentfulTopicDeleted slug
13509
+ * @property {number|Long|null} [deletedAt] ContentfulTopicDeleted deletedAt
13510
+ */
13511
+
13512
+ /**
13513
+ * Constructs a new ContentfulTopicDeleted.
13514
+ * @exports ContentfulTopicDeleted
13515
+ * @classdesc Represents a ContentfulTopicDeleted.
13516
+ * @implements IContentfulTopicDeleted
13517
+ * @constructor
13518
+ * @param {IContentfulTopicDeleted=} [properties] Properties to set
13519
+ */
13520
+ function ContentfulTopicDeleted(properties) {
13521
+ if (properties)
13522
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13523
+ if (properties[keys[i]] != null)
13524
+ this[keys[i]] = properties[keys[i]];
13525
+ }
13526
+
13527
+ /**
13528
+ * ContentfulTopicDeleted slug.
13529
+ * @member {string} slug
13530
+ * @memberof ContentfulTopicDeleted
13531
+ * @instance
13532
+ */
13533
+ ContentfulTopicDeleted.prototype.slug = "";
13534
+
13535
+ /**
13536
+ * ContentfulTopicDeleted deletedAt.
13537
+ * @member {number|Long} deletedAt
13538
+ * @memberof ContentfulTopicDeleted
13539
+ * @instance
13540
+ */
13541
+ ContentfulTopicDeleted.prototype.deletedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
13542
+
13543
+ /**
13544
+ * Creates a new ContentfulTopicDeleted instance using the specified properties.
13545
+ * @function create
13546
+ * @memberof ContentfulTopicDeleted
13547
+ * @static
13548
+ * @param {IContentfulTopicDeleted=} [properties] Properties to set
13549
+ * @returns {ContentfulTopicDeleted} ContentfulTopicDeleted instance
13550
+ */
13551
+ ContentfulTopicDeleted.create = function create(properties) {
13552
+ return new ContentfulTopicDeleted(properties);
13553
+ };
13554
+
13555
+ /**
13556
+ * Encodes the specified ContentfulTopicDeleted message. Does not implicitly {@link ContentfulTopicDeleted.verify|verify} messages.
13557
+ * @function encode
13558
+ * @memberof ContentfulTopicDeleted
13559
+ * @static
13560
+ * @param {IContentfulTopicDeleted} message ContentfulTopicDeleted message or plain object to encode
13561
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13562
+ * @returns {$protobuf.Writer} Writer
13563
+ */
13564
+ ContentfulTopicDeleted.encode = function encode(message, writer) {
13565
+ if (!writer)
13566
+ writer = $Writer.create();
13567
+ if (message.slug != null && message.hasOwnProperty("slug"))
13568
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
13569
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
13570
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.deletedAt);
13571
+ return writer;
13572
+ };
13573
+
13574
+ /**
13575
+ * Encodes the specified ContentfulTopicDeleted message, length delimited. Does not implicitly {@link ContentfulTopicDeleted.verify|verify} messages.
13576
+ * @function encodeDelimited
13577
+ * @memberof ContentfulTopicDeleted
13578
+ * @static
13579
+ * @param {IContentfulTopicDeleted} message ContentfulTopicDeleted message or plain object to encode
13580
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13581
+ * @returns {$protobuf.Writer} Writer
13582
+ */
13583
+ ContentfulTopicDeleted.encodeDelimited = function encodeDelimited(message, writer) {
13584
+ return this.encode(message, writer).ldelim();
13585
+ };
13586
+
13587
+ /**
13588
+ * Decodes a ContentfulTopicDeleted message from the specified reader or buffer.
13589
+ * @function decode
13590
+ * @memberof ContentfulTopicDeleted
13591
+ * @static
13592
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13593
+ * @param {number} [length] Message length if known beforehand
13594
+ * @returns {ContentfulTopicDeleted} ContentfulTopicDeleted
13595
+ * @throws {Error} If the payload is not a reader or valid buffer
13596
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13597
+ */
13598
+ ContentfulTopicDeleted.decode = function decode(reader, length) {
13599
+ if (!(reader instanceof $Reader))
13600
+ reader = $Reader.create(reader);
13601
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulTopicDeleted();
13602
+ while (reader.pos < end) {
13603
+ var tag = reader.uint32();
13604
+ switch (tag >>> 3) {
13605
+ case 1:
13606
+ message.slug = reader.string();
13607
+ break;
13608
+ case 2:
13609
+ message.deletedAt = reader.uint64();
13610
+ break;
13611
+ default:
13612
+ reader.skipType(tag & 7);
13613
+ break;
13614
+ }
13615
+ }
13616
+ return message;
13617
+ };
13618
+
13619
+ /**
13620
+ * Decodes a ContentfulTopicDeleted message from the specified reader or buffer, length delimited.
13621
+ * @function decodeDelimited
13622
+ * @memberof ContentfulTopicDeleted
13623
+ * @static
13624
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13625
+ * @returns {ContentfulTopicDeleted} ContentfulTopicDeleted
13626
+ * @throws {Error} If the payload is not a reader or valid buffer
13627
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13628
+ */
13629
+ ContentfulTopicDeleted.decodeDelimited = function decodeDelimited(reader) {
13630
+ if (!(reader instanceof $Reader))
13631
+ reader = new $Reader(reader);
13632
+ return this.decode(reader, reader.uint32());
13633
+ };
13634
+
13635
+ /**
13636
+ * Verifies a ContentfulTopicDeleted message.
13637
+ * @function verify
13638
+ * @memberof ContentfulTopicDeleted
13639
+ * @static
13640
+ * @param {Object.<string,*>} message Plain object to verify
13641
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
13642
+ */
13643
+ ContentfulTopicDeleted.verify = function verify(message) {
13644
+ if (typeof message !== "object" || message === null)
13645
+ return "object expected";
13646
+ if (message.slug != null && message.hasOwnProperty("slug"))
13647
+ if (!$util.isString(message.slug))
13648
+ return "slug: string expected";
13649
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
13650
+ if (!$util.isInteger(message.deletedAt) && !(message.deletedAt && $util.isInteger(message.deletedAt.low) && $util.isInteger(message.deletedAt.high)))
13651
+ return "deletedAt: integer|Long expected";
13652
+ return null;
13653
+ };
13654
+
13655
+ /**
13656
+ * Creates a ContentfulTopicDeleted message from a plain object. Also converts values to their respective internal types.
13657
+ * @function fromObject
13658
+ * @memberof ContentfulTopicDeleted
13659
+ * @static
13660
+ * @param {Object.<string,*>} object Plain object
13661
+ * @returns {ContentfulTopicDeleted} ContentfulTopicDeleted
13662
+ */
13663
+ ContentfulTopicDeleted.fromObject = function fromObject(object) {
13664
+ if (object instanceof $root.ContentfulTopicDeleted)
13665
+ return object;
13666
+ var message = new $root.ContentfulTopicDeleted();
13667
+ if (object.slug != null)
13668
+ message.slug = String(object.slug);
13669
+ if (object.deletedAt != null)
13670
+ if ($util.Long)
13671
+ (message.deletedAt = $util.Long.fromValue(object.deletedAt)).unsigned = true;
13672
+ else if (typeof object.deletedAt === "string")
13673
+ message.deletedAt = parseInt(object.deletedAt, 10);
13674
+ else if (typeof object.deletedAt === "number")
13675
+ message.deletedAt = object.deletedAt;
13676
+ else if (typeof object.deletedAt === "object")
13677
+ message.deletedAt = new $util.LongBits(object.deletedAt.low >>> 0, object.deletedAt.high >>> 0).toNumber(true);
13678
+ return message;
13679
+ };
13680
+
13681
+ /**
13682
+ * Creates a plain object from a ContentfulTopicDeleted message. Also converts values to other types if specified.
13683
+ * @function toObject
13684
+ * @memberof ContentfulTopicDeleted
13685
+ * @static
13686
+ * @param {ContentfulTopicDeleted} message ContentfulTopicDeleted
13687
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
13688
+ * @returns {Object.<string,*>} Plain object
13689
+ */
13690
+ ContentfulTopicDeleted.toObject = function toObject(message, options) {
13691
+ if (!options)
13692
+ options = {};
13693
+ var object = {};
13694
+ if (options.defaults) {
13695
+ object.slug = "";
13696
+ if ($util.Long) {
13697
+ var long = new $util.Long(0, 0, true);
13698
+ object.deletedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13699
+ } else
13700
+ object.deletedAt = options.longs === String ? "0" : 0;
13701
+ }
13702
+ if (message.slug != null && message.hasOwnProperty("slug"))
13703
+ object.slug = message.slug;
13704
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
13705
+ if (typeof message.deletedAt === "number")
13706
+ object.deletedAt = options.longs === String ? String(message.deletedAt) : message.deletedAt;
13707
+ else
13708
+ 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;
13709
+ return object;
13710
+ };
13711
+
13712
+ /**
13713
+ * Converts this ContentfulTopicDeleted to JSON.
13714
+ * @function toJSON
13715
+ * @memberof ContentfulTopicDeleted
13716
+ * @instance
13717
+ * @returns {Object.<string,*>} JSON object
13718
+ */
13719
+ ContentfulTopicDeleted.prototype.toJSON = function toJSON() {
13720
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
13721
+ };
13722
+
13723
+ return ContentfulTopicDeleted;
13724
+ })();
13725
+
12402
13726
  $root.ContentfulContentModelCreated = (function() {
12403
13727
 
12404
13728
  /**