@@ -88,6 +88,8 @@ class InitialSnapshot {
8888 /// Search for "realm_wildcard_mention_policy" in https://zulip.com/api/register-queue.
8989 final RealmWildcardMentionPolicy realmWildcardMentionPolicy;
9090
91+ final RealmTopicsPolicy realmTopicsPolicy;
92+
9193 final bool realmMandatoryTopics;
9294
9395 final String realmName;
@@ -180,6 +182,7 @@ class InitialSnapshot {
180182 required this .realmCanDeleteOwnMessageGroup,
181183 required this .realmDeleteOwnMessagePolicy,
182184 required this .realmWildcardMentionPolicy,
185+ required this .realmTopicsPolicy,
183186 required this .realmMandatoryTopics,
184187 required this .realmName,
185188 required this .realmWaitingPeriodThreshold,
@@ -204,6 +207,22 @@ class InitialSnapshot {
204207 Map <String , dynamic > toJson () => _$InitialSnapshotToJson (this );
205208}
206209
210+ /// A value of [InitialSnapshot.realmTopicsPolicy] .
211+ ///
212+ /// For docs, search for "realm_topics_policy"
213+ /// in <https://zulip.com/api/register-queue#response>.
214+ @JsonEnum (fieldRename: FieldRename .snake)
215+ enum RealmTopicsPolicy {
216+ allowEmptyTopic,
217+ disableEmptyTopic;
218+
219+ static RealmTopicsPolicy fromRawString (String raw) => _byRawString[raw] ?? allowEmptyTopic;
220+
221+ static final _byRawString = _$RealmTopicsPolicyEnumMap .map ((key, value) => MapEntry (value, key));
222+
223+ String toJson () => _$RealmTopicsPolicyEnumMap [this ]! ;
224+ }
225+
207226@JsonEnum (valueField: 'apiValue' )
208227enum RealmWildcardMentionPolicy {
209228 everyone (apiValue: 1 ),
0 commit comments