@headspace/protos-events 1.129.0 → 1.131.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 +432 -0
- package/lib/index.js +1170 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -13847,6 +13847,1176 @@ $root.ContentfulTopicDeleted = (function() {
|
|
|
13847
13847
|
return ContentfulTopicDeleted;
|
|
13848
13848
|
})();
|
|
13849
13849
|
|
|
13850
|
+
$root.ContentfulOrderedTopicsCreated = (function() {
|
|
13851
|
+
|
|
13852
|
+
/**
|
|
13853
|
+
* Properties of a ContentfulOrderedTopicsCreated.
|
|
13854
|
+
* @exports IContentfulOrderedTopicsCreated
|
|
13855
|
+
* @interface IContentfulOrderedTopicsCreated
|
|
13856
|
+
* @property {string|null} [slug] ContentfulOrderedTopicsCreated slug
|
|
13857
|
+
* @property {string|null} [location] ContentfulOrderedTopicsCreated location
|
|
13858
|
+
* @property {Array.<contentful.ISlugReference>|null} [topics] ContentfulOrderedTopicsCreated topics
|
|
13859
|
+
* @property {number|Long|null} [createdAt] ContentfulOrderedTopicsCreated createdAt
|
|
13860
|
+
*/
|
|
13861
|
+
|
|
13862
|
+
/**
|
|
13863
|
+
* Constructs a new ContentfulOrderedTopicsCreated.
|
|
13864
|
+
* @exports ContentfulOrderedTopicsCreated
|
|
13865
|
+
* @classdesc Represents a ContentfulOrderedTopicsCreated.
|
|
13866
|
+
* @implements IContentfulOrderedTopicsCreated
|
|
13867
|
+
* @constructor
|
|
13868
|
+
* @param {IContentfulOrderedTopicsCreated=} [properties] Properties to set
|
|
13869
|
+
*/
|
|
13870
|
+
function ContentfulOrderedTopicsCreated(properties) {
|
|
13871
|
+
this.topics = [];
|
|
13872
|
+
if (properties)
|
|
13873
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
13874
|
+
if (properties[keys[i]] != null)
|
|
13875
|
+
this[keys[i]] = properties[keys[i]];
|
|
13876
|
+
}
|
|
13877
|
+
|
|
13878
|
+
/**
|
|
13879
|
+
* ContentfulOrderedTopicsCreated slug.
|
|
13880
|
+
* @member {string} slug
|
|
13881
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13882
|
+
* @instance
|
|
13883
|
+
*/
|
|
13884
|
+
ContentfulOrderedTopicsCreated.prototype.slug = "";
|
|
13885
|
+
|
|
13886
|
+
/**
|
|
13887
|
+
* ContentfulOrderedTopicsCreated location.
|
|
13888
|
+
* @member {string} location
|
|
13889
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13890
|
+
* @instance
|
|
13891
|
+
*/
|
|
13892
|
+
ContentfulOrderedTopicsCreated.prototype.location = "";
|
|
13893
|
+
|
|
13894
|
+
/**
|
|
13895
|
+
* ContentfulOrderedTopicsCreated topics.
|
|
13896
|
+
* @member {Array.<contentful.ISlugReference>} topics
|
|
13897
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13898
|
+
* @instance
|
|
13899
|
+
*/
|
|
13900
|
+
ContentfulOrderedTopicsCreated.prototype.topics = $util.emptyArray;
|
|
13901
|
+
|
|
13902
|
+
/**
|
|
13903
|
+
* ContentfulOrderedTopicsCreated createdAt.
|
|
13904
|
+
* @member {number|Long} createdAt
|
|
13905
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13906
|
+
* @instance
|
|
13907
|
+
*/
|
|
13908
|
+
ContentfulOrderedTopicsCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
13909
|
+
|
|
13910
|
+
/**
|
|
13911
|
+
* Creates a new ContentfulOrderedTopicsCreated instance using the specified properties.
|
|
13912
|
+
* @function create
|
|
13913
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13914
|
+
* @static
|
|
13915
|
+
* @param {IContentfulOrderedTopicsCreated=} [properties] Properties to set
|
|
13916
|
+
* @returns {ContentfulOrderedTopicsCreated} ContentfulOrderedTopicsCreated instance
|
|
13917
|
+
*/
|
|
13918
|
+
ContentfulOrderedTopicsCreated.create = function create(properties) {
|
|
13919
|
+
return new ContentfulOrderedTopicsCreated(properties);
|
|
13920
|
+
};
|
|
13921
|
+
|
|
13922
|
+
/**
|
|
13923
|
+
* Encodes the specified ContentfulOrderedTopicsCreated message. Does not implicitly {@link ContentfulOrderedTopicsCreated.verify|verify} messages.
|
|
13924
|
+
* @function encode
|
|
13925
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13926
|
+
* @static
|
|
13927
|
+
* @param {IContentfulOrderedTopicsCreated} message ContentfulOrderedTopicsCreated message or plain object to encode
|
|
13928
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
13929
|
+
* @returns {$protobuf.Writer} Writer
|
|
13930
|
+
*/
|
|
13931
|
+
ContentfulOrderedTopicsCreated.encode = function encode(message, writer) {
|
|
13932
|
+
if (!writer)
|
|
13933
|
+
writer = $Writer.create();
|
|
13934
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
13935
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
|
|
13936
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
13937
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.location);
|
|
13938
|
+
if (message.topics != null && message.topics.length)
|
|
13939
|
+
for (var i = 0; i < message.topics.length; ++i)
|
|
13940
|
+
$root.contentful.SlugReference.encode(message.topics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
13941
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
13942
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
|
|
13943
|
+
return writer;
|
|
13944
|
+
};
|
|
13945
|
+
|
|
13946
|
+
/**
|
|
13947
|
+
* Encodes the specified ContentfulOrderedTopicsCreated message, length delimited. Does not implicitly {@link ContentfulOrderedTopicsCreated.verify|verify} messages.
|
|
13948
|
+
* @function encodeDelimited
|
|
13949
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13950
|
+
* @static
|
|
13951
|
+
* @param {IContentfulOrderedTopicsCreated} message ContentfulOrderedTopicsCreated message or plain object to encode
|
|
13952
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
13953
|
+
* @returns {$protobuf.Writer} Writer
|
|
13954
|
+
*/
|
|
13955
|
+
ContentfulOrderedTopicsCreated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
13956
|
+
return this.encode(message, writer).ldelim();
|
|
13957
|
+
};
|
|
13958
|
+
|
|
13959
|
+
/**
|
|
13960
|
+
* Decodes a ContentfulOrderedTopicsCreated message from the specified reader or buffer.
|
|
13961
|
+
* @function decode
|
|
13962
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
13963
|
+
* @static
|
|
13964
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
13965
|
+
* @param {number} [length] Message length if known beforehand
|
|
13966
|
+
* @returns {ContentfulOrderedTopicsCreated} ContentfulOrderedTopicsCreated
|
|
13967
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
13968
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
13969
|
+
*/
|
|
13970
|
+
ContentfulOrderedTopicsCreated.decode = function decode(reader, length) {
|
|
13971
|
+
if (!(reader instanceof $Reader))
|
|
13972
|
+
reader = $Reader.create(reader);
|
|
13973
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulOrderedTopicsCreated();
|
|
13974
|
+
while (reader.pos < end) {
|
|
13975
|
+
var tag = reader.uint32();
|
|
13976
|
+
switch (tag >>> 3) {
|
|
13977
|
+
case 1:
|
|
13978
|
+
message.slug = reader.string();
|
|
13979
|
+
break;
|
|
13980
|
+
case 2:
|
|
13981
|
+
message.location = reader.string();
|
|
13982
|
+
break;
|
|
13983
|
+
case 3:
|
|
13984
|
+
if (!(message.topics && message.topics.length))
|
|
13985
|
+
message.topics = [];
|
|
13986
|
+
message.topics.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
|
|
13987
|
+
break;
|
|
13988
|
+
case 4:
|
|
13989
|
+
message.createdAt = reader.uint64();
|
|
13990
|
+
break;
|
|
13991
|
+
default:
|
|
13992
|
+
reader.skipType(tag & 7);
|
|
13993
|
+
break;
|
|
13994
|
+
}
|
|
13995
|
+
}
|
|
13996
|
+
return message;
|
|
13997
|
+
};
|
|
13998
|
+
|
|
13999
|
+
/**
|
|
14000
|
+
* Decodes a ContentfulOrderedTopicsCreated message from the specified reader or buffer, length delimited.
|
|
14001
|
+
* @function decodeDelimited
|
|
14002
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
14003
|
+
* @static
|
|
14004
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14005
|
+
* @returns {ContentfulOrderedTopicsCreated} ContentfulOrderedTopicsCreated
|
|
14006
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14007
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14008
|
+
*/
|
|
14009
|
+
ContentfulOrderedTopicsCreated.decodeDelimited = function decodeDelimited(reader) {
|
|
14010
|
+
if (!(reader instanceof $Reader))
|
|
14011
|
+
reader = new $Reader(reader);
|
|
14012
|
+
return this.decode(reader, reader.uint32());
|
|
14013
|
+
};
|
|
14014
|
+
|
|
14015
|
+
/**
|
|
14016
|
+
* Verifies a ContentfulOrderedTopicsCreated message.
|
|
14017
|
+
* @function verify
|
|
14018
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
14019
|
+
* @static
|
|
14020
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
14021
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14022
|
+
*/
|
|
14023
|
+
ContentfulOrderedTopicsCreated.verify = function verify(message) {
|
|
14024
|
+
if (typeof message !== "object" || message === null)
|
|
14025
|
+
return "object expected";
|
|
14026
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14027
|
+
if (!$util.isString(message.slug))
|
|
14028
|
+
return "slug: string expected";
|
|
14029
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
14030
|
+
if (!$util.isString(message.location))
|
|
14031
|
+
return "location: string expected";
|
|
14032
|
+
if (message.topics != null && message.hasOwnProperty("topics")) {
|
|
14033
|
+
if (!Array.isArray(message.topics))
|
|
14034
|
+
return "topics: array expected";
|
|
14035
|
+
for (var i = 0; i < message.topics.length; ++i) {
|
|
14036
|
+
var error = $root.contentful.SlugReference.verify(message.topics[i]);
|
|
14037
|
+
if (error)
|
|
14038
|
+
return "topics." + error;
|
|
14039
|
+
}
|
|
14040
|
+
}
|
|
14041
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14042
|
+
if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
|
|
14043
|
+
return "createdAt: integer|Long expected";
|
|
14044
|
+
return null;
|
|
14045
|
+
};
|
|
14046
|
+
|
|
14047
|
+
/**
|
|
14048
|
+
* Creates a ContentfulOrderedTopicsCreated message from a plain object. Also converts values to their respective internal types.
|
|
14049
|
+
* @function fromObject
|
|
14050
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
14051
|
+
* @static
|
|
14052
|
+
* @param {Object.<string,*>} object Plain object
|
|
14053
|
+
* @returns {ContentfulOrderedTopicsCreated} ContentfulOrderedTopicsCreated
|
|
14054
|
+
*/
|
|
14055
|
+
ContentfulOrderedTopicsCreated.fromObject = function fromObject(object) {
|
|
14056
|
+
if (object instanceof $root.ContentfulOrderedTopicsCreated)
|
|
14057
|
+
return object;
|
|
14058
|
+
var message = new $root.ContentfulOrderedTopicsCreated();
|
|
14059
|
+
if (object.slug != null)
|
|
14060
|
+
message.slug = String(object.slug);
|
|
14061
|
+
if (object.location != null)
|
|
14062
|
+
message.location = String(object.location);
|
|
14063
|
+
if (object.topics) {
|
|
14064
|
+
if (!Array.isArray(object.topics))
|
|
14065
|
+
throw TypeError(".ContentfulOrderedTopicsCreated.topics: array expected");
|
|
14066
|
+
message.topics = [];
|
|
14067
|
+
for (var i = 0; i < object.topics.length; ++i) {
|
|
14068
|
+
if (typeof object.topics[i] !== "object")
|
|
14069
|
+
throw TypeError(".ContentfulOrderedTopicsCreated.topics: object expected");
|
|
14070
|
+
message.topics[i] = $root.contentful.SlugReference.fromObject(object.topics[i]);
|
|
14071
|
+
}
|
|
14072
|
+
}
|
|
14073
|
+
if (object.createdAt != null)
|
|
14074
|
+
if ($util.Long)
|
|
14075
|
+
(message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
|
|
14076
|
+
else if (typeof object.createdAt === "string")
|
|
14077
|
+
message.createdAt = parseInt(object.createdAt, 10);
|
|
14078
|
+
else if (typeof object.createdAt === "number")
|
|
14079
|
+
message.createdAt = object.createdAt;
|
|
14080
|
+
else if (typeof object.createdAt === "object")
|
|
14081
|
+
message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
|
|
14082
|
+
return message;
|
|
14083
|
+
};
|
|
14084
|
+
|
|
14085
|
+
/**
|
|
14086
|
+
* Creates a plain object from a ContentfulOrderedTopicsCreated message. Also converts values to other types if specified.
|
|
14087
|
+
* @function toObject
|
|
14088
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
14089
|
+
* @static
|
|
14090
|
+
* @param {ContentfulOrderedTopicsCreated} message ContentfulOrderedTopicsCreated
|
|
14091
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14092
|
+
* @returns {Object.<string,*>} Plain object
|
|
14093
|
+
*/
|
|
14094
|
+
ContentfulOrderedTopicsCreated.toObject = function toObject(message, options) {
|
|
14095
|
+
if (!options)
|
|
14096
|
+
options = {};
|
|
14097
|
+
var object = {};
|
|
14098
|
+
if (options.arrays || options.defaults)
|
|
14099
|
+
object.topics = [];
|
|
14100
|
+
if (options.defaults) {
|
|
14101
|
+
object.slug = "";
|
|
14102
|
+
object.location = "";
|
|
14103
|
+
if ($util.Long) {
|
|
14104
|
+
var long = new $util.Long(0, 0, true);
|
|
14105
|
+
object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14106
|
+
} else
|
|
14107
|
+
object.createdAt = options.longs === String ? "0" : 0;
|
|
14108
|
+
}
|
|
14109
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14110
|
+
object.slug = message.slug;
|
|
14111
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
14112
|
+
object.location = message.location;
|
|
14113
|
+
if (message.topics && message.topics.length) {
|
|
14114
|
+
object.topics = [];
|
|
14115
|
+
for (var j = 0; j < message.topics.length; ++j)
|
|
14116
|
+
object.topics[j] = $root.contentful.SlugReference.toObject(message.topics[j], options);
|
|
14117
|
+
}
|
|
14118
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14119
|
+
if (typeof message.createdAt === "number")
|
|
14120
|
+
object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
|
|
14121
|
+
else
|
|
14122
|
+
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;
|
|
14123
|
+
return object;
|
|
14124
|
+
};
|
|
14125
|
+
|
|
14126
|
+
/**
|
|
14127
|
+
* Converts this ContentfulOrderedTopicsCreated to JSON.
|
|
14128
|
+
* @function toJSON
|
|
14129
|
+
* @memberof ContentfulOrderedTopicsCreated
|
|
14130
|
+
* @instance
|
|
14131
|
+
* @returns {Object.<string,*>} JSON object
|
|
14132
|
+
*/
|
|
14133
|
+
ContentfulOrderedTopicsCreated.prototype.toJSON = function toJSON() {
|
|
14134
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
14135
|
+
};
|
|
14136
|
+
|
|
14137
|
+
return ContentfulOrderedTopicsCreated;
|
|
14138
|
+
})();
|
|
14139
|
+
|
|
14140
|
+
$root.ContentfulOrderedTopicsUpdated = (function() {
|
|
14141
|
+
|
|
14142
|
+
/**
|
|
14143
|
+
* Properties of a ContentfulOrderedTopicsUpdated.
|
|
14144
|
+
* @exports IContentfulOrderedTopicsUpdated
|
|
14145
|
+
* @interface IContentfulOrderedTopicsUpdated
|
|
14146
|
+
* @property {string|null} [slug] ContentfulOrderedTopicsUpdated slug
|
|
14147
|
+
* @property {string|null} [location] ContentfulOrderedTopicsUpdated location
|
|
14148
|
+
* @property {Array.<contentful.ISlugReference>|null} [topics] ContentfulOrderedTopicsUpdated topics
|
|
14149
|
+
* @property {number|Long|null} [updatedAt] ContentfulOrderedTopicsUpdated updatedAt
|
|
14150
|
+
*/
|
|
14151
|
+
|
|
14152
|
+
/**
|
|
14153
|
+
* Constructs a new ContentfulOrderedTopicsUpdated.
|
|
14154
|
+
* @exports ContentfulOrderedTopicsUpdated
|
|
14155
|
+
* @classdesc Represents a ContentfulOrderedTopicsUpdated.
|
|
14156
|
+
* @implements IContentfulOrderedTopicsUpdated
|
|
14157
|
+
* @constructor
|
|
14158
|
+
* @param {IContentfulOrderedTopicsUpdated=} [properties] Properties to set
|
|
14159
|
+
*/
|
|
14160
|
+
function ContentfulOrderedTopicsUpdated(properties) {
|
|
14161
|
+
this.topics = [];
|
|
14162
|
+
if (properties)
|
|
14163
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14164
|
+
if (properties[keys[i]] != null)
|
|
14165
|
+
this[keys[i]] = properties[keys[i]];
|
|
14166
|
+
}
|
|
14167
|
+
|
|
14168
|
+
/**
|
|
14169
|
+
* ContentfulOrderedTopicsUpdated slug.
|
|
14170
|
+
* @member {string} slug
|
|
14171
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14172
|
+
* @instance
|
|
14173
|
+
*/
|
|
14174
|
+
ContentfulOrderedTopicsUpdated.prototype.slug = "";
|
|
14175
|
+
|
|
14176
|
+
/**
|
|
14177
|
+
* ContentfulOrderedTopicsUpdated location.
|
|
14178
|
+
* @member {string} location
|
|
14179
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14180
|
+
* @instance
|
|
14181
|
+
*/
|
|
14182
|
+
ContentfulOrderedTopicsUpdated.prototype.location = "";
|
|
14183
|
+
|
|
14184
|
+
/**
|
|
14185
|
+
* ContentfulOrderedTopicsUpdated topics.
|
|
14186
|
+
* @member {Array.<contentful.ISlugReference>} topics
|
|
14187
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14188
|
+
* @instance
|
|
14189
|
+
*/
|
|
14190
|
+
ContentfulOrderedTopicsUpdated.prototype.topics = $util.emptyArray;
|
|
14191
|
+
|
|
14192
|
+
/**
|
|
14193
|
+
* ContentfulOrderedTopicsUpdated updatedAt.
|
|
14194
|
+
* @member {number|Long} updatedAt
|
|
14195
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14196
|
+
* @instance
|
|
14197
|
+
*/
|
|
14198
|
+
ContentfulOrderedTopicsUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
14199
|
+
|
|
14200
|
+
/**
|
|
14201
|
+
* Creates a new ContentfulOrderedTopicsUpdated instance using the specified properties.
|
|
14202
|
+
* @function create
|
|
14203
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14204
|
+
* @static
|
|
14205
|
+
* @param {IContentfulOrderedTopicsUpdated=} [properties] Properties to set
|
|
14206
|
+
* @returns {ContentfulOrderedTopicsUpdated} ContentfulOrderedTopicsUpdated instance
|
|
14207
|
+
*/
|
|
14208
|
+
ContentfulOrderedTopicsUpdated.create = function create(properties) {
|
|
14209
|
+
return new ContentfulOrderedTopicsUpdated(properties);
|
|
14210
|
+
};
|
|
14211
|
+
|
|
14212
|
+
/**
|
|
14213
|
+
* Encodes the specified ContentfulOrderedTopicsUpdated message. Does not implicitly {@link ContentfulOrderedTopicsUpdated.verify|verify} messages.
|
|
14214
|
+
* @function encode
|
|
14215
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14216
|
+
* @static
|
|
14217
|
+
* @param {IContentfulOrderedTopicsUpdated} message ContentfulOrderedTopicsUpdated message or plain object to encode
|
|
14218
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14219
|
+
* @returns {$protobuf.Writer} Writer
|
|
14220
|
+
*/
|
|
14221
|
+
ContentfulOrderedTopicsUpdated.encode = function encode(message, writer) {
|
|
14222
|
+
if (!writer)
|
|
14223
|
+
writer = $Writer.create();
|
|
14224
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14225
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
|
|
14226
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
14227
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.location);
|
|
14228
|
+
if (message.topics != null && message.topics.length)
|
|
14229
|
+
for (var i = 0; i < message.topics.length; ++i)
|
|
14230
|
+
$root.contentful.SlugReference.encode(message.topics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
14231
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
14232
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.updatedAt);
|
|
14233
|
+
return writer;
|
|
14234
|
+
};
|
|
14235
|
+
|
|
14236
|
+
/**
|
|
14237
|
+
* Encodes the specified ContentfulOrderedTopicsUpdated message, length delimited. Does not implicitly {@link ContentfulOrderedTopicsUpdated.verify|verify} messages.
|
|
14238
|
+
* @function encodeDelimited
|
|
14239
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14240
|
+
* @static
|
|
14241
|
+
* @param {IContentfulOrderedTopicsUpdated} message ContentfulOrderedTopicsUpdated message or plain object to encode
|
|
14242
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14243
|
+
* @returns {$protobuf.Writer} Writer
|
|
14244
|
+
*/
|
|
14245
|
+
ContentfulOrderedTopicsUpdated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
14246
|
+
return this.encode(message, writer).ldelim();
|
|
14247
|
+
};
|
|
14248
|
+
|
|
14249
|
+
/**
|
|
14250
|
+
* Decodes a ContentfulOrderedTopicsUpdated message from the specified reader or buffer.
|
|
14251
|
+
* @function decode
|
|
14252
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14253
|
+
* @static
|
|
14254
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14255
|
+
* @param {number} [length] Message length if known beforehand
|
|
14256
|
+
* @returns {ContentfulOrderedTopicsUpdated} ContentfulOrderedTopicsUpdated
|
|
14257
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14258
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14259
|
+
*/
|
|
14260
|
+
ContentfulOrderedTopicsUpdated.decode = function decode(reader, length) {
|
|
14261
|
+
if (!(reader instanceof $Reader))
|
|
14262
|
+
reader = $Reader.create(reader);
|
|
14263
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulOrderedTopicsUpdated();
|
|
14264
|
+
while (reader.pos < end) {
|
|
14265
|
+
var tag = reader.uint32();
|
|
14266
|
+
switch (tag >>> 3) {
|
|
14267
|
+
case 1:
|
|
14268
|
+
message.slug = reader.string();
|
|
14269
|
+
break;
|
|
14270
|
+
case 2:
|
|
14271
|
+
message.location = reader.string();
|
|
14272
|
+
break;
|
|
14273
|
+
case 3:
|
|
14274
|
+
if (!(message.topics && message.topics.length))
|
|
14275
|
+
message.topics = [];
|
|
14276
|
+
message.topics.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
|
|
14277
|
+
break;
|
|
14278
|
+
case 4:
|
|
14279
|
+
message.updatedAt = reader.uint64();
|
|
14280
|
+
break;
|
|
14281
|
+
default:
|
|
14282
|
+
reader.skipType(tag & 7);
|
|
14283
|
+
break;
|
|
14284
|
+
}
|
|
14285
|
+
}
|
|
14286
|
+
return message;
|
|
14287
|
+
};
|
|
14288
|
+
|
|
14289
|
+
/**
|
|
14290
|
+
* Decodes a ContentfulOrderedTopicsUpdated message from the specified reader or buffer, length delimited.
|
|
14291
|
+
* @function decodeDelimited
|
|
14292
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14293
|
+
* @static
|
|
14294
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14295
|
+
* @returns {ContentfulOrderedTopicsUpdated} ContentfulOrderedTopicsUpdated
|
|
14296
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14297
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14298
|
+
*/
|
|
14299
|
+
ContentfulOrderedTopicsUpdated.decodeDelimited = function decodeDelimited(reader) {
|
|
14300
|
+
if (!(reader instanceof $Reader))
|
|
14301
|
+
reader = new $Reader(reader);
|
|
14302
|
+
return this.decode(reader, reader.uint32());
|
|
14303
|
+
};
|
|
14304
|
+
|
|
14305
|
+
/**
|
|
14306
|
+
* Verifies a ContentfulOrderedTopicsUpdated message.
|
|
14307
|
+
* @function verify
|
|
14308
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14309
|
+
* @static
|
|
14310
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
14311
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14312
|
+
*/
|
|
14313
|
+
ContentfulOrderedTopicsUpdated.verify = function verify(message) {
|
|
14314
|
+
if (typeof message !== "object" || message === null)
|
|
14315
|
+
return "object expected";
|
|
14316
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14317
|
+
if (!$util.isString(message.slug))
|
|
14318
|
+
return "slug: string expected";
|
|
14319
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
14320
|
+
if (!$util.isString(message.location))
|
|
14321
|
+
return "location: string expected";
|
|
14322
|
+
if (message.topics != null && message.hasOwnProperty("topics")) {
|
|
14323
|
+
if (!Array.isArray(message.topics))
|
|
14324
|
+
return "topics: array expected";
|
|
14325
|
+
for (var i = 0; i < message.topics.length; ++i) {
|
|
14326
|
+
var error = $root.contentful.SlugReference.verify(message.topics[i]);
|
|
14327
|
+
if (error)
|
|
14328
|
+
return "topics." + error;
|
|
14329
|
+
}
|
|
14330
|
+
}
|
|
14331
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
14332
|
+
if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
|
|
14333
|
+
return "updatedAt: integer|Long expected";
|
|
14334
|
+
return null;
|
|
14335
|
+
};
|
|
14336
|
+
|
|
14337
|
+
/**
|
|
14338
|
+
* Creates a ContentfulOrderedTopicsUpdated message from a plain object. Also converts values to their respective internal types.
|
|
14339
|
+
* @function fromObject
|
|
14340
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14341
|
+
* @static
|
|
14342
|
+
* @param {Object.<string,*>} object Plain object
|
|
14343
|
+
* @returns {ContentfulOrderedTopicsUpdated} ContentfulOrderedTopicsUpdated
|
|
14344
|
+
*/
|
|
14345
|
+
ContentfulOrderedTopicsUpdated.fromObject = function fromObject(object) {
|
|
14346
|
+
if (object instanceof $root.ContentfulOrderedTopicsUpdated)
|
|
14347
|
+
return object;
|
|
14348
|
+
var message = new $root.ContentfulOrderedTopicsUpdated();
|
|
14349
|
+
if (object.slug != null)
|
|
14350
|
+
message.slug = String(object.slug);
|
|
14351
|
+
if (object.location != null)
|
|
14352
|
+
message.location = String(object.location);
|
|
14353
|
+
if (object.topics) {
|
|
14354
|
+
if (!Array.isArray(object.topics))
|
|
14355
|
+
throw TypeError(".ContentfulOrderedTopicsUpdated.topics: array expected");
|
|
14356
|
+
message.topics = [];
|
|
14357
|
+
for (var i = 0; i < object.topics.length; ++i) {
|
|
14358
|
+
if (typeof object.topics[i] !== "object")
|
|
14359
|
+
throw TypeError(".ContentfulOrderedTopicsUpdated.topics: object expected");
|
|
14360
|
+
message.topics[i] = $root.contentful.SlugReference.fromObject(object.topics[i]);
|
|
14361
|
+
}
|
|
14362
|
+
}
|
|
14363
|
+
if (object.updatedAt != null)
|
|
14364
|
+
if ($util.Long)
|
|
14365
|
+
(message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
|
|
14366
|
+
else if (typeof object.updatedAt === "string")
|
|
14367
|
+
message.updatedAt = parseInt(object.updatedAt, 10);
|
|
14368
|
+
else if (typeof object.updatedAt === "number")
|
|
14369
|
+
message.updatedAt = object.updatedAt;
|
|
14370
|
+
else if (typeof object.updatedAt === "object")
|
|
14371
|
+
message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
|
|
14372
|
+
return message;
|
|
14373
|
+
};
|
|
14374
|
+
|
|
14375
|
+
/**
|
|
14376
|
+
* Creates a plain object from a ContentfulOrderedTopicsUpdated message. Also converts values to other types if specified.
|
|
14377
|
+
* @function toObject
|
|
14378
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14379
|
+
* @static
|
|
14380
|
+
* @param {ContentfulOrderedTopicsUpdated} message ContentfulOrderedTopicsUpdated
|
|
14381
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14382
|
+
* @returns {Object.<string,*>} Plain object
|
|
14383
|
+
*/
|
|
14384
|
+
ContentfulOrderedTopicsUpdated.toObject = function toObject(message, options) {
|
|
14385
|
+
if (!options)
|
|
14386
|
+
options = {};
|
|
14387
|
+
var object = {};
|
|
14388
|
+
if (options.arrays || options.defaults)
|
|
14389
|
+
object.topics = [];
|
|
14390
|
+
if (options.defaults) {
|
|
14391
|
+
object.slug = "";
|
|
14392
|
+
object.location = "";
|
|
14393
|
+
if ($util.Long) {
|
|
14394
|
+
var long = new $util.Long(0, 0, true);
|
|
14395
|
+
object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14396
|
+
} else
|
|
14397
|
+
object.updatedAt = options.longs === String ? "0" : 0;
|
|
14398
|
+
}
|
|
14399
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14400
|
+
object.slug = message.slug;
|
|
14401
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
14402
|
+
object.location = message.location;
|
|
14403
|
+
if (message.topics && message.topics.length) {
|
|
14404
|
+
object.topics = [];
|
|
14405
|
+
for (var j = 0; j < message.topics.length; ++j)
|
|
14406
|
+
object.topics[j] = $root.contentful.SlugReference.toObject(message.topics[j], options);
|
|
14407
|
+
}
|
|
14408
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
14409
|
+
if (typeof message.updatedAt === "number")
|
|
14410
|
+
object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
|
|
14411
|
+
else
|
|
14412
|
+
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;
|
|
14413
|
+
return object;
|
|
14414
|
+
};
|
|
14415
|
+
|
|
14416
|
+
/**
|
|
14417
|
+
* Converts this ContentfulOrderedTopicsUpdated to JSON.
|
|
14418
|
+
* @function toJSON
|
|
14419
|
+
* @memberof ContentfulOrderedTopicsUpdated
|
|
14420
|
+
* @instance
|
|
14421
|
+
* @returns {Object.<string,*>} JSON object
|
|
14422
|
+
*/
|
|
14423
|
+
ContentfulOrderedTopicsUpdated.prototype.toJSON = function toJSON() {
|
|
14424
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
14425
|
+
};
|
|
14426
|
+
|
|
14427
|
+
return ContentfulOrderedTopicsUpdated;
|
|
14428
|
+
})();
|
|
14429
|
+
|
|
14430
|
+
$root.ContentfulOrderedCategoriesCreated = (function() {
|
|
14431
|
+
|
|
14432
|
+
/**
|
|
14433
|
+
* Properties of a ContentfulOrderedCategoriesCreated.
|
|
14434
|
+
* @exports IContentfulOrderedCategoriesCreated
|
|
14435
|
+
* @interface IContentfulOrderedCategoriesCreated
|
|
14436
|
+
* @property {string|null} [slug] ContentfulOrderedCategoriesCreated slug
|
|
14437
|
+
* @property {contentful.ISlugReference|null} [topic] ContentfulOrderedCategoriesCreated topic
|
|
14438
|
+
* @property {Array.<contentful.ISlugReference>|null} [categories] ContentfulOrderedCategoriesCreated categories
|
|
14439
|
+
* @property {number|Long|null} [createdAt] ContentfulOrderedCategoriesCreated createdAt
|
|
14440
|
+
*/
|
|
14441
|
+
|
|
14442
|
+
/**
|
|
14443
|
+
* Constructs a new ContentfulOrderedCategoriesCreated.
|
|
14444
|
+
* @exports ContentfulOrderedCategoriesCreated
|
|
14445
|
+
* @classdesc Represents a ContentfulOrderedCategoriesCreated.
|
|
14446
|
+
* @implements IContentfulOrderedCategoriesCreated
|
|
14447
|
+
* @constructor
|
|
14448
|
+
* @param {IContentfulOrderedCategoriesCreated=} [properties] Properties to set
|
|
14449
|
+
*/
|
|
14450
|
+
function ContentfulOrderedCategoriesCreated(properties) {
|
|
14451
|
+
this.categories = [];
|
|
14452
|
+
if (properties)
|
|
14453
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14454
|
+
if (properties[keys[i]] != null)
|
|
14455
|
+
this[keys[i]] = properties[keys[i]];
|
|
14456
|
+
}
|
|
14457
|
+
|
|
14458
|
+
/**
|
|
14459
|
+
* ContentfulOrderedCategoriesCreated slug.
|
|
14460
|
+
* @member {string} slug
|
|
14461
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14462
|
+
* @instance
|
|
14463
|
+
*/
|
|
14464
|
+
ContentfulOrderedCategoriesCreated.prototype.slug = "";
|
|
14465
|
+
|
|
14466
|
+
/**
|
|
14467
|
+
* ContentfulOrderedCategoriesCreated topic.
|
|
14468
|
+
* @member {contentful.ISlugReference|null|undefined} topic
|
|
14469
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14470
|
+
* @instance
|
|
14471
|
+
*/
|
|
14472
|
+
ContentfulOrderedCategoriesCreated.prototype.topic = null;
|
|
14473
|
+
|
|
14474
|
+
/**
|
|
14475
|
+
* ContentfulOrderedCategoriesCreated categories.
|
|
14476
|
+
* @member {Array.<contentful.ISlugReference>} categories
|
|
14477
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14478
|
+
* @instance
|
|
14479
|
+
*/
|
|
14480
|
+
ContentfulOrderedCategoriesCreated.prototype.categories = $util.emptyArray;
|
|
14481
|
+
|
|
14482
|
+
/**
|
|
14483
|
+
* ContentfulOrderedCategoriesCreated createdAt.
|
|
14484
|
+
* @member {number|Long} createdAt
|
|
14485
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14486
|
+
* @instance
|
|
14487
|
+
*/
|
|
14488
|
+
ContentfulOrderedCategoriesCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
14489
|
+
|
|
14490
|
+
/**
|
|
14491
|
+
* Creates a new ContentfulOrderedCategoriesCreated instance using the specified properties.
|
|
14492
|
+
* @function create
|
|
14493
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14494
|
+
* @static
|
|
14495
|
+
* @param {IContentfulOrderedCategoriesCreated=} [properties] Properties to set
|
|
14496
|
+
* @returns {ContentfulOrderedCategoriesCreated} ContentfulOrderedCategoriesCreated instance
|
|
14497
|
+
*/
|
|
14498
|
+
ContentfulOrderedCategoriesCreated.create = function create(properties) {
|
|
14499
|
+
return new ContentfulOrderedCategoriesCreated(properties);
|
|
14500
|
+
};
|
|
14501
|
+
|
|
14502
|
+
/**
|
|
14503
|
+
* Encodes the specified ContentfulOrderedCategoriesCreated message. Does not implicitly {@link ContentfulOrderedCategoriesCreated.verify|verify} messages.
|
|
14504
|
+
* @function encode
|
|
14505
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14506
|
+
* @static
|
|
14507
|
+
* @param {IContentfulOrderedCategoriesCreated} message ContentfulOrderedCategoriesCreated message or plain object to encode
|
|
14508
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14509
|
+
* @returns {$protobuf.Writer} Writer
|
|
14510
|
+
*/
|
|
14511
|
+
ContentfulOrderedCategoriesCreated.encode = function encode(message, writer) {
|
|
14512
|
+
if (!writer)
|
|
14513
|
+
writer = $Writer.create();
|
|
14514
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14515
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
|
|
14516
|
+
if (message.topic != null && message.hasOwnProperty("topic"))
|
|
14517
|
+
$root.contentful.SlugReference.encode(message.topic, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
14518
|
+
if (message.categories != null && message.categories.length)
|
|
14519
|
+
for (var i = 0; i < message.categories.length; ++i)
|
|
14520
|
+
$root.contentful.SlugReference.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
14521
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14522
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
|
|
14523
|
+
return writer;
|
|
14524
|
+
};
|
|
14525
|
+
|
|
14526
|
+
/**
|
|
14527
|
+
* Encodes the specified ContentfulOrderedCategoriesCreated message, length delimited. Does not implicitly {@link ContentfulOrderedCategoriesCreated.verify|verify} messages.
|
|
14528
|
+
* @function encodeDelimited
|
|
14529
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14530
|
+
* @static
|
|
14531
|
+
* @param {IContentfulOrderedCategoriesCreated} message ContentfulOrderedCategoriesCreated message or plain object to encode
|
|
14532
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14533
|
+
* @returns {$protobuf.Writer} Writer
|
|
14534
|
+
*/
|
|
14535
|
+
ContentfulOrderedCategoriesCreated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
14536
|
+
return this.encode(message, writer).ldelim();
|
|
14537
|
+
};
|
|
14538
|
+
|
|
14539
|
+
/**
|
|
14540
|
+
* Decodes a ContentfulOrderedCategoriesCreated message from the specified reader or buffer.
|
|
14541
|
+
* @function decode
|
|
14542
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14543
|
+
* @static
|
|
14544
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14545
|
+
* @param {number} [length] Message length if known beforehand
|
|
14546
|
+
* @returns {ContentfulOrderedCategoriesCreated} ContentfulOrderedCategoriesCreated
|
|
14547
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14548
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14549
|
+
*/
|
|
14550
|
+
ContentfulOrderedCategoriesCreated.decode = function decode(reader, length) {
|
|
14551
|
+
if (!(reader instanceof $Reader))
|
|
14552
|
+
reader = $Reader.create(reader);
|
|
14553
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulOrderedCategoriesCreated();
|
|
14554
|
+
while (reader.pos < end) {
|
|
14555
|
+
var tag = reader.uint32();
|
|
14556
|
+
switch (tag >>> 3) {
|
|
14557
|
+
case 1:
|
|
14558
|
+
message.slug = reader.string();
|
|
14559
|
+
break;
|
|
14560
|
+
case 2:
|
|
14561
|
+
message.topic = $root.contentful.SlugReference.decode(reader, reader.uint32());
|
|
14562
|
+
break;
|
|
14563
|
+
case 3:
|
|
14564
|
+
if (!(message.categories && message.categories.length))
|
|
14565
|
+
message.categories = [];
|
|
14566
|
+
message.categories.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
|
|
14567
|
+
break;
|
|
14568
|
+
case 4:
|
|
14569
|
+
message.createdAt = reader.uint64();
|
|
14570
|
+
break;
|
|
14571
|
+
default:
|
|
14572
|
+
reader.skipType(tag & 7);
|
|
14573
|
+
break;
|
|
14574
|
+
}
|
|
14575
|
+
}
|
|
14576
|
+
return message;
|
|
14577
|
+
};
|
|
14578
|
+
|
|
14579
|
+
/**
|
|
14580
|
+
* Decodes a ContentfulOrderedCategoriesCreated message from the specified reader or buffer, length delimited.
|
|
14581
|
+
* @function decodeDelimited
|
|
14582
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14583
|
+
* @static
|
|
14584
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14585
|
+
* @returns {ContentfulOrderedCategoriesCreated} ContentfulOrderedCategoriesCreated
|
|
14586
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14587
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14588
|
+
*/
|
|
14589
|
+
ContentfulOrderedCategoriesCreated.decodeDelimited = function decodeDelimited(reader) {
|
|
14590
|
+
if (!(reader instanceof $Reader))
|
|
14591
|
+
reader = new $Reader(reader);
|
|
14592
|
+
return this.decode(reader, reader.uint32());
|
|
14593
|
+
};
|
|
14594
|
+
|
|
14595
|
+
/**
|
|
14596
|
+
* Verifies a ContentfulOrderedCategoriesCreated message.
|
|
14597
|
+
* @function verify
|
|
14598
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14599
|
+
* @static
|
|
14600
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
14601
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14602
|
+
*/
|
|
14603
|
+
ContentfulOrderedCategoriesCreated.verify = function verify(message) {
|
|
14604
|
+
if (typeof message !== "object" || message === null)
|
|
14605
|
+
return "object expected";
|
|
14606
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14607
|
+
if (!$util.isString(message.slug))
|
|
14608
|
+
return "slug: string expected";
|
|
14609
|
+
if (message.topic != null && message.hasOwnProperty("topic")) {
|
|
14610
|
+
var error = $root.contentful.SlugReference.verify(message.topic);
|
|
14611
|
+
if (error)
|
|
14612
|
+
return "topic." + error;
|
|
14613
|
+
}
|
|
14614
|
+
if (message.categories != null && message.hasOwnProperty("categories")) {
|
|
14615
|
+
if (!Array.isArray(message.categories))
|
|
14616
|
+
return "categories: array expected";
|
|
14617
|
+
for (var i = 0; i < message.categories.length; ++i) {
|
|
14618
|
+
var error = $root.contentful.SlugReference.verify(message.categories[i]);
|
|
14619
|
+
if (error)
|
|
14620
|
+
return "categories." + error;
|
|
14621
|
+
}
|
|
14622
|
+
}
|
|
14623
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14624
|
+
if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
|
|
14625
|
+
return "createdAt: integer|Long expected";
|
|
14626
|
+
return null;
|
|
14627
|
+
};
|
|
14628
|
+
|
|
14629
|
+
/**
|
|
14630
|
+
* Creates a ContentfulOrderedCategoriesCreated message from a plain object. Also converts values to their respective internal types.
|
|
14631
|
+
* @function fromObject
|
|
14632
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14633
|
+
* @static
|
|
14634
|
+
* @param {Object.<string,*>} object Plain object
|
|
14635
|
+
* @returns {ContentfulOrderedCategoriesCreated} ContentfulOrderedCategoriesCreated
|
|
14636
|
+
*/
|
|
14637
|
+
ContentfulOrderedCategoriesCreated.fromObject = function fromObject(object) {
|
|
14638
|
+
if (object instanceof $root.ContentfulOrderedCategoriesCreated)
|
|
14639
|
+
return object;
|
|
14640
|
+
var message = new $root.ContentfulOrderedCategoriesCreated();
|
|
14641
|
+
if (object.slug != null)
|
|
14642
|
+
message.slug = String(object.slug);
|
|
14643
|
+
if (object.topic != null) {
|
|
14644
|
+
if (typeof object.topic !== "object")
|
|
14645
|
+
throw TypeError(".ContentfulOrderedCategoriesCreated.topic: object expected");
|
|
14646
|
+
message.topic = $root.contentful.SlugReference.fromObject(object.topic);
|
|
14647
|
+
}
|
|
14648
|
+
if (object.categories) {
|
|
14649
|
+
if (!Array.isArray(object.categories))
|
|
14650
|
+
throw TypeError(".ContentfulOrderedCategoriesCreated.categories: array expected");
|
|
14651
|
+
message.categories = [];
|
|
14652
|
+
for (var i = 0; i < object.categories.length; ++i) {
|
|
14653
|
+
if (typeof object.categories[i] !== "object")
|
|
14654
|
+
throw TypeError(".ContentfulOrderedCategoriesCreated.categories: object expected");
|
|
14655
|
+
message.categories[i] = $root.contentful.SlugReference.fromObject(object.categories[i]);
|
|
14656
|
+
}
|
|
14657
|
+
}
|
|
14658
|
+
if (object.createdAt != null)
|
|
14659
|
+
if ($util.Long)
|
|
14660
|
+
(message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
|
|
14661
|
+
else if (typeof object.createdAt === "string")
|
|
14662
|
+
message.createdAt = parseInt(object.createdAt, 10);
|
|
14663
|
+
else if (typeof object.createdAt === "number")
|
|
14664
|
+
message.createdAt = object.createdAt;
|
|
14665
|
+
else if (typeof object.createdAt === "object")
|
|
14666
|
+
message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
|
|
14667
|
+
return message;
|
|
14668
|
+
};
|
|
14669
|
+
|
|
14670
|
+
/**
|
|
14671
|
+
* Creates a plain object from a ContentfulOrderedCategoriesCreated message. Also converts values to other types if specified.
|
|
14672
|
+
* @function toObject
|
|
14673
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14674
|
+
* @static
|
|
14675
|
+
* @param {ContentfulOrderedCategoriesCreated} message ContentfulOrderedCategoriesCreated
|
|
14676
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14677
|
+
* @returns {Object.<string,*>} Plain object
|
|
14678
|
+
*/
|
|
14679
|
+
ContentfulOrderedCategoriesCreated.toObject = function toObject(message, options) {
|
|
14680
|
+
if (!options)
|
|
14681
|
+
options = {};
|
|
14682
|
+
var object = {};
|
|
14683
|
+
if (options.arrays || options.defaults)
|
|
14684
|
+
object.categories = [];
|
|
14685
|
+
if (options.defaults) {
|
|
14686
|
+
object.slug = "";
|
|
14687
|
+
object.topic = null;
|
|
14688
|
+
if ($util.Long) {
|
|
14689
|
+
var long = new $util.Long(0, 0, true);
|
|
14690
|
+
object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14691
|
+
} else
|
|
14692
|
+
object.createdAt = options.longs === String ? "0" : 0;
|
|
14693
|
+
}
|
|
14694
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14695
|
+
object.slug = message.slug;
|
|
14696
|
+
if (message.topic != null && message.hasOwnProperty("topic"))
|
|
14697
|
+
object.topic = $root.contentful.SlugReference.toObject(message.topic, options);
|
|
14698
|
+
if (message.categories && message.categories.length) {
|
|
14699
|
+
object.categories = [];
|
|
14700
|
+
for (var j = 0; j < message.categories.length; ++j)
|
|
14701
|
+
object.categories[j] = $root.contentful.SlugReference.toObject(message.categories[j], options);
|
|
14702
|
+
}
|
|
14703
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14704
|
+
if (typeof message.createdAt === "number")
|
|
14705
|
+
object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
|
|
14706
|
+
else
|
|
14707
|
+
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;
|
|
14708
|
+
return object;
|
|
14709
|
+
};
|
|
14710
|
+
|
|
14711
|
+
/**
|
|
14712
|
+
* Converts this ContentfulOrderedCategoriesCreated to JSON.
|
|
14713
|
+
* @function toJSON
|
|
14714
|
+
* @memberof ContentfulOrderedCategoriesCreated
|
|
14715
|
+
* @instance
|
|
14716
|
+
* @returns {Object.<string,*>} JSON object
|
|
14717
|
+
*/
|
|
14718
|
+
ContentfulOrderedCategoriesCreated.prototype.toJSON = function toJSON() {
|
|
14719
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
14720
|
+
};
|
|
14721
|
+
|
|
14722
|
+
return ContentfulOrderedCategoriesCreated;
|
|
14723
|
+
})();
|
|
14724
|
+
|
|
14725
|
+
$root.ContentfulOrderedCategoriesUpdated = (function() {
|
|
14726
|
+
|
|
14727
|
+
/**
|
|
14728
|
+
* Properties of a ContentfulOrderedCategoriesUpdated.
|
|
14729
|
+
* @exports IContentfulOrderedCategoriesUpdated
|
|
14730
|
+
* @interface IContentfulOrderedCategoriesUpdated
|
|
14731
|
+
* @property {string|null} [slug] ContentfulOrderedCategoriesUpdated slug
|
|
14732
|
+
* @property {contentful.ISlugReference|null} [topic] ContentfulOrderedCategoriesUpdated topic
|
|
14733
|
+
* @property {Array.<contentful.ISlugReference>|null} [categories] ContentfulOrderedCategoriesUpdated categories
|
|
14734
|
+
* @property {number|Long|null} [updatedAt] ContentfulOrderedCategoriesUpdated updatedAt
|
|
14735
|
+
*/
|
|
14736
|
+
|
|
14737
|
+
/**
|
|
14738
|
+
* Constructs a new ContentfulOrderedCategoriesUpdated.
|
|
14739
|
+
* @exports ContentfulOrderedCategoriesUpdated
|
|
14740
|
+
* @classdesc Represents a ContentfulOrderedCategoriesUpdated.
|
|
14741
|
+
* @implements IContentfulOrderedCategoriesUpdated
|
|
14742
|
+
* @constructor
|
|
14743
|
+
* @param {IContentfulOrderedCategoriesUpdated=} [properties] Properties to set
|
|
14744
|
+
*/
|
|
14745
|
+
function ContentfulOrderedCategoriesUpdated(properties) {
|
|
14746
|
+
this.categories = [];
|
|
14747
|
+
if (properties)
|
|
14748
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14749
|
+
if (properties[keys[i]] != null)
|
|
14750
|
+
this[keys[i]] = properties[keys[i]];
|
|
14751
|
+
}
|
|
14752
|
+
|
|
14753
|
+
/**
|
|
14754
|
+
* ContentfulOrderedCategoriesUpdated slug.
|
|
14755
|
+
* @member {string} slug
|
|
14756
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14757
|
+
* @instance
|
|
14758
|
+
*/
|
|
14759
|
+
ContentfulOrderedCategoriesUpdated.prototype.slug = "";
|
|
14760
|
+
|
|
14761
|
+
/**
|
|
14762
|
+
* ContentfulOrderedCategoriesUpdated topic.
|
|
14763
|
+
* @member {contentful.ISlugReference|null|undefined} topic
|
|
14764
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14765
|
+
* @instance
|
|
14766
|
+
*/
|
|
14767
|
+
ContentfulOrderedCategoriesUpdated.prototype.topic = null;
|
|
14768
|
+
|
|
14769
|
+
/**
|
|
14770
|
+
* ContentfulOrderedCategoriesUpdated categories.
|
|
14771
|
+
* @member {Array.<contentful.ISlugReference>} categories
|
|
14772
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14773
|
+
* @instance
|
|
14774
|
+
*/
|
|
14775
|
+
ContentfulOrderedCategoriesUpdated.prototype.categories = $util.emptyArray;
|
|
14776
|
+
|
|
14777
|
+
/**
|
|
14778
|
+
* ContentfulOrderedCategoriesUpdated updatedAt.
|
|
14779
|
+
* @member {number|Long} updatedAt
|
|
14780
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14781
|
+
* @instance
|
|
14782
|
+
*/
|
|
14783
|
+
ContentfulOrderedCategoriesUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
14784
|
+
|
|
14785
|
+
/**
|
|
14786
|
+
* Creates a new ContentfulOrderedCategoriesUpdated instance using the specified properties.
|
|
14787
|
+
* @function create
|
|
14788
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14789
|
+
* @static
|
|
14790
|
+
* @param {IContentfulOrderedCategoriesUpdated=} [properties] Properties to set
|
|
14791
|
+
* @returns {ContentfulOrderedCategoriesUpdated} ContentfulOrderedCategoriesUpdated instance
|
|
14792
|
+
*/
|
|
14793
|
+
ContentfulOrderedCategoriesUpdated.create = function create(properties) {
|
|
14794
|
+
return new ContentfulOrderedCategoriesUpdated(properties);
|
|
14795
|
+
};
|
|
14796
|
+
|
|
14797
|
+
/**
|
|
14798
|
+
* Encodes the specified ContentfulOrderedCategoriesUpdated message. Does not implicitly {@link ContentfulOrderedCategoriesUpdated.verify|verify} messages.
|
|
14799
|
+
* @function encode
|
|
14800
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14801
|
+
* @static
|
|
14802
|
+
* @param {IContentfulOrderedCategoriesUpdated} message ContentfulOrderedCategoriesUpdated message or plain object to encode
|
|
14803
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14804
|
+
* @returns {$protobuf.Writer} Writer
|
|
14805
|
+
*/
|
|
14806
|
+
ContentfulOrderedCategoriesUpdated.encode = function encode(message, writer) {
|
|
14807
|
+
if (!writer)
|
|
14808
|
+
writer = $Writer.create();
|
|
14809
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14810
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
|
|
14811
|
+
if (message.topic != null && message.hasOwnProperty("topic"))
|
|
14812
|
+
$root.contentful.SlugReference.encode(message.topic, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
14813
|
+
if (message.categories != null && message.categories.length)
|
|
14814
|
+
for (var i = 0; i < message.categories.length; ++i)
|
|
14815
|
+
$root.contentful.SlugReference.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
14816
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
14817
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.updatedAt);
|
|
14818
|
+
return writer;
|
|
14819
|
+
};
|
|
14820
|
+
|
|
14821
|
+
/**
|
|
14822
|
+
* Encodes the specified ContentfulOrderedCategoriesUpdated message, length delimited. Does not implicitly {@link ContentfulOrderedCategoriesUpdated.verify|verify} messages.
|
|
14823
|
+
* @function encodeDelimited
|
|
14824
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14825
|
+
* @static
|
|
14826
|
+
* @param {IContentfulOrderedCategoriesUpdated} message ContentfulOrderedCategoriesUpdated message or plain object to encode
|
|
14827
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
14828
|
+
* @returns {$protobuf.Writer} Writer
|
|
14829
|
+
*/
|
|
14830
|
+
ContentfulOrderedCategoriesUpdated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
14831
|
+
return this.encode(message, writer).ldelim();
|
|
14832
|
+
};
|
|
14833
|
+
|
|
14834
|
+
/**
|
|
14835
|
+
* Decodes a ContentfulOrderedCategoriesUpdated message from the specified reader or buffer.
|
|
14836
|
+
* @function decode
|
|
14837
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14838
|
+
* @static
|
|
14839
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14840
|
+
* @param {number} [length] Message length if known beforehand
|
|
14841
|
+
* @returns {ContentfulOrderedCategoriesUpdated} ContentfulOrderedCategoriesUpdated
|
|
14842
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14843
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14844
|
+
*/
|
|
14845
|
+
ContentfulOrderedCategoriesUpdated.decode = function decode(reader, length) {
|
|
14846
|
+
if (!(reader instanceof $Reader))
|
|
14847
|
+
reader = $Reader.create(reader);
|
|
14848
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulOrderedCategoriesUpdated();
|
|
14849
|
+
while (reader.pos < end) {
|
|
14850
|
+
var tag = reader.uint32();
|
|
14851
|
+
switch (tag >>> 3) {
|
|
14852
|
+
case 1:
|
|
14853
|
+
message.slug = reader.string();
|
|
14854
|
+
break;
|
|
14855
|
+
case 2:
|
|
14856
|
+
message.topic = $root.contentful.SlugReference.decode(reader, reader.uint32());
|
|
14857
|
+
break;
|
|
14858
|
+
case 3:
|
|
14859
|
+
if (!(message.categories && message.categories.length))
|
|
14860
|
+
message.categories = [];
|
|
14861
|
+
message.categories.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
|
|
14862
|
+
break;
|
|
14863
|
+
case 4:
|
|
14864
|
+
message.updatedAt = reader.uint64();
|
|
14865
|
+
break;
|
|
14866
|
+
default:
|
|
14867
|
+
reader.skipType(tag & 7);
|
|
14868
|
+
break;
|
|
14869
|
+
}
|
|
14870
|
+
}
|
|
14871
|
+
return message;
|
|
14872
|
+
};
|
|
14873
|
+
|
|
14874
|
+
/**
|
|
14875
|
+
* Decodes a ContentfulOrderedCategoriesUpdated message from the specified reader or buffer, length delimited.
|
|
14876
|
+
* @function decodeDelimited
|
|
14877
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14878
|
+
* @static
|
|
14879
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14880
|
+
* @returns {ContentfulOrderedCategoriesUpdated} ContentfulOrderedCategoriesUpdated
|
|
14881
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14882
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14883
|
+
*/
|
|
14884
|
+
ContentfulOrderedCategoriesUpdated.decodeDelimited = function decodeDelimited(reader) {
|
|
14885
|
+
if (!(reader instanceof $Reader))
|
|
14886
|
+
reader = new $Reader(reader);
|
|
14887
|
+
return this.decode(reader, reader.uint32());
|
|
14888
|
+
};
|
|
14889
|
+
|
|
14890
|
+
/**
|
|
14891
|
+
* Verifies a ContentfulOrderedCategoriesUpdated message.
|
|
14892
|
+
* @function verify
|
|
14893
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14894
|
+
* @static
|
|
14895
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
14896
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14897
|
+
*/
|
|
14898
|
+
ContentfulOrderedCategoriesUpdated.verify = function verify(message) {
|
|
14899
|
+
if (typeof message !== "object" || message === null)
|
|
14900
|
+
return "object expected";
|
|
14901
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14902
|
+
if (!$util.isString(message.slug))
|
|
14903
|
+
return "slug: string expected";
|
|
14904
|
+
if (message.topic != null && message.hasOwnProperty("topic")) {
|
|
14905
|
+
var error = $root.contentful.SlugReference.verify(message.topic);
|
|
14906
|
+
if (error)
|
|
14907
|
+
return "topic." + error;
|
|
14908
|
+
}
|
|
14909
|
+
if (message.categories != null && message.hasOwnProperty("categories")) {
|
|
14910
|
+
if (!Array.isArray(message.categories))
|
|
14911
|
+
return "categories: array expected";
|
|
14912
|
+
for (var i = 0; i < message.categories.length; ++i) {
|
|
14913
|
+
var error = $root.contentful.SlugReference.verify(message.categories[i]);
|
|
14914
|
+
if (error)
|
|
14915
|
+
return "categories." + error;
|
|
14916
|
+
}
|
|
14917
|
+
}
|
|
14918
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
14919
|
+
if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
|
|
14920
|
+
return "updatedAt: integer|Long expected";
|
|
14921
|
+
return null;
|
|
14922
|
+
};
|
|
14923
|
+
|
|
14924
|
+
/**
|
|
14925
|
+
* Creates a ContentfulOrderedCategoriesUpdated message from a plain object. Also converts values to their respective internal types.
|
|
14926
|
+
* @function fromObject
|
|
14927
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14928
|
+
* @static
|
|
14929
|
+
* @param {Object.<string,*>} object Plain object
|
|
14930
|
+
* @returns {ContentfulOrderedCategoriesUpdated} ContentfulOrderedCategoriesUpdated
|
|
14931
|
+
*/
|
|
14932
|
+
ContentfulOrderedCategoriesUpdated.fromObject = function fromObject(object) {
|
|
14933
|
+
if (object instanceof $root.ContentfulOrderedCategoriesUpdated)
|
|
14934
|
+
return object;
|
|
14935
|
+
var message = new $root.ContentfulOrderedCategoriesUpdated();
|
|
14936
|
+
if (object.slug != null)
|
|
14937
|
+
message.slug = String(object.slug);
|
|
14938
|
+
if (object.topic != null) {
|
|
14939
|
+
if (typeof object.topic !== "object")
|
|
14940
|
+
throw TypeError(".ContentfulOrderedCategoriesUpdated.topic: object expected");
|
|
14941
|
+
message.topic = $root.contentful.SlugReference.fromObject(object.topic);
|
|
14942
|
+
}
|
|
14943
|
+
if (object.categories) {
|
|
14944
|
+
if (!Array.isArray(object.categories))
|
|
14945
|
+
throw TypeError(".ContentfulOrderedCategoriesUpdated.categories: array expected");
|
|
14946
|
+
message.categories = [];
|
|
14947
|
+
for (var i = 0; i < object.categories.length; ++i) {
|
|
14948
|
+
if (typeof object.categories[i] !== "object")
|
|
14949
|
+
throw TypeError(".ContentfulOrderedCategoriesUpdated.categories: object expected");
|
|
14950
|
+
message.categories[i] = $root.contentful.SlugReference.fromObject(object.categories[i]);
|
|
14951
|
+
}
|
|
14952
|
+
}
|
|
14953
|
+
if (object.updatedAt != null)
|
|
14954
|
+
if ($util.Long)
|
|
14955
|
+
(message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
|
|
14956
|
+
else if (typeof object.updatedAt === "string")
|
|
14957
|
+
message.updatedAt = parseInt(object.updatedAt, 10);
|
|
14958
|
+
else if (typeof object.updatedAt === "number")
|
|
14959
|
+
message.updatedAt = object.updatedAt;
|
|
14960
|
+
else if (typeof object.updatedAt === "object")
|
|
14961
|
+
message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
|
|
14962
|
+
return message;
|
|
14963
|
+
};
|
|
14964
|
+
|
|
14965
|
+
/**
|
|
14966
|
+
* Creates a plain object from a ContentfulOrderedCategoriesUpdated message. Also converts values to other types if specified.
|
|
14967
|
+
* @function toObject
|
|
14968
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
14969
|
+
* @static
|
|
14970
|
+
* @param {ContentfulOrderedCategoriesUpdated} message ContentfulOrderedCategoriesUpdated
|
|
14971
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14972
|
+
* @returns {Object.<string,*>} Plain object
|
|
14973
|
+
*/
|
|
14974
|
+
ContentfulOrderedCategoriesUpdated.toObject = function toObject(message, options) {
|
|
14975
|
+
if (!options)
|
|
14976
|
+
options = {};
|
|
14977
|
+
var object = {};
|
|
14978
|
+
if (options.arrays || options.defaults)
|
|
14979
|
+
object.categories = [];
|
|
14980
|
+
if (options.defaults) {
|
|
14981
|
+
object.slug = "";
|
|
14982
|
+
object.topic = null;
|
|
14983
|
+
if ($util.Long) {
|
|
14984
|
+
var long = new $util.Long(0, 0, true);
|
|
14985
|
+
object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14986
|
+
} else
|
|
14987
|
+
object.updatedAt = options.longs === String ? "0" : 0;
|
|
14988
|
+
}
|
|
14989
|
+
if (message.slug != null && message.hasOwnProperty("slug"))
|
|
14990
|
+
object.slug = message.slug;
|
|
14991
|
+
if (message.topic != null && message.hasOwnProperty("topic"))
|
|
14992
|
+
object.topic = $root.contentful.SlugReference.toObject(message.topic, options);
|
|
14993
|
+
if (message.categories && message.categories.length) {
|
|
14994
|
+
object.categories = [];
|
|
14995
|
+
for (var j = 0; j < message.categories.length; ++j)
|
|
14996
|
+
object.categories[j] = $root.contentful.SlugReference.toObject(message.categories[j], options);
|
|
14997
|
+
}
|
|
14998
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
14999
|
+
if (typeof message.updatedAt === "number")
|
|
15000
|
+
object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
|
|
15001
|
+
else
|
|
15002
|
+
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;
|
|
15003
|
+
return object;
|
|
15004
|
+
};
|
|
15005
|
+
|
|
15006
|
+
/**
|
|
15007
|
+
* Converts this ContentfulOrderedCategoriesUpdated to JSON.
|
|
15008
|
+
* @function toJSON
|
|
15009
|
+
* @memberof ContentfulOrderedCategoriesUpdated
|
|
15010
|
+
* @instance
|
|
15011
|
+
* @returns {Object.<string,*>} JSON object
|
|
15012
|
+
*/
|
|
15013
|
+
ContentfulOrderedCategoriesUpdated.prototype.toJSON = function toJSON() {
|
|
15014
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
15015
|
+
};
|
|
15016
|
+
|
|
15017
|
+
return ContentfulOrderedCategoriesUpdated;
|
|
15018
|
+
})();
|
|
15019
|
+
|
|
13850
15020
|
$root.ContentfulContentModelCreated = (function() {
|
|
13851
15021
|
|
|
13852
15022
|
/**
|