@headspace/protos-events 1.186.0 → 1.187.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.
- package/lib/index.d.ts +444 -0
- package/lib/index.js +1694 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -37550,6 +37550,1700 @@ $root.ContentPlayedMetadata = (function() {
|
|
|
37550
37550
|
return ContentPlayedMetadata;
|
|
37551
37551
|
})();
|
|
37552
37552
|
|
|
37553
|
+
$root.SleepcastContentCreated = (function() {
|
|
37554
|
+
|
|
37555
|
+
/**
|
|
37556
|
+
* Properties of a SleepcastContentCreated.
|
|
37557
|
+
* @exports ISleepcastContentCreated
|
|
37558
|
+
* @interface ISleepcastContentCreated
|
|
37559
|
+
* @property {number|null} [contentId] SleepcastContentCreated contentId
|
|
37560
|
+
* @property {Object.<string,string>|null} [title] SleepcastContentCreated title
|
|
37561
|
+
* @property {string|null} [slug] SleepcastContentCreated slug
|
|
37562
|
+
* @property {Object.<string,string>|null} [subtitle] SleepcastContentCreated subtitle
|
|
37563
|
+
* @property {Object.<string,string>|null} [description] SleepcastContentCreated description
|
|
37564
|
+
* @property {contentful.ISlugReference|null} [recipe] SleepcastContentCreated recipe
|
|
37565
|
+
* @property {Object.<string,contentful.IIdReference>|null} [tileBackgroundMedia] SleepcastContentCreated tileBackgroundMedia
|
|
37566
|
+
* @property {Object.<string,contentful.IIdReference>|null} [playerBackgroundMedia] SleepcastContentCreated playerBackgroundMedia
|
|
37567
|
+
* @property {boolean|null} [useVariantPresets] SleepcastContentCreated useVariantPresets
|
|
37568
|
+
* @property {boolean|null} [isEnabled] SleepcastContentCreated isEnabled
|
|
37569
|
+
* @property {Object.<string,contentful.IIdReferences>|null} [primaryAudioMedia] SleepcastContentCreated primaryAudioMedia
|
|
37570
|
+
* @property {Object.<string,contentful.IIdReferences>|null} [secondaryAudioMedia] SleepcastContentCreated secondaryAudioMedia
|
|
37571
|
+
* @property {Object.<string,contentful.IIdReferences>|null} [mixedAudioMedia] SleepcastContentCreated mixedAudioMedia
|
|
37572
|
+
* @property {Array.<contentful.ISlugReference>|null} [accessGroup] SleepcastContentCreated accessGroup
|
|
37573
|
+
* @property {number|Long|null} [createdAt] SleepcastContentCreated createdAt
|
|
37574
|
+
*/
|
|
37575
|
+
|
|
37576
|
+
/**
|
|
37577
|
+
* Constructs a new SleepcastContentCreated.
|
|
37578
|
+
* @exports SleepcastContentCreated
|
|
37579
|
+
* @classdesc Represents a SleepcastContentCreated.
|
|
37580
|
+
* @implements ISleepcastContentCreated
|
|
37581
|
+
* @constructor
|
|
37582
|
+
* @param {ISleepcastContentCreated=} [properties] Properties to set
|
|
37583
|
+
*/
|
|
37584
|
+
function SleepcastContentCreated(properties) {
|
|
37585
|
+
this.title = {};
|
|
37586
|
+
this.subtitle = {};
|
|
37587
|
+
this.description = {};
|
|
37588
|
+
this.tileBackgroundMedia = {};
|
|
37589
|
+
this.playerBackgroundMedia = {};
|
|
37590
|
+
this.primaryAudioMedia = {};
|
|
37591
|
+
this.secondaryAudioMedia = {};
|
|
37592
|
+
this.mixedAudioMedia = {};
|
|
37593
|
+
this.accessGroup = [];
|
|
37594
|
+
if (properties)
|
|
37595
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
37596
|
+
if (properties[keys[i]] != null)
|
|
37597
|
+
this[keys[i]] = properties[keys[i]];
|
|
37598
|
+
}
|
|
37599
|
+
|
|
37600
|
+
/**
|
|
37601
|
+
* SleepcastContentCreated contentId.
|
|
37602
|
+
* @member {number} contentId
|
|
37603
|
+
* @memberof SleepcastContentCreated
|
|
37604
|
+
* @instance
|
|
37605
|
+
*/
|
|
37606
|
+
SleepcastContentCreated.prototype.contentId = 0;
|
|
37607
|
+
|
|
37608
|
+
/**
|
|
37609
|
+
* SleepcastContentCreated title.
|
|
37610
|
+
* @member {Object.<string,string>} title
|
|
37611
|
+
* @memberof SleepcastContentCreated
|
|
37612
|
+
* @instance
|
|
37613
|
+
*/
|
|
37614
|
+
SleepcastContentCreated.prototype.title = $util.emptyObject;
|
|
37615
|
+
|
|
37616
|
+
/**
|
|
37617
|
+
* SleepcastContentCreated slug.
|
|
37618
|
+
* @member {string} slug
|
|
37619
|
+
* @memberof SleepcastContentCreated
|
|
37620
|
+
* @instance
|
|
37621
|
+
*/
|
|
37622
|
+
SleepcastContentCreated.prototype.slug = "";
|
|
37623
|
+
|
|
37624
|
+
/**
|
|
37625
|
+
* SleepcastContentCreated subtitle.
|
|
37626
|
+
* @member {Object.<string,string>} subtitle
|
|
37627
|
+
* @memberof SleepcastContentCreated
|
|
37628
|
+
* @instance
|
|
37629
|
+
*/
|
|
37630
|
+
SleepcastContentCreated.prototype.subtitle = $util.emptyObject;
|
|
37631
|
+
|
|
37632
|
+
/**
|
|
37633
|
+
* SleepcastContentCreated description.
|
|
37634
|
+
* @member {Object.<string,string>} description
|
|
37635
|
+
* @memberof SleepcastContentCreated
|
|
37636
|
+
* @instance
|
|
37637
|
+
*/
|
|
37638
|
+
SleepcastContentCreated.prototype.description = $util.emptyObject;
|
|
37639
|
+
|
|
37640
|
+
/**
|
|
37641
|
+
* SleepcastContentCreated recipe.
|
|
37642
|
+
* @member {contentful.ISlugReference|null|undefined} recipe
|
|
37643
|
+
* @memberof SleepcastContentCreated
|
|
37644
|
+
* @instance
|
|
37645
|
+
*/
|
|
37646
|
+
SleepcastContentCreated.prototype.recipe = null;
|
|
37647
|
+
|
|
37648
|
+
/**
|
|
37649
|
+
* SleepcastContentCreated tileBackgroundMedia.
|
|
37650
|
+
* @member {Object.<string,contentful.IIdReference>} tileBackgroundMedia
|
|
37651
|
+
* @memberof SleepcastContentCreated
|
|
37652
|
+
* @instance
|
|
37653
|
+
*/
|
|
37654
|
+
SleepcastContentCreated.prototype.tileBackgroundMedia = $util.emptyObject;
|
|
37655
|
+
|
|
37656
|
+
/**
|
|
37657
|
+
* SleepcastContentCreated playerBackgroundMedia.
|
|
37658
|
+
* @member {Object.<string,contentful.IIdReference>} playerBackgroundMedia
|
|
37659
|
+
* @memberof SleepcastContentCreated
|
|
37660
|
+
* @instance
|
|
37661
|
+
*/
|
|
37662
|
+
SleepcastContentCreated.prototype.playerBackgroundMedia = $util.emptyObject;
|
|
37663
|
+
|
|
37664
|
+
/**
|
|
37665
|
+
* SleepcastContentCreated useVariantPresets.
|
|
37666
|
+
* @member {boolean} useVariantPresets
|
|
37667
|
+
* @memberof SleepcastContentCreated
|
|
37668
|
+
* @instance
|
|
37669
|
+
*/
|
|
37670
|
+
SleepcastContentCreated.prototype.useVariantPresets = false;
|
|
37671
|
+
|
|
37672
|
+
/**
|
|
37673
|
+
* SleepcastContentCreated isEnabled.
|
|
37674
|
+
* @member {boolean} isEnabled
|
|
37675
|
+
* @memberof SleepcastContentCreated
|
|
37676
|
+
* @instance
|
|
37677
|
+
*/
|
|
37678
|
+
SleepcastContentCreated.prototype.isEnabled = false;
|
|
37679
|
+
|
|
37680
|
+
/**
|
|
37681
|
+
* SleepcastContentCreated primaryAudioMedia.
|
|
37682
|
+
* @member {Object.<string,contentful.IIdReferences>} primaryAudioMedia
|
|
37683
|
+
* @memberof SleepcastContentCreated
|
|
37684
|
+
* @instance
|
|
37685
|
+
*/
|
|
37686
|
+
SleepcastContentCreated.prototype.primaryAudioMedia = $util.emptyObject;
|
|
37687
|
+
|
|
37688
|
+
/**
|
|
37689
|
+
* SleepcastContentCreated secondaryAudioMedia.
|
|
37690
|
+
* @member {Object.<string,contentful.IIdReferences>} secondaryAudioMedia
|
|
37691
|
+
* @memberof SleepcastContentCreated
|
|
37692
|
+
* @instance
|
|
37693
|
+
*/
|
|
37694
|
+
SleepcastContentCreated.prototype.secondaryAudioMedia = $util.emptyObject;
|
|
37695
|
+
|
|
37696
|
+
/**
|
|
37697
|
+
* SleepcastContentCreated mixedAudioMedia.
|
|
37698
|
+
* @member {Object.<string,contentful.IIdReferences>} mixedAudioMedia
|
|
37699
|
+
* @memberof SleepcastContentCreated
|
|
37700
|
+
* @instance
|
|
37701
|
+
*/
|
|
37702
|
+
SleepcastContentCreated.prototype.mixedAudioMedia = $util.emptyObject;
|
|
37703
|
+
|
|
37704
|
+
/**
|
|
37705
|
+
* SleepcastContentCreated accessGroup.
|
|
37706
|
+
* @member {Array.<contentful.ISlugReference>} accessGroup
|
|
37707
|
+
* @memberof SleepcastContentCreated
|
|
37708
|
+
* @instance
|
|
37709
|
+
*/
|
|
37710
|
+
SleepcastContentCreated.prototype.accessGroup = $util.emptyArray;
|
|
37711
|
+
|
|
37712
|
+
/**
|
|
37713
|
+
* SleepcastContentCreated createdAt.
|
|
37714
|
+
* @member {number|Long} createdAt
|
|
37715
|
+
* @memberof SleepcastContentCreated
|
|
37716
|
+
* @instance
|
|
37717
|
+
*/
|
|
37718
|
+
SleepcastContentCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
37719
|
+
|
|
37720
|
+
/**
|
|
37721
|
+
* Creates a new SleepcastContentCreated instance using the specified properties.
|
|
37722
|
+
* @function create
|
|
37723
|
+
* @memberof SleepcastContentCreated
|
|
37724
|
+
* @static
|
|
37725
|
+
* @param {ISleepcastContentCreated=} [properties] Properties to set
|
|
37726
|
+
* @returns {SleepcastContentCreated} SleepcastContentCreated instance
|
|
37727
|
+
*/
|
|
37728
|
+
SleepcastContentCreated.create = function create(properties) {
|
|
37729
|
+
return new SleepcastContentCreated(properties);
|
|
37730
|
+
};
|
|
37731
|
+
|
|
37732
|
+
/**
|
|
37733
|
+
* Encodes the specified SleepcastContentCreated message. Does not implicitly {@link SleepcastContentCreated.verify|verify} messages.
|
|
37734
|
+
* @function encode
|
|
37735
|
+
* @memberof SleepcastContentCreated
|
|
37736
|
+
* @static
|
|
37737
|
+
* @param {ISleepcastContentCreated} message SleepcastContentCreated message or plain object to encode
|
|
37738
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
37739
|
+
* @returns {$protobuf.Writer} Writer
|
|
37740
|
+
*/
|
|
37741
|
+
SleepcastContentCreated.encode = function encode(message, writer) {
|
|
37742
|
+
if (!writer)
|
|
37743
|
+
writer = $Writer.create();
|
|
37744
|
+
if (message.contentId != null && message.hasOwnProperty("contentId"))
|
|
37745
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.contentId);
|
|
37746
|
+
if (message.title != null && message.hasOwnProperty("title"))
|
|
37747
|
+
for (var keys = Object.keys(message.title), i = 0; i < keys.length; ++i)
|
|
37748
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.title[keys[i]]).ldelim();
|
|
37749
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
37750
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.slug);
|
|
37751
|
+
if (message.subtitle != null && message.hasOwnProperty("subtitle"))
|
|
37752
|
+
for (var keys = Object.keys(message.subtitle), i = 0; i < keys.length; ++i)
|
|
37753
|
+
writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.subtitle[keys[i]]).ldelim();
|
|
37754
|
+
if (message.description != null && message.hasOwnProperty("description"))
|
|
37755
|
+
for (var keys = Object.keys(message.description), i = 0; i < keys.length; ++i)
|
|
37756
|
+
writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.description[keys[i]]).ldelim();
|
|
37757
|
+
if (message.recipe != null && message.hasOwnProperty("recipe"))
|
|
37758
|
+
$root.contentful.SlugReference.encode(message.recipe, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
37759
|
+
if (message.tileBackgroundMedia != null && message.hasOwnProperty("tileBackgroundMedia"))
|
|
37760
|
+
for (var keys = Object.keys(message.tileBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
37761
|
+
writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
37762
|
+
$root.contentful.IdReference.encode(message.tileBackgroundMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
37763
|
+
}
|
|
37764
|
+
if (message.playerBackgroundMedia != null && message.hasOwnProperty("playerBackgroundMedia"))
|
|
37765
|
+
for (var keys = Object.keys(message.playerBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
37766
|
+
writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
37767
|
+
$root.contentful.IdReference.encode(message.playerBackgroundMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
37768
|
+
}
|
|
37769
|
+
if (message.useVariantPresets != null && message.hasOwnProperty("useVariantPresets"))
|
|
37770
|
+
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.useVariantPresets);
|
|
37771
|
+
if (message.isEnabled != null && message.hasOwnProperty("isEnabled"))
|
|
37772
|
+
writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isEnabled);
|
|
37773
|
+
if (message.primaryAudioMedia != null && message.hasOwnProperty("primaryAudioMedia"))
|
|
37774
|
+
for (var keys = Object.keys(message.primaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
37775
|
+
writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
37776
|
+
$root.contentful.IdReferences.encode(message.primaryAudioMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
37777
|
+
}
|
|
37778
|
+
if (message.secondaryAudioMedia != null && message.hasOwnProperty("secondaryAudioMedia"))
|
|
37779
|
+
for (var keys = Object.keys(message.secondaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
37780
|
+
writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
37781
|
+
$root.contentful.IdReferences.encode(message.secondaryAudioMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
37782
|
+
}
|
|
37783
|
+
if (message.mixedAudioMedia != null && message.hasOwnProperty("mixedAudioMedia"))
|
|
37784
|
+
for (var keys = Object.keys(message.mixedAudioMedia), i = 0; i < keys.length; ++i) {
|
|
37785
|
+
writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
37786
|
+
$root.contentful.IdReferences.encode(message.mixedAudioMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
37787
|
+
}
|
|
37788
|
+
if (message.accessGroup != null && message.accessGroup.length)
|
|
37789
|
+
for (var i = 0; i < message.accessGroup.length; ++i)
|
|
37790
|
+
$root.contentful.SlugReference.encode(message.accessGroup[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
37791
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
37792
|
+
writer.uint32(/* id 15, wireType 0 =*/120).uint64(message.createdAt);
|
|
37793
|
+
return writer;
|
|
37794
|
+
};
|
|
37795
|
+
|
|
37796
|
+
/**
|
|
37797
|
+
* Encodes the specified SleepcastContentCreated message, length delimited. Does not implicitly {@link SleepcastContentCreated.verify|verify} messages.
|
|
37798
|
+
* @function encodeDelimited
|
|
37799
|
+
* @memberof SleepcastContentCreated
|
|
37800
|
+
* @static
|
|
37801
|
+
* @param {ISleepcastContentCreated} message SleepcastContentCreated message or plain object to encode
|
|
37802
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
37803
|
+
* @returns {$protobuf.Writer} Writer
|
|
37804
|
+
*/
|
|
37805
|
+
SleepcastContentCreated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
37806
|
+
return this.encode(message, writer).ldelim();
|
|
37807
|
+
};
|
|
37808
|
+
|
|
37809
|
+
/**
|
|
37810
|
+
* Decodes a SleepcastContentCreated message from the specified reader or buffer.
|
|
37811
|
+
* @function decode
|
|
37812
|
+
* @memberof SleepcastContentCreated
|
|
37813
|
+
* @static
|
|
37814
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
37815
|
+
* @param {number} [length] Message length if known beforehand
|
|
37816
|
+
* @returns {SleepcastContentCreated} SleepcastContentCreated
|
|
37817
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
37818
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
37819
|
+
*/
|
|
37820
|
+
SleepcastContentCreated.decode = function decode(reader, length) {
|
|
37821
|
+
if (!(reader instanceof $Reader))
|
|
37822
|
+
reader = $Reader.create(reader);
|
|
37823
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SleepcastContentCreated(), key;
|
|
37824
|
+
while (reader.pos < end) {
|
|
37825
|
+
var tag = reader.uint32();
|
|
37826
|
+
switch (tag >>> 3) {
|
|
37827
|
+
case 1:
|
|
37828
|
+
message.contentId = reader.int32();
|
|
37829
|
+
break;
|
|
37830
|
+
case 2:
|
|
37831
|
+
reader.skip().pos++;
|
|
37832
|
+
if (message.title === $util.emptyObject)
|
|
37833
|
+
message.title = {};
|
|
37834
|
+
key = reader.string();
|
|
37835
|
+
reader.pos++;
|
|
37836
|
+
message.title[key] = reader.string();
|
|
37837
|
+
break;
|
|
37838
|
+
case 3:
|
|
37839
|
+
message.slug = reader.string();
|
|
37840
|
+
break;
|
|
37841
|
+
case 4:
|
|
37842
|
+
reader.skip().pos++;
|
|
37843
|
+
if (message.subtitle === $util.emptyObject)
|
|
37844
|
+
message.subtitle = {};
|
|
37845
|
+
key = reader.string();
|
|
37846
|
+
reader.pos++;
|
|
37847
|
+
message.subtitle[key] = reader.string();
|
|
37848
|
+
break;
|
|
37849
|
+
case 5:
|
|
37850
|
+
reader.skip().pos++;
|
|
37851
|
+
if (message.description === $util.emptyObject)
|
|
37852
|
+
message.description = {};
|
|
37853
|
+
key = reader.string();
|
|
37854
|
+
reader.pos++;
|
|
37855
|
+
message.description[key] = reader.string();
|
|
37856
|
+
break;
|
|
37857
|
+
case 6:
|
|
37858
|
+
message.recipe = $root.contentful.SlugReference.decode(reader, reader.uint32());
|
|
37859
|
+
break;
|
|
37860
|
+
case 7:
|
|
37861
|
+
reader.skip().pos++;
|
|
37862
|
+
if (message.tileBackgroundMedia === $util.emptyObject)
|
|
37863
|
+
message.tileBackgroundMedia = {};
|
|
37864
|
+
key = reader.string();
|
|
37865
|
+
reader.pos++;
|
|
37866
|
+
message.tileBackgroundMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
|
|
37867
|
+
break;
|
|
37868
|
+
case 8:
|
|
37869
|
+
reader.skip().pos++;
|
|
37870
|
+
if (message.playerBackgroundMedia === $util.emptyObject)
|
|
37871
|
+
message.playerBackgroundMedia = {};
|
|
37872
|
+
key = reader.string();
|
|
37873
|
+
reader.pos++;
|
|
37874
|
+
message.playerBackgroundMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
|
|
37875
|
+
break;
|
|
37876
|
+
case 9:
|
|
37877
|
+
message.useVariantPresets = reader.bool();
|
|
37878
|
+
break;
|
|
37879
|
+
case 10:
|
|
37880
|
+
message.isEnabled = reader.bool();
|
|
37881
|
+
break;
|
|
37882
|
+
case 11:
|
|
37883
|
+
reader.skip().pos++;
|
|
37884
|
+
if (message.primaryAudioMedia === $util.emptyObject)
|
|
37885
|
+
message.primaryAudioMedia = {};
|
|
37886
|
+
key = reader.string();
|
|
37887
|
+
reader.pos++;
|
|
37888
|
+
message.primaryAudioMedia[key] = $root.contentful.IdReferences.decode(reader, reader.uint32());
|
|
37889
|
+
break;
|
|
37890
|
+
case 12:
|
|
37891
|
+
reader.skip().pos++;
|
|
37892
|
+
if (message.secondaryAudioMedia === $util.emptyObject)
|
|
37893
|
+
message.secondaryAudioMedia = {};
|
|
37894
|
+
key = reader.string();
|
|
37895
|
+
reader.pos++;
|
|
37896
|
+
message.secondaryAudioMedia[key] = $root.contentful.IdReferences.decode(reader, reader.uint32());
|
|
37897
|
+
break;
|
|
37898
|
+
case 13:
|
|
37899
|
+
reader.skip().pos++;
|
|
37900
|
+
if (message.mixedAudioMedia === $util.emptyObject)
|
|
37901
|
+
message.mixedAudioMedia = {};
|
|
37902
|
+
key = reader.string();
|
|
37903
|
+
reader.pos++;
|
|
37904
|
+
message.mixedAudioMedia[key] = $root.contentful.IdReferences.decode(reader, reader.uint32());
|
|
37905
|
+
break;
|
|
37906
|
+
case 14:
|
|
37907
|
+
if (!(message.accessGroup && message.accessGroup.length))
|
|
37908
|
+
message.accessGroup = [];
|
|
37909
|
+
message.accessGroup.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
|
|
37910
|
+
break;
|
|
37911
|
+
case 15:
|
|
37912
|
+
message.createdAt = reader.uint64();
|
|
37913
|
+
break;
|
|
37914
|
+
default:
|
|
37915
|
+
reader.skipType(tag & 7);
|
|
37916
|
+
break;
|
|
37917
|
+
}
|
|
37918
|
+
}
|
|
37919
|
+
return message;
|
|
37920
|
+
};
|
|
37921
|
+
|
|
37922
|
+
/**
|
|
37923
|
+
* Decodes a SleepcastContentCreated message from the specified reader or buffer, length delimited.
|
|
37924
|
+
* @function decodeDelimited
|
|
37925
|
+
* @memberof SleepcastContentCreated
|
|
37926
|
+
* @static
|
|
37927
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
37928
|
+
* @returns {SleepcastContentCreated} SleepcastContentCreated
|
|
37929
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
37930
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
37931
|
+
*/
|
|
37932
|
+
SleepcastContentCreated.decodeDelimited = function decodeDelimited(reader) {
|
|
37933
|
+
if (!(reader instanceof $Reader))
|
|
37934
|
+
reader = new $Reader(reader);
|
|
37935
|
+
return this.decode(reader, reader.uint32());
|
|
37936
|
+
};
|
|
37937
|
+
|
|
37938
|
+
/**
|
|
37939
|
+
* Verifies a SleepcastContentCreated message.
|
|
37940
|
+
* @function verify
|
|
37941
|
+
* @memberof SleepcastContentCreated
|
|
37942
|
+
* @static
|
|
37943
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
37944
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
37945
|
+
*/
|
|
37946
|
+
SleepcastContentCreated.verify = function verify(message) {
|
|
37947
|
+
if (typeof message !== "object" || message === null)
|
|
37948
|
+
return "object expected";
|
|
37949
|
+
if (message.contentId != null && message.hasOwnProperty("contentId"))
|
|
37950
|
+
if (!$util.isInteger(message.contentId))
|
|
37951
|
+
return "contentId: integer expected";
|
|
37952
|
+
if (message.title != null && message.hasOwnProperty("title")) {
|
|
37953
|
+
if (!$util.isObject(message.title))
|
|
37954
|
+
return "title: object expected";
|
|
37955
|
+
var key = Object.keys(message.title);
|
|
37956
|
+
for (var i = 0; i < key.length; ++i)
|
|
37957
|
+
if (!$util.isString(message.title[key[i]]))
|
|
37958
|
+
return "title: string{k:string} expected";
|
|
37959
|
+
}
|
|
37960
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
37961
|
+
if (!$util.isString(message.slug))
|
|
37962
|
+
return "slug: string expected";
|
|
37963
|
+
if (message.subtitle != null && message.hasOwnProperty("subtitle")) {
|
|
37964
|
+
if (!$util.isObject(message.subtitle))
|
|
37965
|
+
return "subtitle: object expected";
|
|
37966
|
+
var key = Object.keys(message.subtitle);
|
|
37967
|
+
for (var i = 0; i < key.length; ++i)
|
|
37968
|
+
if (!$util.isString(message.subtitle[key[i]]))
|
|
37969
|
+
return "subtitle: string{k:string} expected";
|
|
37970
|
+
}
|
|
37971
|
+
if (message.description != null && message.hasOwnProperty("description")) {
|
|
37972
|
+
if (!$util.isObject(message.description))
|
|
37973
|
+
return "description: object expected";
|
|
37974
|
+
var key = Object.keys(message.description);
|
|
37975
|
+
for (var i = 0; i < key.length; ++i)
|
|
37976
|
+
if (!$util.isString(message.description[key[i]]))
|
|
37977
|
+
return "description: string{k:string} expected";
|
|
37978
|
+
}
|
|
37979
|
+
if (message.recipe != null && message.hasOwnProperty("recipe")) {
|
|
37980
|
+
var error = $root.contentful.SlugReference.verify(message.recipe);
|
|
37981
|
+
if (error)
|
|
37982
|
+
return "recipe." + error;
|
|
37983
|
+
}
|
|
37984
|
+
if (message.tileBackgroundMedia != null && message.hasOwnProperty("tileBackgroundMedia")) {
|
|
37985
|
+
if (!$util.isObject(message.tileBackgroundMedia))
|
|
37986
|
+
return "tileBackgroundMedia: object expected";
|
|
37987
|
+
var key = Object.keys(message.tileBackgroundMedia);
|
|
37988
|
+
for (var i = 0; i < key.length; ++i) {
|
|
37989
|
+
var error = $root.contentful.IdReference.verify(message.tileBackgroundMedia[key[i]]);
|
|
37990
|
+
if (error)
|
|
37991
|
+
return "tileBackgroundMedia." + error;
|
|
37992
|
+
}
|
|
37993
|
+
}
|
|
37994
|
+
if (message.playerBackgroundMedia != null && message.hasOwnProperty("playerBackgroundMedia")) {
|
|
37995
|
+
if (!$util.isObject(message.playerBackgroundMedia))
|
|
37996
|
+
return "playerBackgroundMedia: object expected";
|
|
37997
|
+
var key = Object.keys(message.playerBackgroundMedia);
|
|
37998
|
+
for (var i = 0; i < key.length; ++i) {
|
|
37999
|
+
var error = $root.contentful.IdReference.verify(message.playerBackgroundMedia[key[i]]);
|
|
38000
|
+
if (error)
|
|
38001
|
+
return "playerBackgroundMedia." + error;
|
|
38002
|
+
}
|
|
38003
|
+
}
|
|
38004
|
+
if (message.useVariantPresets != null && message.hasOwnProperty("useVariantPresets"))
|
|
38005
|
+
if (typeof message.useVariantPresets !== "boolean")
|
|
38006
|
+
return "useVariantPresets: boolean expected";
|
|
38007
|
+
if (message.isEnabled != null && message.hasOwnProperty("isEnabled"))
|
|
38008
|
+
if (typeof message.isEnabled !== "boolean")
|
|
38009
|
+
return "isEnabled: boolean expected";
|
|
38010
|
+
if (message.primaryAudioMedia != null && message.hasOwnProperty("primaryAudioMedia")) {
|
|
38011
|
+
if (!$util.isObject(message.primaryAudioMedia))
|
|
38012
|
+
return "primaryAudioMedia: object expected";
|
|
38013
|
+
var key = Object.keys(message.primaryAudioMedia);
|
|
38014
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38015
|
+
var error = $root.contentful.IdReferences.verify(message.primaryAudioMedia[key[i]]);
|
|
38016
|
+
if (error)
|
|
38017
|
+
return "primaryAudioMedia." + error;
|
|
38018
|
+
}
|
|
38019
|
+
}
|
|
38020
|
+
if (message.secondaryAudioMedia != null && message.hasOwnProperty("secondaryAudioMedia")) {
|
|
38021
|
+
if (!$util.isObject(message.secondaryAudioMedia))
|
|
38022
|
+
return "secondaryAudioMedia: object expected";
|
|
38023
|
+
var key = Object.keys(message.secondaryAudioMedia);
|
|
38024
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38025
|
+
var error = $root.contentful.IdReferences.verify(message.secondaryAudioMedia[key[i]]);
|
|
38026
|
+
if (error)
|
|
38027
|
+
return "secondaryAudioMedia." + error;
|
|
38028
|
+
}
|
|
38029
|
+
}
|
|
38030
|
+
if (message.mixedAudioMedia != null && message.hasOwnProperty("mixedAudioMedia")) {
|
|
38031
|
+
if (!$util.isObject(message.mixedAudioMedia))
|
|
38032
|
+
return "mixedAudioMedia: object expected";
|
|
38033
|
+
var key = Object.keys(message.mixedAudioMedia);
|
|
38034
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38035
|
+
var error = $root.contentful.IdReferences.verify(message.mixedAudioMedia[key[i]]);
|
|
38036
|
+
if (error)
|
|
38037
|
+
return "mixedAudioMedia." + error;
|
|
38038
|
+
}
|
|
38039
|
+
}
|
|
38040
|
+
if (message.accessGroup != null && message.hasOwnProperty("accessGroup")) {
|
|
38041
|
+
if (!Array.isArray(message.accessGroup))
|
|
38042
|
+
return "accessGroup: array expected";
|
|
38043
|
+
for (var i = 0; i < message.accessGroup.length; ++i) {
|
|
38044
|
+
var error = $root.contentful.SlugReference.verify(message.accessGroup[i]);
|
|
38045
|
+
if (error)
|
|
38046
|
+
return "accessGroup." + error;
|
|
38047
|
+
}
|
|
38048
|
+
}
|
|
38049
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
38050
|
+
if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
|
|
38051
|
+
return "createdAt: integer|Long expected";
|
|
38052
|
+
return null;
|
|
38053
|
+
};
|
|
38054
|
+
|
|
38055
|
+
/**
|
|
38056
|
+
* Creates a SleepcastContentCreated message from a plain object. Also converts values to their respective internal types.
|
|
38057
|
+
* @function fromObject
|
|
38058
|
+
* @memberof SleepcastContentCreated
|
|
38059
|
+
* @static
|
|
38060
|
+
* @param {Object.<string,*>} object Plain object
|
|
38061
|
+
* @returns {SleepcastContentCreated} SleepcastContentCreated
|
|
38062
|
+
*/
|
|
38063
|
+
SleepcastContentCreated.fromObject = function fromObject(object) {
|
|
38064
|
+
if (object instanceof $root.SleepcastContentCreated)
|
|
38065
|
+
return object;
|
|
38066
|
+
var message = new $root.SleepcastContentCreated();
|
|
38067
|
+
if (object.contentId != null)
|
|
38068
|
+
message.contentId = object.contentId | 0;
|
|
38069
|
+
if (object.title) {
|
|
38070
|
+
if (typeof object.title !== "object")
|
|
38071
|
+
throw TypeError(".SleepcastContentCreated.title: object expected");
|
|
38072
|
+
message.title = {};
|
|
38073
|
+
for (var keys = Object.keys(object.title), i = 0; i < keys.length; ++i)
|
|
38074
|
+
message.title[keys[i]] = String(object.title[keys[i]]);
|
|
38075
|
+
}
|
|
38076
|
+
if (object.slug != null)
|
|
38077
|
+
message.slug = String(object.slug);
|
|
38078
|
+
if (object.subtitle) {
|
|
38079
|
+
if (typeof object.subtitle !== "object")
|
|
38080
|
+
throw TypeError(".SleepcastContentCreated.subtitle: object expected");
|
|
38081
|
+
message.subtitle = {};
|
|
38082
|
+
for (var keys = Object.keys(object.subtitle), i = 0; i < keys.length; ++i)
|
|
38083
|
+
message.subtitle[keys[i]] = String(object.subtitle[keys[i]]);
|
|
38084
|
+
}
|
|
38085
|
+
if (object.description) {
|
|
38086
|
+
if (typeof object.description !== "object")
|
|
38087
|
+
throw TypeError(".SleepcastContentCreated.description: object expected");
|
|
38088
|
+
message.description = {};
|
|
38089
|
+
for (var keys = Object.keys(object.description), i = 0; i < keys.length; ++i)
|
|
38090
|
+
message.description[keys[i]] = String(object.description[keys[i]]);
|
|
38091
|
+
}
|
|
38092
|
+
if (object.recipe != null) {
|
|
38093
|
+
if (typeof object.recipe !== "object")
|
|
38094
|
+
throw TypeError(".SleepcastContentCreated.recipe: object expected");
|
|
38095
|
+
message.recipe = $root.contentful.SlugReference.fromObject(object.recipe);
|
|
38096
|
+
}
|
|
38097
|
+
if (object.tileBackgroundMedia) {
|
|
38098
|
+
if (typeof object.tileBackgroundMedia !== "object")
|
|
38099
|
+
throw TypeError(".SleepcastContentCreated.tileBackgroundMedia: object expected");
|
|
38100
|
+
message.tileBackgroundMedia = {};
|
|
38101
|
+
for (var keys = Object.keys(object.tileBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
38102
|
+
if (typeof object.tileBackgroundMedia[keys[i]] !== "object")
|
|
38103
|
+
throw TypeError(".SleepcastContentCreated.tileBackgroundMedia: object expected");
|
|
38104
|
+
message.tileBackgroundMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.tileBackgroundMedia[keys[i]]);
|
|
38105
|
+
}
|
|
38106
|
+
}
|
|
38107
|
+
if (object.playerBackgroundMedia) {
|
|
38108
|
+
if (typeof object.playerBackgroundMedia !== "object")
|
|
38109
|
+
throw TypeError(".SleepcastContentCreated.playerBackgroundMedia: object expected");
|
|
38110
|
+
message.playerBackgroundMedia = {};
|
|
38111
|
+
for (var keys = Object.keys(object.playerBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
38112
|
+
if (typeof object.playerBackgroundMedia[keys[i]] !== "object")
|
|
38113
|
+
throw TypeError(".SleepcastContentCreated.playerBackgroundMedia: object expected");
|
|
38114
|
+
message.playerBackgroundMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.playerBackgroundMedia[keys[i]]);
|
|
38115
|
+
}
|
|
38116
|
+
}
|
|
38117
|
+
if (object.useVariantPresets != null)
|
|
38118
|
+
message.useVariantPresets = Boolean(object.useVariantPresets);
|
|
38119
|
+
if (object.isEnabled != null)
|
|
38120
|
+
message.isEnabled = Boolean(object.isEnabled);
|
|
38121
|
+
if (object.primaryAudioMedia) {
|
|
38122
|
+
if (typeof object.primaryAudioMedia !== "object")
|
|
38123
|
+
throw TypeError(".SleepcastContentCreated.primaryAudioMedia: object expected");
|
|
38124
|
+
message.primaryAudioMedia = {};
|
|
38125
|
+
for (var keys = Object.keys(object.primaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38126
|
+
if (typeof object.primaryAudioMedia[keys[i]] !== "object")
|
|
38127
|
+
throw TypeError(".SleepcastContentCreated.primaryAudioMedia: object expected");
|
|
38128
|
+
message.primaryAudioMedia[keys[i]] = $root.contentful.IdReferences.fromObject(object.primaryAudioMedia[keys[i]]);
|
|
38129
|
+
}
|
|
38130
|
+
}
|
|
38131
|
+
if (object.secondaryAudioMedia) {
|
|
38132
|
+
if (typeof object.secondaryAudioMedia !== "object")
|
|
38133
|
+
throw TypeError(".SleepcastContentCreated.secondaryAudioMedia: object expected");
|
|
38134
|
+
message.secondaryAudioMedia = {};
|
|
38135
|
+
for (var keys = Object.keys(object.secondaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38136
|
+
if (typeof object.secondaryAudioMedia[keys[i]] !== "object")
|
|
38137
|
+
throw TypeError(".SleepcastContentCreated.secondaryAudioMedia: object expected");
|
|
38138
|
+
message.secondaryAudioMedia[keys[i]] = $root.contentful.IdReferences.fromObject(object.secondaryAudioMedia[keys[i]]);
|
|
38139
|
+
}
|
|
38140
|
+
}
|
|
38141
|
+
if (object.mixedAudioMedia) {
|
|
38142
|
+
if (typeof object.mixedAudioMedia !== "object")
|
|
38143
|
+
throw TypeError(".SleepcastContentCreated.mixedAudioMedia: object expected");
|
|
38144
|
+
message.mixedAudioMedia = {};
|
|
38145
|
+
for (var keys = Object.keys(object.mixedAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38146
|
+
if (typeof object.mixedAudioMedia[keys[i]] !== "object")
|
|
38147
|
+
throw TypeError(".SleepcastContentCreated.mixedAudioMedia: object expected");
|
|
38148
|
+
message.mixedAudioMedia[keys[i]] = $root.contentful.IdReferences.fromObject(object.mixedAudioMedia[keys[i]]);
|
|
38149
|
+
}
|
|
38150
|
+
}
|
|
38151
|
+
if (object.accessGroup) {
|
|
38152
|
+
if (!Array.isArray(object.accessGroup))
|
|
38153
|
+
throw TypeError(".SleepcastContentCreated.accessGroup: array expected");
|
|
38154
|
+
message.accessGroup = [];
|
|
38155
|
+
for (var i = 0; i < object.accessGroup.length; ++i) {
|
|
38156
|
+
if (typeof object.accessGroup[i] !== "object")
|
|
38157
|
+
throw TypeError(".SleepcastContentCreated.accessGroup: object expected");
|
|
38158
|
+
message.accessGroup[i] = $root.contentful.SlugReference.fromObject(object.accessGroup[i]);
|
|
38159
|
+
}
|
|
38160
|
+
}
|
|
38161
|
+
if (object.createdAt != null)
|
|
38162
|
+
if ($util.Long)
|
|
38163
|
+
(message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
|
|
38164
|
+
else if (typeof object.createdAt === "string")
|
|
38165
|
+
message.createdAt = parseInt(object.createdAt, 10);
|
|
38166
|
+
else if (typeof object.createdAt === "number")
|
|
38167
|
+
message.createdAt = object.createdAt;
|
|
38168
|
+
else if (typeof object.createdAt === "object")
|
|
38169
|
+
message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
|
|
38170
|
+
return message;
|
|
38171
|
+
};
|
|
38172
|
+
|
|
38173
|
+
/**
|
|
38174
|
+
* Creates a plain object from a SleepcastContentCreated message. Also converts values to other types if specified.
|
|
38175
|
+
* @function toObject
|
|
38176
|
+
* @memberof SleepcastContentCreated
|
|
38177
|
+
* @static
|
|
38178
|
+
* @param {SleepcastContentCreated} message SleepcastContentCreated
|
|
38179
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
38180
|
+
* @returns {Object.<string,*>} Plain object
|
|
38181
|
+
*/
|
|
38182
|
+
SleepcastContentCreated.toObject = function toObject(message, options) {
|
|
38183
|
+
if (!options)
|
|
38184
|
+
options = {};
|
|
38185
|
+
var object = {};
|
|
38186
|
+
if (options.arrays || options.defaults)
|
|
38187
|
+
object.accessGroup = [];
|
|
38188
|
+
if (options.objects || options.defaults) {
|
|
38189
|
+
object.title = {};
|
|
38190
|
+
object.subtitle = {};
|
|
38191
|
+
object.description = {};
|
|
38192
|
+
object.tileBackgroundMedia = {};
|
|
38193
|
+
object.playerBackgroundMedia = {};
|
|
38194
|
+
object.primaryAudioMedia = {};
|
|
38195
|
+
object.secondaryAudioMedia = {};
|
|
38196
|
+
object.mixedAudioMedia = {};
|
|
38197
|
+
}
|
|
38198
|
+
if (options.defaults) {
|
|
38199
|
+
object.contentId = 0;
|
|
38200
|
+
object.slug = "";
|
|
38201
|
+
object.recipe = null;
|
|
38202
|
+
object.useVariantPresets = false;
|
|
38203
|
+
object.isEnabled = false;
|
|
38204
|
+
if ($util.Long) {
|
|
38205
|
+
var long = new $util.Long(0, 0, true);
|
|
38206
|
+
object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
38207
|
+
} else
|
|
38208
|
+
object.createdAt = options.longs === String ? "0" : 0;
|
|
38209
|
+
}
|
|
38210
|
+
if (message.contentId != null && message.hasOwnProperty("contentId"))
|
|
38211
|
+
object.contentId = message.contentId;
|
|
38212
|
+
var keys2;
|
|
38213
|
+
if (message.title && (keys2 = Object.keys(message.title)).length) {
|
|
38214
|
+
object.title = {};
|
|
38215
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38216
|
+
object.title[keys2[j]] = message.title[keys2[j]];
|
|
38217
|
+
}
|
|
38218
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
38219
|
+
object.slug = message.slug;
|
|
38220
|
+
if (message.subtitle && (keys2 = Object.keys(message.subtitle)).length) {
|
|
38221
|
+
object.subtitle = {};
|
|
38222
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38223
|
+
object.subtitle[keys2[j]] = message.subtitle[keys2[j]];
|
|
38224
|
+
}
|
|
38225
|
+
if (message.description && (keys2 = Object.keys(message.description)).length) {
|
|
38226
|
+
object.description = {};
|
|
38227
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38228
|
+
object.description[keys2[j]] = message.description[keys2[j]];
|
|
38229
|
+
}
|
|
38230
|
+
if (message.recipe != null && message.hasOwnProperty("recipe"))
|
|
38231
|
+
object.recipe = $root.contentful.SlugReference.toObject(message.recipe, options);
|
|
38232
|
+
if (message.tileBackgroundMedia && (keys2 = Object.keys(message.tileBackgroundMedia)).length) {
|
|
38233
|
+
object.tileBackgroundMedia = {};
|
|
38234
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38235
|
+
object.tileBackgroundMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.tileBackgroundMedia[keys2[j]], options);
|
|
38236
|
+
}
|
|
38237
|
+
if (message.playerBackgroundMedia && (keys2 = Object.keys(message.playerBackgroundMedia)).length) {
|
|
38238
|
+
object.playerBackgroundMedia = {};
|
|
38239
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38240
|
+
object.playerBackgroundMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.playerBackgroundMedia[keys2[j]], options);
|
|
38241
|
+
}
|
|
38242
|
+
if (message.useVariantPresets != null && message.hasOwnProperty("useVariantPresets"))
|
|
38243
|
+
object.useVariantPresets = message.useVariantPresets;
|
|
38244
|
+
if (message.isEnabled != null && message.hasOwnProperty("isEnabled"))
|
|
38245
|
+
object.isEnabled = message.isEnabled;
|
|
38246
|
+
if (message.primaryAudioMedia && (keys2 = Object.keys(message.primaryAudioMedia)).length) {
|
|
38247
|
+
object.primaryAudioMedia = {};
|
|
38248
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38249
|
+
object.primaryAudioMedia[keys2[j]] = $root.contentful.IdReferences.toObject(message.primaryAudioMedia[keys2[j]], options);
|
|
38250
|
+
}
|
|
38251
|
+
if (message.secondaryAudioMedia && (keys2 = Object.keys(message.secondaryAudioMedia)).length) {
|
|
38252
|
+
object.secondaryAudioMedia = {};
|
|
38253
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38254
|
+
object.secondaryAudioMedia[keys2[j]] = $root.contentful.IdReferences.toObject(message.secondaryAudioMedia[keys2[j]], options);
|
|
38255
|
+
}
|
|
38256
|
+
if (message.mixedAudioMedia && (keys2 = Object.keys(message.mixedAudioMedia)).length) {
|
|
38257
|
+
object.mixedAudioMedia = {};
|
|
38258
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38259
|
+
object.mixedAudioMedia[keys2[j]] = $root.contentful.IdReferences.toObject(message.mixedAudioMedia[keys2[j]], options);
|
|
38260
|
+
}
|
|
38261
|
+
if (message.accessGroup && message.accessGroup.length) {
|
|
38262
|
+
object.accessGroup = [];
|
|
38263
|
+
for (var j = 0; j < message.accessGroup.length; ++j)
|
|
38264
|
+
object.accessGroup[j] = $root.contentful.SlugReference.toObject(message.accessGroup[j], options);
|
|
38265
|
+
}
|
|
38266
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
38267
|
+
if (typeof message.createdAt === "number")
|
|
38268
|
+
object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
|
|
38269
|
+
else
|
|
38270
|
+
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;
|
|
38271
|
+
return object;
|
|
38272
|
+
};
|
|
38273
|
+
|
|
38274
|
+
/**
|
|
38275
|
+
* Converts this SleepcastContentCreated to JSON.
|
|
38276
|
+
* @function toJSON
|
|
38277
|
+
* @memberof SleepcastContentCreated
|
|
38278
|
+
* @instance
|
|
38279
|
+
* @returns {Object.<string,*>} JSON object
|
|
38280
|
+
*/
|
|
38281
|
+
SleepcastContentCreated.prototype.toJSON = function toJSON() {
|
|
38282
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
38283
|
+
};
|
|
38284
|
+
|
|
38285
|
+
return SleepcastContentCreated;
|
|
38286
|
+
})();
|
|
38287
|
+
|
|
38288
|
+
$root.SleepcastContentUpdated = (function() {
|
|
38289
|
+
|
|
38290
|
+
/**
|
|
38291
|
+
* Properties of a SleepcastContentUpdated.
|
|
38292
|
+
* @exports ISleepcastContentUpdated
|
|
38293
|
+
* @interface ISleepcastContentUpdated
|
|
38294
|
+
* @property {number|null} [contentId] SleepcastContentUpdated contentId
|
|
38295
|
+
* @property {Object.<string,string>|null} [title] SleepcastContentUpdated title
|
|
38296
|
+
* @property {string|null} [slug] SleepcastContentUpdated slug
|
|
38297
|
+
* @property {Object.<string,string>|null} [subtitle] SleepcastContentUpdated subtitle
|
|
38298
|
+
* @property {Object.<string,string>|null} [description] SleepcastContentUpdated description
|
|
38299
|
+
* @property {contentful.ISlugReference|null} [recipe] SleepcastContentUpdated recipe
|
|
38300
|
+
* @property {Object.<string,contentful.IIdReference>|null} [tileBackgroundMedia] SleepcastContentUpdated tileBackgroundMedia
|
|
38301
|
+
* @property {Object.<string,contentful.IIdReference>|null} [playerBackgroundMedia] SleepcastContentUpdated playerBackgroundMedia
|
|
38302
|
+
* @property {boolean|null} [useVariantPresets] SleepcastContentUpdated useVariantPresets
|
|
38303
|
+
* @property {boolean|null} [isEnabled] SleepcastContentUpdated isEnabled
|
|
38304
|
+
* @property {Object.<string,contentful.IIdReferences>|null} [primaryAudioMedia] SleepcastContentUpdated primaryAudioMedia
|
|
38305
|
+
* @property {Object.<string,contentful.IIdReferences>|null} [secondaryAudioMedia] SleepcastContentUpdated secondaryAudioMedia
|
|
38306
|
+
* @property {Object.<string,contentful.IIdReferences>|null} [mixedAudioMedia] SleepcastContentUpdated mixedAudioMedia
|
|
38307
|
+
* @property {Array.<contentful.ISlugReference>|null} [accessGroup] SleepcastContentUpdated accessGroup
|
|
38308
|
+
* @property {number|Long|null} [updatedAt] SleepcastContentUpdated updatedAt
|
|
38309
|
+
*/
|
|
38310
|
+
|
|
38311
|
+
/**
|
|
38312
|
+
* Constructs a new SleepcastContentUpdated.
|
|
38313
|
+
* @exports SleepcastContentUpdated
|
|
38314
|
+
* @classdesc Represents a SleepcastContentUpdated.
|
|
38315
|
+
* @implements ISleepcastContentUpdated
|
|
38316
|
+
* @constructor
|
|
38317
|
+
* @param {ISleepcastContentUpdated=} [properties] Properties to set
|
|
38318
|
+
*/
|
|
38319
|
+
function SleepcastContentUpdated(properties) {
|
|
38320
|
+
this.title = {};
|
|
38321
|
+
this.subtitle = {};
|
|
38322
|
+
this.description = {};
|
|
38323
|
+
this.tileBackgroundMedia = {};
|
|
38324
|
+
this.playerBackgroundMedia = {};
|
|
38325
|
+
this.primaryAudioMedia = {};
|
|
38326
|
+
this.secondaryAudioMedia = {};
|
|
38327
|
+
this.mixedAudioMedia = {};
|
|
38328
|
+
this.accessGroup = [];
|
|
38329
|
+
if (properties)
|
|
38330
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
38331
|
+
if (properties[keys[i]] != null)
|
|
38332
|
+
this[keys[i]] = properties[keys[i]];
|
|
38333
|
+
}
|
|
38334
|
+
|
|
38335
|
+
/**
|
|
38336
|
+
* SleepcastContentUpdated contentId.
|
|
38337
|
+
* @member {number} contentId
|
|
38338
|
+
* @memberof SleepcastContentUpdated
|
|
38339
|
+
* @instance
|
|
38340
|
+
*/
|
|
38341
|
+
SleepcastContentUpdated.prototype.contentId = 0;
|
|
38342
|
+
|
|
38343
|
+
/**
|
|
38344
|
+
* SleepcastContentUpdated title.
|
|
38345
|
+
* @member {Object.<string,string>} title
|
|
38346
|
+
* @memberof SleepcastContentUpdated
|
|
38347
|
+
* @instance
|
|
38348
|
+
*/
|
|
38349
|
+
SleepcastContentUpdated.prototype.title = $util.emptyObject;
|
|
38350
|
+
|
|
38351
|
+
/**
|
|
38352
|
+
* SleepcastContentUpdated slug.
|
|
38353
|
+
* @member {string} slug
|
|
38354
|
+
* @memberof SleepcastContentUpdated
|
|
38355
|
+
* @instance
|
|
38356
|
+
*/
|
|
38357
|
+
SleepcastContentUpdated.prototype.slug = "";
|
|
38358
|
+
|
|
38359
|
+
/**
|
|
38360
|
+
* SleepcastContentUpdated subtitle.
|
|
38361
|
+
* @member {Object.<string,string>} subtitle
|
|
38362
|
+
* @memberof SleepcastContentUpdated
|
|
38363
|
+
* @instance
|
|
38364
|
+
*/
|
|
38365
|
+
SleepcastContentUpdated.prototype.subtitle = $util.emptyObject;
|
|
38366
|
+
|
|
38367
|
+
/**
|
|
38368
|
+
* SleepcastContentUpdated description.
|
|
38369
|
+
* @member {Object.<string,string>} description
|
|
38370
|
+
* @memberof SleepcastContentUpdated
|
|
38371
|
+
* @instance
|
|
38372
|
+
*/
|
|
38373
|
+
SleepcastContentUpdated.prototype.description = $util.emptyObject;
|
|
38374
|
+
|
|
38375
|
+
/**
|
|
38376
|
+
* SleepcastContentUpdated recipe.
|
|
38377
|
+
* @member {contentful.ISlugReference|null|undefined} recipe
|
|
38378
|
+
* @memberof SleepcastContentUpdated
|
|
38379
|
+
* @instance
|
|
38380
|
+
*/
|
|
38381
|
+
SleepcastContentUpdated.prototype.recipe = null;
|
|
38382
|
+
|
|
38383
|
+
/**
|
|
38384
|
+
* SleepcastContentUpdated tileBackgroundMedia.
|
|
38385
|
+
* @member {Object.<string,contentful.IIdReference>} tileBackgroundMedia
|
|
38386
|
+
* @memberof SleepcastContentUpdated
|
|
38387
|
+
* @instance
|
|
38388
|
+
*/
|
|
38389
|
+
SleepcastContentUpdated.prototype.tileBackgroundMedia = $util.emptyObject;
|
|
38390
|
+
|
|
38391
|
+
/**
|
|
38392
|
+
* SleepcastContentUpdated playerBackgroundMedia.
|
|
38393
|
+
* @member {Object.<string,contentful.IIdReference>} playerBackgroundMedia
|
|
38394
|
+
* @memberof SleepcastContentUpdated
|
|
38395
|
+
* @instance
|
|
38396
|
+
*/
|
|
38397
|
+
SleepcastContentUpdated.prototype.playerBackgroundMedia = $util.emptyObject;
|
|
38398
|
+
|
|
38399
|
+
/**
|
|
38400
|
+
* SleepcastContentUpdated useVariantPresets.
|
|
38401
|
+
* @member {boolean} useVariantPresets
|
|
38402
|
+
* @memberof SleepcastContentUpdated
|
|
38403
|
+
* @instance
|
|
38404
|
+
*/
|
|
38405
|
+
SleepcastContentUpdated.prototype.useVariantPresets = false;
|
|
38406
|
+
|
|
38407
|
+
/**
|
|
38408
|
+
* SleepcastContentUpdated isEnabled.
|
|
38409
|
+
* @member {boolean} isEnabled
|
|
38410
|
+
* @memberof SleepcastContentUpdated
|
|
38411
|
+
* @instance
|
|
38412
|
+
*/
|
|
38413
|
+
SleepcastContentUpdated.prototype.isEnabled = false;
|
|
38414
|
+
|
|
38415
|
+
/**
|
|
38416
|
+
* SleepcastContentUpdated primaryAudioMedia.
|
|
38417
|
+
* @member {Object.<string,contentful.IIdReferences>} primaryAudioMedia
|
|
38418
|
+
* @memberof SleepcastContentUpdated
|
|
38419
|
+
* @instance
|
|
38420
|
+
*/
|
|
38421
|
+
SleepcastContentUpdated.prototype.primaryAudioMedia = $util.emptyObject;
|
|
38422
|
+
|
|
38423
|
+
/**
|
|
38424
|
+
* SleepcastContentUpdated secondaryAudioMedia.
|
|
38425
|
+
* @member {Object.<string,contentful.IIdReferences>} secondaryAudioMedia
|
|
38426
|
+
* @memberof SleepcastContentUpdated
|
|
38427
|
+
* @instance
|
|
38428
|
+
*/
|
|
38429
|
+
SleepcastContentUpdated.prototype.secondaryAudioMedia = $util.emptyObject;
|
|
38430
|
+
|
|
38431
|
+
/**
|
|
38432
|
+
* SleepcastContentUpdated mixedAudioMedia.
|
|
38433
|
+
* @member {Object.<string,contentful.IIdReferences>} mixedAudioMedia
|
|
38434
|
+
* @memberof SleepcastContentUpdated
|
|
38435
|
+
* @instance
|
|
38436
|
+
*/
|
|
38437
|
+
SleepcastContentUpdated.prototype.mixedAudioMedia = $util.emptyObject;
|
|
38438
|
+
|
|
38439
|
+
/**
|
|
38440
|
+
* SleepcastContentUpdated accessGroup.
|
|
38441
|
+
* @member {Array.<contentful.ISlugReference>} accessGroup
|
|
38442
|
+
* @memberof SleepcastContentUpdated
|
|
38443
|
+
* @instance
|
|
38444
|
+
*/
|
|
38445
|
+
SleepcastContentUpdated.prototype.accessGroup = $util.emptyArray;
|
|
38446
|
+
|
|
38447
|
+
/**
|
|
38448
|
+
* SleepcastContentUpdated updatedAt.
|
|
38449
|
+
* @member {number|Long} updatedAt
|
|
38450
|
+
* @memberof SleepcastContentUpdated
|
|
38451
|
+
* @instance
|
|
38452
|
+
*/
|
|
38453
|
+
SleepcastContentUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
38454
|
+
|
|
38455
|
+
/**
|
|
38456
|
+
* Creates a new SleepcastContentUpdated instance using the specified properties.
|
|
38457
|
+
* @function create
|
|
38458
|
+
* @memberof SleepcastContentUpdated
|
|
38459
|
+
* @static
|
|
38460
|
+
* @param {ISleepcastContentUpdated=} [properties] Properties to set
|
|
38461
|
+
* @returns {SleepcastContentUpdated} SleepcastContentUpdated instance
|
|
38462
|
+
*/
|
|
38463
|
+
SleepcastContentUpdated.create = function create(properties) {
|
|
38464
|
+
return new SleepcastContentUpdated(properties);
|
|
38465
|
+
};
|
|
38466
|
+
|
|
38467
|
+
/**
|
|
38468
|
+
* Encodes the specified SleepcastContentUpdated message. Does not implicitly {@link SleepcastContentUpdated.verify|verify} messages.
|
|
38469
|
+
* @function encode
|
|
38470
|
+
* @memberof SleepcastContentUpdated
|
|
38471
|
+
* @static
|
|
38472
|
+
* @param {ISleepcastContentUpdated} message SleepcastContentUpdated message or plain object to encode
|
|
38473
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38474
|
+
* @returns {$protobuf.Writer} Writer
|
|
38475
|
+
*/
|
|
38476
|
+
SleepcastContentUpdated.encode = function encode(message, writer) {
|
|
38477
|
+
if (!writer)
|
|
38478
|
+
writer = $Writer.create();
|
|
38479
|
+
if (message.contentId != null && message.hasOwnProperty("contentId"))
|
|
38480
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.contentId);
|
|
38481
|
+
if (message.title != null && message.hasOwnProperty("title"))
|
|
38482
|
+
for (var keys = Object.keys(message.title), i = 0; i < keys.length; ++i)
|
|
38483
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.title[keys[i]]).ldelim();
|
|
38484
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
38485
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.slug);
|
|
38486
|
+
if (message.subtitle != null && message.hasOwnProperty("subtitle"))
|
|
38487
|
+
for (var keys = Object.keys(message.subtitle), i = 0; i < keys.length; ++i)
|
|
38488
|
+
writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.subtitle[keys[i]]).ldelim();
|
|
38489
|
+
if (message.description != null && message.hasOwnProperty("description"))
|
|
38490
|
+
for (var keys = Object.keys(message.description), i = 0; i < keys.length; ++i)
|
|
38491
|
+
writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.description[keys[i]]).ldelim();
|
|
38492
|
+
if (message.recipe != null && message.hasOwnProperty("recipe"))
|
|
38493
|
+
$root.contentful.SlugReference.encode(message.recipe, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
38494
|
+
if (message.tileBackgroundMedia != null && message.hasOwnProperty("tileBackgroundMedia"))
|
|
38495
|
+
for (var keys = Object.keys(message.tileBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
38496
|
+
writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
38497
|
+
$root.contentful.IdReference.encode(message.tileBackgroundMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
38498
|
+
}
|
|
38499
|
+
if (message.playerBackgroundMedia != null && message.hasOwnProperty("playerBackgroundMedia"))
|
|
38500
|
+
for (var keys = Object.keys(message.playerBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
38501
|
+
writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
38502
|
+
$root.contentful.IdReference.encode(message.playerBackgroundMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
38503
|
+
}
|
|
38504
|
+
if (message.useVariantPresets != null && message.hasOwnProperty("useVariantPresets"))
|
|
38505
|
+
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.useVariantPresets);
|
|
38506
|
+
if (message.isEnabled != null && message.hasOwnProperty("isEnabled"))
|
|
38507
|
+
writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isEnabled);
|
|
38508
|
+
if (message.primaryAudioMedia != null && message.hasOwnProperty("primaryAudioMedia"))
|
|
38509
|
+
for (var keys = Object.keys(message.primaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38510
|
+
writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
38511
|
+
$root.contentful.IdReferences.encode(message.primaryAudioMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
38512
|
+
}
|
|
38513
|
+
if (message.secondaryAudioMedia != null && message.hasOwnProperty("secondaryAudioMedia"))
|
|
38514
|
+
for (var keys = Object.keys(message.secondaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38515
|
+
writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
38516
|
+
$root.contentful.IdReferences.encode(message.secondaryAudioMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
38517
|
+
}
|
|
38518
|
+
if (message.mixedAudioMedia != null && message.hasOwnProperty("mixedAudioMedia"))
|
|
38519
|
+
for (var keys = Object.keys(message.mixedAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38520
|
+
writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
38521
|
+
$root.contentful.IdReferences.encode(message.mixedAudioMedia[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
38522
|
+
}
|
|
38523
|
+
if (message.accessGroup != null && message.accessGroup.length)
|
|
38524
|
+
for (var i = 0; i < message.accessGroup.length; ++i)
|
|
38525
|
+
$root.contentful.SlugReference.encode(message.accessGroup[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
38526
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
38527
|
+
writer.uint32(/* id 15, wireType 0 =*/120).uint64(message.updatedAt);
|
|
38528
|
+
return writer;
|
|
38529
|
+
};
|
|
38530
|
+
|
|
38531
|
+
/**
|
|
38532
|
+
* Encodes the specified SleepcastContentUpdated message, length delimited. Does not implicitly {@link SleepcastContentUpdated.verify|verify} messages.
|
|
38533
|
+
* @function encodeDelimited
|
|
38534
|
+
* @memberof SleepcastContentUpdated
|
|
38535
|
+
* @static
|
|
38536
|
+
* @param {ISleepcastContentUpdated} message SleepcastContentUpdated message or plain object to encode
|
|
38537
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
38538
|
+
* @returns {$protobuf.Writer} Writer
|
|
38539
|
+
*/
|
|
38540
|
+
SleepcastContentUpdated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
38541
|
+
return this.encode(message, writer).ldelim();
|
|
38542
|
+
};
|
|
38543
|
+
|
|
38544
|
+
/**
|
|
38545
|
+
* Decodes a SleepcastContentUpdated message from the specified reader or buffer.
|
|
38546
|
+
* @function decode
|
|
38547
|
+
* @memberof SleepcastContentUpdated
|
|
38548
|
+
* @static
|
|
38549
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38550
|
+
* @param {number} [length] Message length if known beforehand
|
|
38551
|
+
* @returns {SleepcastContentUpdated} SleepcastContentUpdated
|
|
38552
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38553
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38554
|
+
*/
|
|
38555
|
+
SleepcastContentUpdated.decode = function decode(reader, length) {
|
|
38556
|
+
if (!(reader instanceof $Reader))
|
|
38557
|
+
reader = $Reader.create(reader);
|
|
38558
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SleepcastContentUpdated(), key;
|
|
38559
|
+
while (reader.pos < end) {
|
|
38560
|
+
var tag = reader.uint32();
|
|
38561
|
+
switch (tag >>> 3) {
|
|
38562
|
+
case 1:
|
|
38563
|
+
message.contentId = reader.int32();
|
|
38564
|
+
break;
|
|
38565
|
+
case 2:
|
|
38566
|
+
reader.skip().pos++;
|
|
38567
|
+
if (message.title === $util.emptyObject)
|
|
38568
|
+
message.title = {};
|
|
38569
|
+
key = reader.string();
|
|
38570
|
+
reader.pos++;
|
|
38571
|
+
message.title[key] = reader.string();
|
|
38572
|
+
break;
|
|
38573
|
+
case 3:
|
|
38574
|
+
message.slug = reader.string();
|
|
38575
|
+
break;
|
|
38576
|
+
case 4:
|
|
38577
|
+
reader.skip().pos++;
|
|
38578
|
+
if (message.subtitle === $util.emptyObject)
|
|
38579
|
+
message.subtitle = {};
|
|
38580
|
+
key = reader.string();
|
|
38581
|
+
reader.pos++;
|
|
38582
|
+
message.subtitle[key] = reader.string();
|
|
38583
|
+
break;
|
|
38584
|
+
case 5:
|
|
38585
|
+
reader.skip().pos++;
|
|
38586
|
+
if (message.description === $util.emptyObject)
|
|
38587
|
+
message.description = {};
|
|
38588
|
+
key = reader.string();
|
|
38589
|
+
reader.pos++;
|
|
38590
|
+
message.description[key] = reader.string();
|
|
38591
|
+
break;
|
|
38592
|
+
case 6:
|
|
38593
|
+
message.recipe = $root.contentful.SlugReference.decode(reader, reader.uint32());
|
|
38594
|
+
break;
|
|
38595
|
+
case 7:
|
|
38596
|
+
reader.skip().pos++;
|
|
38597
|
+
if (message.tileBackgroundMedia === $util.emptyObject)
|
|
38598
|
+
message.tileBackgroundMedia = {};
|
|
38599
|
+
key = reader.string();
|
|
38600
|
+
reader.pos++;
|
|
38601
|
+
message.tileBackgroundMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
|
|
38602
|
+
break;
|
|
38603
|
+
case 8:
|
|
38604
|
+
reader.skip().pos++;
|
|
38605
|
+
if (message.playerBackgroundMedia === $util.emptyObject)
|
|
38606
|
+
message.playerBackgroundMedia = {};
|
|
38607
|
+
key = reader.string();
|
|
38608
|
+
reader.pos++;
|
|
38609
|
+
message.playerBackgroundMedia[key] = $root.contentful.IdReference.decode(reader, reader.uint32());
|
|
38610
|
+
break;
|
|
38611
|
+
case 9:
|
|
38612
|
+
message.useVariantPresets = reader.bool();
|
|
38613
|
+
break;
|
|
38614
|
+
case 10:
|
|
38615
|
+
message.isEnabled = reader.bool();
|
|
38616
|
+
break;
|
|
38617
|
+
case 11:
|
|
38618
|
+
reader.skip().pos++;
|
|
38619
|
+
if (message.primaryAudioMedia === $util.emptyObject)
|
|
38620
|
+
message.primaryAudioMedia = {};
|
|
38621
|
+
key = reader.string();
|
|
38622
|
+
reader.pos++;
|
|
38623
|
+
message.primaryAudioMedia[key] = $root.contentful.IdReferences.decode(reader, reader.uint32());
|
|
38624
|
+
break;
|
|
38625
|
+
case 12:
|
|
38626
|
+
reader.skip().pos++;
|
|
38627
|
+
if (message.secondaryAudioMedia === $util.emptyObject)
|
|
38628
|
+
message.secondaryAudioMedia = {};
|
|
38629
|
+
key = reader.string();
|
|
38630
|
+
reader.pos++;
|
|
38631
|
+
message.secondaryAudioMedia[key] = $root.contentful.IdReferences.decode(reader, reader.uint32());
|
|
38632
|
+
break;
|
|
38633
|
+
case 13:
|
|
38634
|
+
reader.skip().pos++;
|
|
38635
|
+
if (message.mixedAudioMedia === $util.emptyObject)
|
|
38636
|
+
message.mixedAudioMedia = {};
|
|
38637
|
+
key = reader.string();
|
|
38638
|
+
reader.pos++;
|
|
38639
|
+
message.mixedAudioMedia[key] = $root.contentful.IdReferences.decode(reader, reader.uint32());
|
|
38640
|
+
break;
|
|
38641
|
+
case 14:
|
|
38642
|
+
if (!(message.accessGroup && message.accessGroup.length))
|
|
38643
|
+
message.accessGroup = [];
|
|
38644
|
+
message.accessGroup.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
|
|
38645
|
+
break;
|
|
38646
|
+
case 15:
|
|
38647
|
+
message.updatedAt = reader.uint64();
|
|
38648
|
+
break;
|
|
38649
|
+
default:
|
|
38650
|
+
reader.skipType(tag & 7);
|
|
38651
|
+
break;
|
|
38652
|
+
}
|
|
38653
|
+
}
|
|
38654
|
+
return message;
|
|
38655
|
+
};
|
|
38656
|
+
|
|
38657
|
+
/**
|
|
38658
|
+
* Decodes a SleepcastContentUpdated message from the specified reader or buffer, length delimited.
|
|
38659
|
+
* @function decodeDelimited
|
|
38660
|
+
* @memberof SleepcastContentUpdated
|
|
38661
|
+
* @static
|
|
38662
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
38663
|
+
* @returns {SleepcastContentUpdated} SleepcastContentUpdated
|
|
38664
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
38665
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
38666
|
+
*/
|
|
38667
|
+
SleepcastContentUpdated.decodeDelimited = function decodeDelimited(reader) {
|
|
38668
|
+
if (!(reader instanceof $Reader))
|
|
38669
|
+
reader = new $Reader(reader);
|
|
38670
|
+
return this.decode(reader, reader.uint32());
|
|
38671
|
+
};
|
|
38672
|
+
|
|
38673
|
+
/**
|
|
38674
|
+
* Verifies a SleepcastContentUpdated message.
|
|
38675
|
+
* @function verify
|
|
38676
|
+
* @memberof SleepcastContentUpdated
|
|
38677
|
+
* @static
|
|
38678
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
38679
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
38680
|
+
*/
|
|
38681
|
+
SleepcastContentUpdated.verify = function verify(message) {
|
|
38682
|
+
if (typeof message !== "object" || message === null)
|
|
38683
|
+
return "object expected";
|
|
38684
|
+
if (message.contentId != null && message.hasOwnProperty("contentId"))
|
|
38685
|
+
if (!$util.isInteger(message.contentId))
|
|
38686
|
+
return "contentId: integer expected";
|
|
38687
|
+
if (message.title != null && message.hasOwnProperty("title")) {
|
|
38688
|
+
if (!$util.isObject(message.title))
|
|
38689
|
+
return "title: object expected";
|
|
38690
|
+
var key = Object.keys(message.title);
|
|
38691
|
+
for (var i = 0; i < key.length; ++i)
|
|
38692
|
+
if (!$util.isString(message.title[key[i]]))
|
|
38693
|
+
return "title: string{k:string} expected";
|
|
38694
|
+
}
|
|
38695
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
38696
|
+
if (!$util.isString(message.slug))
|
|
38697
|
+
return "slug: string expected";
|
|
38698
|
+
if (message.subtitle != null && message.hasOwnProperty("subtitle")) {
|
|
38699
|
+
if (!$util.isObject(message.subtitle))
|
|
38700
|
+
return "subtitle: object expected";
|
|
38701
|
+
var key = Object.keys(message.subtitle);
|
|
38702
|
+
for (var i = 0; i < key.length; ++i)
|
|
38703
|
+
if (!$util.isString(message.subtitle[key[i]]))
|
|
38704
|
+
return "subtitle: string{k:string} expected";
|
|
38705
|
+
}
|
|
38706
|
+
if (message.description != null && message.hasOwnProperty("description")) {
|
|
38707
|
+
if (!$util.isObject(message.description))
|
|
38708
|
+
return "description: object expected";
|
|
38709
|
+
var key = Object.keys(message.description);
|
|
38710
|
+
for (var i = 0; i < key.length; ++i)
|
|
38711
|
+
if (!$util.isString(message.description[key[i]]))
|
|
38712
|
+
return "description: string{k:string} expected";
|
|
38713
|
+
}
|
|
38714
|
+
if (message.recipe != null && message.hasOwnProperty("recipe")) {
|
|
38715
|
+
var error = $root.contentful.SlugReference.verify(message.recipe);
|
|
38716
|
+
if (error)
|
|
38717
|
+
return "recipe." + error;
|
|
38718
|
+
}
|
|
38719
|
+
if (message.tileBackgroundMedia != null && message.hasOwnProperty("tileBackgroundMedia")) {
|
|
38720
|
+
if (!$util.isObject(message.tileBackgroundMedia))
|
|
38721
|
+
return "tileBackgroundMedia: object expected";
|
|
38722
|
+
var key = Object.keys(message.tileBackgroundMedia);
|
|
38723
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38724
|
+
var error = $root.contentful.IdReference.verify(message.tileBackgroundMedia[key[i]]);
|
|
38725
|
+
if (error)
|
|
38726
|
+
return "tileBackgroundMedia." + error;
|
|
38727
|
+
}
|
|
38728
|
+
}
|
|
38729
|
+
if (message.playerBackgroundMedia != null && message.hasOwnProperty("playerBackgroundMedia")) {
|
|
38730
|
+
if (!$util.isObject(message.playerBackgroundMedia))
|
|
38731
|
+
return "playerBackgroundMedia: object expected";
|
|
38732
|
+
var key = Object.keys(message.playerBackgroundMedia);
|
|
38733
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38734
|
+
var error = $root.contentful.IdReference.verify(message.playerBackgroundMedia[key[i]]);
|
|
38735
|
+
if (error)
|
|
38736
|
+
return "playerBackgroundMedia." + error;
|
|
38737
|
+
}
|
|
38738
|
+
}
|
|
38739
|
+
if (message.useVariantPresets != null && message.hasOwnProperty("useVariantPresets"))
|
|
38740
|
+
if (typeof message.useVariantPresets !== "boolean")
|
|
38741
|
+
return "useVariantPresets: boolean expected";
|
|
38742
|
+
if (message.isEnabled != null && message.hasOwnProperty("isEnabled"))
|
|
38743
|
+
if (typeof message.isEnabled !== "boolean")
|
|
38744
|
+
return "isEnabled: boolean expected";
|
|
38745
|
+
if (message.primaryAudioMedia != null && message.hasOwnProperty("primaryAudioMedia")) {
|
|
38746
|
+
if (!$util.isObject(message.primaryAudioMedia))
|
|
38747
|
+
return "primaryAudioMedia: object expected";
|
|
38748
|
+
var key = Object.keys(message.primaryAudioMedia);
|
|
38749
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38750
|
+
var error = $root.contentful.IdReferences.verify(message.primaryAudioMedia[key[i]]);
|
|
38751
|
+
if (error)
|
|
38752
|
+
return "primaryAudioMedia." + error;
|
|
38753
|
+
}
|
|
38754
|
+
}
|
|
38755
|
+
if (message.secondaryAudioMedia != null && message.hasOwnProperty("secondaryAudioMedia")) {
|
|
38756
|
+
if (!$util.isObject(message.secondaryAudioMedia))
|
|
38757
|
+
return "secondaryAudioMedia: object expected";
|
|
38758
|
+
var key = Object.keys(message.secondaryAudioMedia);
|
|
38759
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38760
|
+
var error = $root.contentful.IdReferences.verify(message.secondaryAudioMedia[key[i]]);
|
|
38761
|
+
if (error)
|
|
38762
|
+
return "secondaryAudioMedia." + error;
|
|
38763
|
+
}
|
|
38764
|
+
}
|
|
38765
|
+
if (message.mixedAudioMedia != null && message.hasOwnProperty("mixedAudioMedia")) {
|
|
38766
|
+
if (!$util.isObject(message.mixedAudioMedia))
|
|
38767
|
+
return "mixedAudioMedia: object expected";
|
|
38768
|
+
var key = Object.keys(message.mixedAudioMedia);
|
|
38769
|
+
for (var i = 0; i < key.length; ++i) {
|
|
38770
|
+
var error = $root.contentful.IdReferences.verify(message.mixedAudioMedia[key[i]]);
|
|
38771
|
+
if (error)
|
|
38772
|
+
return "mixedAudioMedia." + error;
|
|
38773
|
+
}
|
|
38774
|
+
}
|
|
38775
|
+
if (message.accessGroup != null && message.hasOwnProperty("accessGroup")) {
|
|
38776
|
+
if (!Array.isArray(message.accessGroup))
|
|
38777
|
+
return "accessGroup: array expected";
|
|
38778
|
+
for (var i = 0; i < message.accessGroup.length; ++i) {
|
|
38779
|
+
var error = $root.contentful.SlugReference.verify(message.accessGroup[i]);
|
|
38780
|
+
if (error)
|
|
38781
|
+
return "accessGroup." + error;
|
|
38782
|
+
}
|
|
38783
|
+
}
|
|
38784
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
38785
|
+
if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
|
|
38786
|
+
return "updatedAt: integer|Long expected";
|
|
38787
|
+
return null;
|
|
38788
|
+
};
|
|
38789
|
+
|
|
38790
|
+
/**
|
|
38791
|
+
* Creates a SleepcastContentUpdated message from a plain object. Also converts values to their respective internal types.
|
|
38792
|
+
* @function fromObject
|
|
38793
|
+
* @memberof SleepcastContentUpdated
|
|
38794
|
+
* @static
|
|
38795
|
+
* @param {Object.<string,*>} object Plain object
|
|
38796
|
+
* @returns {SleepcastContentUpdated} SleepcastContentUpdated
|
|
38797
|
+
*/
|
|
38798
|
+
SleepcastContentUpdated.fromObject = function fromObject(object) {
|
|
38799
|
+
if (object instanceof $root.SleepcastContentUpdated)
|
|
38800
|
+
return object;
|
|
38801
|
+
var message = new $root.SleepcastContentUpdated();
|
|
38802
|
+
if (object.contentId != null)
|
|
38803
|
+
message.contentId = object.contentId | 0;
|
|
38804
|
+
if (object.title) {
|
|
38805
|
+
if (typeof object.title !== "object")
|
|
38806
|
+
throw TypeError(".SleepcastContentUpdated.title: object expected");
|
|
38807
|
+
message.title = {};
|
|
38808
|
+
for (var keys = Object.keys(object.title), i = 0; i < keys.length; ++i)
|
|
38809
|
+
message.title[keys[i]] = String(object.title[keys[i]]);
|
|
38810
|
+
}
|
|
38811
|
+
if (object.slug != null)
|
|
38812
|
+
message.slug = String(object.slug);
|
|
38813
|
+
if (object.subtitle) {
|
|
38814
|
+
if (typeof object.subtitle !== "object")
|
|
38815
|
+
throw TypeError(".SleepcastContentUpdated.subtitle: object expected");
|
|
38816
|
+
message.subtitle = {};
|
|
38817
|
+
for (var keys = Object.keys(object.subtitle), i = 0; i < keys.length; ++i)
|
|
38818
|
+
message.subtitle[keys[i]] = String(object.subtitle[keys[i]]);
|
|
38819
|
+
}
|
|
38820
|
+
if (object.description) {
|
|
38821
|
+
if (typeof object.description !== "object")
|
|
38822
|
+
throw TypeError(".SleepcastContentUpdated.description: object expected");
|
|
38823
|
+
message.description = {};
|
|
38824
|
+
for (var keys = Object.keys(object.description), i = 0; i < keys.length; ++i)
|
|
38825
|
+
message.description[keys[i]] = String(object.description[keys[i]]);
|
|
38826
|
+
}
|
|
38827
|
+
if (object.recipe != null) {
|
|
38828
|
+
if (typeof object.recipe !== "object")
|
|
38829
|
+
throw TypeError(".SleepcastContentUpdated.recipe: object expected");
|
|
38830
|
+
message.recipe = $root.contentful.SlugReference.fromObject(object.recipe);
|
|
38831
|
+
}
|
|
38832
|
+
if (object.tileBackgroundMedia) {
|
|
38833
|
+
if (typeof object.tileBackgroundMedia !== "object")
|
|
38834
|
+
throw TypeError(".SleepcastContentUpdated.tileBackgroundMedia: object expected");
|
|
38835
|
+
message.tileBackgroundMedia = {};
|
|
38836
|
+
for (var keys = Object.keys(object.tileBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
38837
|
+
if (typeof object.tileBackgroundMedia[keys[i]] !== "object")
|
|
38838
|
+
throw TypeError(".SleepcastContentUpdated.tileBackgroundMedia: object expected");
|
|
38839
|
+
message.tileBackgroundMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.tileBackgroundMedia[keys[i]]);
|
|
38840
|
+
}
|
|
38841
|
+
}
|
|
38842
|
+
if (object.playerBackgroundMedia) {
|
|
38843
|
+
if (typeof object.playerBackgroundMedia !== "object")
|
|
38844
|
+
throw TypeError(".SleepcastContentUpdated.playerBackgroundMedia: object expected");
|
|
38845
|
+
message.playerBackgroundMedia = {};
|
|
38846
|
+
for (var keys = Object.keys(object.playerBackgroundMedia), i = 0; i < keys.length; ++i) {
|
|
38847
|
+
if (typeof object.playerBackgroundMedia[keys[i]] !== "object")
|
|
38848
|
+
throw TypeError(".SleepcastContentUpdated.playerBackgroundMedia: object expected");
|
|
38849
|
+
message.playerBackgroundMedia[keys[i]] = $root.contentful.IdReference.fromObject(object.playerBackgroundMedia[keys[i]]);
|
|
38850
|
+
}
|
|
38851
|
+
}
|
|
38852
|
+
if (object.useVariantPresets != null)
|
|
38853
|
+
message.useVariantPresets = Boolean(object.useVariantPresets);
|
|
38854
|
+
if (object.isEnabled != null)
|
|
38855
|
+
message.isEnabled = Boolean(object.isEnabled);
|
|
38856
|
+
if (object.primaryAudioMedia) {
|
|
38857
|
+
if (typeof object.primaryAudioMedia !== "object")
|
|
38858
|
+
throw TypeError(".SleepcastContentUpdated.primaryAudioMedia: object expected");
|
|
38859
|
+
message.primaryAudioMedia = {};
|
|
38860
|
+
for (var keys = Object.keys(object.primaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38861
|
+
if (typeof object.primaryAudioMedia[keys[i]] !== "object")
|
|
38862
|
+
throw TypeError(".SleepcastContentUpdated.primaryAudioMedia: object expected");
|
|
38863
|
+
message.primaryAudioMedia[keys[i]] = $root.contentful.IdReferences.fromObject(object.primaryAudioMedia[keys[i]]);
|
|
38864
|
+
}
|
|
38865
|
+
}
|
|
38866
|
+
if (object.secondaryAudioMedia) {
|
|
38867
|
+
if (typeof object.secondaryAudioMedia !== "object")
|
|
38868
|
+
throw TypeError(".SleepcastContentUpdated.secondaryAudioMedia: object expected");
|
|
38869
|
+
message.secondaryAudioMedia = {};
|
|
38870
|
+
for (var keys = Object.keys(object.secondaryAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38871
|
+
if (typeof object.secondaryAudioMedia[keys[i]] !== "object")
|
|
38872
|
+
throw TypeError(".SleepcastContentUpdated.secondaryAudioMedia: object expected");
|
|
38873
|
+
message.secondaryAudioMedia[keys[i]] = $root.contentful.IdReferences.fromObject(object.secondaryAudioMedia[keys[i]]);
|
|
38874
|
+
}
|
|
38875
|
+
}
|
|
38876
|
+
if (object.mixedAudioMedia) {
|
|
38877
|
+
if (typeof object.mixedAudioMedia !== "object")
|
|
38878
|
+
throw TypeError(".SleepcastContentUpdated.mixedAudioMedia: object expected");
|
|
38879
|
+
message.mixedAudioMedia = {};
|
|
38880
|
+
for (var keys = Object.keys(object.mixedAudioMedia), i = 0; i < keys.length; ++i) {
|
|
38881
|
+
if (typeof object.mixedAudioMedia[keys[i]] !== "object")
|
|
38882
|
+
throw TypeError(".SleepcastContentUpdated.mixedAudioMedia: object expected");
|
|
38883
|
+
message.mixedAudioMedia[keys[i]] = $root.contentful.IdReferences.fromObject(object.mixedAudioMedia[keys[i]]);
|
|
38884
|
+
}
|
|
38885
|
+
}
|
|
38886
|
+
if (object.accessGroup) {
|
|
38887
|
+
if (!Array.isArray(object.accessGroup))
|
|
38888
|
+
throw TypeError(".SleepcastContentUpdated.accessGroup: array expected");
|
|
38889
|
+
message.accessGroup = [];
|
|
38890
|
+
for (var i = 0; i < object.accessGroup.length; ++i) {
|
|
38891
|
+
if (typeof object.accessGroup[i] !== "object")
|
|
38892
|
+
throw TypeError(".SleepcastContentUpdated.accessGroup: object expected");
|
|
38893
|
+
message.accessGroup[i] = $root.contentful.SlugReference.fromObject(object.accessGroup[i]);
|
|
38894
|
+
}
|
|
38895
|
+
}
|
|
38896
|
+
if (object.updatedAt != null)
|
|
38897
|
+
if ($util.Long)
|
|
38898
|
+
(message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
|
|
38899
|
+
else if (typeof object.updatedAt === "string")
|
|
38900
|
+
message.updatedAt = parseInt(object.updatedAt, 10);
|
|
38901
|
+
else if (typeof object.updatedAt === "number")
|
|
38902
|
+
message.updatedAt = object.updatedAt;
|
|
38903
|
+
else if (typeof object.updatedAt === "object")
|
|
38904
|
+
message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
|
|
38905
|
+
return message;
|
|
38906
|
+
};
|
|
38907
|
+
|
|
38908
|
+
/**
|
|
38909
|
+
* Creates a plain object from a SleepcastContentUpdated message. Also converts values to other types if specified.
|
|
38910
|
+
* @function toObject
|
|
38911
|
+
* @memberof SleepcastContentUpdated
|
|
38912
|
+
* @static
|
|
38913
|
+
* @param {SleepcastContentUpdated} message SleepcastContentUpdated
|
|
38914
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
38915
|
+
* @returns {Object.<string,*>} Plain object
|
|
38916
|
+
*/
|
|
38917
|
+
SleepcastContentUpdated.toObject = function toObject(message, options) {
|
|
38918
|
+
if (!options)
|
|
38919
|
+
options = {};
|
|
38920
|
+
var object = {};
|
|
38921
|
+
if (options.arrays || options.defaults)
|
|
38922
|
+
object.accessGroup = [];
|
|
38923
|
+
if (options.objects || options.defaults) {
|
|
38924
|
+
object.title = {};
|
|
38925
|
+
object.subtitle = {};
|
|
38926
|
+
object.description = {};
|
|
38927
|
+
object.tileBackgroundMedia = {};
|
|
38928
|
+
object.playerBackgroundMedia = {};
|
|
38929
|
+
object.primaryAudioMedia = {};
|
|
38930
|
+
object.secondaryAudioMedia = {};
|
|
38931
|
+
object.mixedAudioMedia = {};
|
|
38932
|
+
}
|
|
38933
|
+
if (options.defaults) {
|
|
38934
|
+
object.contentId = 0;
|
|
38935
|
+
object.slug = "";
|
|
38936
|
+
object.recipe = null;
|
|
38937
|
+
object.useVariantPresets = false;
|
|
38938
|
+
object.isEnabled = false;
|
|
38939
|
+
if ($util.Long) {
|
|
38940
|
+
var long = new $util.Long(0, 0, true);
|
|
38941
|
+
object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
38942
|
+
} else
|
|
38943
|
+
object.updatedAt = options.longs === String ? "0" : 0;
|
|
38944
|
+
}
|
|
38945
|
+
if (message.contentId != null && message.hasOwnProperty("contentId"))
|
|
38946
|
+
object.contentId = message.contentId;
|
|
38947
|
+
var keys2;
|
|
38948
|
+
if (message.title && (keys2 = Object.keys(message.title)).length) {
|
|
38949
|
+
object.title = {};
|
|
38950
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38951
|
+
object.title[keys2[j]] = message.title[keys2[j]];
|
|
38952
|
+
}
|
|
38953
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
38954
|
+
object.slug = message.slug;
|
|
38955
|
+
if (message.subtitle && (keys2 = Object.keys(message.subtitle)).length) {
|
|
38956
|
+
object.subtitle = {};
|
|
38957
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38958
|
+
object.subtitle[keys2[j]] = message.subtitle[keys2[j]];
|
|
38959
|
+
}
|
|
38960
|
+
if (message.description && (keys2 = Object.keys(message.description)).length) {
|
|
38961
|
+
object.description = {};
|
|
38962
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38963
|
+
object.description[keys2[j]] = message.description[keys2[j]];
|
|
38964
|
+
}
|
|
38965
|
+
if (message.recipe != null && message.hasOwnProperty("recipe"))
|
|
38966
|
+
object.recipe = $root.contentful.SlugReference.toObject(message.recipe, options);
|
|
38967
|
+
if (message.tileBackgroundMedia && (keys2 = Object.keys(message.tileBackgroundMedia)).length) {
|
|
38968
|
+
object.tileBackgroundMedia = {};
|
|
38969
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38970
|
+
object.tileBackgroundMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.tileBackgroundMedia[keys2[j]], options);
|
|
38971
|
+
}
|
|
38972
|
+
if (message.playerBackgroundMedia && (keys2 = Object.keys(message.playerBackgroundMedia)).length) {
|
|
38973
|
+
object.playerBackgroundMedia = {};
|
|
38974
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38975
|
+
object.playerBackgroundMedia[keys2[j]] = $root.contentful.IdReference.toObject(message.playerBackgroundMedia[keys2[j]], options);
|
|
38976
|
+
}
|
|
38977
|
+
if (message.useVariantPresets != null && message.hasOwnProperty("useVariantPresets"))
|
|
38978
|
+
object.useVariantPresets = message.useVariantPresets;
|
|
38979
|
+
if (message.isEnabled != null && message.hasOwnProperty("isEnabled"))
|
|
38980
|
+
object.isEnabled = message.isEnabled;
|
|
38981
|
+
if (message.primaryAudioMedia && (keys2 = Object.keys(message.primaryAudioMedia)).length) {
|
|
38982
|
+
object.primaryAudioMedia = {};
|
|
38983
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38984
|
+
object.primaryAudioMedia[keys2[j]] = $root.contentful.IdReferences.toObject(message.primaryAudioMedia[keys2[j]], options);
|
|
38985
|
+
}
|
|
38986
|
+
if (message.secondaryAudioMedia && (keys2 = Object.keys(message.secondaryAudioMedia)).length) {
|
|
38987
|
+
object.secondaryAudioMedia = {};
|
|
38988
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38989
|
+
object.secondaryAudioMedia[keys2[j]] = $root.contentful.IdReferences.toObject(message.secondaryAudioMedia[keys2[j]], options);
|
|
38990
|
+
}
|
|
38991
|
+
if (message.mixedAudioMedia && (keys2 = Object.keys(message.mixedAudioMedia)).length) {
|
|
38992
|
+
object.mixedAudioMedia = {};
|
|
38993
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
38994
|
+
object.mixedAudioMedia[keys2[j]] = $root.contentful.IdReferences.toObject(message.mixedAudioMedia[keys2[j]], options);
|
|
38995
|
+
}
|
|
38996
|
+
if (message.accessGroup && message.accessGroup.length) {
|
|
38997
|
+
object.accessGroup = [];
|
|
38998
|
+
for (var j = 0; j < message.accessGroup.length; ++j)
|
|
38999
|
+
object.accessGroup[j] = $root.contentful.SlugReference.toObject(message.accessGroup[j], options);
|
|
39000
|
+
}
|
|
39001
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
39002
|
+
if (typeof message.updatedAt === "number")
|
|
39003
|
+
object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
|
|
39004
|
+
else
|
|
39005
|
+
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;
|
|
39006
|
+
return object;
|
|
39007
|
+
};
|
|
39008
|
+
|
|
39009
|
+
/**
|
|
39010
|
+
* Converts this SleepcastContentUpdated to JSON.
|
|
39011
|
+
* @function toJSON
|
|
39012
|
+
* @memberof SleepcastContentUpdated
|
|
39013
|
+
* @instance
|
|
39014
|
+
* @returns {Object.<string,*>} JSON object
|
|
39015
|
+
*/
|
|
39016
|
+
SleepcastContentUpdated.prototype.toJSON = function toJSON() {
|
|
39017
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
39018
|
+
};
|
|
39019
|
+
|
|
39020
|
+
return SleepcastContentUpdated;
|
|
39021
|
+
})();
|
|
39022
|
+
|
|
39023
|
+
$root.SleepcastContentDeleted = (function() {
|
|
39024
|
+
|
|
39025
|
+
/**
|
|
39026
|
+
* Properties of a SleepcastContentDeleted.
|
|
39027
|
+
* @exports ISleepcastContentDeleted
|
|
39028
|
+
* @interface ISleepcastContentDeleted
|
|
39029
|
+
* @property {string|null} [slug] SleepcastContentDeleted slug
|
|
39030
|
+
* @property {number|Long|null} [deletedAt] SleepcastContentDeleted deletedAt
|
|
39031
|
+
*/
|
|
39032
|
+
|
|
39033
|
+
/**
|
|
39034
|
+
* Constructs a new SleepcastContentDeleted.
|
|
39035
|
+
* @exports SleepcastContentDeleted
|
|
39036
|
+
* @classdesc Represents a SleepcastContentDeleted.
|
|
39037
|
+
* @implements ISleepcastContentDeleted
|
|
39038
|
+
* @constructor
|
|
39039
|
+
* @param {ISleepcastContentDeleted=} [properties] Properties to set
|
|
39040
|
+
*/
|
|
39041
|
+
function SleepcastContentDeleted(properties) {
|
|
39042
|
+
if (properties)
|
|
39043
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
39044
|
+
if (properties[keys[i]] != null)
|
|
39045
|
+
this[keys[i]] = properties[keys[i]];
|
|
39046
|
+
}
|
|
39047
|
+
|
|
39048
|
+
/**
|
|
39049
|
+
* SleepcastContentDeleted slug.
|
|
39050
|
+
* @member {string} slug
|
|
39051
|
+
* @memberof SleepcastContentDeleted
|
|
39052
|
+
* @instance
|
|
39053
|
+
*/
|
|
39054
|
+
SleepcastContentDeleted.prototype.slug = "";
|
|
39055
|
+
|
|
39056
|
+
/**
|
|
39057
|
+
* SleepcastContentDeleted deletedAt.
|
|
39058
|
+
* @member {number|Long} deletedAt
|
|
39059
|
+
* @memberof SleepcastContentDeleted
|
|
39060
|
+
* @instance
|
|
39061
|
+
*/
|
|
39062
|
+
SleepcastContentDeleted.prototype.deletedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
39063
|
+
|
|
39064
|
+
/**
|
|
39065
|
+
* Creates a new SleepcastContentDeleted instance using the specified properties.
|
|
39066
|
+
* @function create
|
|
39067
|
+
* @memberof SleepcastContentDeleted
|
|
39068
|
+
* @static
|
|
39069
|
+
* @param {ISleepcastContentDeleted=} [properties] Properties to set
|
|
39070
|
+
* @returns {SleepcastContentDeleted} SleepcastContentDeleted instance
|
|
39071
|
+
*/
|
|
39072
|
+
SleepcastContentDeleted.create = function create(properties) {
|
|
39073
|
+
return new SleepcastContentDeleted(properties);
|
|
39074
|
+
};
|
|
39075
|
+
|
|
39076
|
+
/**
|
|
39077
|
+
* Encodes the specified SleepcastContentDeleted message. Does not implicitly {@link SleepcastContentDeleted.verify|verify} messages.
|
|
39078
|
+
* @function encode
|
|
39079
|
+
* @memberof SleepcastContentDeleted
|
|
39080
|
+
* @static
|
|
39081
|
+
* @param {ISleepcastContentDeleted} message SleepcastContentDeleted message or plain object to encode
|
|
39082
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39083
|
+
* @returns {$protobuf.Writer} Writer
|
|
39084
|
+
*/
|
|
39085
|
+
SleepcastContentDeleted.encode = function encode(message, writer) {
|
|
39086
|
+
if (!writer)
|
|
39087
|
+
writer = $Writer.create();
|
|
39088
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
39089
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
|
|
39090
|
+
if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
|
|
39091
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.deletedAt);
|
|
39092
|
+
return writer;
|
|
39093
|
+
};
|
|
39094
|
+
|
|
39095
|
+
/**
|
|
39096
|
+
* Encodes the specified SleepcastContentDeleted message, length delimited. Does not implicitly {@link SleepcastContentDeleted.verify|verify} messages.
|
|
39097
|
+
* @function encodeDelimited
|
|
39098
|
+
* @memberof SleepcastContentDeleted
|
|
39099
|
+
* @static
|
|
39100
|
+
* @param {ISleepcastContentDeleted} message SleepcastContentDeleted message or plain object to encode
|
|
39101
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
39102
|
+
* @returns {$protobuf.Writer} Writer
|
|
39103
|
+
*/
|
|
39104
|
+
SleepcastContentDeleted.encodeDelimited = function encodeDelimited(message, writer) {
|
|
39105
|
+
return this.encode(message, writer).ldelim();
|
|
39106
|
+
};
|
|
39107
|
+
|
|
39108
|
+
/**
|
|
39109
|
+
* Decodes a SleepcastContentDeleted message from the specified reader or buffer.
|
|
39110
|
+
* @function decode
|
|
39111
|
+
* @memberof SleepcastContentDeleted
|
|
39112
|
+
* @static
|
|
39113
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39114
|
+
* @param {number} [length] Message length if known beforehand
|
|
39115
|
+
* @returns {SleepcastContentDeleted} SleepcastContentDeleted
|
|
39116
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39117
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39118
|
+
*/
|
|
39119
|
+
SleepcastContentDeleted.decode = function decode(reader, length) {
|
|
39120
|
+
if (!(reader instanceof $Reader))
|
|
39121
|
+
reader = $Reader.create(reader);
|
|
39122
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SleepcastContentDeleted();
|
|
39123
|
+
while (reader.pos < end) {
|
|
39124
|
+
var tag = reader.uint32();
|
|
39125
|
+
switch (tag >>> 3) {
|
|
39126
|
+
case 1:
|
|
39127
|
+
message.slug = reader.string();
|
|
39128
|
+
break;
|
|
39129
|
+
case 2:
|
|
39130
|
+
message.deletedAt = reader.uint64();
|
|
39131
|
+
break;
|
|
39132
|
+
default:
|
|
39133
|
+
reader.skipType(tag & 7);
|
|
39134
|
+
break;
|
|
39135
|
+
}
|
|
39136
|
+
}
|
|
39137
|
+
return message;
|
|
39138
|
+
};
|
|
39139
|
+
|
|
39140
|
+
/**
|
|
39141
|
+
* Decodes a SleepcastContentDeleted message from the specified reader or buffer, length delimited.
|
|
39142
|
+
* @function decodeDelimited
|
|
39143
|
+
* @memberof SleepcastContentDeleted
|
|
39144
|
+
* @static
|
|
39145
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
39146
|
+
* @returns {SleepcastContentDeleted} SleepcastContentDeleted
|
|
39147
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
39148
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
39149
|
+
*/
|
|
39150
|
+
SleepcastContentDeleted.decodeDelimited = function decodeDelimited(reader) {
|
|
39151
|
+
if (!(reader instanceof $Reader))
|
|
39152
|
+
reader = new $Reader(reader);
|
|
39153
|
+
return this.decode(reader, reader.uint32());
|
|
39154
|
+
};
|
|
39155
|
+
|
|
39156
|
+
/**
|
|
39157
|
+
* Verifies a SleepcastContentDeleted message.
|
|
39158
|
+
* @function verify
|
|
39159
|
+
* @memberof SleepcastContentDeleted
|
|
39160
|
+
* @static
|
|
39161
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
39162
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
39163
|
+
*/
|
|
39164
|
+
SleepcastContentDeleted.verify = function verify(message) {
|
|
39165
|
+
if (typeof message !== "object" || message === null)
|
|
39166
|
+
return "object expected";
|
|
39167
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
39168
|
+
if (!$util.isString(message.slug))
|
|
39169
|
+
return "slug: string expected";
|
|
39170
|
+
if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
|
|
39171
|
+
if (!$util.isInteger(message.deletedAt) && !(message.deletedAt && $util.isInteger(message.deletedAt.low) && $util.isInteger(message.deletedAt.high)))
|
|
39172
|
+
return "deletedAt: integer|Long expected";
|
|
39173
|
+
return null;
|
|
39174
|
+
};
|
|
39175
|
+
|
|
39176
|
+
/**
|
|
39177
|
+
* Creates a SleepcastContentDeleted message from a plain object. Also converts values to their respective internal types.
|
|
39178
|
+
* @function fromObject
|
|
39179
|
+
* @memberof SleepcastContentDeleted
|
|
39180
|
+
* @static
|
|
39181
|
+
* @param {Object.<string,*>} object Plain object
|
|
39182
|
+
* @returns {SleepcastContentDeleted} SleepcastContentDeleted
|
|
39183
|
+
*/
|
|
39184
|
+
SleepcastContentDeleted.fromObject = function fromObject(object) {
|
|
39185
|
+
if (object instanceof $root.SleepcastContentDeleted)
|
|
39186
|
+
return object;
|
|
39187
|
+
var message = new $root.SleepcastContentDeleted();
|
|
39188
|
+
if (object.slug != null)
|
|
39189
|
+
message.slug = String(object.slug);
|
|
39190
|
+
if (object.deletedAt != null)
|
|
39191
|
+
if ($util.Long)
|
|
39192
|
+
(message.deletedAt = $util.Long.fromValue(object.deletedAt)).unsigned = true;
|
|
39193
|
+
else if (typeof object.deletedAt === "string")
|
|
39194
|
+
message.deletedAt = parseInt(object.deletedAt, 10);
|
|
39195
|
+
else if (typeof object.deletedAt === "number")
|
|
39196
|
+
message.deletedAt = object.deletedAt;
|
|
39197
|
+
else if (typeof object.deletedAt === "object")
|
|
39198
|
+
message.deletedAt = new $util.LongBits(object.deletedAt.low >>> 0, object.deletedAt.high >>> 0).toNumber(true);
|
|
39199
|
+
return message;
|
|
39200
|
+
};
|
|
39201
|
+
|
|
39202
|
+
/**
|
|
39203
|
+
* Creates a plain object from a SleepcastContentDeleted message. Also converts values to other types if specified.
|
|
39204
|
+
* @function toObject
|
|
39205
|
+
* @memberof SleepcastContentDeleted
|
|
39206
|
+
* @static
|
|
39207
|
+
* @param {SleepcastContentDeleted} message SleepcastContentDeleted
|
|
39208
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
39209
|
+
* @returns {Object.<string,*>} Plain object
|
|
39210
|
+
*/
|
|
39211
|
+
SleepcastContentDeleted.toObject = function toObject(message, options) {
|
|
39212
|
+
if (!options)
|
|
39213
|
+
options = {};
|
|
39214
|
+
var object = {};
|
|
39215
|
+
if (options.defaults) {
|
|
39216
|
+
object.slug = "";
|
|
39217
|
+
if ($util.Long) {
|
|
39218
|
+
var long = new $util.Long(0, 0, true);
|
|
39219
|
+
object.deletedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
39220
|
+
} else
|
|
39221
|
+
object.deletedAt = options.longs === String ? "0" : 0;
|
|
39222
|
+
}
|
|
39223
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
39224
|
+
object.slug = message.slug;
|
|
39225
|
+
if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
|
|
39226
|
+
if (typeof message.deletedAt === "number")
|
|
39227
|
+
object.deletedAt = options.longs === String ? String(message.deletedAt) : message.deletedAt;
|
|
39228
|
+
else
|
|
39229
|
+
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;
|
|
39230
|
+
return object;
|
|
39231
|
+
};
|
|
39232
|
+
|
|
39233
|
+
/**
|
|
39234
|
+
* Converts this SleepcastContentDeleted to JSON.
|
|
39235
|
+
* @function toJSON
|
|
39236
|
+
* @memberof SleepcastContentDeleted
|
|
39237
|
+
* @instance
|
|
39238
|
+
* @returns {Object.<string,*>} JSON object
|
|
39239
|
+
*/
|
|
39240
|
+
SleepcastContentDeleted.prototype.toJSON = function toJSON() {
|
|
39241
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
39242
|
+
};
|
|
39243
|
+
|
|
39244
|
+
return SleepcastContentDeleted;
|
|
39245
|
+
})();
|
|
39246
|
+
|
|
37553
39247
|
$root.TopicCreated = (function() {
|
|
37554
39248
|
|
|
37555
39249
|
/**
|